You are on page 1of 30

Linear System Theory Manual Using Matlab - Notebook

Lanzhou University Of Technology [1]


Lanzhou Gansu China
Problem 1
In the papermaking process, the pulp feed tank should become 2cm jet stream
and uniformly sprayed on the mesh belt.Therefore, to precisely control
the ratio between the jet velocity and transmission speed. Feeding Changes
in pressure inside the main volume to be controlled, which determines the
speed of the pulp jet. The total pressure inside the feed pulp and the
hydraulic pressure of infusion and another. Controlled by the pressure
of the feed box is coupled to the system, therefore, it is difficult to
ensure the quality of the paper used manual methods. Work on a particular
point, the feed tank linearization can get the following state-space
model:
x = [
0.08 +0.02
0.02 0
] x + [
0.05 1
0.001 0
] u
y = [x1, x2]
Among them, the system state variables X1 = liquid height, X2 = controlled
variable pressure system U1= pulp flow, U2 = pressure valve opening amount.
Under these conditions, the test design appropriate state variable
feedback controller, the system has a real characteristic roots, and there
is a root greater than 5.

Solution:
Question requires a characteristic root modulo value greater than 5.
The system is unstable so eigenvalue is positive, so the two desired
characteristics is taken after the state feedback and -7 -8 meet the above
requirements, first, determine the system controllability, using rank
criterion method, and then use the pole placement theorem of state
feedback coefficient matrix K is obtained and the new system matrix. State
variable feedback controller design procedure is as follows:

clear
A=[-0.8 0.02;-0.02 0];
B=[0.05 1; 0.001 0];
C=[1 0;0 1];
D=0;
Qc=ctrb(A,B) %Judging system controllability
if rank(Qc)==size(A)
disp('System is controlable');
else
disp('System is not controlable');
end
p=[-8 -7];
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [2]
Lanzhou Gansu China
if rank(A)==size(A)
disp('Reasonable number of poles and system configuration');
else
disp(' Pole number and system configuration unreasonable ');
end
K=place(A,B,p)
A1=A-B*K;
B1=B;
C1=C;
ROOTSnew=eig(A1)
ROOTSold=eig(A)

Qc =
0.0500 1.0000 -0.0400 -0.8000
0.0010 0 -0.0010 -0.0200
System is controlable
Reasonable number of poles and system configuration
K =
1.0e+03 *
-0.0200 7.0000
0.0082 -0.3500
ROOTSnew =
-8.0000
-7.0000
ROOTSold =
-0.7995
-0.0005
Its clear from the above result, obtained state feedback matrix K, the
characteristic feature of the original system and the new root of the root
system, are negative so the system is stable.








Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [3]
Lanzhou Gansu China
Problem 2
Description guided missiles constant speed motion equation is:

=
[

0 1 0 0 0
0.1 0.5 0 0 0
0.5 0 0 0 0
0 0 10 0 0
0.5 1 0 0 0
]

x +
[

0
1
0
0
0
]

u
a. Use ctrb function compute systems controllability matrix, and verify
that the system is not controllable:
Solution:
The controllability matrix Qc obtained by ctrb discriminant function,
then using rank criterion for determining system controllability
procedure is as follows
A=[0 1 0 0 0;-0.1 -0.5 0 0 0;0.5 0 0 0 0;0 0 10 0 0;0.5 1 0 0 0];
B=[0;1;0;0;0];
C=[0 0 0 1 0];
Qc=ctrb(A,B)
if rank(Qc)==5
disp('System is controlable');
else
disp('System is not controlable')
end

Qc =
0 1.0000 -0.5000 0.1500 -0.0250
1.0000 -0.5000 0.1500 -0.0250 -0.0025
0 0 0.5000 -0.2500 0.0750
0 0 0 5.0000 -2.5000
0 1.0000 0 -0.1000 0.0500
System is not controlable

From the above result, Qc rank less than n, the system is not controllable.
b. From y to u calculate the transfer function, and eliminate the common
factor of the numerator and denominator of transfer function, from
which state-space model can be controlled. After the elimination of
the common factors, determine new state variable model with tf2ss
function:

Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [4]
Lanzhou Gansu China
Solution:
First, the system transfer function G is obtained, the procedure is as
follows;
I=eye(5);
syms s;
E=s*I-A;
F=collect(inv(E));
G=C*F*B

