MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 MAS07 Control Theory Exam Solutions 2008 Geir Hovland, Mechatronics Group, Grimstad, Norway June 30, 2008 C. Repeat question B, but plot the phase curve instead of the gain. I. BODE PLOT A. Write down the zeroes and poles of the following transfer function 0.s G(s) ( + s 0 )( + s 2 0 ) 3 This transfer function consists of four parts The gain constant 0. The derivator s, which is equal to a zero at location s 0 The pole ( + s 0 ), which is equal to a pole at s 2 0 2 00 The pole ( + s 0 ), which is equal to a pole at s 3 0 3 000 B. Draw the asymptotic Bode plots (only gain) for each component of the transfer function above. Use frequencies from 0 0 to 0 5 rad/sec. Add all the components together to get an asymptotic approximation for the Bode plot of G(s). Finally, draw a more accurate Bode-plot based on the asymptotic approximation. In the figure above, note that the gain 0. becomes a constant of 20dB in the Bode amplitude plot. Note also that the derivator s has a gain value of 0dB at frequency 0 0 and increases by 20dB per decade frequency. The individual components are drawn in red color, the total asymptotic plot is shown in green color, while the black curve shows the more accurate Bode plot. The black circles are drawn 3dB below the asymptotic green curve. The black circles in the phase plot above are drawn at 45 o, 0 o and 45 o. II. NYQUIST PLOT A. Draw the Nyquist plot for the following transfer function when 4. G(s) (s + ) 2 We see directly from this transfer function that the phase will go from 0 o to 80 o. Hence, the Nyquist plot will stay in two quadrants only. First, we replace s by jω and multiply by the complex conjugate in the denominator G(jω) (jω + )(jω + ) ω 2 + 2jω + ω 2 + j2ω (( ω 2 ) j2ω) (( ω 2 ) + j2ω)(( ω 2 ) j2ω) ( ω 2 ) 2 + 4ω 2 (( ω2 ) j2ω) Next, let us set 4 and choose a few frequencies ω and calculate the frequency response (complex numbers) ω Re Im 0 4 0 0.5.92 2.56 0 2 2 0.48 0.64 4 0.2076 0.07 8 0.0596 0.05
MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 2 This gives us approximately the following Nyquist plot, where the red curve is from the table above, while the green curve is the mirror of the red curve about the real axis. D. Based on the Nyquist plot from question 2A, estimate the phase margin graphically (no calculations required). B. Calculate amplitude and phase for the system in question 2A at the following frequencies: 0.5,, 2 and 4 rad/sec. The amplitude A in decibel and phase P are given by the following formulas. ( ) A 20log 0 Re(G(jω))2 + Im(G(jω)) 2 ( ) Im(G(jω)) P atan Re(G(jω)) We then get the following results ω Re Im A P 0.5.92 2.56 0. 53. o 0 2 6.02 90 o 2 0.48 0.64.94 26.9 o 4 0.2076 0.07 2.6 5.9 o C. Is the system in question 2A stable for a unity-feedback controller? Yes, the system is stable because N 0 (the number of encirclements of -) and P 0 (the number of open-loop unstable poles). The Nyquist criterion says Z P N 0, which is stable when Z 0. A unit circle is drawn in the Nyquist plot, see the figure above. The phase margin is given by the angle between the negative real axis and the cross-point between the unit circle and the Nyquist curve. From the figure this seems to occur approximately at the black dot representing the frequency ω 2. However, the table in question 2B says that the amplitude A.92dB at ω 2. Hence, the Nyquist curve will cross the unit circle slightly before ω 2 (remember that an amplitude of 0dB represents the unit circle). The phase margin at ω 2 equals 80 o 26.9 o 53. o. Since the cross-point occurs slightly before ω 2, the phase margin is estimated to be approximately 60 o. III. TIME AND FREQUENCY RESPONSE Given the control system in the figure below with the following plant model: G(s) s(s + 2) A. Describe a method to analytically calculate percentage overshoot and settling time when a unit step is applied to the reference input R(s). Hint: Open/closed transfer functions. First, the closed-loop transfer function is calculated. G(s) + G(s) s(s+ 2) + s(s+ 2) s 2 + 2s + ω 2 s 2 + 2ζωs + ω 2
MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 3 From the equations above we see that the natural frequency ω and the damping factor ζ equal ω 2 2 ζ 2ω 2 0.707 From the exam formula sheet, we then have the following relationships between percentage overshoot and settling time. ζ 2 π 2 %OS 00/exp T s 4 ζω 5.66 ζ 2 4.32 B. When a settling time less than.0 second is required, calculate the range of values for the parameter. T s 4 ζω 5.66 ( ) 2 5.66 32 Hence, must be equal to 32 or larger to achieve a settling time of.0 seconds or less. C. When a peak time less than 0.2 second is required, calculate the range of values for the parameter. The formula for peak time was specified as follows. T p T s π ω ζ 4.44 2 ( ) 2 4.44 492.8 () T p Hence, must be equal to 492.8 or larger to achieve a peak time of 0.2 seconds or less. as there is a steady-state control error. Hence, this type of controller is typically used to achieve zero steady-state error for Type 0 systems when a step is applied as the reference input. The integral action appears at low frequencies in the Bode plot, and hence the PI-controller can be tuned such that it does not worsen bandwidth performance or stability margins. PID-Controller: The PID-controller is the same as the PIcontroller with an added parameter T d which is the derivative time constant. The derivative action reacts on changes in the control error. Hence, the derivative action prevents the system response to change too rapidly. A mechanical equivalent of the derivative action is a damper mechanism. In the Bode plot, the derivative action increases both the amplitude and the phase. Hence, the derivative action can be used to improve system bandwidth as well as stability margins. Lag-Compensator: The lag compensator is very similar to the PI-controller. The main difference is the low frequency characteristics. While the PI-controller goes to infinity gain at low frequencies, the lag compensator has a limited gain at low frequencies. Hence, the lag compensator can reduce steady-state errors, but not completely remove them. Lead-Compensator: The lead compensator is very similar to a PD controller. The main difference is the high frequency characteristics. While the PD controller goes to infinity gain at high frequencies, the lead compensator has a limited gain at high frequencies. This limited gain is a benefit in systems which contain high frequency measurement noise. B. The Nyquist curve for a system crosses the real axis at -2, circles the point - once and the system is stable in closed loop. How many poles in the right half plane does the system have? Explain your answer. IV. SYSTEM UNDERSTANDING A. Explain the properties of the following controllers: P, PI, PID, lag and lead compensator. Write maximum one page. P-Controller: The P-controller is the simplest controller and contains a single parameter usually denoted p. This parameter affects only the gain of the system, while the total phase is unaffected. Hence, a typical method to tune this controller is to find the frequency ω c where the desired phase margin in the phase plot occurs, and then adjust the gain parameter p such that the amplitude curve crosses the 0dB line at the same frequency ω c. Systems which are open-loop stable (no poles in the right half-plane) have an upper limit on the gain parameter p for stability, while systems which are open-loop unstable have a lower limit on the gain parameter. The P-controller can typically improve system properties such as rise time, settling time, peak time and steady-state error. These improvements usually result in a worse performance in terms of percentage overshoot (stability margin). PI-Controller: The PI-controller is the same as the P- controller with an added parameter T i which is the integral time constant. The integral action will never settle as long Let us use the Nyquist curve above as a concrete example for this problem. The Nyquist curve above is a perfect circle with a radius of 2 and is generated by the following system G(s) 2(s + ) s
MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 4 The Nyquist curve crosses the real axis at -2, the curve circles the point - once. The problem text states that the system is stable in closed-loop. Hence, Z P N 0. Since N, we need also that P. In other words, the open-loop system has one pole in the right half-plane. We can also see that the example transfer function above also has a single pole in the right half-plane (at s ). C. For the system in question 4B two different P-controllers are applied. The first P-controller has a gain of 2.0, while the other controller has a gain of 0.4. Are the two new control systems stable or unstable. Explain your answers. The first P-controller will double the radius of the example circle to 4. The Nyquist curve will still encircle the point once. Hence, the control system will be stable. The P- controller with gain 0.4 will change the radius of the example circle to 0.8. The Nyquist curve will no longer encircle the point. Hence, the P-controller with a gain of 0.4 will be unstable for this system. Note, that this system behavior is the opposite of what we see for an open-loop stable system. For an open-loop unstable system, a large P-controller gain will stabilize the system, while small P-controller gains will reduce the stability margins. V. STEADY-STATE ERRORS AND COMPENSATOR G p (s) 0.2 s(s + 2) The controller equals G c 0. A. Calculate the steady-state error when applying a unity step at the input R(s). The system above is a Type system (because of the integrator). Hence, the steady-state error for a unity step is equal to 0. B. Calculate the steady-state error when applying a ramp at the input R(s). The control error equals e(s) + G c (s)g p (s) + 2 s(s+2) s(s + 2) s(s + 2) + 2 Now we can use the final value theorem to determine the steady-state error (knowing that the Laplace transform of a ramp equals s ). 2 [ ] lim s 0 s 2 s s(s + 2) s(s + 2) + 2 lim s 0 [ s + 2 s(s + 2) + 2 ] 2 2 C. Design a lag compensator for the system such that the steady-state error for a ramp is reduced by a factor of 0 without influencing the system s bandwidth to a large degree. The Bode plot of the open-loop transfer function is given below. First, we multiply the system with the gain of 0. From the Bode plot we see that the cross-over frequency w c 0 0.. Hence, to make sure that we do not influence the system bandwidth to a large degree, we choose the zero of the lag compensator equal to 0.0, ie. T 0.0 or T 00. The high frequency gain of the lag compensator needs to compensate for the initial multiplication of 0. Hence, α 0, or αt 0.00. The lag compensator and the initial gain of 0 are summarized as follows and illustrated in the figure below. Note from the figure that the net gain of the lag compensator and the gain of 0 equals 0dB at high frequencies. This is an important characteristic too avoid affecting the overall system bandwidth as specified in the problem definition. G c (s) 0 s + T α s + αt s + 0.0 s + 0.00 D. eep the lag compensator from question 5C and add a lead compensator such that the bandwidth is increased by a factor 3. We want to increase the cross-over frequency from ω c 0. to ω c 0.3. From the Bode plot in Question 5C, we see that the amplitude at ω c 0.3 equals approximately 0dB. Hence, the lead compensator must contribute with a gain of
MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 5 0dB (or 3.6) at ω c. From the formula sheet, we have G c (jω c ) β β 3.6 ( ) 2 0. 3.6 The formula sheet gives us the final parameter T of the lead compensator. ω c T G c (s) β T β ω c β 0.3 0.0 0.54 s + T s + βt 0(s + 0.095) s + 0.95 From the Bode plots below, we see that the lead compensator raises the gain with 0dB at ω c 0.3 and that the phase has its maximum phase lift at the same frequency. Taking the Laplace transform and inserting m, d, we can find the transfer function from f(t) to x(t). x(s 2 + s) f(s) x f (s) s 2 + 2 B. Calculate the transfer function from the battery voltage to the current in the figure below. V (t) Ri(t) + C i(t)dt VI. MODELLING A. Calculate the transfer function from the force f(t) to the position x(t) for the mechanical system in the figure below. Taking Laplace, we get the following transfer function The spring has no effect, since the force f(t) is the same on both sides of the spring (Newton s st law). The differential equation which describes the motion of the mass are given below. mẍ(t) f(t) dẋ(t) (2) V (s) Ri(s) + Cs i(s) ( i(s) R + ) Cs i(s) RCs + Cs i V (s) Cs RCs + 0.5s 0.5s +
MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 6 C. The figure below shows two watertanks. The height in tank is h (metre) while the height in tank 2 is h 2. The area of tank and 2 are A and A 2 (m 2 ), respectively. The inflow to tank is u (m 3 /sec) while the outflow is k h. The inflow to tank 2 is k h, while the outflow is k 2 h 2. Write down the two differential equations which describe the system. Based on the differential equations, write down the transfer function from u(s) to h2(s). A h dt h 2 A 2 dt Taking Laplace, we get u k h k h k 2 h 2 A sh u k h h (A s + k ) u h u A s + k A 2 sh 2 k h k 2 h 2 h 2 (A 2 s + k 2 ) k h u ( A s ) + ( k ) h 2 u (s) k A 2 s + k 2 A s + k k