Upload
phunghanh
View
225
Download
1
Embed Size (px)
Citation preview
SUPSI DTI Automazione
Digital Control of Dynamic Systems
Silvano BalemiUniversity of Applied Sciences of Southern Switzerland
Manno, 2004
SUPSI DTI Automazione
Discrete-time signals
SUPSI DTI Automazione Step response of a sampled system
Time (sec.)
Ampl
itude
Step Response
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.05
0.1
0.15
0.2
0.25
0.3
0.35From: U(1)
To: Y
(1)
SUPSI DTI Automazione Sample and hold
SUPSI DTI Automazione
Multiplication with a train of unit impulses(operation is linear but time-variant)
Sampling
SUPSI DTI Automazione Train of impulses andits Fourier expansion
SUPSI DTI Automazione Sampled signal
with
SUPSI DTI Automazione Spectrum of Sampled signal
-10 -8 -6 -4 -2 0 2 4 6 8 100
0.5
1
1.5
2SPECTRUM OF A SIGNAL
|R|
-15 -10 -5 0 5 10 150
0.5
1
1.5SPECTRUM OF THE SAMPLED SIGNAL AND ITS COMPONENTS|R*|
w1
SUPSI DTI Automazione Hold
Linear operation
Impulse response of a ZOH
1(t)
1(t − T)
SUPSI DTI Automazione Z transform
where
Laplace transformation with
The z transform corresponds to the sequence
with the function
SUPSI DTI Automazione Relation between different transforms
SUPSI DTI Automazione
Z transform:Examples and properties
SUPSI DTI Automazione Examples of z transforms
SUPSI DTI Automazione Some transformations
SUPSI DTI Automazione Properties of the z transform
Linearity
Delay
Anticipation
Damping
Product
Initial value
End value
SUPSI DTI Automazione z transform
1. From the Laplace transformation
Factorization
G(s) =s+ak g(t) = k á eàaát G(z) = k á
zàeàaáTz
Using „primitives“
SUPSI DTI Automazione Inverse z transform
1. Inverse trasform via factorization
2. Inverse transform via recursion
SUPSI DTI Automazione
Sampled Systems
SUPSI DTI Automazione Discrete-time Transfer functionfrom time domain
No transfer function between u and y but between u* and y*
and with variable substitution l=k-m
SUPSI DTI Automazione Discrete-time Transfer functionfrom frequency domain
with variablesubstitution m=k+n
SUPSI DTI Automazione Transfer functionwith ZOH
Gzoh(z)
SUPSI DTI Automazione ExampleTransfer function with ZOH
SUPSI DTI Automazione State space representation
u constant from 0 to T
Transfer function
from
SUPSI DTI Automazione Description ofLinear Time-invariantDiscrete-time Systems
SUPSI DTI Automazione Stability of sampled systems
x x
x
x
x
x
x x
x
x
x
x
SUPSI DTI Automazione Step responses
x
x
x
x
xx
xx
xx
x
x
x
SUPSI DTI Automazione Closed-loopsampled systems
Digital part Analog part
Digitalcontroller
Cont.-timeprocess
SUPSI DTI Automazione Closed-loopDiscrete-time system (2)
model ofA/D conv
model ofprogram
model ofD/A conv
model ofprocess
Gzoh(z)
SUPSI DTI Automazione Example: system stability
≈ 0.09
SUPSI DTI Automazione Example of a program for a controller
(1 + zà1 + zà2) á U(z) = (zà1 + 3 á zà2) á E(z)
Gc(z) = E(z)
U(z)=
z2+z+1z+3
(z2 + z + 1) á U(z) = (z + 3) á E(z)
U(z) + zà1 á U(z) + zà2 á U(z) = zà1 á E(z) + 3 á zà2 á E(z){uk} + {ukà1} + {ukà2} = {ekà1} + 3 á {ekà2}
uk + ukà1 + ukà2 = ekà1 + 3 á ekà2
uk = à ukà1 à ukà2 + ekà1 + 3 á ekà2
SUPSI DTI Automazione Example of aprogram for a controller:C-code
ek_1=0; ek_2=0; uk_1=0; uk_2=0;while TRUE{yk=read_yk();ek=yrefk-yk;uk=-uk_1-uk_2+ek_1-3*ek_2;write(uk);uk_2=uk_1; uk_1=uk;ek_2=ek_1; ek_1=ek;}
C-code
Minimize control delay!
ek_1=0; ek_2=0; uk_1=0; uk_2=0;while TRUE{uk=-uk_1-uk_2+ek_1-3*ek_2;yk=read_yk();write(uk);ek=yrefk-yk;uk_2=uk_1; uk_1=uk;ek_2=ek_1; ek_1=ek;}