Académique Documents
Professionnel Documents
Culture Documents
LAB 3
To become familiar with the CAD tools available to assist in the design of control systems. To study
performance of a control system using MATLAB and MATLAB Control Systems Toolbox.
2.
Generate simulations of the results obtained in labs 1 and 2 and compare the simulations to empirical results.
3.
Introduction
Rather than having to physically build a design to observe its behaviour, a more efficient approach is to use
CAD tools to simulate the system. In this lab we will introduce and use the tools available within MATLAB
which can be applied to control system analysis and design.
+
!"#$%
&$%#$%
M1
'
PRELAB ASSIGNMENT
M2
Apply the Routh-Hurwitz criterion to the following system and determine for what values of K the system
will be stable.
!"#$%
$
G(s)
&$%#$%
'
If a system is known to produce a second order response to a step input, and exhibits a non-zero steady
state error, sketch what you would expect the output to be if the input is a ramp instead of a step.
Determine the steady state error for the above transfer function when used in a closed loop configuration
with a ramp input. Sketch what you think the result will look like.
MATLAB commands:
SYS = tf(NUM,DEN) creates a continuous-time transfer function SYS with numerator NUM and
denominator DEN;
[Y,T] = step(SYS) computes the step response Y of the dynamic system SYS. The time vector T is
expressed in the time units of SYS and the time step and final time are chosen automatically. When called
1-1
LAB 3
without output arguments, step(SYS,...) plots the step response of SYS and is equivalent to
STEPPLOT(SYS,...).
1.
num=1, den=10
sys=tf(num, den)
step(sys)
Running the code shown will generate a figure showing the step
response.
transfer function and step response simulation for both the high
gain and low-pass filter configurations.
Record the standard performance measures (Tr, Tp, Ts, etc.) of the
2.
To generate the control system models (as built in lab 2) and the simulation of their step response, we will
given a set of zero locations in vector Z, a set of pole locations in vector P, and a gain in scalar K. Vectors
NUM and DEN are returned with numerator and denominator coefficients in descending powers of s;
B.YOSHIDA, P.ENG 2013 V2.1.0
1-2
LAB 3
!"#$%
$
M1
&$%#$%
'
M2
Negative feedback is assumed and the model M maps u to y. To apply positive feedback, use the syntax M
= feedback(M1,M2,+1).
3.
transfer function.
follows.
!"#$%
&'()
Pre-Amp
Servo Amp
Motor
Operational
Unit
Tachometer
*$%#$%
+'()
sys=feedback(T,1)
1-3
LAB 3
considering only the poles that are closest to the j axis which are called the dominant poles. We can easily see
this by comparing the simulations generated from a high order system its second order approximation
To compare simulation results on a single plot, we will introduce the following MATLAB commands:
hold on holds the current plot and all axis properties so that subsequent graphing commands add to the
existing graph. hold off returns to the default mode whereby PLOT commands erase the previous plots
and reset all axis properties before drawing new plots. hold, by itself, toggles the hold state. hold does
not affect axis autoranging properties.
4.
Dominant Poles
example.
Generate the step response for both G1 and G2 on the same plot
example.
step(G1)
hold on
step(G2)
We have been told that there are costs associated with adding feedback. One cost is the possibility of
1-4
5.
!"#$%
$
Stability
G(s)
LAB 3
&$%#$%
'
!"#$%
$
&$%#$%
'
G(s)
Close the feedback loop and repeat the above experiment recording
!"#$%
$
&$%#$%
'
G(s)
To this point we have only used a step input for the test signal into the system. We can also examine the
response of a system to another standard test input, the ramp. In addition we can examine the steady state error
when dealing with the various test inputs.
4.
Steady State Error, and Simulation of the Closed Loop System with a ramp wave input
Compare the steady state error when K=10 and K=100 (use the
1-5
4.
LAB 3
Steady State Error, and Simulation of the Closed Loop System with a ramp wave input
S=tf(s);
step(1/S)
We can repeat the previous steady state error simulation (where
K=10 and K=100) using a ramp input and overlay the system
response on the previously generated ramp.
Based on our results what is the steady state error in each case?
What is the effect of the gain on the steady state error? What is the
Type Number of the system? How do the simulated results
compare to your pre-lab sketch?
1-6