G =
50/(10*s^4 + 5*s^3 + s^2)
Then eliminate common factor, determine new state variable model
num=[50];
den=[10 5 1 0 0];
Gf=tf(num,den)

Gf =
50
--------------------
10 s^4 + 5 s^3 + s^2
Continuous-time transfer function.
sys=ss(Gf)


sys =

a =
x1 x2 x3 x4
x1 -0.5 -0.4 0 0
x2 0.25 0 0 0
x3 0 0.125 0 0
x4 0 0 0.25 0

b =
u1
x1 32
x2 0
x3 0
x4 0

c =
x1 x2 x3 x4
y1 0 0 0 20
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [5]
Lanzhou Gansu China

d =
u1
y1 0

Continuous-time state-space model.

c. Prove that state variable model obtained from (b) is controlled;
Solution:
A1=[-0.5 -0.4 0 0;0.25 0 0 0;0 0.125 0 0;0 0 0.25 0];
B1=[32;0;0;0];
C1=[0 0 0 20];
Qc1=ctrb(A1,B1)
if rank(Qc1)==size(A1)
disp('System is controlable');
else
disp('System is not controlable');
end

Qc1 =
32.0000 -16.0000 4.8000 -0.8000
0 8.0000 -4.0000 1.2000
0 0 1.0000 -0.5000
0 0 0 0.2500
System is controlable

after checking the result, Qc rank of the new system is 4, so the system
is controllable.
d. Describe guided missiles constant speed stability?
Solution:
G1=C*inv(s*eye(size(A))-A)*B
G1 =
50/(s^2*(10*s^2 + 5*s + 1))
sys=tf(50,[10, 5, 1, 0, 0])
sys =
50
--------------------
10 s^4 + 5 s^3 + s^2
Continuous-time transfer function.
t=[0:0.1:100];
y=step(sys,t);
plot(t,y)
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [6]
Lanzhou Gansu China

Unit step response of the system:
As can be seen from the results above, the real part of the eigenvalues
of the system is 0 or negative, the system is described in the sense of
Lyapunov stability, can also be seen from the step response, the system
is divergent.

e. Discuss the relationship between Controllability and complexity of the
state variables model (assuming that the number of state variables used
to measure the complexity)

Solution:
If you can control the number of a system requiring its rank of
controllability matrix is equal to the system identification number is
the order of the system state variables, in turn, the more complex the
system, the greater the number of variables, controllability also
determine the rank of a bigger matrix, more difficult to meet the
requirements; therefore shows that the more complex systems can be more
difficult to achieve complete control.


Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [7]
Lanzhou Gansu China
Problem 3
Linearized model VTOL aircraft as follows:
x = Ax+B1u1+B2u2
A =
[

0.0366 0.0271 0.0188 0.4555


0.0482 1.0100 0.0024 4.0208
0.1002 0.3681 0.7070 1.4200
0 0 1 0
]


B1 =
[

0.4422
3.5446
5.5200
0
]

, B2 =
[

0.1761
7.5900
4.4900
0
]


Horizontal linear state variable speed x1 (section), vertical velocity
x2 (section), tilt rate x3 (degrees, seconds) and tilt angle x4 (degrees):
Linear control input u1 and u2, where u1 is used to control vertical movement,
u2 for controlling the horizontal movement.
a) calculate the eigenvalues of the system matrix A, and thus
determine whether the system is stable:
Solution:
A=[-0.0366 0.0271 0.0188 -0.4555;0.0482 -1.0100 0.0024 -4.0208;0.1002
0.3681 -0.707 1.42;0 0 1 0];
d=eig(A)
d =
0.2758 + 0.2576i
0.2758 - 0.2576i
-0.2325 + 0.0000i
-2.0727 + 0.0000i
The output results, the eigenvalues of the system matrix has two real roots
are positive and two negative, thereby indicating that the system is
unstable.
b) By using function poly determine the characteristics polynomial
of A , the calculated characteristics hate, and compared with the
characteristic roots obtained from (a);
Solution:
Q=poly(A)
Q1=localpoly(Q)
Q =
1.0000 1.7536 -0.6472 0.0625 0.0686
Q1 =
X1^4 + 1.75*X1^3 - 0.647*X1^2 + 0.0625*X1 + 0.0686
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [8]
Lanzhou Gansu China


