Outline Servo Control Servo-Motor Drivers Control Modes orque Capability Servo-control Systems Direct/Indirect Control System Control Algorithm Implementation Controller Design by Emulation Discretization echniques PID Controller Cascade Controller De-facto Standard Controller Chapter 12 ME 551 2 Servo-Motor Drivers Most servo-motor drivers incorporate motion controllers that allow the user to control orque phase currents Speed Position Once theuser selects the control mode, the motor drivers must be connected to multi-ais controller unit industrial PC, motion control card etc.: Wiring configuration Setting motor parameters via Manually Control Panel / Memory Stick Software assistance Chapter 12 ME 551 3
orque Control Mode In this mode, the motor driver accurately regulates the motor phase currents in respect to the rotor s position namely, rotor magnetic flu linkage vector. Servo-motor acts like an ideal torque modulator to yield the electro-magnetic torque being demanded by the position control system. orque command is issued through an analog input usually a bipolar voltage. In precision motion control applications, this mode is frequently preffered. Chapter 12 ME 551 4 Velocity Control Mode Motor driver regulates the rotor s angular velocity. Relies on built-in incremental position encoder to measure velocity. Generally, a digital PI controller is employed to control the velocity. Velocity controller feeds torque commands to the current/torque regulator. User must upload the relevant gains and parameters of the hardwired controller to the driver. Velocity command is usually issued through an analog input. Use of control data buses such as CAN, SERCOS, Profibus, RS-485, etc. to send digital commands out to the driver is also common in industry. Chapter 12 ME 551 5
Position Control Mode Motor driver regulates the rotor s angular position. Motor driver again employs built-in incremental position encoder to measure position. Generally, a digital PID controller is utilized to control the position. Position controller feeds torque commands to the current/torque regulator. User must upload the relevant gains and parameters of the hardwired controller to the driver. For convenience, command is usually issued through two digital inputs i.e. direction and pulse. he servo-motor behaves like a position controlled stepper motor. Advanced drivers support data buses such as CAN, SERCOS, Profibus, RS-485, etc. to send/receive digital information. Chapter 12 ME 551 6 orque Capability A servo-motor s torque generation capability depends on its output shaft speed ω m. In constant torque region, maimum motor torque ma is limited by the rated one r provided that ω m < ω r rated speed. In constant power region, ma = rω r / ω m =P r / ω m. Chapter 12 ME 551 7
Indirect Control System Posi comm tion mand orq que comm mand Courtesy of Heidenhain Corp. Chapter 12 ME 551 8 Direct Control System Posi comm tion mand orq que comm mand Courtesy of Heidenhain Corp. Chapter 12 ME 551 9
Generic Servo-Control System Disturbance Command * k ek Control mk mt Drive mt t Feed Drive Generator Algorithm Motor Control lcomputer _ k Clock Synchronization Signal orque command voltage Position Sensor Motor torque Carriage's position In this direct control system, the position of the carriage is measured and sampled by this simplified control system. he command generator computes the desired position * of the carriage at a particular instant in time. Chapter 12 ME 551 10 Generic Control System Cont d he control algorithm first determines the deviation e = *- of the feed-drive di system from the desired d path and then calculates the corrective action m. he correction signal called manipulation is sent to the output interface digital-to-analog converter generating a corresponding voltage mt. his voltage serves as a torque command for the servomotor drive which in turns controls the motor currents to produce the desired torque. Hence, the generated torque τ m compensates the disturbance on the feed-drive system and puts the carriage back to its desired course. Chapter 12 ME 551 11
Computer Control Each physical quantity such as position measurement, error, etc. in the control system a.k.a. a control computer is represented by a corresponding binary number with a finite length: Byte / word Integer, long integer Floating point number etc. All computations and I/O operations are synchronized by a master clock. Chapter 12 ME 551 12 Computer Control Cont d Inside the computer, each quantity is valid at only discrete-time intervals: t = {0,, 2, 3,..., k,...} is called sampling period of the computer. In discrete-time domain, the time dependence among various quantities of interest are represented by a time inde: t=k = k = k where k = 0, 1, 2,... Integer k is called time inde. Chapter 12 ME 551 13
Control Algorithm Control algorithm can be epressed in terms of a finite difference equation. hat is, it is an algebraic epression which depends on not only the history of the input but also that of the output: I k = a im k i b je k m j i= 1 j= 0 a i,b j are the constant coefficients of the equation; mk current value of the output manipulation @ t = k; mk-1 is old value of m @ t = k-1,... ; ek current value of the input error @ t = k; ek-1 is old value of e @ t = k-1,... ; J Chapter 12 ME 551 14 Control Algorithm Cont d 1. Read * k from the interpolator. 2. Read the position measurement k. 3. Calculate the error: ek = * k - k. 4. Compute the correction signal: mk= -a 1 mk-1 a 2 mk-2 -... b 0 ek b 1 ek-1... 5. Send mk to the output t interface. 6. Wait till the end of the period. 7. Go to Step 1. Chapter 12 ME 551 15
Control Algorithm Cont d Read the mea asuremen nt C corr alculat rection te the n signa al Outp put the c signa orrectio al n Wa ait till the end of perio od, Read the mea asuremen nt ime Chapter 12 ME 551 16 Controller Design by Emulation A continuous-time time controller PI, PID, lead-lag is designed using classical control theory. An equivalent discrete-time controller is then developed via mapping discretization techniques. Sampling frequency must be at least 10 times higher than the bandwidth of the controlled system. Chapter 12 ME 551 17
Discretization Methods Cont d In control literature, t there eist various approimation techniques to convert ordinary differential equations conveniently into discrete-time forms without utilizing z- transforms. he methods discussed here approimate the time derivative d/dt in ODE using a corresponding difference equation: 1. Forward difference Euler s rule 2. Backward difference 3. rapezoidal integration ti rule Also known as ustin or bilinear transformation Chapter 12 ME 551 18 1 Forward Difference Utilizing the definition of derivative, we have d k 1 k k 1 k = dt k 1 k In terms of forward time-shift operator q: d q d q 1 k 1 dt dt Since d/dt corresponds to s variable while q operator is equivalent to z variable, one can write s z 1 he s-variable in the transfer function is conveniently replaced by this epression leading to a new transfer function of z: z 1 G z G s = Chapter 12 ME 551 19
2 Backward Difference Utilizing the definition of derivative, we get d k k 1 k k 1 = dt k k 1 In terms of backward time-shift operator q -1 : d dt 1 q 1 k d dt 1 q As d/dt corresponds to s variable while q -1 operator is equivalent to z -1 variable, we have s z 1 z he s-variable in the transfer function is to be replaced by this epression leading to a new transfer function of z: z 1 G z G s = z Chapter 12 ME 551 20 1 3 rapezoidal ustin Rule Let ut = d/dt. he trapezoidal integration rule leads to k 1 = k k 1 k = In terms of q: 2 2 q 1 k = q 1 u k 2 d u k = dt [ u k 1 u k ] [ u k 1 u k ] 2 q 1 d 2 q 1 k q 1 dt q 11 As d/dt corresponds to s variable while q operator is equivalent to z variable, we have herefore, z 2 z 1 G z G s = z1 1 s 2 z 1 z 1 Chapter 12 ME 551 21
Discrete-time PID Controller Various different controllers can be implemented via a combination of these laws: PI, PD, PID, etc. For instance, the discrete-time PID controller can be epressed as M z E z = K K i 1 z p 1 K d 1 z 1 his F gives rise to M z = G E z c b z = 0 b1 z 1 z he corresponding CCDE becomes 1 1 b 2 z 2 where b 0 b b 1 2 = ˆ K p = ˆ K =ˆ K d p K d 2K K d i m k = m k 1 b0e k b1 e k 1 b2e k 2 Chapter 12 ME 551 22 Cascade Control Many motion control applications contain cascaded control loops: Fast inner velocity loop Slow outer position control loop feed velocity commands to the inner loop. First velocity controller is designed. With the velocity loop in place, a position controller is developed. Chapter 12 ME 551 23
Industrial Motion Controller Cascaded motion controllers are common in industry: Factory automation Robotics CNC machine tools Defacto standard motion controllers employ a PI velocity controller inner loop along with a P position controller outer loop. A velocity command feedforward improves the command tracking accuracy of the controlled system. Chapter 12 ME 551 24 De-facto Standard Controller Chapter 12 ME 551 25
PID Algorithm of PMAC2 Motion Control Card* [*] [] Courtesy of Delta-au Corp. Chapter 12 ME 551 26