Вы находитесь на странице: 1из 15

# EE 5307 Homework 1

Fall 2011
Block Diagrams/Transfer function, MATLAB, Computer Simulation
2. Simulate the forced van der Pol oscillator
2
(1 ) sin( ) 0 y y y y wt + && & using MATLAB. Plot
y(t) vs. t and also the phase plane plot y'(t) vs. y(t). Use y(0)=0, y'(0)= 0.5.
a. For = 5, A=0.
b. For = 8.53, A=1.2, w=2/10.
4. Do MATLAB simulation of the following RLC circuit (discussed in the class). Run for 200
sec. with different logical values for R, L, C and u=sin(t). Plot states versus time, output versus
time and also make 2-D plot of x
1
, x
2
using PLOT(x1,x2) for every case. Explain the behavior of
each case.
1 2
2 1 2
2
1 1
( )
1
x x u t
C C
R
x x x
L C
y Rx
+

&
&
5. A system has transfer function
13 4
4
) (
2
+ +
+

s s
s
s H
a. Use MATLAB to make a 3-D plot of the magnitude of H(s)
b. Use MATLAB to make a 3-D plot of the phase of H(s)
c. Use MATLAB to draw magnitude and phase Bode plots

EE 5307 Homework 2
Fall 2011
State-Space Analysis
Show all work. Make plots with MATLAB.
1.
2. Consider
[ ]
1 1 0
, 1 0
2 5 1
x x u Ax Bu y x Cx
1 1
+ +
1 1
] ]
&
a. Find poles and zeros.
b. Find (s) and (t)=e
At
.
c. Find transfer function.
d. Find impulse response. Use MATLAB to plot impulse response.
e. Find step response. Use MATLAB to plot step response.
f. Given that there is no input and that the initial condition are x(0)=[3 -1] determine the
value of y(t) when t=2.
3.
a. Find state-space representation for the circuit in terms of L, R1, R2, R3, C1, C2.
Now, set L= 2H, C1= 2F, C2=1F and all resistors to 1 ohm:
b. Find transfer function from A,B,C,D. Use MATLAB function ss2tf
c. Find poles and zeros for these values of components. Use MATLAB, not by hand.
d. Simulate on MATLAB. Plot the output y(t). Set input u(t)= unit step and initial
conditions equal to zero
4. Consider the following linear system
Cx x y Bu Ax u x x
1
]
1

+
1
]
1

+
1
]
1

2 4
1 2
,
1 1
0 1
6 8
1 0

a. Draw a block diagram for the system showing individual gains and integrators.
b. Derive an equivalent second order differential equation description for the system.
c. Find poles and MV zeros
d. Find transfer function.
e. Is system minimal?
f. Find minimal realization (A,B,C,D).
EE 5307 Homework 3
Fall 2011
Controllability/Observability and MV zeros
1. The state-space models of four systems are below. For each system:
a. Find poles and natural modes.
b. Find transfer function H(s).
c. Find zeros.
d. Make Bode plots of open-loop system.
e. Plot step response if the system is stable.
a. Inverted pendulum.
[ ]
1 1 1
0 1 0 0 0
0 0 1 0 0.1
, , 1 0 0 0
0 0 0 1 0
0 0 10 0 0.1
A B C
1 1
1 1

1 1

1 1
1 1

] ]
b. Ball balancer.
[ ]
2 2 2
0 1 0 0 0
0 0 9 0 0
, , 1 0 0 0
0 0 0 1 0
1 0 0 0 0.1
A B C
1 1
1 1

1 1

1 1
1 1

] ]
c. Flexible-joint system.
[ ]
3 3 3
0 1 0 0 0
1 0.2 1 0.2 1
, , 0 0 1 0
0 0 0 1 0
1 0.2 10 2.1 0
A B C
1 1
1 1

1 1

1 1
1 1

] ]
[ ]
4 4 4
0 1 0 0 0
1 0.1 1 0.1 1
, , 1 0 0 0
0 0 0 1 0
1 0.1 23 0.3 0
A B C
1 1
1 1

1 1

1 1
1 1

] ]
2. Given the system described by the equations
0 1 1 2
5 2 0 0
4 1
6 1
x x u
y x
1 1
+
1 1

] ]
1

