Digital Control IMEC 4301P | 50950 August 29th, 2023 Instructor: Héctor A. Pacheco Martínez Lab Team: Andrés Alemán, Héctor Moore, Ricardo Villanueva, Sonja Henttinen. Laboratory #1 Experiment 4.1 Objectives To evaluate the effect of pole and zero location upon the time response of first- and second-order systems. Minimum Required Software Packages MATLAB, Simulink, and the Control System Toolbox. Prelab Problem 1 Given the transfer function , evaluate settling time and rise time for the following values of a: 1,2,3,4. Also, plot the poles. Answer: t1 = tf(1,[1 1]); t2 = tf(1,[1 2]); t3 = tf(1,[1 3]); t4 = tf(1,[1 4]); step(t1,t2,t3,t4) legend('a = 1','a = 2','a = 3','a = 4') 1 st1 = stack(1,t1,t2,t3,t4); pzplot(st1(:,:,1),st1(:,:,2),st1(:,:,3),st1(:,:,4)) legend('a = 1','a = 2','a = 3','a = 4') grid 2 T1 = stepinfo(t1) T1 = struct with fields: RiseTime: 2.1970 TransientTime: 3.9121 SettlingTime: 3.9121 SettlingMin: 0.9045 SettlingMax: 0.9993 Overshoot: 0 Undershoot: 0 Peak: 0.9993 PeakTime: 7.3222 T2 = stepinfo(t2) T2 = struct with fields: RiseTime: 1.0985 TransientTime: 1.9560 SettlingTime: 1.9560 SettlingMin: 0.4523 SettlingMax: 0.4997 Overshoot: 0 Undershoot: 0 Peak: 0.4997 PeakTime: 3.6611 T3 = stepinfo(t3) T3 = struct with fields: RiseTime: 0.7323 TransientTime: 1.3040 SettlingTime: 1.3040 3 SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: 0.3015 0.3331 0 0 0.3331 2.4407 T4 = stepinfo(t4) T4 = struct with fields: RiseTime: 0.5493 TransientTime: 0.9780 SettlingTime: 0.9780 SettlingMin: 0.2261 SettlingMax: 0.2498 Overshoot: 0 Undershoot: 0 Peak: 0.2498 PeakTime: 1.8306 Problem 2 Given the transfer function . 2.a Evaluate precent overshoot, settling time, peak time, and rise time for the following values: plot the poles. Answer: Gs2a = tf(25, [1 4 25]); step(Gs2a) 4 , . Also, poles2a = pole(Gs2a) poles2a = 2×1 complex -2.0000 + 4.5826i -2.0000 - 4.5826i pzplot(Gs2a) grid 5 gs2a = stepinfo(Gs2a) gs2a = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.2930 1.6819 1.6819 0.9065 1.2537 25.3741 0 1.2537 0.6908 2.b Calculate the values of a and b so that the imaginary part of the poles remains the same but the real part is increased two times over that of Prelab 2a, and repeat Prelab 2a. Answer: Real part is increased by 2 times: 6 Gs2b = tf(37, [1 8 37]); step(Gs2b) poles2b = pole(Gs2b) poles2b = 2×1 complex -4.0000 + 4.5826i -4.0000 - 4.5826i pzplot(Gs2b) grid 7 gs2b = stepinfo(Gs2b) gs2b = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.3294 0.9882 0.9882 0.9041 1.0644 6.4396 0 1.0644 0.6908 2.c Calculate the values of a and b so that the imaginary part of the poles remains the same but the real part is decreased by one half over that of Prelab 2a, and repeat Prelab 2a. Answer: Real part is decreased by half: 8 Gs2c = tf(22, [1 2 22]); step(Gs2c) poles2c = pole(Gs2c) poles2c = 2×1 complex -1.0000 + 4.5826i -1.0000 - 4.5826i pzplot(Gs2c) grid 9 gs2c = stepinfo(Gs2c) gs2c = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.2608 3.6352 3.6352 0.7465 1.5037 50.3661 0 1.5037 0.6908 Problem 3 3.a For the system of Prelab 2a, calculate the values of a and b so that the real part of the poles remains the same but the imaginary part is increased two times over that of Prelab 2a, and repeat Prelab 2a. Answer: Real part is increased by 2 times: 10 Gs3a = tf(84, [1 4 84]); step(Gs3a) poles3a = pole(Gs3a) poles3a = 2×1 complex -2.0000 + 8.9443i -2.0000 - 8.9443i pzplot(Gs3a) grid 11 gs3a = stepinfo(Gs3a) gs3a = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.1341 1.8533 1.8533 0.7559 1.4946 49.4636 0 1.4946 0.3454 3.b For the system of Prelab 2a, calculate the values of a and b so that the real part of the poles remains the same but the imaginary part is increased four times over that of Prelab 2a, and repeat Prelab 2a. Answer: Real part is increased by 4 times: 12 Gs3b = tf(340, [1 4 340]); step(Gs3b) poles3b = pole(Gs3b) poles3b = 2×1 complex -2.0000 +18.3303i -2.0000 -18.3303i pzplot(Gs3b) grid 13 gs3b = stepinfo(Gs3b) gs3b = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.0615 1.9131 1.9131 0.4965 1.7097 70.9674 0 1.7097 0.1704 Problem 4 4.a For the system of Prelab 2a, calculate the values of a and b so that the damping ratio remains the same but the natural frequency is increased two times over that of Prelab 2a, and repeat Prelab 2a. Answer: For a LTI second ordersystem without zeros: 14 & & Natural frequency is increased by two times: Gs4a = tf(100, [1 8 100]); step(Gs4a) poles4a = pole(Gs4a) poles4a = 2×1 complex -4.0000 + 9.1652i -4.0000 - 9.1652i pzplot(Gs4a) grid 15 damp(Gs4a) Pole Damping Frequency (rad/seconds) Time Constant (seconds) -4.00e+00 + 9.17e+00i -4.00e+00 - 9.17e+00i 4.00e-01 4.00e-01 1.00e+01 1.00e+01 2.50e-01 2.50e-01 gs4a = stepinfo(Gs4a) gs4a = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.1465 0.8409 0.8409 0.9065 1.2537 25.3741 0 1.2537 0.3454 4.b For the system of Prelab 2a, calculate the values of a and b so that the damping ratio remains the same but the natural frequency is increased four times over that of Prelab 2a, and repeat Prelab 2a. Answer: Natural frequency is increased by two times: 16 Gs4b = tf(400, [1 16 400]); step(Gs4b) poles4b = pole(Gs4b) poles4b = 2×1 complex -8.0000 +18.3303i -8.0000 -18.3303i pzplot(Gs4b) grid 17 damp(Gs4b) Pole Damping Frequency (rad/seconds) Time Constant (seconds) -8.00e+00 + 1.83e+01i -8.00e+00 - 1.83e+01i 4.00e-01 4.00e-01 2.00e+01 2.00e+01 1.25e-01 1.25e-01 gs4b = stepinfo(Gs4b) gs4b = struct with RiseTime: TransientTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: fields: 0.0733 0.4205 0.4205 0.9065 1.2537 25.3741 0 1.2537 0.1727 Problem 5 Briefly describe the effects on the time response as the poles are changed in each of the Prelabs 2, 3, and 4. Answer: Lab 18 Problem 1 Using Simulink, set up the systems of Prelab 1 and plot the step response of each of the four transfer functions on a single graph by using the Simulink LTI Viewer (See Appendix E.6 online for tutorial). Also, record the values of settling time and rise time for each step response. For your Simulink, please provide a screenshot that clearly shows the system. Problem 2 Using Simulink, set up the systems of Prelab 2. Using the Simulink LTI Viewer, plot the step response of each of the three transfer functions on a single graph. Also, record the values of pervent overshoot, settling time, peak time, and rise time for each step response. For your Simulink, please provide a screenshot that clearly shows the system. Problem 3 Using Simulink, set up the systems of Prelab 2a and Prelab 3. Using the Simulink LTI Viewer, plot the step response of each of the three transfer functions on a single graph. Also, record the values of percent overshoot, settling time, peak time, and rise time for each step response. For your Simulink, please provide a screenshot that clearly shows the system. Problem 4 Using Simulink, set up the systems of Prelab 2a and Prelab 4. Using the Simulink LTI Viewer, plot the step response of each of the three transfer functions on a single graph. Also, record the values of percent overshoot, settling time, peak time, and rise time for each step response. For your Simulink, please provide a screenshot that clearly shows the system. Postlab Problem 1 For the first-order systems, make a table of calculated and experimental values of settling time, rise time, and pole location. Problem 2 For the second-order systems of Prelab 2, make a table of caluclated and experimental values of percent overshoot, settling time, peak time, rise time, and pole location. Problem 3 For the second-order systems of Prelab 2a and Prelab 3, make a table of calculated and experimental values of percent overshoot, settling time, peak time, rise time, and pole location. Problem 4 19 For the second-order systems of Prelab 2a and Prelab 4, make a table of calculated and experimental values of percent overshoot, settling time, peak time, rise time, and pole location. Problem 5 Discuss the effects of pole location upon the time response for both first- and second-order systems. Discuss any discrepancies between your calculated and experimental values. 20