Shows the output characteristic value determined by the function and the
poly (a) has four different positive, a negative, but still results in
the system is unstable.
c) When only u1 play a role, can system control it? When only u2 play
a role in the results and how? Please explain your conclusions after
comparison.
Solution:

B1=[0.4422;3.5446;-5.52;0];
B2=[0.1761;-7.5922;4.49;0];
Qc1=ctrb(A,B1);
dimA=size(A)
if rank(Qc1)==size(A)
disp(' Only when U1 has role in controllability of the system ');
else
disp(' Only when U1has no role in controllability of the system ');
end
Qc2=ctrb(A,B2);
if rank(Qc2)==size(A)
disp(' Only when U2 has role in controllability of the system ');
else
disp(' Only when U2 has no role in controllability of the system ');
end

dimA =
4 4
Only when U1 has role in controllability of the system
Only when U2 has role in controllability of the system


The output shows, u1, u2 respectively when controlling effect can rank
discriminant matrix are 4, equal to the system's order, indicating both
systems are able to control the situation.




Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [9]
Lanzhou Gansu China

Problem 4
In order to explore the mysteries of the moon on the back (away from the
side of the Earth), people pay unremitting efforts. For example, in the
Earth's sun - moon system, people want to be able to point communications
satellite in orbit without shelter on the moon, and has carried out
extensive research work demonstration. The figure shows a expected
schematic of the orbit of the satellite,looks from the Earth, like a bad
light orbit around the moon in the outer halo, so this track, also known
as Wei halo orbit. The purpose is to make orbit control, communications
satellites on Earth visible halo orbit, thus ensuring the smooth flow of
communication links required

When fixed position of the satellites moving through orbiting,
standardization drift linearized equations of motion are:
x =
[

0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
7.3809 0 0 0 2 0
0 2.1904 0 2 0 0
0 0 3.1904 0 0 0
]

x +
[

0
0
0
1
0
0
]

u1+
[

0
0
0
0
1
0
]

u2+
[

0
0
0
0
0
1
]

u3
Wherein the state variable x for the position and speed of the satellite
drift in the three directions of the input ui (i = 1,2,3) are the engine
control track on an , and are the acceleration generated in that
direction.















Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [10]
Lanzhou Gansu China
















































Moon
Lunar Trajectory
Earth
View of Humanity on Earth
Moon
Halo Track Aircraft





Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [11]
Lanzhou Gansu China

communication links, including satellite and from the Earth to the Moon
from the satellite to the back of two lines.

a). The fixed position of the satellite is stable?
b). If only u1 play a role, whether satellite can be controlled?
c). If only u2 play a role, whether satellite can be controlled?
d). If only u3 play a role, whether satellite can be controlled?
Solution:
By running the following results shows that feature real part of the root
system has a negative, positive or 0, the extreme point distribution
system also can be seen, RHP pole imaginary axis has a value, so the system
instability.
(b) (c) (d) can be controlled using discriminant matrix rank criterion
method, can be seen from the results, u1, u2, u3, alone, the system is
not controllable.
A=[0 0 0 1 0 0; 0 0 0 0 1 0; 0 0 0 0 0 1; 7.3809 0 0 0 2 0; 0 -2.1904 0
-2 0 0;0 0 -3.1904 0 0 0];
num=1;
den=poly(A)
sys=tf(num,den);
pzmap(sys)
roots1=eig(A)
B1=[0;0;0;1;0;0];
Qc1=ctrb(A,B1);
dimA=size(A)
if rank(Qc1)==size(A)
disp(' Only when U1 has role in controllability of the system ')
else
disp(' Only when U1 has no role in controllability of the system ')
end
B2=[0;0;0;0;1;0];
Qc2=ctrb(A,B2);
if rank(Qc2)==size(A)
disp(' Only when U2 has role in controllability of the system ')
else
disp(' Only when U2 has no role in controllability of the system ')
end
B3=[0;0;0;0;0;1];
Qc3=ctrb(A,B3);
if rank(Qc3)==size(A)
disp(' Only when U3 has role in controllability of the system ')
else
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [12]
Lanzhou Gansu China
disp(' Only when U3 has no role in controllability of the system ')
end

