You are on page 1of 11
DESIGN AND ANALYSIS OF CNC SYSTEMS ‘The parameters of the closed-loop transfer function Ga(z) are given as follows iy — ARIAS Ob aba) +b(@1 = 1) +00 =, Ke KK Ki ky ey = ABB 6 40 65) + (ay —a1) a0, b _RKKiKy 9 y 09 = SRS by ~ ba Ki Ke Ka Ky b y= Rie Ra Kobe ‘The transfer function (Eq. 6.30) can be expressed by the use of the backward time shift operator z~! by multiplying both numerator and denominator by 2~* ‘This gives 1+ BaeW? + B2~® + Boe Ky 2 fe 6.31 ST age age Faye? + age wean Gae = Note that the 2~! backward time shift operator acts on the discrete signal as, 2x(kT) = xk DTI. where T is the discrete sampling time interval and x(kT) is the diserete value of x at sampling interval number &. For any given discrete time input X,(k1'), the position response X,(#T) can be found by rearranging the transfer function Gy(z~*) as follows: Tage? + a2"? + aoe Kale) Xe + Kae} + Bea? + Bre + foo ). (6.32) ‘The discrete time response of the position servo can be simulated by tak- ing the inverse z~' transform of Eq. (6.32). The resulting difference equation contains the discrete history of input and the past history of output position values. ‘Note that the position control loop can be analyzed in the continuous time (8) domain as an alternative to the discrete time (2) domain analysis. However, this, approach requires approximating the digital filter (D(z)) in the s domain. One of the widely used approximations is z = (1 + s7/2)/(1—sT/2), which is called 6.3 TRANSFER FUNCTION OF THE POSITION LOOP. ‘Tustin’s bilinear transformation. The corresponding digital filter becomes +a — D6) = Keto. (633) where l-a 21+b Be Boy ~TI-8 Ty 2 “THF? In this case, the closed-loop transfer function of the position loop in Laplace domain becomes D(s)KaGels) OO) = RAED (6.34) Following Error in CNC Systems ‘There are two critical performance requirements from the feed drive servo. ‘The first is to obtain a smooth transient response to avoid an oscillatory tool path during velocity changes; the second is to minimize the steady-state posi- tion error, the following error, to achieve precision multiaxis contouring, At steady-state contouring with a feeding velocity f. (counts/s), the reference posi- tion is expressed as a ramp type input as follws: XRT) = fe kT, (6.35) where & is the sampling counter. In the 2 domain, the ramp command is expressed as X= (636) @-1)? ‘The corresponding following error is then derived as time? _ 23 @-DDOGe Substituting Eqs. 6.26), (6.29), and (6.35) into Eq, (6.37) gives the paramet- ric expression for the following error in the feed drives as [Ko +b) © KKEKG +a) It is evident that the higher the open-loop transfer funetion gain is (i.e., D(z)Ge(2)), the smaller the following error will be, which is desired for accurate ‘multiaxis contouring operations. However, high open-loop gain is limited by the inertia of the mechanical drive system and the limits of motor torque ‘and amplifier. The control engineer must tune the digital control (i.e. filter) parameters to achieve an optimum feed drive servoresponse without causing any oscillation or overshoot: e «a7) e (6.38) 267 DESIGN AND ANALYSIS OF CNC SYSTEMS ‘The steady-state error can also be estimated by the use of the continuous time domain transfer functions as fe 23°2DORGe ee) where Ge(s) and D(s) are given in Eqs. (6.28) and (6.38). 6.4 STATE SPACE MODEL OF FEED DRIVE CONTROL SYSTEMS Astate space model for the feed drive servo is used to verify the derived model by using experimentally measured time domain response data. The servo is again divided into continuous and discrete sections for state space modeling [80) ‘The continuous part of the system consists of the velocity control loop (Bq. 6.28) and the up-down counter (Eq. 6.24). Three states ~ the armature current I,, the angular velocity », and the actual position X, — are derived as follows: From Figure 6.4, the armature voltage can be expressed as, Vy = KilK(S:Ve ~ TyHyo) — Kola] 6.40) Substituting Eq, (6.12) into (6.40) yields dl, KK 4 Ry, Ket KART, a 7 TL. (6.41) Eliminating the motor torque T,, by substituting Eq. (6.13) into Eq. (6.14) gives de do t 42) & 6 ‘The inverse Laplace transform of the transfer function of the up-down counter and the encoder (Eq. 6.24) gives dX) = K,-wlt) (6.43) dt ‘The state equations (6.41-6.43) can be organized in a standard state space form as follws: elt) = Ae xelt) + Be welt), (6.44) where the state vector (xe(¢)) and the input vector (ue(¢)) are defined as A(t) ] wtye [oo |. aoe X(t) | “ 6.4 STATE SPACE MODEL OF FEED DRIVE CONTROL SYSTEMS 269 and A, and B, are constant matrices as follows: ‘The state equation (6.44) represents the continuous part of the feed drive servosystem, which has the following discrete equivalent solution for an obser- vation interval of T [80] xe(he+ 1) = (1) x(k) + H(L) wel), (6.45) where the state and input vectors at sampling interval k are defined as x ih) aw=| om |. w=[], ie | me) OT) = eT = | dor dan don ou biz | Lon dae da] [hs I Mdt-Be= | hor hw List hse ‘The matrix (7) is computed from the eigenvalues of the A, matrix or its ‘Taylor series expansion for the discrete-time equivalent of the continuous-time system. Because the sampling interval (7) is small, the first three terms of the following Taylor series approximation may be sufficient for most applications: r ete OP) =A = IN IAI + TAP + (6.46) ‘The discrete-time components of the position control loop consists of digital filter D(@) and D/A converter gain Kg. The velocity command signal can be expressed in the z domain as. za Volk) = By ‘The equation can be rearranged as Ve(h) = Ky Ka [Xe(k) —X,(8)1 + Valk), (6.48) Ky eth) —Xa(h)] (6.47) 270 DESIGN AND ANALYSIS OF CNC SYSTEMS where Vath) = Ky Ky 2? 1Xth) — X01 (6.49) ‘The new variables V; and V, can be treated as a fourth state, After rearrang- ing Eqs. (649) and (6.47) and taking their inverse z transforms, we obtain the following discrete-time state equations Valk + 1) = ~b Va(h) + Kp Kg (a ~ b) Xe (h) —X(h)], Ve(h) = Ky Ka (Xy(h) — Xo(h)] + Vath) (6.50) ‘The discrete-time state equation (6.50) can be combined with the state equation (6.45), which represents the discrete-time equivalent of the continuous part of the feed drive servo. An algebraic rearrangement yields the following complete state equations for the feed drive servo: x(k +1) = GT) -x(k) + P(7) wh), y(k) = Cy x(k) + Dy - uk), (Gan where the state, input, and output vectors are defined, respectively, as Vath) ‘Vetk) _| na _ px) _ |e w= |B | wey = [EP]. 9) = | Xk) | Xa(h) ‘The state matrix G(T), input matrix (7), output matrix C, and transmission matrix D, are defined in order as follows: —b 0 0 =K,Ky(a-b) Far ou 12 1a far KyKa har da bx das — haiKyKa har os és 3s — hei KyKa ar) K,Kya—b) 0 hiKyKe Inn PO) = | eK hel haKeKe hse jl 0 0 Kya K, Ka 0 o10 0 0 0 G=loo1 0 | B=lo o looo 1 0 0 The output vector y(2) gives access to three useful dynamic parameters in the feed drive servo; namely, the armature current, the angular velocity, and the position of the table for a given position command and applied cutting torque. Other states in the control system can be easily found by multiplying them with the appropriate gains according to the block diagram shown in Figure 6.4. 6.4 STATE SPACE MODEL OF FEED DRIVE CONTROL SYSTEMS Example: Feed Drive Control System Design for a Vertical Milling Machine. A three- axis vertical research milling machine was retrofitted at the author's labora- tory at the University of British Columbia. The retrofitted machine tool has a 5kW ac motor connected to a spindle gear box. The three feeding axes (x, y, and 2) of the machine have recirculating ballserew drives with 60-, 40- ‘and 12-cm travel limits. All three axes are driven by permanent magnet de servomotors powered by PWM amplifiers. The motors, which are directly con- nected to the leadscrew shafts, have an 11ms mechanical (without table) time constant and a 5 ms electrical time constant, and the amplifiers have 30 peak and 15A continuous current delivery capacity, The amplifiers are the same type as explained in Section 6.2.4 A personal computer (PC) is used as a master CNC. A 32-bit digital signal- processing board (DSP) with a three-axis motion control module is used to con- trol positions of the three linear axes of the machine. Both cards reside in the PC bus. The motion control eard has 24-bit programmable digital input/output (VO) lines for logic control functions. Coolant, spindle, travel limit, emergency relay, ete. logic control signals are wired to the /O lines to control auxiliary functions of the machine tool. The real-time linear, circular, and spline inter- polation algorithms, and the position control of all axes, aro executed in the DSP board. The discrete position commands are sent to the VO board, which converts them into analog signal voltage via 16-bit dedicated D/A converters and sends them to the servoamplifiers. The /O board and the real-time inter- polation and control codes have been developed in the author's laboratory. Additional sensor-based intelligent machining process monitoring and control ‘modules ean be added to tho CNC, which was designed with an open software and hardware architecture as explained in Chapter Seven. The machine tool can be used as a standard CNC machine by loading an in-house developed 180 NC language emulator into the PC. Feed, acceleration, deceleration, and digital filter parameters can be changed in real time by sending the desired values from the PC to the motion control unit [11]. This feature is particu- larly important and essential for adaptive control and machine tool monitoring tasks. ‘The block diagram of the control system is the same as shown in Figure 6.4 ‘The constants of the de motor, gains, and digital filter parameters are given in Table 6.1. The parameters of the velocity and position loop transfer fune- tions [19] are calculated from Eqs. (6.19), (6.29), and (6.30) and are given in Table 6.2, ‘The calculated damping ratio and the natural frequencies ofthe velocity loop are found to be Wy = VK = 554 (rad/s) = 88 Hz, Ky = 0.8384, by an 272 DESIGN AND ANALYSIS OF CNC SYSTEMS ‘The step response of the velocity loop is TABLE 6.1. Parameters of Feed Drive obtained by applying V. = 1.0 V to the ter- ca minals of the amplifier and simultaneously B 0.09. Nmfradls) measuring the velocity from the tachogener- 4, 9087, Viel ater. The simulated stp response (Bq, 6:2) SEG can of the velocity control servo is shown in Fig- sea) ure 6.7. The system seems to reach to the K, 0.00488 Vieount command velocity at about 10ms without K, 696.62 countalrad/s) any overshoot. The frequency response ofthe K 55MN velocity loop is analyzed to determine the 592038 Sania rte contol. The magnitude Ko 03Nm/A ratio (M(a)) and the phase angle ($(0)) of L, 2mH the closed velocity loop can be derived from R 04a Eq, (6.19) as follows: S, 00648 T; 0.13183 VV M(o) = 20logiKi/Ks) a -07161 as a 5 06681 = 20log[ Cl - w?/of)? + 2ker/on)*] > 508mm . Continuous current supply ~ 15.4 (6.52) Peak current supply = 30 A (6.53) ‘The frequency response of the velocity loop can be measured with a two- channel Fourier analyzer. The analyzer's random signal generator output is fed to the input terminal of the amplifier, and the velocity is measured from the tachogenerator output. Alternatively, harmonic (ic., sine wave) sig- nals at different frequencies can be given as an input, and the correspond- ing time delay (i.e., phase delay) and magnitude of the output can be mes- sured, The simulated frequency response results are shown in Figure 6.7. ‘The results indicate that the servo seems to be able to follow feeding veloc ity changes up to 40 Hz (250 rad/s), which is the bandwidth of the velocity loop. ‘TABLE 62, Calculated Parameters ofthe Feed Drive Transfer Function 5102-108 Ky 077-108 40681. 10-* 25539. 10-* to =0.261 644 STATE SPACE MODEL OF FEED DRIVE CONTROL SYSTEMS 273 Step response [rad/s] Magnitude [rad/s/V] [des] g “Phage & Frequency (Hz) Figure 6.7: Stop and frequency response ofthe feed drive's velocity loop In addition to the velocity loop, the position loop consists of an encoder, digital filter, and integrator (i.e., up-down counter). These are mostly digital and their transfer functions are known (see Fig. 6.4). The digital filter is tuned in such a way that the overall closed-loop position control system behaves like a second-order system with a rise time of f, = 30ms and an overshoot of M, =0.1%. The following digital filter was identified: 2-0.7161 D(z) = 9.2038 Dee) = 9.2038 == ‘The calculated values of the state space parameters of the system are ary =A"—|0.0515 0.8718 0 fo.sa7a -2.1160 0 Lo.o1s4 0.6049 1 n@)= f° AMdt-B=| 0.5592 —0.2690 fi.s754 0.3481 Lo.z71 —0.0859 278 DESIGN AND ANALYSIS OF CNC SYSTEMS 0.6681 0 0 0.0022 Ger) =| 143754 09274 -2.1160 -05112 | 0.5682 0.0515 0.8718 -0.0249 | 0.1271 0.0194 0.6049 0.9943 | 0.0022 0 rir) =| 0512 0.8481 0.0249 —0.2639 0.0057 | —0.0859 1 0 0 -0.0449" 0.0449 0 o10 0 o 0 oo1 0 | P=) 0 0 ooo 1 o 0 ‘The steady-state position error can be calculated by substituting the ser- voparameter values in Eq. (6.7); thus, se = 0.0083 f. [counts] ‘The step, ramp, and frequency response of the digital position control loop are shown in Figure 6.8, ‘Measurements across a range of velocities showed that the steady-state error is not quite linear; this is mainly due to the effect of the static friction disturbance and unmodeled part of the dynamics. An average coefficient of friction is used for a general analysis and tuning of the positional control systems. However, for precision contouring, the influence of the static friction must be compensated by a more advanced control law than the simple digital filter presented in this text. Example 9. A single-axis ballscrew-driven table is used in teaching identi- fication and digital control, principles as shown in Figure 6.9, Develop the state space model of the system, and simulate the step and ramp input response, Ballscrow Table Parameters Bacoder gain Kacountirad/s) Current amplifier proportional gain Koy (VIN) Equivalent inertia Te ag 2) Current amplifier integral gain Ki (VV) Equivalent viscous damping Navirad/e) Current command iW) Disturbance torque Ty (mn) Velacty amplifier proportional gain Kip (WIV) Motor toraue Tn (Nm) Ku (WN) Motor inductance Lin) (VIA) Motor resistance Ro) 5, (WN) Back eleccrometor constant Ki, (Wiradls)_—_Mator torque constant K, mv/a) Angular velocity ofballserow wo (rad/) ‘Transfor function of controler Gus) Velocity feedback gain T,(Vieountls) Position command (counts) Measured position a (counts) 644 STATE SPACE MODEL OF FEED DRIVE CONTROL SYSTEMS 275 Table of Transfer Function Blocks Encoder wo =x) Mechanical system On —Tabg = 009) Electrical winding of the motor (V, ~ Kia) aby = (8) Current PL amplifier (in — Ky (Kop + ©) = Vi) Velocity PI amplifier (S:Ve— ©) (Kip + ) = ints) Position error controller G, —2)G.(6) = Vols) Motor electrical winding and mechanical system can be modeled as follows: des do_ BK, 1 “en IG +Bo=Ki-Te > B= S04 i Fle (6.54) di di_ K&R “easy 1G, tRI=Vi— Kuo > F = -Bo Fit TV 6.55 Figure 6.8: Stop, ramp, and frequency reeponse ofthe feod drive's position loop. ‘000 Tiput— 7 }— Ramp response g 5) | 0002 004 008 008 01 O12 014 016 018 02 S Time (s) & g Phase [deg] Frequency (H2) 276 DESIGN AND ANALYSIS OF CNC SYSTEMS igure 6.9: A ballscrow drive system used for teashing CNC design, PI Current Loop ) = Kp ia — Kai) + Ki in Kai) (6.56) Le gy, cst) =f kG 6.57) Vi = Kip ia — Kai) + Kien 6.58) PI Velocity Loop in = (8;Ve - 0) (Kin Auxiliary state zy = + (6,V, —a) > =8,v,-0 (6.60) 3 a ig = Kip (SWe—0) + Kies 661) Rewriting the equation for $1 and ¥; by substituting ig 41 Ki -K,(8,V.—0) + Kun — 2) SF = ia ~ Koi = Kip (SWVe ~ 0) + Kut ~ Kyi 6.62) Vi = Kup (ia — Kai) + Kuti = Kop (Kip (SVe — 0) + Kuta ~ Kai) + Kun (6.63 Vi = KipKipS Ve — KepKipto + KopKita ~ KopKei + Kuen 6.64)

You might also like