Академический Документы
Профессиональный Документы
Культура Документы
SYSTEMS ENGINEERING
COURSE #: CS421
INSTRUCTOR:
DR. RICHARD H. MGAYA
Design problem:
Selection of the coefficients ai and bi once the sampling interval T is
specified
Note: The control system designer must know whether the actuating
hardware will be able to respond to the magnitude of the control effort
generated by the algorithm in the digital processor
Modeling and digital simulations of the control system
Examination of the control effort required
de
u (t ) K p e(t ) K i edt K d
dt
0
KT K
u (k ) uk 1 K p i d ek
2
T
2K d
Kd
K iT
Kp
ek 2
ek 1
T
T
2
1
E( z)
1 z
z ( z 1)
where
K iT K d
2
T
KT
2K d
i Kp
2
T
Kp
Kd
T
Dr. Richard H. Mgaya
General PI
D( z )
where
U ( z ) z
E( z)
z 1
Kp
K iT
2
K iT
Kp
2
U ( z) ( z / )
E( z)
z 1
( z 0.952)
z 1
Dr. Richard H. Mgaya
1.5
System: sys
Gain: 2.5
Pole: 0.705 + 0.221i
Damping: 0.706
Overshoot (%): 4.35
Frequency (rad/sec): 1.72
Imaginary Axis
0.5
-0.5
-1
-1.5
-2
-5
-4
-3
-2
-1
Real Axis
1.2
Amplitude
0.8
0.6
0.4
0.2
Time (sec)
Tuning strategy:
Relationship between PID parameters to the values of R and L
0.9
RL
Ki
1
0.272
Kp
3.3L
RL2
PID Controller:
0.9
RL
1
0.6
Ki
Kp
2L
RL2
Kp
0.6
K d 0.5 LK p
R
T ( s)
1
2
U ( s ) s 2.75s 0.5
Step Response
2
1.8
1.8
1.6
1.6
1.4
1.4
1.2
Amplitude
Amplitude
1.2
1
0.8
1
0.8
0.6
0.6
0.4
System: sys
Time (sec): 0.47
Amplitude: 0.0763
0.2
0
L 0.47 s
0.4
0.2
10
15
Time (sec)
20
25
30
R 0.37
10
15
20
25
30
Time (sec)
0.9
0.9
5.175
RL 0.37 0.47
Ki
0.272
0.272
0.330
2
2
RL
0.37 0.47
Step Response
1.6
Using T = 0.25:
1.4
Control algorithm:
uk uk 1 5.592ek 4.758ek 1
1
Amplitude
5.592( z 0.85)
D( z )
z 1
1.2
0.8
0.6
0.4
0.2
Time (sec)
1.2
Amplitude
0.8
0.6
0.4
0.2
10
15
Time (sec)
20
25
30
Y ( z)
G ( z ) D( z )
R( z ) 1 G ( z ) D( z )
G( z) 1 M ( z)
Causal controller current effort does not dependent on the future values
of the error
Dr. Richard H. Mgaya
1 G ( z ) D( z ) 0
Let D(z) = c(z)/d(z) and G(z) = b(z)/a(z) the closed-loop characteristic
polynomial:
a ( z ) d ( z ) b ( z )c ( z ) 0
Let a common factor (z - ) be in the numerator D(z) and the denominator
of G(z). If the factor is the pole of G(z), (z - )a to be cancelled then,
( z )a ( z )d ( z ) ( z )c ( z )b( z ) 0
( z )a ( z )d ( z ) c ( z )b( z ) 0
Dr. Richard H. Mgaya
E ( z ) R( z )[1 M ( z )]
z
ess lim z 1 1 z
[1 M ( z )]
z 1
1 M (1)
1
M (1) 1
Tz
1
ess lim z 1 1 z
[1 M ( z )]
2
Kv
z 1
M (1) 1
1
dM
dz
dM
dz
1
Kv
1
K vT
z 1
z 1
G( z)
0.025( z 0.816)
z 2 1.48 z 0.5026
b0 b1 z 1 b2 z 2 b3 z 3
M ( z)
1 0.8 z 1 0.32 z 2
Dr. Richard H. Mgaya
M ( z)
b1 z b2
1 0.8 z 1 0.32 z 2
M (1)
b1 b2
1
0.52
(i)
dM
dz
z 1
0.1
2
2
( z 0.8 z 0.32)
K vT
Dr. Richard H. Mgaya
dM
dz
z 1
b1 1.148
b2 0.52 b1 0.628
M ( z)
1.148 z 0.628
1 0.8 z 1 0.32 z 2
Dr. Richard H. Mgaya
D( z )
1
M ( z)
G( z ) 1 M ( z )
Substitution
D( z )
Controller :
U ( z) M ( z)
R( z ) G ( z )
Soln:
Since G(z) has no free integrator in the form of 1 - z-1, then for zero
steady-state error M(z) must have that factor
1 M ( z ) (1 z 1 )(a0 a1 z 1 )
(i)
Dr. Richard H. Mgaya
M ( z ) (1 0.816 z 1 )d1 z 1
1 M ( z ) 1 d1 z 1 0.816 z 2
(ii)
a0 1
a1 a0 d1
a1 0.816d1
a0 1, a1 0.4493, d1 0.5507
M ( z ) 0.5507 z 1 0.4493z 2
Controller
1 1.48 z 1 0.5026 z 2
0.5507 z 1
D( z )
0.025 z 1
(1 z 1 )(1 0.4493z 1 )
22.028( z 2 1.48 z 0.5026)
D( z )
z 2 0.5507 z 0.4493
Confirming U(z)/R(z)
R( z ) G ( z )
z2
1.2
Amplitude
0.8
0.6
0.4
0.2
0.5
1.5
2.5
3.5
4.5
Time (sec)
State-Space Representation
Solution to the State Vector Differential Equation
Consider the first-order differential equation
Laplace
dx
ax(t ) bu (t )
dt
sX ( s ) x(0) aX ( s ) bU ( s )
X ( s)
Inverse
Note:
x(0)
b
U ( s)
sa sa
t
2 2
k k
a
t
a
t
e at 1 at
2!
k!
State-Space Representation
Solution to the State Vector Differential Equation Cont
Consider the state vector differential equation
x Ax Bu
Laplace
sX ( s ) x(0) AX ( s ) BU ( s )
( sI A) X ( s ) x(0) BU ( s )
Inverse
x(t ) e At x(0) e A( t ) BU ( )d
0
State-Space Representation
Solution to the State Vector Differential Equation Cont
Alternatively:
Thus,
A2t 2
Ak t k
(t ) 1 At
2!
k!
t
Characteristic equation:
( sI A) 0
Dr. Richard H. Mgaya
State-Space Representation
Discrete Solution to the State Vector Differential Equation
Discrete solution to state equation:
T
AT
A
x(k 1)T e x(kT ) e Bd u (kT )
0
General form:
AT 2 A2T 3
Ak T k 1
B(T ) 1T
B
2!
3!
(k 1)!
State-Space Representation
Discrete Solution to the State Vector Differential Equation
Example: The state-space equation for a mass damper system is
given as follows
x1 0
x 2
2
1 x1 0
u
3 x2 1
Evaluate:
(a) Characteristic equation, its roots, n and
(b) Transition matrix (s) and (t)
(c) Transient response of state variables from initial conditions
y(0) = 0 and y`(0) = 0.1
State-Space Representation
Discrete Solution to the State Vector Differential Equation
(a) Characteristic equation, its roots, n and
s 0 0
( sI A)
0 s 2
1 s
3 2
1
s 3
( sI A) s ( s 3) (2) s 2 3s 2 0
Roots: s = -1, -2
s 1, 2
State-Space Representation
Discrete Solution to the State Vector Differential Equation
(b) Transition matrix (s) and (t)
A1
Adjoint A
det A
( s ) ( sI A) 1
s 3 2
Minor
( s)
1
s
s 3 2
Cofactor ( s )
s
1
(s) is given as
s3
( s 1)( s 2)
( s)
1
( s 1)( s 2)
( s 1)( s 2)
( s 1)( s 2)
State-Space Representation
Discrete Solution to the State Vector Differential Equation
(b) Transition matrix (s) and (t)
Partial fraction of (s):
2
1
1
1
s 1 s 2
s 1 s 2
( s)
2 1 1 1 2
s 1 s 2 s 1 s 2
Inverse Laplace:
2e t e 2t
(t )
t
2t
2 e e
e 2t
e t 2e 2t
State-Space Representation
Discrete Solution to the State Vector Differential Equation
(c) Transient response of state variables from initial conditions
y(0) = 0, y`(0) = 0.1, x1(0) = 1, and x2(0) = 0
Transient response:
x(t ) (t ) x(0)
2e t e 2t
x(t )
t
2t
2
e
e 2t
e t 2e 2t
1
0
x1 (t ) 2e t e 2t
x2 (t ) 2(e t e 2t )
State-Space Representation
Controllability
The possibility to drive the system from some arbitrary initial
condition x(0) to some specified final state x(n) in n sampling
intervals
Consider the general system
x(k 1) Ax(k ) Bu (k )
x(k ) A x(0) Ak i 1 Bu (i )
k
Similarly,
i 0
n 1
x(n) An x(0) An i 1 Bu (i )
i 0
State-Space Representation
Controllability
Matrix form:
u (0)
u (1)
x(n) An x(0) An 1 B An 2 B B
u
(
n
1
)
rank An 1 B An 2 B AB B n
State-Space Representation
Controllability
Example: A linear discrete system is given as follows
x1 (k 1) 1
x (k 1) 0.4
2
0.2 x1 (k ) 1
u (k )
0.4 x2 (k ) 1
1
AB
0.4
0.2 1 0.8
0.4 1 0.8
0.8 1
rank AB B rank
1
0.8 1
Thus, uncontrollable
Dr. Richard H. Mgaya
State-Space Representation
Observability
The possibility to determine the states and the control effort
from measured output at different time intervals
Consider the general system
x(k 1) Ax(k ) Bu (k )
y (k ) Cx(k )
Similarly,
y (k ) CA x(0) CAk i 1 Bu (i )
k
i 0
State-Space Representation
Observability
In matrix form:
n 2 i
n 1
y
(
n
1
)
C
A
Bu
(
i
)
CA
x(0)
i 0
2
y (2) CA
y (n 1) CAn 1
State-Space Representation
Observability
Solution exists if the rank of the observability matrix is n
C
CA
2
rank CA n
CAn 1
T
x1 (k 1) 1 T x1 (k )
x (k 1) 0 1 x (k ) 2 u (k )
2 T
2
x1 (k )
y (k ) 0 1
x
(
k
)
2
State-Space Representation
Observability
Observability matrix:
CT
0 1
rank T rank
1
0 1
C A