Escolar Documentos
Profissional Documentos
Cultura Documentos
ENGR 446-02 and ENGR 446-03 Control Systems Lab (Fall 2016)
Page 1 of 3
=
( + 1)( 2 + 2 + 2 )
where = 3, = 3, = 0.5 and = 10 rad/sec. A sample application could be the position control of a DC
motor with time delay in the position sensor (shaft encoder output).
Assignment
The controller is a simple gain, , in the forward path, upstream of the plant in an open-loop control system (i.e.
no feedback). For the range of controller gain given below, plot the unit step-responses of the open-loop system.
Then close the loop around the system with a unit negative feedback loop, and obtain the unit step response of
the closed loop system for the range of controller gains indicated below.
= 0.2, 0.5, 1, 10
Note: Plot all the step-responses on the same plot, as this is advantageous for your analysis. Use MATLAB Control
System Toolbox commands such as tf and step, instead of using Simulink.
For the given controller gains, determine the values of the following step-response characteristics of both the open
and closed-loop systems from the simulated step-response data: steady-state error, rise time, peak time, and peak
overshoot and settling time (5%). Prepare a table containing the observed values (may use stepinfo command).
For Cloed Loop = 10 case only: measure and report these values directly from the plot using the data tip feature
of MATLAB figure and mention in report.
It is best to write the commands in an m-file for easy editing and debugging.
LAB 3
Report Due Wednesday September 21
Sept. 9, 2016
ENGR 446-02 and ENGR 446-03 Control Systems Lab (Fall 2016)
Page 2 of 3
(7) Appendix: Print out of your m-file; please include your name and brief description of what the
commands do as comments. The appendix should also include other supplementary materials as you
see relevant.
Comments
1. Definitions of the rise time, peak time ( ), peak overshoot, settling time, etc.: Nises textbook 7th ed.
section 4. 6 pp 173-6.
2. For definition of steady state error, see figure 5-5 shown below, also Nises textbook chapter 7.
3. The transfer function may be defined as in LAB 2: s = tf(s); define G as given on page 1
followed by step(G). You may use feedback() command to close the loop (type help
feedback for usage). in the above may be stored in an array and refered to in a for loop (as in
LAB 2).
4. To do multiple plots in a figure use hold in MATLAB. Alternatively, store step(..) outputs in arrays
and plot the saved results later. Type help step and help plot in MATLAB for details.
Step Input of
Magnitude
Steady State
Error
LAB 3
Report Due Wednesday September 21
Sept. 9, 2016
ENGR 446-02 and ENGR 446-03 Control Systems Lab (Fall 2016)
Page 3 of 3
Sample Code
%
%
%
%
%
%
%
%
%
%
%
s = tf('s')
Gp = 3 * 100 * (s + 1) / (3*s + 1) / (s^2 + 10*s + 100)
Kc = [0.2, 0.5, 1, 10]
% Open Loop
figure(1)
hold
for n = 1:4
% Plot the step response; end time = 20 sec.; change end time as you see fit:
step(Kc(n) * Gp, 0:.01:20)
% Generate data used by stepinfo command; set simulation end time > 20:
[Y,T] = step(Kc(n) * Gp,0:.0001:20); % Simulation resolution is 0.0001 sec.
stepinfo(Y,T)
end
hold
% Closed Loop
figure(2)
hold
for n = 1:4
% Plot the step response; end time = 8 sec.; change as necessary:
step(feedback(Kc(n) * Gp, 1),0:.0001:8)
% Generate data used by stepinfo command; set end time > 20:
[Y,T] = step(feedback(Kc(n) * Gp, 1),0:.0001:20);
stepinfo(Y,T)
end
hold
% You may also explore settlingtime(Y,T,5); type help settlingtime.