den =
1.0000 0.0000 1.9999 0.0000 -19.9653 0.0000
-51.5796
roots1 =
-2.1587 + 0.0000i
2.1587 + 0.0000i
0.0000 + 1.8626i
0.0000 - 1.8626i
0.0000 + 1.7862i
0.0000 - 1.7862i
dimA =
6 6
Only when U1 has no role in controllability of the system
Only when U2 has no role in controllability of the system
Only when U3 has no role in controllability of the system







Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [13]
Lanzhou Gansu China


e). If you can measure the position of the direction of drift , please
determine u2 to the location determined by the amount of drift transfer
function. (Tip: You can make the observed output
= [
0 1 0 0 0 0
]x )
Solution:
C=[0 1 0 0 0 0];
syms s
I=eye(6);
E=s*I-A;
F=collect(inv(E));
G=C*F*B2

G =
(6250000*s^2 - 46130625)/(6250000*s^4 - 7440625*s^2 - 101044521)

f). With tf2ss function calculate the state variable model (e) obtained
in the transfer function and verify that the subsystem is able to control
the trajectory of the system;
Solution:
num=[-6250000 0 46130625];
den=[-6250000 0 7440625 0 101044521];
Gf=tf(num,den)
sys_ss=ss(Gf)
Gf =

6.25e06 s^2 - 4.613e07
------------------------------------
6.25e06 s^4 - 7.441e06 s^2 - 1.01e08

Continuous-time transfer function.

sys_ss =

a =
x1 x2 x3 x4
x1 0 0.5952 0 2.021
x2 2 0 0 0
x3 0 2 0 0
x4 0 0 2 0

Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [14]
Lanzhou Gansu China
b =
u1
x1 1
x2 0
x3 0
x4 0

c =
x1 x2 x3 x4
y1 0 0.5 0 -0.9226

d =
u1
y1 0

Continuous-time state-space model.

A1=[0 0.5952 0 2.021;2 0 0 0;0 2 0 0;0 0 2 0];
B1=[1;0;0;0];
Qc=ctrb(A1,B1)
if rank(Qc)==size(A)
disp(' Subsystem is controlable ')
else
disp(' Subsystem is not controlable ')
end

Qc =
1.0000 0 1.1904 0
0 2.0000 0 2.3808
0 0 4.0000 0
0 0 0 8.0000
Subsystem is not controlable


g). Closed bad state feedback pole u2 =-Kx , suitable feedback controller
designed to enable (f) is obtained in a system s1,2 = -1 j and s3,4 = -10.
Solution:
sys s
num=[-6250000 0 46130625];
den=[-6250000 0 7440625 0 101044521];
[A1 B1 C1 D1]=tf2ss(num,den);
P=[-1+i -1-i -10 -10];
if rank(A1)==4
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [15]
Lanzhou Gansu China
disp(' ')
else
disp()
end
K=acker(A1,B1,P)
AGK=A1;
BGK=B1;
CGK=K;
DGK=0;
subplot(2,1,1);
rlocus(AGK,BGK,CGK,DGK)% Join root locus of the feedback system
grid
title(' Joint Root Locus Of The Feedback System ')
At=A1-B1*K;
Bt=B1;
Ct=C1;
Dt=D1;
[zI,pI,gainI]=ss2zp(At,Bt,Ct,Dt)
dcg=dcgain(At,Bt,Ct,Dt);
t=0:0.1:10;
yc=step(At,Bt,Ct,Dt,1,t);
yc1=yc/dcg;
subplot(2,1,2);
plot(t,yc1)
grid
title(' After adding a feedback system step response');


K =
22.0000 143.1905 240.0000 216.1671
zI =
2.7168
-2.7168
pI =
-10.0000 + 0.0000i
-10.0000 - 0.0000i
-1.0000 + 1.0000i
-1.0000 - 1.0000i
gainI =
1

After adding the state feedback root locus and status of the system
response is:

Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [16]
Lanzhou Gansu China










