Sie sind auf Seite 1von 6

ECE 4150 CONTROL SYSTEMS

LAB 3

Lab 3 - Transient Response (MATLAB tools)


Objective
1.

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.

The observe the effect of dominant poles, and stability.

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.

Part1. Simulating the hardware from lab 1 & 2


To generate the device models and the simulation of their step responses, we will introduce the following

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

B.YOSHIDA, P.ENG 2013 V2.1.0


1-1

ECE 4150 CONTROL SYSTEMS


LAB 3

without output arguments, step(SYS,...) plots the step response of SYS and is equivalent to
STEPPLOT(SYS,...).

1.

Simulation of Operational Unit

We will use the MATLAB to generate a simulation of the step

response for the various configurations of the Operational Unit


used in labs 1 and 2.

Refer to the transfer functions you determined in lab 1, and

represent the transfer function in MATLAB. For example in the


low gain configuration the transfer function would be
approximately

num=1, den=10
sys=tf(num, den)
step(sys)

Running the code shown will generate a figure showing the step

response.

Use the transfer functions determined in lab 1 and generate the

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

simulation. Compare the simulation results to the experimental


results obtained from lab 1. How do they compare?

2.

Simulation of Pre-Amp/Servo Amp/Motor combination

Use the transfer functions determined in lab 1, and the tf and

step commands in MATLAB, to generate the transfer function


and step response simulation for the Pre-Amp/Servo Amp/Motor
combination.
Record the standard performance measures (Tr, Tp, Ts, etc.) of the

simulation. Compare the simulation results to the experimental


results obtained from lab 1. How do they compare?

To generate the control system models (as built in lab 2) and the simulation of their step response, we will

introduce the following MATLAB commands:

[NUM,DEN] = zp2tf(Z,P,K) forms the transfer function:

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

ECE 4150 CONTROL SYSTEMS


LAB 3

C = conv(A, B) convolves vectors A and B. The resulting vector is length MAX([LENGTH(A)


+LENGTH(B)-1,LENGTH(A),LENGTH(B)]). If A and B are vectors of polynomial coefficients,
convolving them is equivalent to multiplying the two polynomials;
M = feedback(M1,M2) computes a closed-loop model M for the feedback loop:

!"#$%
$

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.

Simulation of Open Loop and Closed Loop Systems

Example: If the transfer function of the complete open/closed loop

system as determined from lab 2 is in the form:

Note: For this particular T(s), the

zeros are at s=-3, the poles are at


s=-4 and s=-5 and the gain is K=2.

Execute the following MATLAB commands to generate the

Z=[-3], P=[-4, -5]


[NUM,DEN]=zp2tf(Z,P,2)
tf(NUM,DEN)

Alternatively we could have used the convolution command as

NUM=conv(2, [1, 3])


DEN=conv([1, 4], [1, 5])
tf(NUM,DEN)

transfer function.

follows.

!"#$%
&'()

Pre-Amp
Servo Amp
Motor

Operational
Unit

Using the individual transfer functions obtained from lab 1,

generate the transfer function and simulated step response of


both the open loop and closed loop configurations when using the
operational unit in both low gain, and low pass mode (capacitor in
the feedback path). Record the standard performance measures (Tr,
Tp, Ts, etc.) for each of the scenarios.

Tachometer

*$%#$%
+'()

Note: if the open loop transfer

function is named T, then the


feedback transfer function can be
generated using:

sys=feedback(T,1)

Compare the simulation results to the experimental results (rise

time, settle time, etc) obtained in lab 2. Do the simulation results


correlate to the experimental results?

B.YOSHIDA, P.ENG 2013 V2.1.0


1-3

ECE 4150 CONTROL SYSTEMS


LAB 3

Part 2. Dominant Poles, Stability, and Steady State Error - Simulating an


arbitrary system
We have been told that for higher order systems we can approximate the transient response of the output by

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

Consider an arbitrary process with the following transfer function:

Note: For this particular T(s), the

Using MATLAB generate the transfer function.

Call the transfer function G1 for

zeros are at s=-3, the poles are at


s=-4 and s=-5 and the gain is K=2.

example.

Rather than deal with a fourth order characteristic equation, we

should be able to get a reasonable estimate of the output using a


second order model with the dominant poles.

Using the final value theorem to scale the response (Knew=0.0104),

we should be able to use a simplified model which considers only


the dominant poles.

Generate the step response for both G1 and G2 on the same plot

using the following MATLAB instructions. Compare the rise time,


settling time, etc.

Call this transfer function G2 for

example.

step(G1)
hold on
step(G2)

From these results, do the dominant poles provide a reasonable

approximation of the original fourth order system?

We have been told that there are costs associated with adding feedback. One cost is the possibility of

introducing instability to the system.

B.YOSHIDA, P.ENG 2013 V2.1.0


1-4

ECE 4150 CONTROL SYSTEMS


5.

!"#$%
$

Stability

G(s)

LAB 3

&$%#$%
'

Using the process transfer function from part 4, within an open

loop control system which uses a controller with a gain of K.

!"#$%
$

&$%#$%
'

G(s)

Using MATLAB, generate the system transfer function with a gain

K of 480,+and generate the step response of the system.&$%#$%


!"#$%
M1
$
'

Repeat withK being doubled, tripled, and then quadrupled. Record


the standard performance measures (Tr, Tp, Ts, etc.) for each K
value.
M2

Note: due to the scaling of the

functions make sure hold is set to


off and separate plots are
generated.

Close the feedback loop and repeat the above experiment recording

the standard performance measures for each K value.

!"#$%
$

&$%#$%
'

G(s)

What conclusions can be drawn from these results? What

conclusions can be drawn from comparing the open loop and


closed loop results?

Confirm your prelab calculation for the maximum K value for

which the system will be stable.

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

To examine the effect of changes in the systems parameters on the

steady state error use the previously used transfer function

Compare the steady state error when K=10 and K=100 (use the

hold instruction when plotting the two step response).

Within MATLAB the command S = tf('s') specifies the

transfer function H(s) = s (Laplace variable). Therefore if we


divide the unit step by S we can generate a ramp.

B.YOSHIDA, P.ENG 2013 V2.1.0


1-5

ECE 4150 CONTROL SYSTEMS


4.

LAB 3

Steady State Error, and Simulation of the Closed Loop System with a ramp wave input

Using the following MATLAB instructions we can plot a ramp

Note: this should be a new plot.

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?

B.YOSHIDA, P.ENG 2013 V2.1.0


1-6

Das könnte Ihnen auch gefallen