Date post: | 15-Dec-2015 |
Category: |
Documents |
Upload: | abdiel-borders |
View: | 222 times |
Download: | 3 times |
3. Systems and Transfer function
Discrete-time system revision• Discrete-time system• A/D and D/A converters• Sampling frequency and sampling theorem• Nyquist frequency• Aliasings• Z-transform & inverse Z-transform• The output of a D/A converter
3.1 Zero-order-hold (ZOH)
How does a signal change its form in a discrete-time system?
The input signal x(t) is sampled at discrete instants and the sampled signal is passed through the zero-order-hold (ZOH). The ZOH circuit smoothes the sampled signal to produce the signal h(t), which is a constant from the last sampled value until the next sample is available. That is
TtforkTxtkTh 0 ),()(
3.1 Zero-order-hold (ZOH)
Transfer function of Zero-order-holdThe figure below shows a combination of a
sampler and a zero-order hold.
x(t) x(kT) h(t)Zero-orderHold
Sampler
3.1 Zero-order-hold (ZOH)
Assume that the signal x(t) is zero for t<0, then the output h(t)is related to x(t) as follows:
0k
1)T)](k-1(t-kT)-x(kT)[1(t
)]2(1)(1)[()](1)(1)[0()( TtTtTxTttxth
h(t)
t
3.1 Zero-order-hold (ZOH)
As
The Laplace transform of the above equation becomes
000
)1(
)1(
00
0k
11
][1)T)](k-1(t-kT)-1(t[
1)T)]](k-1(t-kT)-x(kT)[1(t[)]([
k
kTsTs
k
kTsTs
k
TskkTs
Tsk
k
kTs
k
x(kT)es
ee
s
ex(kT)
s
eex(kT)
s
e
s
ex(kT)x(kT)L
LthL
kTs
kTskTs
ekTtLtL
s
ekTtLesFkTtfL
)( ,1)]([
)](1[ ,)()]([
3.1 Zero-order-hold (ZOH)
As
Therefore
Finally, we obtain the transfer function of a ZOH as
)(11
)]([)(0
sXs
ex(kT)e
s
ethLsH
Ts
k
kTsTs
00
)()()()(k
kTs
k
ekTxkTtkTxLsX
s
e
sX
sHsGsG
Ts
h
1
)(
)()()( 0
3.1 Zero-order-hold (ZOH)
There are also first-order-hold and high-order-hold although they are not used in control system.
3.1 Zero-order-hold (ZOH)
First-order-hold and high-order-hold does not bring us much advantages except in some special cases. Therefore, in a control system, usually a ZOH is employed. The device to implement a ZOH is a D/A converter.
If not told, always suppose there is a ZOH in a digital control system.
3.2 Plants with ZOH
Given a discrete-time system, the transfer function of a combination of a ZOH and the plant can be written as GHP(z) in Z-domain. HP, here, means the ZOH and the Plant.
ZOH GP(s)
GHP(z)
3.2 Plants with ZOH
The continuous time transfer function GHP(s)=G0(s)GP(s)
The discrete time transfer function
sT1
11
ez ,)(
)1()(
)()1(
)()(
)()()()1()()(
s
sGZzzG
s
sGZz
s
sGZz
s
sGZ
s
sGeZ
s
sGZ
s
sGeZsGZzG
PHP
PPP
PsTPPsTHPHP
3.2 Plants with ZOH
Example 1: Given a ZOH and a plant
Determine their Z-domain transfer function.1
1)(
s
sGP
1
1
11
111
111
11
11
1
)1(
)1)(1(
11)1(
1
1
1
1)1(
1
11)1(
1
11)1(
)1(
1)1(
)()1()(
ze
ze
zez
zzez
zezz
sZ
sZz
ssZz
ssZz
s
sGZzzG
T
T
T
T
T
PHP
3.2 Plants with ZOH
Example 2: Given a ZOH and a plant
Determine their z-domain transfer function.)1(
1)(
sssGP
)1)(1(
)1()1(
1
1
1
1
)1()1(
1
111)1(
1
111)1(
)1(
1)1(
)()1()(
11
21
1121
11
21
21
211
zez
zTeezeT
zezz
Tzz
sZ
sZ
sZz
sssZz
ssZz
s
sGZzzG
T
TTT
T
PHP
3.2 Plants with ZOH
Exercise 1: Given a ZOH and a plant
Determine their z-domain transfer function.
Answer:
))(()(
bsas
absGP
111
1
111
1)(
ze
a
ze
b
z
ba
ba
zzG
aTaTHP
Assignment 1
You are required to implement a digital PID controller which will enable a control object with a transfer function of
where K=0.2, n=10 rad/s, and =0.3.to track a) a unit step signal, and b) a unit ramp
signal.1) Simulate this control object and find the responses using
Matlab or other packages/computer languages.
22
2
2)(
nn
n
ss
KsG
Assignment 1
2) Choose a suitable sample period for a control loop for G(s) and explain your choice.
3)* Derive the discrete-time system transfer function GHP(z) from G(s).
4) Design a digital PID controller for the discrete-time system, and optimize its parameters with respect to the performance criterion below using steepest descent minimization process .
5) Simulate the resulting closed-loop system and find the responses. Swapping the input signals a) and b), discuss the resulting responses.
M
kkekS
0
3.3 Represent a system in difference equation
For we have
Let A=1-e-T and B=e-T, then the transfer function can be rewritten as
1
1
1
)1()(
ze
zezG
T
T
HP
)1()1()(
)1()1()(
)()()()()1)((
)(
)(
11
)1()(
111
1
1
1
1
kBykAxky
kAxkByky
zzAXzzBYzYzAXBzzY
zX
zY
Bz
Az
ze
zezG
T
T
HP
1
1)(
s
sGP
3.3 Represent a system in difference equation
Simulate the above system1) Parameters and input: A=1-e-T, B=e-T , x(k)=1
2) initial condition: x(k-1)=0, y(k)=y(k-1)=0, k=0
3) Simulation
While k<100 do
y(k)=Ax(k-1)+By(k-1); Calculate output
x(k-1)=x(k); y(k-1)=y(k); x(k)=1; k=k+1; Update data
print k, x(k), y(k); Display step, input & output
End
3.3 Represent a system in difference equation
Let T=1, we have A=0.6321 and B=0.3679
For a unit step input, the response is
y(k)=0.6321x(k-1)+0.3679y(k-1)
k= 0 1 2 3 4 5
x(k) 1 1 1 1 1 1
y(k) 0 0.6321 1 1 1 1
3.3 Represent a system in difference equation
Time (sec.)
Am
plitu
de
Step Response
0 1 2 3 4 5 6
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Assignment 1
1)* Simulate this control object and find the responses using Matlab or other packages/computer languages.
Hints: Method 1
22
2
2)(
nn
n
ss
KsG
)(2
)]()([
)(2
)()()(
)(
)(
2)(
22
211
22
2
22
2
sXss
KLsXsGLy(t)
sXss
KsXsGsY
sX
sY
ss
KsG
nn
n
nn
n
nn
n
Assignment 1
Hints: Method 2
2,1,0
))(())(()]([
))(())(()(
))(()1)((
12)(
)(
)(
)()]([)( ,
)(
)(
2)(
22
11
22
110
11
22
11
22
110
22
110
22
11
22
11
22
110
22
2
22
2
k
zazazYzbzbbzXLzYLy(kT)
zazazYzbzbbzXzY
zbzbbzXzazazY
zaza
zbzbb
ss
KZ
zX
zY
zX
zYsGZzG
sX
sY
ss
KsG
nn
n
nn
n
3.4 System stability
We can rewrite the difference equation as
If A=1 and =0.9, for an impulse input we have
k 0 1 2 3 4 ...x(k) 1 0 0 0 0 ...
y(k) 0 1 0.9 0.81 0.729 …It decreases exponentially, a stable system.
ABkykxA
kyA
BkxAkBykAxky
)),1()1((
))1()1(()1()1()(
))1(9.0)1()( kykxky
3.4 System stability
If K=1 and =1.2, we have
k 0 1 2 3 4 ...
x(k) 1 0 0 0 0 ...
y(k) 0 1 1.2 1.44 1.728 2.074…
It increases exponentially, an unstable system.
))1(2.1)1()( kykxky
3.4 System stability
If K=1 and = -0.8, we have
k 0 1 2 3 4 ...
x(k) 1 0 0 0 0 ...
y(k) 0 1 -0.8 0.64 -0.512 …
It decays exponentially, and alternates in sign, a gradual stable system.
))1(8.0)1()( kykxky
3.4 System stability
It is clear that the value of determines the system stability. Why is so important?
First, let A=1, we have
From the transfer function, we can see that z= is a pole of the system. The pole of the system will determine the nature of the response.
zz
z
zX
zYzG
zzYzzXzYkykxky
1
1)(
)()(
)()()()1()1()(
1
1
11
3.4 System stability
For continuous system, we have stable, critical stable and unstable areas in s domain.
Stable area Unstable area
Critical stable area
3.4 System stability
What is the stable area, critical stable area and unstable area for a discrete system in Z domain ?
Stable area: unit circle
Critical stable: on the unit circle
Unstable area: outside of the unit circle
3.4 System stability
As
For the critical stable area in s domain s=j,
As is from 0 to , then the angle will be greater than 2. That is the critical area forms a unit circle in Z domain.
sT1 ez ,)(
)1()(
s
sGZzzG P
HP
1)(sin)(cos
sincosez
22
sT je j
3.4 System stability
If we choose a point from the stable area at S domain, eg s=- a + j, we have
Let eg s=- + j
The stable area in Z domain is within a unit circle around the origin.
0)(sin)(cos
)sin(cosez
22
sT
ee
jee j
aa
aja
ee
jee
22
sT
)(sin)(cos
)sin(cosez
3.4 System stability
Exercise 2: Prove that the unstable area in Z domain is the area outside the unit circle.
Hint: Follow the above procedures.
3.5 Closed-loop transfer function
Computer controlled system
Gc(z) ZOH GP(s)R(z)E(z)
M(z)
GHP(z)
Computer system
C(z)
Plant
3.5 Closed-loop transfer function
Let’s find out the closed-loop transfer function
)()(1
)()(
)(
)()(
)()()()()()()(
)()())()(()(
)()()(
)()()()()()(
zGzG
zGzG
zR
zCzT
zGzGzRzGzGzCzC
zGzGzCzRzC
zCzRzE
zGzGzEzGzMzC
HPC
HPC
HPCHPC
HPC
HPCHP
3.5 Closed-loop transfer function
C(z): output; E(z): error
R(z): input; M(z): controller output
GC(z): controller
GP(z)/G(z): plant transfer function
GHP(z): transfer function of plant + ZOH
T(z): closed-loop transfer function
GC(z)GHP(z): open-loop transfer function
1+ GC(z)GHP(z)=0: characteristic equation
3.6 System block diagram
G(s)
H(s)
-
+
R(s)
C(s) C(z)
)(1
)(
)(
)(
zGH
zG
zR
zC
G(s)
H(s)
-
+
R(s)
C(z)
)()(1
)(
)(
)(
zHzG
zG
zR
zC
3.6 System block diagram
The difference between G(z)H(z) and GH(z)
G(z)H(z)=Z[G(s)]Z[H(s)]
GH(z)=Z[G(s)H(s)]
Usually, G(z)H(z) GH(z)
G(z)H(z) means they are connected through a sampler. Whereas GH(z) they are connected directly.
3.6 System block diagram
Example: Find the closed-loop transfer function for the system below.
Solution: The open-loop is G1(z)G2H(z).
The forward path is G1(z)G2(z).
G1(s)
H(s)
-
+
R(s)
C(z)G2(s)
3.6 System block diagram
)()(1
)()()(
)(
)()(
))()(1/()()()()()()()(
))()(1/()()(
)()()()()( );()()()()(
21
21
212121
21
2121
zHGzG
zGzGzR
zR
zCzT
zHGzGzRzGzGzGzGzEzC
zHGzGzRzE
zHGzGzEzEzRzHGzGzEzRzE
G1(s)
H(s)
-
+
R(s)
C(z)G2(s)
3.6 System block diagram
*Exercise 3: Find the output for the closed-loop system below.
G(s)
H(s)-
+
R(s)
C(s) C(z)
)(1
)()(
zGH
zGRzC
3.6 System block diagram
*Exercise 4: Find the output for the closed-loop system below.
G1(s)
H(s)
-
+
R(s)
C(z)G2(s)
)(1
)()()(
21
21
zHGG
zGzRGzC
Reading
Study book
• Module 3: Systems and transfer functions (Please try the problems on page 3.46-47)
Textbook
• Chapter 3 : Z-plane analysis of discrete-time control system (pages 74-83 & 104-114).
Tutorial
Exercise 1: Given a ZOH and a plant
Determine their z-domain transfer function.))((
)(bsas
absGP
111
1
1111
1
13211
11
111
)1(
1
1
1
1
1
1)1(
111)1(
)()(1)1()1(
))(()1(
)()1()(
ze
a
ze
b
z
ba
ba
z
zeab
a
zeba
b
zz
bsZ
ab
a
asZ
ba
b
sZz
bs
aba
as
bab
sZz
bs
k
as
k
s
kZz
bsass
abZz
s
sGZzzG
aTaT
bTaT
PHP
Tutorial
You are required to implement a digital PID controller which will enable a control object with a transfer function of
where K=0.2, n=10 rad/s, and =0.3.to track a) a unit step signal, and b) a unit ramp
signal.1) Simulate this control object and find the responses using
Matlab or other packages/computer languages.
22
2
2)(
nn
n
ss
KsG
Tutorial
2) Choose a suitable sample period for a control loop for G(s) and explain your choice.
3) Derive the discrete-time system transfer function GHP(z) from G(s).
4) Design a digital PID controller for the discrete-time system, and optimize its parameters with respect to the performance criterion below using steepest descent minimization process .
5) Simulate the resulting closed-loop system and find the responses. Swapping the input signals a) and b), discuss the resulting responses.
M
kkekS
0