Where K is the state feedback matrix, zI is added after the zero state
feedback, pI state feedback is added after the pole, gainI the system gain
is apparent from the results of the pole, the system is stable. The pole
can also be seen precisely calculated desired value, and can be seen from
the root locus and step response system diagram, the real part of the
extreme points are less than zero, the system is asymptotically stable,
adjust the time after joining the state feedback faster.




Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [17]
Lanzhou Gansu China
Problem 5
In 8.2 wind turbine in a first-order model, the use of wind turbine pitch
angle control of the speed of change in wind speed considered disturbances,
design closed bad PI controller of wind turbine speed, so that the speed
is constant.
Solution:
PI controller model for K1 + K2 / s, so that the system can be obtained
closed-loop system characteristic equation is
S^2+0.3397K1*S+0.3397K2=0
To make the stable operation of the wind turbine, you need to let the roots
of the characteristic equation have negative real parts.
Procedures are as follows:
>> syms s k1 k2;
>> s=solve(s^2+0.339*k1*s+0.339*k2)
s =
((114921*k1^2)/1000000 - (339*k2)/250)^(1/2)/2 - (339*k1)/2000
- (339*k1)/2000 - ((114921*k1^2)/1000000 - (339*k2)/250)^(1/2)/2
It is negative, which can be drawn from K1 <= 180, K2 <= 86, PI controller
was able to meet the requirements, it is assumed to take K1 = 80, K2 =
60, simulink simulation as shown.


Which uses the input step signal pulse perturbation signal units.
When the disturbance signal is not added, only step signal input system
response is shown below.
Not only adding pulse disturbance input step signal output response is:





Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [18]
Lanzhou Gansu China




In adding the output pulse in response to system disturbances



By comparing these two figures found that the system can be a good feedback
regulation by the system to stabilize the situation in the disturbance,
but it can be seen adjusting the speed, so the PI controller is required
to meet the resulting index.


Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [19]
Lanzhou Gansu China
Problem 6
In the third-order model 8.2 wind turbine, the use of wind turbine pitch
angle control the speed of change in wind speed considered disturbance,
electromagnetic torque as a constant, using state feedback and pole
placement algorithm, design closed bad wind turbine speed control
systems.
Solution:
General expectations of selected observer poles of the transfer function
poles 2-5 times, select the observer program in the following extreme
point-2.2986e004, -300,-0.0286e004. Solving procedure is as follows, and
by adding state feedback strike after Bode plots, and root locus as well
as to determine the stability of the unit step response and adjust the
speed of the system, first of all, should determine the system's
controllability, using rank criterion.
A=[-0.8468 -8.1598e-008 0.5071;867637000 0 -867637000;1.1636e+004
0.0019 -1.1636e+004];
B=[-0.0262;0;0];
C=[0 0 1];
D=0;
Qc=ctrb(A,B)
if rank(Qc)==size(A)
disp(' System is controlable ')
else
disp(' System is not controlable ')
end
pe=[-2.2986e+004 -300 -0.0286e+004];
w=[0.01 10];
t=0:0.05:10;
K=place(A,B,pe)
bode(A,B,K,0);
title('State Feedback System After Adding Bode Plot ')
grid
[gm pm wpc wgc]=margin(A,B,K,0);
figure;
rlocus(A,B,K,0);
grid
title('After Adding The Root Locus State Feedback System')
At=A-B*K;
Bt=B;
Ct=C;
Dt=D;
[zI PI gain]=ss2zp(At,Bt,Ct,Dt);
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [20]
Lanzhou Gansu China
dcg=dcgain(At,Bt,Ct,Dt);
figure;
yc=step(At,Bt,Ct,Dt,1,t);
yc=yc/dcg;
plot(t,yc);
title('After Adding The State Feedback System Step Response ')
grid

Qc =
1.0e+11 *
-0.0000 0.0000 -0.0000
0 -0.0002 2.6453
0 -0.0000 0.0000
System is controlable
K =
1.0e+05 *
-4.5554 0.0000 4.0989

After adding the root locus feed back system






