Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

EE132 Lab1 OL Vs CL

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1

EE 132 Lab 1: Open vs Closed Loop


I. OBJECTIVE
To compare the performance of open and closed loop controllers, applied to a simple plant, in the presence of
disturbances or modeling error.
II. EQUIPMENT
Matlab and Simulink
III. BACKGROUND
Consider a DC motor shown in Fig. 1. The schematic diagram for this system is shown in Fig. 2, where R is the
electric resistance, L is the electric inductance, is the angle of the shaft, =

is the angular rate of the shaft, T
is the motor torque, V is the input voltage, J is the moment of inertia of the rotor, b is the coefcient of friction
of the mechanical system. For a DC motor, we have the following relations
T = Ki (1)
e = K (2)
where i is the armature current, e is the back electromotive force, and K is the electromotive force constant. Let
d(t) represent an unknown load torque applied to the shaft. For example, if this is a grinding application, then the
torque d would be determined by the force applied to the grinding disk by the user.
The state space model of this system is
J + b = Ki + d (3)
L
di
dt
+ Ri = V K (4)
From (4), we have
i =
L
R
di
dt
+
V
R

K
R
.
We will assume that the motor has been selected such that R >> L, then L/R 0 and
i =
V
R

K
R
.
Substitute i into (3), we have
J +

b +
K
2
R

=
K
R
V + d. (5)
Selecting the state variable as x = , equation (5) can be written as
x =

bR + K
2
JR

x +
K
JR
V +
1
J
d. (6)
If the nominal parameter values are as follows
b = 0.01N m s, J = 1.0 kg m
2
, K = 0.1
N m
A
, R = 1.0
then, equation (6) becomes
x = 0.02x + 0.1V + d. (7)
In (7), V is the control input, d can be considered as a disturbance, x is the angular velocity of the shaft. All units
in this lab are international units.
2
Fig. 1. DC motor Fig. 2. DC motor System
In practice, the nominal parameter values are not known exactly and may change with time. So, a more realistic
model than (7) is
x = (0.02 + a)x + (0.1 + b)V + d (8)
where a and b are uncertain constants terms.
For the prelab portion of this assignment, we will analyze the effects of a, b, and d.
For the in lab simulation portion of this assignment, we will only be concerned with the disturbance d.
System (7) is called the nominal system corresponding to (8). The nominal system can be obtained by letting
a = b = 0 in (8).
IV. PRELAB (COMPLETE THIS SECTION PRIOR TO LAB.)
In this section, we assume that the reference state x
c
(t) = 1u(t), where u(t) is a step function, i.e., u(t) = 1
for all t 0 and u(t) = 0 for all t < 0.
1) For system (7), design an open loop controller
V (t) = F
1
x
c
(t) (9)
where F
1
is a constant.
a) Find F
1
such that lim
t
(x(t) x
c
(t)) = 0 when d = 0, a = 0, and b = 0.
b) Where is the pole of the controlled system when d = a = b = 0? Is the pole location affected by the
choice of the control law parameter F
1
?
c) What is the settling time of the closed-loop system when d = a = b = 0 (i.e., three times the time
constant when d = a = b = 0)?
d) Find an expression for the tracking error x
e
= (x x
c
) as a function of d, a, and b.
2) For system (8), dene the closed loop controller
V (t) = P(x
c
(t) x(t)) + I

t
0
(x
c
() x())d (10)
where P and I are constant real numbers.
a) Substitute eqn. (10) int eqn. (7) with d = 0, transform to the frequency domain, and simplify, to nd
the closed loop transfer function from X
c
(s) to X(s).
b) Find P and I such that the closed loop transfer function from X
c
(s) to X(s) has poles at 0.1 j0.05
when d = a = b = 0.
3
i) To nd the desired characteristic equation (i.e., transfer function denominator), nd a polynomial
that has the specied roots.
ii) Find P and I so that the denominator of the closed loop transfer function matches the desired
characteristic equation.
c) What is the settling time of the closed-loop system when d = a = b = 0 (i.e., three times the 1/||,
where is the real portion of the pole when d = a = b = 0.)
d) What is the tracking error x
e
= (xx
c
) for constant values of d, a, and b, assuming the system remains
stable.
V. SIMULATION PROCEDURE
Please download the le Lab1.mdl from iLearn. Open the Simulink library in MATLAB. The simulation le
can be opened in the Simulink library. Finish the simulation implementation by the following steps.
1) The simulation implementation includes portions of the control law implementation. Check the implementation
of the plant model. Make sure that you agree, then proceed to the following steps.
2) Implement the open loop controller. Let x
c
be a step input at time zero with a magnitude of 1.0. Set the
length of the time interval to be 600 seconds for this case.
a) Simulate the response of system (8) with control law (9) when d = a = b = 0. In this step your goal is
to ensure that your prelab design and simulation implementation are correct (i.e., The steady state error
should be zero. Steady state should be approximately achieved in three time constants.)
b) Simulate the response of the open loop system for d = 0.1 and a = b = 0.
c) Show the results of the three simulations on one graph. Every time when you launch the Simulink le,
the time array and corresponding state array will be saved as Data in the workspace of MATLAB.
The time array can be obtained by using Data.time. The state array can be obtained by using
Data.signals.values. Then you can use your knowledge of MATLAB to plot what gure that is asked.
Ask the TA if you do not understand how to do this. Clearly label each graph. In your lab report, discuss
the effect of the off-nominal effects on the system response. Compare the simulated responses with the
prelab analysis.
d) Remove the open loop controller.
3) Implement the closed loop controller. Again, let x
c
be a step input at time zero with a magnitude of 1.0. Set
the length of the time interval to be 120 seconds for this case.
a) Simulate the response of system (8) with control law (10) when d = a = b = 0. In this step your goal
is to ensure that your prelab design and simulation implementation are correct (i.e., The steady state
error should be zero. Steady state should be approximately achieved in three time constants.)
b) Simulate the response of system (8) with control law (10) for d = 0.1 and a = b = 0.
c) Show the results of the three simulations on one graph. Ask the TA if you do not understand how to
do this. Clearly label each graph. In your lab report, discuss the effect of the off-nominal effects on the
system response. Compare the simulated responses with the prelab analysis.
Congratulations. You have implemented your rst closed loop control law. The simulation allows an easy means to
analyze the affect of changing the other model error terms. Investigate them if you are interested.
FIGURES - Throughout this class, all gures must be properly labeled
Each axis must have a variable name with units (e.g. tracking error, m/s).
The gure must have name (e.g., Figure 1).
Each gure must be mentioned by name and discussed in the text (e.g. Figure 1 shows that ...). The discussion
must state any conclusion that the students expects the reader to draw from the gure.
If a graph contains more than one curve, each curve should have a different line type. Each line type must
be dened. Each curve must be discussed. For example, Figure 1 shows that for d = 0.0 (solid curve) the
tracking error achieves a steady state value of ... in ... seconds and for d = 0.1 (dashed curve) the tracking
error achieves a steady state value of ... in ... seconds.
This direction will not be repeated in future labs, but is expected to be followed.

You might also like