%% Experiment 4.1
%% Name: Aidan Sharpe
%% 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 G(s) = \frac{a}{s+a}, evaluate settling time and rise time for the following values of a: 1,2,3,4. Also, plot the poles.
% Answer:
% T_s(G(s))=\begin{cases}
% 3.9121 & a =1\\
% 1.9560 & a =2\\
% 1.3040 & a =3\\
% 0.9780 & a = 4
% \end{cases}
% T_R(G(s)) = \begin{cases}
% 2.1970 & a = 0\\
% 1.0985 & a = 1\\
% 0.7323 & a = 2\\
% 0.5493 & a = 3\\
% \end{cases}
%
%
%% Problem 2
% Given the transfer function G(s)=\frac{b}{s^2 + as + b}.
%% 2.a
% Evaluate precent overshoot, settling time, peak time, and rise time for the following values: a=4, b=25. Also, plot the poles.
% Answer:
% Overshoot: 25.3741
% Settling Time: 1.6819
% Peak Time: 0.6908
% Rise Time: 0.2930
%
%
%% 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:
% a=8,b=37
% Overshoot: 6.4396
% Settling Time: 0.9882
% Peak Time: 0.6908
% Rise Time: 0.3294
%
%% 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:
% a=2,b=22
% Overshoot: 50.3661
% Settling TIme: 3.6352
% Peak Time: 0.6908
% Rise Time: 0.2608
%%
%% 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:
% a=4,b=88
% Overshoot: 50.3661
% Settling Time: 1.8176
% Peak Time: 0.3454
% Rise Time: 0.1304
%
%% 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:
% a=4;b=340
% Overshoot: 70.9674
% Settling Time: 1.9131
% Peak Time: 1.7097
% Rise Time: 0.0615
%
%% 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:
% a=8,b=100
% Overshoot: 25.3741
% Settling Time: 0.8409
% Peak Time: 0.3454
% Rise Time: 0.1465
%
%% 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:
% a=16,b=400
% Overshoot: 25.3741
% Settling Time: 0.4205
% Peak Time: 0.1727
% Rise Tie: 0.0733
%
%
%% 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:
% Changing the real part of the poles affects it position on the real axis (left and right). Changing the imaginary part of the poles affects their positions on the imaginary axis (up and down).
%
%
%
%
%
%
%
%
%
%% Lab
%
%% 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.
% a
% T_{S,\textrm{calc}}
% T_{S,\exp }
% T_{R,\textrm{calc}}
% T_{R,\exp }
% Poles (Calc)
% Poles (Exp)
% 1
% 3.9121
% 3.9121
% 2.1970
% 2.1970
% -1
% -1
% 2
% 1.9560
% 1.9560
% 1.0985
% 1.0985
% -2
% -2
% 3
% 1.3040
% 1.3040
% 0.7323
% 0.7323
% -3
% -3
% 4
% 0.9780
% 0.9780
% 0.5493
% 0.5493
% -4
% -4
%
%% 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.
%
% %{\mathrm{OS}}_{\mathrm{calc}}
% %{\mathrm{OS}}_{\exp }
% T_{P,\mathrm{calc}}
% T_{P,\exp }
% T_{S,\mathrm{calc}}
% T_{S,\exp }
% T_{R,\mathrm{calc}}
% T_{R,\exp }
% Poles (Calc)
% Poles (Exp)
% 2a
% 25.3741%
% 25.3741%
% 0.6980
% 0.6908
% 1.6819
% 1.6819
% 0.2930
% 0.2930
% -2\pm j4.5826
% -2\pm j4.5826
% 2b
% 6.4396%
% 6.4396%
% 1.0644
% 1.0644
% 0.9882
% 0.9882
% 0.3294
% 0.3294
% -4\pm j4.5826
% -4\pm j4.5826
% 2c
% 50.3661%
% 50.3661%
% 0.6908
% 0.6908
% 3.6352
% 3.6352
% 0.2608
% 0.2608
% -1\pm j4.5826
% -1\pm j4.5826
%
%% 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.
%
% %{\textrm{OS}}_{\textrm{calc}}
% %{\textrm{OS}}_{\exp }
% T_{P,\textrm{calc}}
% T_{P,\exp }
% T_{S,\textrm{calc}}
% T_{S,\exp }
% T_{R,\textrm{calc}}
% T_{R,\exp }
% Poles (Calc)
% Poles (Exp)
% 2a
% 25.3741%
% 25.3741%
% 0.6980
% 0.6908
% 1.6819
% 1.6819
% 0.2930
% 0.2930
% -2\pm j4.5826
% -2\pm j4.5826
% 3a
% 50.3661%
% 50.3661%
% 0.3454
% 0.3454
% 1.8176
% 1.8176
% 0.1304
% 0.1304
% -2\pm j9.1652
% -2\pm j9.1652
% 3b
% 70.9674%
% 70.9674%
% 1.7097
% 1.7097
% 1.9131
% 1.9131
% 0.0615
% 0.0615
% -2\pm j18.3303
% -2\pm j18.3303
%
%% Problem 4
% 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.
%
% %{\textrm{OS}}_{\textrm{calc}}
% %{\textrm{OS}}_{\exp }
% T_{P,\textrm{calc}}
% T_{P,\exp }
% T_{S,\textrm{calc}}
% T_{S,\exp }
% T_{R,\textrm{calc}}
% T_{R,\exp }
% Poles (Calc)
% Poles (Exp)
% 2a
% 25.3741%
% 25.3741%
% 0.6980
% 0.6908
% 1.6819
% 1.6819
% 0.2930
% 0.2930
% -2\pm j4.5826
% -2\pm j4.5826
% 4a
% 25.3741%
% 25.3741%
% 0.3454
% 0.3454
% 0.8409
% 0.8409
% 0.1465
% 0.1465
% -4\pm j9.1652
% -4\pm j9.1652
% 4b
% 25.3741%
% 25.3741%
% 0.1727
% 0.1727
% 0.4205
% 0.4205
% 0.0733
% 0.0733
% -8\pm j18.3303
% -8\pm j18.3303
%
%% 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.
% For first-order systems, there is one pole at -a, and making the pole more negative results in smaller values of rise time and settling time. For second-order systems, percent overshoot is related to the magnitude of the ratio of the real and imaginary parts of the poles, the peak time and settling time seem to increase with the magnitude of the poles, and the rise time seems to decrease with the magnitude of the poles.
%
%
%
%
%