-2.5 -2 -1.5 -1 -0.5 0 0.5
x 10
4
-1500
-1000
-500
0
500
1000
1500
0.999
1
1
0.86 0.965 0.986 0.993 0.996 0.998
0.999
1
1
5e+03 1e+04 1.5e+04 2e+04 2.5e+04
0.86 0.965 0.986 0.993 0.996 0.998
After Adding The Root Locus State Feedback System
Real Axis (seconds
-1
)
I
m
a
g
i
n
a
r
y

A
x
i
s

(
s
e
c
o
n
d
s
-
1
)
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [21]
Lanzhou Gansu China
State feed back system after adding the Bode Plot


After adding the state feedback system step response:

From the above results, system control, and the system after joining the
state feedback system is not only stable but also to adjust and respond
faster
-40
-20
0
20
40
60
80
M
a
g
n
i
t
u
d
e

(
d
B
)
10
-2
10
0
10
2
10
4
10
6
-135
-90
-45
0
P
h
a
s
e

(
d
e
g
)
State Feedback System After Adding Bode Plot
Frequency (rad/s)
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
1.2
1.4
After Adding The State Feedback System Step Response
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [22]
Lanzhou Gansu China
Problem 7
From above question, design LQR controller for the speed of the wind
turbine.

Solution:
LQR controller design, we must first determine the weighting matrix Q,
we may assume that Q = diag ([4e004, 0,1 e004]), and then use Iqr function
LQR controller strike state feedback matrix k, the program is as follows:
A=[-0.8468 -8.1598e-008 0.5071;867637000 0 -867637000;1.1636e+004
0.0019 -1.1636e+004];
B=[-0.0262;0;0];
Q=diag([4e+004 0 1e+004]);
R=1;
K=lqr(A,B,Q,R)
bode(A,B,K,0)
title('State Feedback System After Adding Bode Plot')
[gm pm wpc wgc]=margin(A,B,K,0);
figure;
rlocus(A,B,K,0);
title('After Adding The Root Locus State Feedback System')
grid
At=A-B*K;
Bt=B;
Ct=C;
Dt=D;
[zI PI gain]=ss2zp(At,Bt,Ct,Dt);
dcg=dcgain(At,Bt,Ct,Dt);
figure
yc=step(At,Bt,Ct,Dt,1,t);
yc=yc/dcg;
plot(t,yc);
title('After Adding The State Feedback System Step Response ')
grid
LQR controller state feedback matrix K
K =
-211.0180 -0.0000 0.0013






Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [23]
Lanzhou Gansu China
State feedback system after adding the Bode Plot



After adding the root locus state feedback system





-100
-50
0
50
M
a
g
n
i t
u
d
e

(
d
B
)
10
-2
10
-1
10
0
10
1
10
2
10
3
10
4
10
5
-135
-90
-45
0
P
h
a
s
e

(
d
e
g
)
State Feedback System After Adding Bode Plot
Frequency (rad/s)
-2.5 -2 -1.5 -1 -0.5 0 0.5
x 10
4
-1500
-1000
-500
0
500
1000
1500
0.999
1
1
0.86 0.965 0.986 0.993 0.996 0.998
0.999
1
1
5e+03 1e+04 1.5e+04 2e+04 2.5e+04
0.86 0.965 0.986 0.993 0.996 0.998
After Adding The Root Locus State Feedback System
Real Axis (seconds
-1
)
I
m
a
g
i
n
a
r
y

A
x
i
s

(
s
e
c
o
n
d
s
-
1
)
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [24]
Lanzhou Gansu China
After adding the feedback system step response



from the results, after joining the state feedback system is not only
stable but also faster response.










