Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS] 1 Chapter One: Introduction 1.1 Advantages of digital control: Complex control algorithms are easy implemented in digital computers than in analog computer. Controllers are changed by changing the system program without hardware modifications. Digital circuits are less sensitive to noise. This involves a very small error as compared to analog. Digital filter coefficients are more accurate than analog filter circuits. The speed of computer hardware has increased exponentially since the 1980s. 1.2 Disadvantages of digital control: Complex methods used to analysis and design of digital control systems. Since sampling period is not zero, then a delay is occurs in digital systems. Quantization error affects accuracy in digital control. 1.3 Digital system: The basic scheme of digital control system is shown in figure 1. 1.4 Nyquist Sampling Theorem: A signal x(t) is sampled every T seconds, and the sampled output signal x p (t) is () = (). () = ∑ ()( − ) ∞ =0 The Fourier transform of the discrete signal is
35
Embed
Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]uotechnology.edu.iq/dep-cse/lectures/mechatronecs/stage 4/farazaq c... · Dr Farazdaq Rafeeq AL-Taha [COMPUTER CONTROL
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]
1
Chapter One: Introduction
1.1 Advantages of digital control:
Complex control algorithms are easy implemented in digital computers than in analog
computer. Controllers are changed by changing the system program without hardware
modifications. Digital circuits are less sensitive to noise. This involves a very small error as
compared to analog. Digital filter coefficients are more accurate than analog filter circuits. The
speed of computer hardware has increased exponentially since the 1980s.
1.2 Disadvantages of digital control:
Complex methods used to analysis and design of digital control systems. Since sampling period
is not zero, then a delay is occurs in digital systems. Quantization error affects accuracy in
digital control.
1.3 Digital system:
The basic scheme of digital control system is shown in figure 1.
1.4 Nyquist Sampling Theorem:
A signal x(t) is sampled every T seconds, and the sampled output signal xp(t) is
𝑥𝑝(𝑡) = 𝑥(𝑡). 𝑝(𝑡) = ∑ 𝑥(𝑛𝑇)𝛿(𝑡 − 𝑛𝑇)
∞
𝑛=0
The Fourier transform of the discrete signal is
Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]
2
𝑋(𝑒𝑗𝜃) = ∑ 𝑥(𝑛)𝑒−𝑗𝑛𝜃
∞
𝑛=−∞
𝑥(𝑛) =1
2𝜋∫ 𝑋(𝑒𝑗𝜃)𝑒𝑗𝑛𝜃𝑑𝑡
𝜋
−𝜋
The frequency spectrum of the signal before and after sampling is shown in figure below
In order to avoid any aliasing or distortion of the frequency content of the original signal, and
hence to be able to recover the original signal, we must have
𝜔𝑠 − 𝜔 > 𝜔
𝜔𝑠 ≥ 2 𝜔 Where 2𝜔 is Nyquist rate
𝜔 is maximum frequency
𝜔𝑠 is sampling frequency
This means the sampling frequency should be at least twice the highest frequency of the signal.
To get the original signal a LPF with H(jω)
Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]
3
Example:
1.5 Applications: Systems that described by difference equations includes:
Computer controlled systems
Digital signal transmission system ( telephone system)
Systems that process audio signals. For example a CD contains digital signal
information, and when it is read from CD, it is a digital signal that can be processed with
a digital filter.
Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]
4
Chapter Two: Z-Transform:
The Z-transform offers a valuable set of techniques for the frequency analysis of digital signals
and processors. It is also very useful in design.
The Z-transform of a discrete time signal x(n) is
X(z) = ∑ X(
∞
n=−∞
n) z−n n = 0, 1, 2, …
Where Z = esT , T is the sampling period.
Example: find the Z-transform of discrete unit impulse function.
δ(n) = {1 for n = 00 for n ≠ 0
X(z) = ∑ X (
∞
n=−∞
n) z−n = ∑ 1
0
n=0
. z0 = 1
Example: find the z transform of sampled unit step function
u(n) = {1 for n ≥ 0
0 for n < 0
X(z) = ∑ X (
∞
n=−∞
n) z−n = ∑ 1
∞
n=0
. z−n = 1 + Z−1 + Z−2 + ⋯ + Z−n
=1
1 − z−1=
z
z − 1
The Residue Method:
This is a powerful technique for obtaining z transform
1. X(s) has distinct pole at s=r:
𝐗(𝐳) = 𝐥𝐢𝐦𝐬→𝐫(𝐬 − 𝐫)[𝐗(𝐬)𝐳
𝐳−𝐞𝐬𝐓]
Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]
5
2. X(s) with repeated poles of order q:
𝐗(𝐳) =𝟏
(𝐪 − 𝐫)!𝐥𝐢𝐦𝐬→𝐫
𝐝𝐪−𝟏
𝐝𝐬𝐪−𝟏(𝐬 − 𝐫)𝐪[𝐗(𝐬)
𝐳
𝐳 − 𝐞𝐬𝐓]
Example: find the z transform of sampled exponential function
x(t) = e−at and X(s) =1
s + a ∴ one pole at s = −a
X(z) = lims→−a
(s + a) [ 1
(s + a)
z
z − esT ] =
z
z − e−aT
Example: find the z transform of sampled cosine function
x(t) = cos(ωt) X(s) =s
s2 + ω2=
s
(s − jω)(s + jω) ∴ 2 poles at s = ±jω
X(z) =1
2
z
z − e−jωT+
1
2
z
z − ejωT=
z2 − zcosωT
z2 − 2zcosωT + 1
The range of values of z for which the sum in the Z-transform converges absolutely is referred to
as the ROC of the Z-transform
Table 1: Z-Transform
f(t) F(s) F(z) f(kT)
Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]
6
Z-Transform properties:
1 Linearity Z[a x(n) + b f(n)] = a X(z) + b F(z)
2 Multiplication by n Z[nT f(nT)] = −Tzd
dzF(z)
3 Multiplication by an Z[an f(nT)] = F(z
a)
4 Multiplication by e−anT Z[f(nT)e−anT] = F(z)|z=z e−anT
5 Final Value Theorem f(∞) = limk→∞ f(k) = limz→1(1 − z−1) F(z)
6 Time Delay Z{x(t − kT)} = z−kX(z)
7 Time advance:
8 Differentiation Z{tx(t)} = −z
dX(z)
dz
9 Initial Value Theorem x(0) = limz→∞
X(z)
Example: find the z transform of sampled ramp function
x(t) = t , X(s) =1
s2 Two repeated poles at s = 0
X(z) =1
(2 − 1)!lims→0
d
dss2[X(s)
z
z − esT] =
zT
(z − 1)2
Example: x(n) = u(n) − nu(n)
: X(Z) =z
z−1−
z
(z−1)2 f(0) = limZ→∞ X(z) = 1
Example: find the Z-transform of the sampled function e−AtcosωT
Z[cos(ωT)] =z2 − zcosωT
z2 − 2zcosωT + 1=
z(z − cosωT)
z2 − 2zcosωT + 1
Replace z by ze+At then
X(z) =ze+AT(ze+AT − cosωT)
z2e+2AT − 2ze+ATcosωT + 1=
z2 − ze−ATcosωT
z2 − 2ze−ATcosωT + e−2AT
Example: Z-transform of a discrete unit step function is X(z) =z
z−1 then
Z(an) = X (z
a) =
za
za − 1
=z
z − a
Example: Find the z-transform of the causal sequence
Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]
7
Solution: The given sequence is a sampled step starting at k = 2 rather than k = 0 (i.e., it is
delayed by two sampling periods). Using the delay property, we have
Inversion of the z-Transform
1. Long Division:
Example: Obtain the inverse z-transform of the function