This exercise should be run in MATLAB 2019 or later versions. It makes use of the MATLAB Control Toolbox. Create a folde
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
This exercise should be run in MATLAB 2019 or later versions. It makes use of the MATLAB Control Toolbox. Create a folde
R(s) kp Figure 1: Closed loop system with proportional controller 1. Analysis of the plant NOTE - ALL THE OTHER SECTIONS OF THIS LABORATORY DEPEND UPON THE COMPLETION AND RESULTS OF THIS SECTION. G(s) Question 1.1 Using the formula from your notes, calculate the minimum damping ratio of the dominant poles for an overshoot of Mp ≤ 12%. Show all of your working out. Y(8) Question 1.2 Using the formula from your notes, calculate the minimum damped frequency, 0-01-², of the dominant poles for a peak time tp ≤ 0.6 sec. To save the text from your session in a file, type diary filename.doc To obtain the plant that will be used in this exercise, please use the following values: k = 0.74, T1 = 0.055 and T2 = 0.106 Define the plant, G(s), in transfer function form by G-tf (k, [T1.T2, T1+T2, 1, 01) Obtain the open-loop poles of the plant by pole (G) Plot the plant poles on the s-plane by pzmap (G); Question 1.3 Record the transfer function. Record and comment on the plant poles. Question 1.4 What will happen if you try to obtain the plant open loop step response? Show plot. Obtain the open loop impulse response by impulse (G); Question 1.5 Explain this response characteristics (include plot).
2. Proportional controller design by Bode plot In this section, a proportional controller K(s) = kp for the system shown in Figure 1 will be designed and the stability will be analysed using frequency domain techniques. Obtain the plant Bode plot by bode (G); Question 2.1 Explain the Bode plot characteristics. Question 2.2 Find the limiting value of kp for system stability. Show the workings on the Bode plot. Question 2.3 From the Bode plot, determine the value of kp required for Mp = 12% assuming PM = 100 for PM < 70deg where PM is the phase margin. Show the working out on the Bode plot. Input the calculated value of kp into the MATLAB workspace as the variable kp. Now calculate the closed loop transfer function by k,G(s) 1+k,G(s) T(s)-- T-feedback (kp.G, 1) Now display the closed loop system step response by step (T); From the plot, measure Mp and tp. Question 2.4 Record and comment on the closed loop transfer function. Comment on the response. Record Mp and tp. Compare Mp to the value predicted from the Bode plot. Does your design meet the specifications? Now obtain the Bode plot of the open loop compensated system L(s) = G(s)K(s) = kpG(s) by bode (kp*G); Obtain the gain margin GM, phase margin P M, and associated frequencies wcg and wep by [GM, PM, Weg, Wep] = margin (kp.G)
You can convert GM to decibels by 20.log10 (GM) Question 2.5 Record the gain margin, phase margin, and associated frequencies. Comment on the Bode plot of the open loop compensated system. Show the gain and phase margins on the plot. 3. PID/P+D controller design PID controllers are the most commonly used type of industrial control. They are usually designed by trial and error using a few simple rules. Question 3.1 What will be the system type (Type 0, Type 1 or Type 2 etc) if a PID controller is used on this plant? For zero steady state error (to unity step references) for this plant, is an integrator required in the controller? Question 3.2 What are the advantages and disadvantages of not using integral action (i.e. using P+D control)? For many mechanical control applications, the derivative of the output is available for measurement using tachometers and other devices. However, for many applications, such a signal is simply not available (e.g. process engineering applications), or prohibitively expensive to obtain. In such cases, the derivative signal y (t) should be approximated by R(s) Y (s)- where 1/a is greater than the system bandwidth. Making 1/a too large means that high frequency noise in the measurement signal of y(t) is amplified. The closed loop system is shown in Figure 2. K (8) kp sy (s) as +1 aft! G(8) Figure 2: Closed loop system with P+D controller The controller K(s) for this exercise is a P+D controller Y(8)
K(s)-k,+ Now design the controller. Firstly, define a. A suggested value is a = 0.02 alpha=0.02 Define a proportional gain term kp in MATLAB workspace as a variable kp. Similarly, define a derivative gain term kd, as a variable kd. Now define the transfer function K(s) of the controller by Katf([kd+alpha.kp, kpl, lalpha, 11) sk k + s(k+ak,) as +1 as +1 Obtain the system open loop transfer function L(s) = G(s)K(s) by L-K.G Now obtain the system closed loop transfer function G(s)K(s) 1+G(s)K(s) by T(s)- T-feedback (K.G, 1) Now display the closed loop system step response by step (T); L(S) 1+L(s) If the response does not meet the specifications, change kp and kd and repeat the procedure until a satisfactory design is obtained. Question 3.3 From the plot, measure Mp and tp. Does your design meet the specifications? Record the final values of kp and kd. Record the transfer function K(s), the system open loop transfer function L(s) and the closed loop transfer function T (s). Obtain the Bode plot of the controller transfer function K(s) by bode (K) Question 3.4 Explain the Bode plot characteristics. Obtain the Bode plot of the system open loop transfer function L(s) by bode (L) You can convert GM to decibels by 20.log10 (GM) Obtain the gain margin GM, phase margin Pm, and associated frequencies wcg and wcp by [GM, PM, Weg,Wcp] = margin (L) Question 3.5 Record the gain margin, phase margin, and associated frequencies. Show the gain margin and phase margin on the Bode plot.
Obtain the closed loop poles and zeros by pole (T) zero (T) Plot the closed loop system poles and zeros on the s-plane by pzmap (T); Question 3.6 Record and comment on the closed loop poles and zeros. To end recording, type diary off