EE 3CL4: Introduction to Control Systems Lab 4: Lead Compensation Tim Davidson Ext. 27352 davidson@mcmaster.ca Objective To use the root locus technique to design a lead compensator for a marginally-stable servomotor. Assessment The assessment for this laboratory will consist of 1. a pre-lab design exercise, which must be completed before the lab, 2. a system identification experiment, 3. the design of a lead compensator for the system identified in item 2, 4. an experiment to evaluate the performance of the compensated closed loop designed in item 3. Your answer to the pre-lab exercise will be evaluated at the beginning of the lab. Your performance of the system identification experiment, the compensator design and the performance evaluation experiment will be evaluated during the lab. The marks for each component are clearly indicated. 1 Pre-lab design exercise (5 marks) Consider the closed loop in Figure 1 in the case in which H(s) = 1 and G(s) = 4.7 s(s+3.2). Design a lead compensator of the form G c (s) = Kc(s+z) (s+p) so that for a unit step input r(t) = u(t) the percentage overshoot of the output y(t) is 22% and its 2% settling time is 0.8 seconds. Please provide the details of the calculations that you performed in each step of the design process. (In addition to the material in lectures and the text book, the material in Section 3 may be of assistance.) Figure 1: A compensated closed loop. We will focus on the case in which H(s) = 1. (Figure 10.1 of Dorf and Bishop, Modern Control Systems, 11th edition, Prentice Hall, 2008.) 1
2 Exp. 1: Closed Loop System Identification (2 marks) Recall that we will model the motor in the experiments using the transfer function G(s) = A s(sτ m + 1). (1) In order to perform the design component of this lab, we will need to obtain the A and τ m for the motor that you will use in this laboratory. Note that the values that you obtain may be different from those that you obtained in Lab. 1, even if you are using the same motor. Repeat experiments 1 and 2 from Lab. 1 to obtain the parameters A and τ m for the motor that you will use in this laboratory. Remember that this involves constructing a circuit of the form in Fig. 2 using components in the form of Figs 3 and 4. For these systems you can choose R 1 = R 2 = 10 kω. Please follow the instructions from Lab. 1 carefully. To obtain your mark for this experiment you must show your TA the scope trace for input frequency ω p and must provide the corresponding values of A and τ m. 3 Design of a Lead Compensator for the Servomotor In Lab. 2, we designed a proportional controller that had a large gain and achieved no more than 25% overshoot. However, we were unable to adjust the settling time of the closed loop by manipulating the value of the amplifier gain. In this lab, we will design a lead compensator that will enable us to achieve 25% overshoot and a settling time that is three times shorter than that achieved in Lab. 2. We will also examine the velocity error constant obtained in this design. 3.1 Design of compensator (7 marks) In this section we will determine the pole positions required to achieve the desired goals. Begin a sketch of the root locus by rewriting the motor transfer function as G(s) = plotting the poles of the model in (1). A/τm s(s+1/τ m) Recall from Lab. 2 that the time constant for an underdamped closed loop with proportional control is 2τ m. On your graph, mark with squares the positions of the closed loop poles that would result in an overshoot of 25% and a settling time that is 1/3 of that achieved in the previous lab. s+z As a first step in the design of the compensator, G c (s) = K c s+p, place the zero of the compensator on the real axis with the same real part as that of the desired closed-loop poles. The pole of the compensator will be on the real axis to the left of this zero. Use the angle criterion to determine where the pole should be placed in order for the root locus to pass through the squares. Use the magnitude criterion to determine the gain K c A/τ m required to place the poles in this position. Complete the sketch of the root locus. You will need to compute the angles and the centroid of the asymptotes, but you may simply estimate the breakaway points. and 2
Figure 2: Closed loop circuit from Labs 1 and 2. Figure 3: Summing amplifier. Figure 4: Unit-gain inverting amplifier (inverter). Figure 5: An implementation of a lead compensator. 3
If we write the compensator in the form G c (s) = K aτs+1 c τs+1 what values should we choose for τ, a and K c? Compute the velocity error constant for the closed loop that you have designed. Recall that the velocity 1 1 1 error constant of a stable closed loop satisfies K v = lim s 0 s 1+G c(s)g(s) s. 2 To obtain your marks for this section, you must show a TA your worked solution, including the computed position for the pole, your sketch of the root locus, and the values you computed for τ, a and K c 3.2 Design of compensator circuit (3 marks) The goal of this section is to design a circuit that will implement the compensator that was designed in the previous section. For the circuit in Fig. 5, assume that the op-amp is ideal and the bias resistor is absent. Show that the transfer function can be written as G c (s) = K c aτs + 1 τs + 1 where K c = R 3 /R 2, τ = C 1 R 1, and a = (R 1 + R 2 )/R 1. Note that a > 1 so that the zero is closer to the origin than the pole. Hence, this circuit can be used to construct a lead compensator. Now choose values for R 1, R 2, R 3 and C 1 so that we achieve the desired value of K c, and the zero and pole positions designed above. Note that there are three requirements, and four degrees of freedom. This provides the flexibility required to ensure that we can use standard values for at least some of the components. In particular, Capacitors should be selected between 0.1µF and 30µF, preferably from standard values. For the op-amps that we are using, resistors should be chosen between 10kΩ and 1MΩ. If R 2 is chosen to be larger than 500kΩ, we must add the bias resistor in Fig. 5. As a guide, you should consider choosing R 2 to be a value that satisfies 10 4 (a 1) R 2 10 7 (a 1), preferably a standard value. That should enable you to choose values for the capacitor and R 1 that can be constructed from the available equipment and enable linear operation of the op-amp. To obtain your marks for this section, you must show a TA your worked solution, including the values for the resistors and the capacitor. 4 Exp. 2: Implementation of the Lead Compensator 4.1 Construct the closed loop (1 mark) Construct a closed loop that implements the designed system using a combination of the summing amplifier in Fig. 3, the inverter in Fig. 4, the lead compensator in Fig. 5, and the SEU. (Recall that the output of the summing amplifier is proportional to the negative of the sum.) Make sure that the Laplace Transform of the output of the compensator is G c (s) ( R(s) Θ(s) ), where R(s) is the Laplace Transform of the input and Θ(s) is the Laplace Transform of the angle output. In order to ensure that the sign of this output is correct, the architecture of your closed loop may need to be different from that in Fig. 2. Before enabling this circuit, obtain your mark for this section by showing your block diagram to a TA, and showing the TA your implementation. (2) 4
4.2 Evaluation of the design To obtain your marks for each section, you must show a TA the appropriate trace on the oscilloscope and your associated calculations, and you should provide appropriate discussion. 4.2.1 Evaluate the percentage overshoot of your design (4 marks) Apply a square wave to the command input, and measure the percentage overshoot that you obtained. Make sure that the amplitude is large enough so that the non-linear effects of the motor are mitigated, but small enough so that the op-amp voltage does not saturate. Some guidance on the latter point can be obtained by considering the steady-state response of the compensator circuit to a step input, and the percentage overshoot. 4.2.2 Evaluate the settling time of your design (4 marks) Apply a square wave to the command input, and assess the settling time. Compare this value to 8τ m, which was the settling time of an underdamped closed-loop with proportional control. 4.2.3 Evaluate the velocity error constant of your design (2 marks) Apply a triangular wave to the command input. Make sure that the frequency of the wave is low enough for the loop to settle into the steady state before the wave reverses. Let β be the magnitude of the slope of the triangular wave. Estimate the velocity error constant by dividing the steady-state value of r(t) θ(t) by β. The steady-state error can be measured by measuring the input r(t) using channel 1 of the oscilloscope and measuring the output θ(t) using channel 2. Be sure to select a value of β that facilitates this measurement. Compare the achieved velocity error constant to the value that can be calculated from the gains and the positions of the open-loop poles and zeros in your design in Section 3.1. 5