1
]
&
a. Draw the block diagram of the system.
b. Calculate the poles of the system.
c. Calculate the resolvent matrix of the system.
d. Calculate the state transition matrix of the system.
e. Calculate the system zeros using the Rosenbrock matrix.
f. Calculate the input and output decoupling zeros.
g. Calculate the transfer function matrix of the system.
h. Calculate the transmission zeros of the system.
i. Is the state space realization of the system minimal? If not, find a minimal realization for
the system. Draw the block diagram for the minimal realization.
3. Take the linear dynamical system described by
[ ]
1 2
0 5 0
;
2 1
a
x x u
a
a R
y x
1 1
+
1 1

] ] '

&
a. Study the reachability and observability of the system.
b. Calculate the transfer function matrix.
c. Find the poles of the system.
d. Find the transmission zeros and the decoupling zeros.
Make discussion for all values of
a R
.
4.
EE 5307 Homework 4
Fall 2011
Discrete Time SV Systems
1. Compound Interest. Consider the scalar DT SV system
k k k
bu ax x +
+1
Let initial condition be
0
x
and the input be the unit step
,... 1 , 1 , 1 , 1 ) (
1

k u u
k
The initial
condition is called the initial balance, and a constant input is known as an annuity deposit.
Find the state solution
k
x
. (Find analytic solution.). This is the compound interest formula in
economics.
2. The DT SV is
k k k
u x x
1
]
1

+
1
]
1

+
1
1
2 / 3 1
2 / 1 0
1
,
[ ]
k k
x y 1 0
a. Find poles and natural modes.
b. Find resolvent
) (z
and an analytic expression for the DT exponential
k
A k ) (
c. Find transfer function
d. Find pulse response (analytic expression)
e. Find step response (analytic expression)
f. Find analytic expression for the state
k
x
if [ ]
T
x 1 2
0
and input is
) (
4
1
1
k u u
k
k

,
_

## g. Find analytic expression for the output

k
y
in this case.
h. Write the difference equation relating
k
y
to
k
u
.
3. For the system in problem 2,
a. Use iteration to compute
3 2 1
, , x x x
and
3 2 1
, , y y y
by hand. Do they agree with the
analytic solution found in problem 2?
b. Use the difference equation to compute
3 2 1
, , y y y
by hand.
4. a. Write a MATLAB program to compute output
k
y
if
k k k k
u y y y +
2 1
9925 . 0 9 . 1
Use zero initial conditions and unit step input. Plot output for k= 1 to 500.
b. Find poles. Can you explain the behavior of
k
y
? Find natural frequency
n

.
EE 5307 Homework 5
Fall 2011
Lyapunov Stability, Realization and Canonical Forms
Part A Lyapunov Stability
Solve Lyapunov equation to determine stability.
1.
4 2
1 1
x Ax x
1

1

]
&
2.
0 1
0 4
x Ax x
1

1

]
&
3.
1
0 1
0.09 1
k k k
x Ax x
+
1

1

]
Part B Realization and Canonical Forms
8 14 7
3
) (
2 3
+ + +
+

s s s
s
s H
1. RCF
a. Write SV equations for reachable canonical form
b. Draw RCF block diagram
2. OCF
a. Write SV equations for observable canonical form
b. Draw OCF block diagram
3. Duality
Show that RCF SV matrices are the same as OCF SV matrices if you reorder the states backwards
and replace (A,B,C) by ) , , (
T T T
B C A .
4. Parallel Canonical Form.
a. Write SV equations for Parallel canonical form
b. Draw Parallel Form block diagram
EE 5307 Homework 6
Fall 2011
Jordan Normal Form, Gilberts Method
1. Find eigenvalues and eigenvectors.
simple matrix
1 1 2
0 2 1
0 0 3
A
1
1

1
1
]
2. Find eigenvalues and eigenvectors.
eigenvector chain
3 1 1
0 1 1
2 1 1
A
1
1

1
1
]

3. Gilberts Method
1
1
1
1
]
1

+
+
+ +
+
+ + + +
+

4
2
12 7
1
2 3 3 4
2
) (
2
2
2
2
s
s
s s
s
s s
s
s s
s
s H
Find minimal SV realization.
EE 5307 Homework 7
Fall 2011
Ball Balancer Controller Design
1. The ball balancer is given by
[ ] 0 0 0 1 2 ,
1 . 0
0
0
0
2 ,
0 0 0 1
1 0 0 0
0 9 0 0
0 0 1 0
2
1
1
1
1
]
1

1
1
1
1
]
1

C B A
with state [ ]
T
p p x

