Professional Documents
Culture Documents
g Modeling
g Issues
• Design Approaches
– Design by Emulation • Discrete-time:
– Direct Digital System Design
– Constant Coefficient Difference Equations (CCDEs)
• Constant Coefficient Difference
Equations are used to model the systems.
• Z-transforms – No information on discrete variables is available
– Examples between sampling instances
instances.
– Properties – Magnitudes of digital signals are quantized.
• Discrete-time System Modeling
• Examples: • Continuous-time:
– Cruise Control – Ordinary Differential Equations (ODEs) are used.
– Water Tank – Time and every physical quantity are continuous.
continuous
– Motor Position Control
– Magnitudes are usually not quantized.
Design
g Issues 1 - Design
g by
y Emulation
• Treat controller as a pseudo continuous-time
continuous time
• How do we design a digital controller? system:
– How to devise a control algorithm (CCDE) – Use control theory to design a continuous
continuous-time
time
controller:
yielding the desired control performance? • State-space
• There are two design approaches to • Laplace (frequency or s) domain
Mathematical Simulations
• State-space techniques Model for Plant Studies
• z-domain techniques Preliminary Fine
Analysis Tuning
• Most practical and reliable approach! S l ti off
Selection
Control System Test
Components
Si lifi ti
Simplifications
Chapter 2a ME 534 6 Chapter 2a ME 534 7
Transport
p Delay
y Property
p y Conventions in Z-transforms
Z-transform is only defined for
R
Recall
ll th
thatt sampled time functions as
∞
F ( z ) = Z { f (kT )} = ∑ f (kT ) z − k
L{ f (t )} = F ( s) k =0
0
sT
where z =ˆ e .
L{ f (t − T )} = e − sT F ( s)
t
T
Z { f * (t )} = Y ( z ) = 1 ⋅ z −0 + 0 ⋅ z −1 + 0 ⋅ z −2 + ... = 1 f * (t ) = 0 ⋅ δ (t ) + T ⋅ δ (t − T ) + 2T ⋅ δ (t − 2T ) + ...
2. Unit Step: f * (t ) = 1 ⋅ δ (t ) + 1 ⋅ δ (t − T ) + 1 ⋅ δ (t − 2T ) + ... ∞
∞
Z { f * (t )} = 0 ⋅ z −0 + T ⋅ z −1 + 2T ⋅ z −2 + ... = ∑ ( kT )z −k
Z { f * (t )} = 1 ⋅ z −0 + 1 ⋅ z −1 + 1 ⋅ z −2 + ...∑ z −k k =0
k =0
∞
1 Tz −1
Recall that ∑ k
a =
1−a
( a < 1) F (z) =
k =0 (1 − z −1 )2
1
F (z) = (|z −1 |< 1)
1 − z −1
Examples
p ((Cont’d)) Z-transform Table
4 Arbitrary Function:
4. F(s) f(kT) F(z)
1 δ(kT) 1
f * (t ) = 0 ⋅ δ (t ) + 1 ⋅ δ (t − T ) + 2 ⋅ δ (t − 2T )
1/s 1(kT) 1/(1 − z-1)
+ 2 ⋅ δ (t − 3T ) + 1 ⋅ δ (t − 4T ) + 0 + ....
1/s2 kT ( − z-1)2
Tz-1/(1
Properties
p of Z-transform Properties
p ((Cont’d))
1. Linearity: Z { a ⋅ f ( kT )} = a ⋅ Z { f ( kT )}
6. Final Value Theorem: (valid only for stable systems)
Z { f1 ( kT ) ± f2 ( kT )} = Z { f1 ( kT )} ± Z { f2 ( kT )} ((zz − 1)
2. Addition: f ( ∞ ) = lim f ( kT ) = lim F (z)
k →∞ z →1 z
3. Time Shift: kT )} = z − n Z { f ( kT )}
Z { f ( kT − nkT where F ( z ) = Z { f ( kT )}
+∞
4. Convolution: Z { ∑ f1 (iT ) f2 ( kT − iT )} = F1 ( z ) F2 ( z ) 7. Initial Value Theorem:
i = −∞
f (0) = lim F ( z )
5. Scaling: Z {r − k f ( kT )} = F (rz ) z →∞
Sampled
p Impulse
p Response
p Sampled
p Impulse
p Response
p ((Cont’d))
x(t) y*(t)
Ideal y(0) Note that y (t ) = g (t ) = L−1{G ( s )}
(t) Sampler y(T)
y(2T)
x(t)
Linear Time-
y(t) y*(t) y * (t ) = g (0) ⋅ δ (t ) + g (T ) ⋅ δ (t − T ) + g (2T ) ⋅ δ (t − 2T )
t t
0 a a t Syste
invariant System
T 0 T 2T
+ ... + g ( kT ) ⋅ δ (t − kT ) + ...
In Laplace
p domain: Similarly
Similarly, Y * ( s) = L{ y * (t )} = g (0) + g (T ) e − sT + g (2T ) e − s2T + ...
X ( s) = L{δ (t )} = 1 Z-transform
Z transform of the sampled impulse response y*(t)
y (t) becomes
∞
Y ( z ) = g (0) + g (T )z −1 + g (2T )z −2 + ... = ∑ g ( kT )z −k =ˆ G( z )
where G(s) is the transfer function of LTI system
system. Hence
Hence, k =0
G( z )
y0* (t ) = g (0)x (0)δ (t ) + g (T )x (0)δ (t − T ) + ... −1
∴Y1 ( z ) = G( z ) ⋅ x (T ) ⋅ z
∴ Y0 ( z ) = G( z ) ⋅ x (0)
− sT Similarly, Y2 ( z ) = G( z ) ⋅ x (T ) ⋅ z −2 and so on...
Likewise, the response to x(T)δ(t-T) is Y1 ( s) = G( s)[
x (
T ⋅ e
) ⋅
1]
d l
delayed
d impulse
i l
Overall Response
p Transfer Function of ZOH / Latch
Y ( z ) = Y0 ( z ) + Y1 ( z ) + ...
−1 −2
= G( z )[
x ( +
0) x (
T )
z + x
( 2T ) z +
...]
]
Z { x ( kT )} = X ( z )
1 2
x(kT) x(kT) x(kT)
Y ( z ) = G( z ) ⋅ X ( z )
Y (z)
t t t
kT (k+1)T kT kT (k+1)T
∴ G( z ) =
X (z)
D l
Delayed
d step
t b by kT
kT: Dela ed step b
Delayed by (k+1)T:
(k+1)T
X ( s) = x ( kT ) ⋅ 1 ⋅ e − skT
x ( kT ) −skT
Y ( s) = ⋅e (1 − e −sT ) B( z )
s = G( z ) = Z {Gzoh ( s) ⋅ G1 ( s) ⋅ G2 ( s) ⋅ H ( s)}
M (z)
Y ( s)
Si
Since Gzoh ( s) = 1 − e − sT 1 − z −1
X ( s) Since Gzoh ( s) = =
s s
Overall System
y Model Operators
p / Complex
p Variables
Continuous-time:
Discrete-time:
( Ms + C )V ( s) = K e A( s)
where V(s) ≡ L{v(t)} and A(s) ≡ L{α(t)}. Therefore, the transfer function is
⎧ Pa ⎫ Use the Z-transform table (see Slide 17):
V (z) ⎪⎪ (1 − z ) K e
−1 C
⎪⎪
V ( s) Ke = Z⎨ ⋅ ⋅ M C ⎬ ⇒ V ( z ) = K e ⋅ (1 − z −1 ) (1 − e − aTT )z −1
= A( z ) ⎪ s
C s+ M ⎪ A( z ) C (1 − z −1 )(1 − e −aT z −1 )
A( s) Ms + C ⎪⎩ ZOH
⎪
Pr ocess ⎭
Chapter 2a ME 534 36 Chapter 2a ME 534 37
Part ((b)) (Cont’d)
( ) Part ((c)) – The Response
p
V (z)
Ke
(1 − e − aT )z −1 b1 z −1 a1 =ˆ e −CT / M L t a1 = 0.99;
Let 1 α(k)
0 99 b1 = 1; (k) = 0
0.1.
1
= C
= where K
A( z ) 1 − e −aT z −1 1 − a1 z −1 b1 =ˆ e (1 − a1 )
C Coefs: 0 99
0.99 0 1
The corresponding CCDE is obtained by substituting k v(k) v(k-1) α(k) α(k-1)
z −1 −1
← q ; V ( z ) ← v( k );
) A( z ) ← α ( k ) 0 0 0 0.1 0
1 0.1 0 0.1 0.1
v( k ) b q −1
Hence = 1 −1 ⇒ v( k )(1 − a1q ) = b1q α ( k )
−1 −1
2 0.199 0.1 0.1 0.1
α ( k ) 1 − a1q
3 0 297
0.297 0 199
0.199 01
0.1 01
0.1
∴ v( k ) = a1v( k − 1) + b1α ( k − 1) 4 0.394 0.297 0.1 0.1
9 m(t) Servo
2.5
8
-valve
qi(t) • Consider the water
2
7
6
tank illustrated.
city [m/s]
Buoy
city [m/s]
1
4
Area: A equation.
3
0.5
2
h(t) b) Draw the block diagram
1 off the
th overallll control
t l
0
0 5 10 15 20 25 30
0
0 100 200 300 400 500 600 700
qo(t) system.
Time Index k
Time Index k
b(t)
O can easily
One il compute
t this
thi response with
ith Matlab:
M tl b c) Determine the discrete-
Here, qi (t ) = c1m(t ) time representation.
>> alpha = 0.1*ones(700,1); q o (t ) = c2 h(t ) d)) If m(k)
( ) = 1 [V]
[ ] (unit
( step)
p)
>> A = [1 -0.99];
0 99] B = [0 1]
1];
>> v = filter(B,A,alpha); b(t ) = c3 h(t ) is applied, calculate the
>> stem(v) final water height.
where c1, c2, and c3 are constants.
Chapter 2a ME 534 40 Chapter 2a ME 534 41
Part ((a)) – Differential Equation
q Part ((b)) – Block Diagram
g
The differential equation
q of this system
y can be simply
p y written as
dh
A⋅ = qi (t ) − qo (t )
dt
Using the aforementioned relationships yields
A db c2
⋅ + b = c1m(t )
c3 dt c3
Taking the Laplace transform of this equation gives
B( s ) K
=
M ( s) s + a
where a = c2/A and K = c1c3/A.
b( k ) q −1 β1 b( k )(1 − α1q −1 ) = m( k )q −1 β1
B( z ) K z −1 (1 − e − aT ) = ⇒
= (1 − z −1 ) m( k ) 1 − α1q −1
M (z) a (1 − z −1 )(1 − z −1e −aT )
b( k ) = α1 ⋅ b( k − 1) + β1 ⋅ m( k − 1)
B( z ) K z −1 (1 − e − aT )
= ⋅
M ( z ) a (1 − z −1e −aT ) where α1 ≡ e-aT and β1 ≡ (K/a)(1− e-aT)
M (z)
The final value of h becomes
Since B(z) = c3H(z),
H(z)
c1 (1 − e − c2T / A ) c1
−1 − aT −1 − c2T / A h( ∞ ) = ⋅ =
B( z ) K z (1 − e ) 1 c z (1 − e ) 1 c2 (1 − e −c2T / A ) c2
H (z) = = ⋅ −1 − aT
⋅ −1
= 1⋅ −1 −c2T / A
⋅
c3 T
c3a (1 − z e ) 1 − z c2 (1 − z e ) 1 − z −1
When a step input is applied to the servo valve, the water level rises
((exponentialy)
p y) to its final level h(∞).
( )
Chapter 2a ME 534 46 Chapter 2a ME 534 47
Example
p 3 - Motor Control Part (a)
( )
⎧ −1
⎫
Θ( z ) ⎪ (1 − z ) 1 1 ⎪ 1 ⎧1 ⎫
= Z⎨ ⋅ ⋅ 2 ⎬ = (1 − z −1 )Z ⎨ 3 ⎬
Ideal Torque
Modulator M (z) ⎪ s
J
s ⎪ J ⎩s ⎭
⎩ ZOH Pr ocess ⎭
Θ( z ) T 2 ( z −1 + z −2 )
= (1 − z −1 )
Ideal Position
Sensor
M ( z ) 2J (1 − z −1 )3 2
Θ( z ) T −1 z −1
= (1 − z )
M (z) J (1 − z −1 )2
Ω( z ) T z −1
= ⋅
M ( z ) J (1 − z −1 )
B(z)