Speed Control 3. Speed Control 3.1. Laboratory Objectives The objective of this laboratory is to develop an understanding of PI control (applied to speed), how it works, and how it can be tuned to meet required specifications. In particular you will explore: Qualitative properties of proportional and integral action. Set-point weighting. Design of controllers for specifications on the set-point response. Integrator windup and windup protection. Tracking of triangular signals. Response to load disturbances. 3.2. Preparation And Pre-Requisites A pre-requisite to this laboratory is to have successfully completed the modelling and model validation laboratory described in Chapter 2. Before the lab, you should also review Proportional-Integral (PI) control from your textbook. From Chapter 2 and for the purpose of speed control, the system can be represented by the block diagram in Figure 3.1. This block diagram illustrates the parts of the system that are relevant for speed control. Document Number: 627 Revision: 01 Page: 57 Speed Control Figure 3.1 DCMCT Block Diagram For Speed Control The process is represented by a block which has motor voltage Vm and torque Td as inputs and motor speed ωm as the output. The torque is typically a disturbance torque that you apply manually to the inertial load. The velocity is actually computed in the PIC by filtered differences of the motor angle θm using the following relationship: s θm ωm = Tf s + 1 where Tf is the filter time constant and s the Laplace operator. The controller block represents the control algorithm in the computer and the power amplifier. Vsd is a simulated external disturbance voltage. Make sure that you understand this fully. The linear behaviour of the system is described by the transfer functions given in the block diagram. The major nonlinearities are the saturation of the motor amplifier at 15 V, Coulomb friction corresponding to 0.5 V, and the quantization of the encoder. The major unmodeled dynamics is due to the effects of sampling and filtering. The former can be approximated by a time delay of one sampling period. Document Number: 627 Revision: 01 Page: 58 Speed Control 3.3. Introduction: The PI Controller The PI controller is the most common control algorithm. It is used for a variety of purposes and it often works very well. For systems with simple dynamics it can give close to optimal performance and for processes with complicated dynamics, it can often give good performance provided that specifications are not too demanding. Better performance can, however, be obtained by using more complicated controllers. 3.3.1. PI Control Law The linear behaviour of a PI controller can be described by: t u( t ) = kp ( b sp r ( t ) − y( t ) ) + ki ⌠ ⎮ r ( τ ) − y( τ ) d τ ⌡0 [3.1] where u(t) is the control signal, r(t) the reference, and y(t) the measured process output. The reference r(t) is also called the set-point or the command. The linear behaviour of the controller is governed by three parameters: kp: proportional gain ki: integral gain bsp: set-point weight Further in this laboratory, we introduce a fourth parameter, aw, which governs the nonlinear properties of the controller. Sometimes the filtered measurement yf(t) is also used in the control loop. It is computed from Tf, the time constant of filter for measured signal. The filter time constant Tf is typically set to a constant value and it is often combined with the sensor. The filter provides roll-off at high frequencies. It is important to reduce the effects of sensor noise and it improves robustness. In this particular case the filtering is incorporated in the calculation of the velocity from the encoder signal. 3.3.2. The Magic Of Integral Action A nice property of a controller with integral action is that it always gives the correct steadystate value provided that there is an equilibrium. This can be seen simply by assuming that there is a steady-state value with constant u(t) = uss, r(t) = rss, and y(t) = yss. Equation [3.1] can then be written as: u ss = kp ( b sp rss − y ss ) + ki ( rss − yss ) t Since the left-hand-side is a constant, the right-hand-side must also be a constant. This requires that yss = rss. Notice that the only assumption that has been made about the process Document Number: 627 Revision: 01 Page: 59 Speed Control is that there exists an asymptotic steady-state. Document Number: 627 Revision: 01 Page: 60 Speed Control 3.4. Nomenclature The following nomenclature, as described in Table 3.1, is used for the system modelling and control design. Symbol Description Unit ωm Motor speed which can be computed from the motor angle rad/s Vm Voltage from the amplifier which drives the motor V Tm Torque generated by the motor N.m Td Disturbance Torque externally applied to the inertial load N.m Vd Disturbance Voltage corresponding to Td V Vsd Simulated External Disturbance Voltage V Im Motor Armature Current A km Motor Torque Constant N.m/A Rm Motor Armature Resistance Ω Jeq Total Moment Of Inertia Of Motor Rotor And The Load kg.m2 K Open-Loop Steady-State Gain rad/(V.s) τ Open-Loop Time Constant s s Laplace Operator rad/s h Sampling Interval s t Continuous Time s kp Proportional Gain V.s/rad ki Integral Gain V/rad bsp Set-Point Weight aw Windup Protection Parameter u Control Signal V r Reference Signal rad/s y Measured Process Output rad/s Tf Time Constant of filter for measured signal s Table 3.1 System Modelling Nomenclature Document Number: 627 Revision: 01 Page: 61 Speed Control 3.5. Pre-Laboratory Assignments 3.5.1. PI Controller Design To Given Specifications In this section you will practice design of a controller for a specified response to reference signals. One of the key tasks in design is to assess fundamental limitations and assess the performance that can be achieved. The obtained design will then be verified by an experimental procedure in Section 3.6.5. The following problem will be investigated: use the mathematical model of the process to design a PI controller that gives a step response with: i) no overshoot. ii) the following closed-loop undamped natural frequency: rad ⎤ ω 0 = 16.0 ⎡⎢⎢ ⎥ ⎣ s ⎥⎦ The relation between motor velocity and motor voltage can be modeled by the following transfer function: K G ω , V( s ) = [3.2] τs+ 1 Please answer the following questions. 1. Using the PI control law [3.1] and the process transfer [3.2], determine the closed-loop block diagram used for speed control. Include the simulated disturbance voltage Vsd. Solution: 0 Document Number: 627 Revision: 01 Page: 62 1 2 Speed Control 2. Assuming no disturbance, determine the closed-loop transfer function, Gω,r(s), from reference to output, as defined below: Ω m( s ) G ω , r( s ) = R( s ) Solution: 0 1 2 3. One possible way to design a controller is to choose controller gains which give a specified characteristic polynomial. One possibility is to choose gains which give the following quadratic characteristic equation: s2 + 2 ζ ω0 s + ω0 2 [3.3] Determine the PI controller parameters kp and ki so that the closed-loop system satisfies the specified characteristic equation [3.3]. That is to say derive kp and ki as functions of ω0, ζ, K, and τ. Solution: 0 Document Number: 627 Revision: 01 Page: 63 1 2 Speed Control 4. Choose ζ to get the fastest possible response without overshoot (i.e. critically damped), as dictated by the design requirements. Solution: 0 1 2 5. Using kp, ki, and ζ as previously determined and assuming a controller with no set-point weighting (bsp = 0), express Gω,r(s) under a fully-factored form. Determine the closedloop system time response equation to a unit step input. Solution: 0 1 2 0 1 2 6. Using the above closed-loop time response equation to a step, the 2% settling time, Ts, can be expressed as a function of ω0, as shown below: 5.8 Ts = ω0 Assuming that the closed-loop system meets the design specifications, evaluate its 2% settling time. Solution: Document Number: 627 Revision: 01 Page: 64 Speed Control 7. Assume that the motor represents the velocity loop in a manufacturing process and that under normal operating conditions the maximum nominal motor speed ωnom at which the motor operates is defined as follows: rad ⎤ ω nom = 150.0 ⎡⎢⎢ ⎥⎥ [3.4] ⎣ s ⎦ In order to derive the shortest achievable settling time Ts, calculate the maximum acceleration, amax, achievable by the motor with the attached inertial load. To do so, assume that the maximum allowable constant current, Imax, is 0.6 A. Justify this assumption. Solution: 0 Document Number: 627 Revision: 01 Page: 65 1 2 Speed Control 8. The motor should switch speed between -ωnom and +ωnom as fast as possible. A simple estimate of the minimum achievable settling time is the transition time needed to make that change assuming full acceleration. Calculate the shortest time, Ts_min, to make the speed transition under the assumption that the motor uses maximum achievable acceleration. Solution: 0 1 2 0 1 2 9. Does the designed closed-loop system respect the process physical limitations? Solution: Document Number: 627 Revision: 01 Page: 66 Speed Control 10.Evaluate the PI controller parameters, kp and ki, satisfying the design requirements. Hint: Use the nominal values of the process parameters K and τ, as evaluated in Section 2.5.3.6. Solution: 0 11.In a first design we have used the set-point weight bsp = 0. An alternative design with faster response will now be investigated. It will be shown that faster response can be obtained by using a larger value of bsp. To do this, a PI controller that gives the following transfer function from reference to output: ω0 G ω , r( s ) = [3.6] s + ω0 will be designed. Using both proportional and integral gains previously designed, determine and calculate bsp such that the system closed-loop transfer function is of the form [3.6]. Document Number: 627 Revision: 01 Page: 67 1 2 Speed Control Solution: 0 Document Number: 627 Revision: 01 Page: 68 1 2 Speed Control 12.Determine the system time response equation to a unit step input. For an asymptotically stable system, the 2 % settling time, Ts, is defined as the time required for the amplitude of oscillation to decay permanently to within a 2% margin around the steady-state value. Using the system closed-loop time response equation to a step and considering that e-4 ≈ 0.02, express Ts as a function of ω0. Solution: 0 1 2 0 1 2 13.Assuming that the closed-loop system meets the design specifications, evaluate its 2 % settling time. Verify that the controller design with bsp ≠ 0 provides a faster response. Does it satisfy the system physical limitations? Solution: Document Number: 627 Revision: 01 Page: 69