0 1 2 3 4 5 6 7 8 9 10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
After Adding The State Feedback System Step Response
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [25]
Lanzhou Gansu China
Problem 8
Third-order model of the wind turbine system, said second axis of torsion
spring force is not easy to measure the state of the state variables,
design the state of the observer, and the composition state feedback
system.
Solution:
Because it is a state observer dimensionality reduction, the output matrix
C of rank 1, so the dimension of dimensionality reduction state observer
is 3-1 = 2; may wish to set the desired state feedback pole is-4e004,
0,-1e004, state observers expect the pole is -20, -30, the corresponding
design procedure is as follows:
A=[-0.8468 -8.1598e-008 0.5071;867637000 0 -867637000;1.1636e+004
0.0019 -1.1636e+004];
B=[-0.0262;0;0];
C=[0 0 1];
D=0;
w=[0.01 10];
t=0:0.05:10;
p=[-4e+004 0 -1e+004];
op=[-20 -30];
x0=[1 2 3];
xh0=[-1 -2 -3];
k=place(A,B,p);
T=[0 1 0;1 0 0];
e=[C;T];
ei=inv(e);
[mm nn]=size(C);
p=ei(:,1:mm);m=ei(:,mm+1:nn);
a11=C*A*p;
a12=C*A*m;
a21=T*A*p;
a22=T*A*m;
b1=C*B;
b2=T*B;
Lr=place(a22',a12',op);Lr=Lr';
f=a22-Lr*a12;
g=b2-Lr*b1;
d=f*Lr+(a21-Lr*a11);
n=p+m*Lr;
Ak=f-g*k*m;
Bk=d-g*k*n;
Ck=k*m;
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [26]
Lanzhou Gansu China
Dk=k*n;
[zk pk gk]=ss2zp(Ak,Bk,Ck,Dk,1);
zk,pk,gk
[Ac Bc Cc Dc]=series(A,B,C,D,Ak,Bk,Ck,Dk);
rlocus(Ac,Bc,Cc,Dc);
title(' Dimensionality reduction state observer system root locus ')
grid
axis([-6 1 -6 6]);
figure
[mc pc]=bode(Ac,Bc,Cc,Dc,1,w)
bode(Ac,Bc,Cc,Dc);
title(' Bode diagram of the system ')
grid
[gm pm wpc wgc]=margin(mc,pc,w)
[At,Bt,Ct,Dt]=feedback(A,B,C,D,Ak,Bk,Ck,Dk);
[zt pt gaint]=ss2zp(At,Bt,Ct,Dt,1);
dcg=dcgain(At,Bt,Ct,Dt)
ycc=lsim(At,Bt,Ct,Dt,ones(201,1),t,[x0 xh0(1:2)]);
ycc=ycc/dcg;
[zt pt gt]=ss2zp(At,Bt,Ct,Dt,1);
zt,pt
Ct=[eye(nn) zeros(nn,nn-mm);n*C m];
Dt=zeros(2*nn,1);t2=[0:0.02:2]';
w0=T*xho'-Lr*C*x0';
w0=w0';
x_xh=initial(At,Bt,Ct,Dt,[x0 w0],t2);
figure
plot(t2,[x_xh(:,1) x_xh(:,4)]);grid
title(' Observing the actual state of x1 * x1 and response curve ');
figure;
plot(t2,[x_xh(:,2) x_xh(:,5)]);grid
title(' Observing the actual state of x2*x2 and response curve ');
figure;
plot(t2,[x_xh(:,3) x_xh(:,6)]);grid
title(' Observing the actual state of x3*x3 and response curve ');

zk =
1.0e+03 *
-9.9435
-0.0003
pk =
1.0e+04 *
-0.9367
-2.9046
Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [27]
Lanzhou Gansu China
gk =
1.0439e+06
mc =
1.0000
0.9995
pc =
179.9991
179.9755
gm =
1.0000
pm =
Inf
wpc =
0.0077
wgc =
NaN
dcg =
-4.8027e+09
zt =
1.0e+04 *
-2.9046
-0.9367
-0.0142
pt =
1.0e+04 *
-4.0000
-1.0000
0.0000
-0.0020
-0.0030














Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [28]
Lanzhou Gansu China
Dimensionality reduction state observer system root locus

Bode plot of the system under state observer:



Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [29]
Lanzhou Gansu China
State x1*x1 Contrast:

State x2*x2 Contrast:



Linear System Theory Manual Using Matlab - Notebook
Lanzhou University Of Technology [30]
Lanzhou Gansu China



State x3 and x3 * Contrast:



The calculated k program is state feedback controller state feedback
matrix, Lr is the reduced-order observer Matrix. The procedures required
by the matrix may constitute seeking state feedback controller with
reduced-order observer. By comparing the actual state observer status and
found x1 = x1 *, x3 = x3 *, only the state x2 is not easy to measure, you
need to measure the state observer.

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0
500
1000
1500
2000
2500
3000
3500
4000
Observing the actual state of x3*x3 and response curve

You might also like