. We are going to do 3 feedback control designs using MATLAB.
a. Use Ackermann to find SVFB to place the poles at 3 5 , 2 1 j j s t t . Plot time response
over 15 seconds if [ ]
T
x 0 1 . 0 0 1 . 0 ) 0 ( . (MATLAB routine is called place or acker.
Place is numerically more stable)
b. Use LQR to design SVFB. Select R= 0.01, Q= diag{1, 1, 50, 50}. Find closed-loop poles. Plot
time response over 15 seconds if [ ]
T
x 0 1 . 0 0 1 . 0 ) 0 ( .
b. Use LQR to design SVFB. Select R= 1, Q= diag{1, 1, 50, 50}. Find closed-loop poles. Plot time
response over 15 seconds if [ ]
T
x 0 1 . 0 0 1 . 0 ) 0 ( .
2. A telescope pointing system is ,
2
1
1 2
1 0
u x x
1
]
1

+
1
]
1

a. Find poles.
b. Use Ackermann to make settling time equal to sec and POV equal to 4%. Do BY HAND.
c. Verify BY HAND that the closed-loop poles are where desired.
d. Use MATLAB to plot closed-loop step response. Check settling time and POV. Check closed-loop
poles.
EE 5307 Homework 8
Fall 2011
Discretization
1. A continuous-time systems is
[ ] Cx x y Bu Ax u x x +
1
]
1

+
1
]
1

1 3 ,
1
0
6 8
1 0

## a. Find sampled system if sampling time is T= 0.1 sec.

1
,
s s s
k k k k k
x A x B u y C x
+
+
Do BY HAND. It is practice for the exam.
b. find sampled system by MATLAB function c2d if T= 0.1 sec.
c. Plot x(t) and y(t) using the continuous-time dynamics. Let u(t)= unit step and x(0)=0. You can use either
MATLAB ode23 or lsim or step.
d. Plot ,
k k
x y using DT dynamics. Use MATLAB dlsim, dstep, whatever.
e. Verify that the two plots are the same at the samples. Maybe you can plot the samples of ,
k k
x y on the same
plots as x(t), y(t)?
2. A CT transfer function is given by
3
( )
( 2)( 4)
s
H s
s s
+

+ +
a. Find discrete time transfer function by step invariance if sampling time is T= 0.1 sec.
Do BY HAND. It is practice for the exam.
b. find sampled system by MATLAB function c2dm if T= 0.1 sec. Use ZOH, step invariance.
c. Plot x(t) and y(t) using the continuous-time dynamics. Let u(t)= unit step. You can use either MATLAB lsim or
step.
d. Plot ,
k k
x y using DT dynamics. Use MATLAB dlsim, dstep, whatever.
e. Verify that the two plots are the same at the samples. Maybe you can plot the samples of ,
k k
x y on the same
plots as x(t), y(t)?
(Note that transfer function in problem 2 is the TF of the system in problem 1.)
EE 5307 Homework 9
LQR/LQE Design
Fall 2011
Ball Balancer LQR/LQE Regulator Design
The inverted pendulum with both position and angle measurements is given by
[ ] 0 0 0 1 2 ,
1 . 0
0
0
0
2 ,
0 0 0 1
1 0 0 0
0 9 0 0
0 0 1 0
2
1
1
1
1
]
1

1
1
1
1
]
1

C B A
with state [ ]
T
p p x

.
a. Use LQR to design a SVFB K. Select R= 0.01, Q= diag{1, 1, 50, 50}. Find closed-loop poles. Use SVFB u=
-Kx and plot time response over 15 seconds if [ ]
T
x 0 1 . 0 0 1 . 0 ) 0 ( . (You did this for hwk 7.)
b. Use LQE to design an observer L. Select Ro= 0.001, Qo= diag{1, 1, 50, 50}. Find observer poles.
c. Use observer to design a regulator x K u . Draw block diagram of the closed-loop system. Use MATLAB
to plot system response with estimated state FB and observer. One way to do this is to write MATLAB M file
with both the plant dynamics and the observer dynamics. Another is to make a large augmented system with
eight states.
Plot time response over 15 seconds if initial state is [ ]
T
x 0 1 . 0 0 1 . 0 ) 0 ( and initial estimation error is
[ ]
T
x 0 05 . 0 0 05 . 0 ) 0 (
~
. Compare to results of part a.
d. Use MATLAB to find the 2 DOF regulator polynomials ) ( ), ( ), ( s S s T s Z in
) ( ) ( ) ( ) ( ) ( ) ( s Y s S s R s T s U s Z
with r(t) the reference input. You can multiply polynomials in MATLAB using convolution operator conv( )