%% Experiment 5.1
%% Name: Aidan Sharpe
%% Objectives
% To verify the equivalency of the basic forms, including cascade, parallel, and feedback forms. To verify the equivalency of the basic moves, including moving blocks past summing junctions, and moving blocks past pickoff points.
%% Minimum Required Software Packages
% MATLAB, Simulink, and the Control System Toolbox.
%
%
%% Prelab
%% Problem 1
% Find the equivalent transfer function of three cascaded blocks, G_1(s) = \frac{1}{s+1}, G_2(s) = \frac{1}{s+4}, and G_3(s) = \frac{s+1}{s+5}.
% Answer:
% G_1(s) G_2(s) G_3(s) = {s + 1 \over s^3 + 10s^2 + 29s + 20}
%
%
%%
%
%% Problem 2
% Find the equivalent transfer function of three parallel blocks, G_1(s) = \frac{1}{s+4}, G_2(s) = \frac{1}{s+4}, and G_3(s) = \frac{s+3}{s+5}.
% Answer:
% G_1(s) + G_2(s) + G_3(s) = {s^3 + 14s^2 + 58s + 88 \over s^3 + 14s^2 + 56s + 80}
%
%%
%% Problem 3
% Find the equivalent transfer funciton of the negative feedback system of Figure P5.55 (picture below) if G(s) = \frac{s+1}{s(s+2)}, and H(s)=\frac{s+3}{s+4}.
%
%
%
%
% Answer:
% {G(s) \over 1 + H(s)G(s)} = {s^4 + 7s^3 + 14s^2 + 8s \over s^5 + 9 s^4 + 26s^3 + 27s^2 + 6s}
%
%%
%% Problem 4
% For the system of Prelab 3, push H(s) to the left past the summing junction and draw the equivalent system.
% Answer:
%
%
%
%% Problem 5
% For the system of Prelab 3, push H(s) to the right past the pickoff point and draw the equivalent system.
% Answer:
%
%
%
%
%
%
%
%
%
%
%% Lab
%
%% Problem 1
% Using Simulink, set up the cascade system of Prelab 1 and the equivalent single block. Make separate plots of the step response of the cascaded system and its equivalent single block. 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 parallel system of Prelab 2 and the equivalent single block. Make separate plots of the step response of the parallel system and its equivalent single block. 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 3
% Using Simulink, set up the negatvie feedback system of Prelab 3 and the equivalent single block. Make separate plots of the step response of the negative feedback system and its equivalent single block. 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 4
% Using Simulink, set up the negative feeback systems of Prelab 3, Prelab 4, and Prelab 5. Make separate plots of the step response of each of the systems. 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.
%
%
%
%
%% Postlab
%
%% Problem 1
% Using your lab data, verify the equivalent transfer function of blocks in cascade.
% The equivalent transfer function of cascaded (series) gains is the product of the gains. The results of lab question 1 demonstrate this equality as the two pictures, despite depicting different systems, have the same step response.
%
%
%% Problem 2
% Using your lab data, verify the equivalent transfer function of block in parallel.
% The equivalent transfer function of parallel blocks is the sum of the gains. The results of lab question 2 demonstrate this equality as the two pictures, despite depicting different systems, have the same step response.
%
%
%
%% Problem 3
% Using your lab data, verify the equivalent transfer function of negative feedback systems.
% After a few attempts of mistyping the tranfer functions into simulink, it was eventually verified that the form {C(s) \over R(s)} = {G(s) \over 1 + G(s)H(s)} is equivalent to negative feedback. This was verified by plotting the step reponses for both negative feedback and a combined transfer function and seeing no change in results.
%%
%% Problem 4
% Using your lab data, verify the moving of blocks past summing junctions and pickoff points.
% Moving past summing junctions produces the same result as moving past pickoff points. This is true because gains multiply in series, and multiplication is commutative.
%
%
%% Problem 5
% Discuss your results. Were the equivalencies verified?
% All equivilances were verifiable by comparing the step responses of the systems. In each case, as long as the transfer function was typed in correctly (4s \ne 14s), the step responses of the equivalent systems were always the same as the more complicated systems they represented.
%
%
%
%