Digital control systems

amaranthgymnophoriaΗλεκτρονική - Συσκευές

15 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

137 εμφανίσεις

Umeå University 2006-06-21
Applied Physics and Electronics
Staffan Grundberg



Digital control systems

Learning objectives
The student should after this laboratory assignment be able to
• Describe the structure of a digital control system.
• Describe the sampling process and remedies against aliasing.
• Use difference equations and transfer functions to describe digital systems.
• Discretize analog transfer functions.

Introduction
Modern control systems are almost always based on digital computers. Digital control
systems provide the opportunity to implement more advanced control algorithms that are not
feasible using analog control systems. Digital control systems also give better possibilities for
storing, analysing and presenting data.

The parts of a digital control system are presented in figure 1.The main component of a digital
control system is a digital computer, which calculates the controller output. The digital output
from the computer is converted to an analog signal by a digital-to-analog converter. The
analog output from the digital-to-analog converter is the input to the actuator, which
influences the plant. The output from the plant is measured by a sensor and its analog output
signal is converted to a digital signal before it is fed into the computer.









Figure 1.

The computer output is time-discrete, i.e, it is calculated at discrete times separated by equal
time intervals. The computer output is denoted
)(ku, where the integer
k
denotes the discrete
time. In the digital-to-analog converter. The time-discrete signal is converted into a time-
continous signal by using e.g. a zero-order-hold circuit, see figure 2.




Computer
Plant
D/A
A/D
Actuato
r
Senso
r










Figure 2.

The analog-to-digital converter converts a time-continuous signal )(
ty
into a time-discrete
signal )(
ky
by the process of sampling
)()(
khyky
=, (1.)
where
h
is the sampling interval.

According to the Nyquist sampling theorem, the sampling frequency
s
f
must be twice as high
as the maximum frequency of the time continuous signal to allow reconstruction of the time-
continuous signal from the samples. Too low sampling frequencies cause aliasing, i.e., high
frequency components result in low frequency components in the sampled signal. Aliasing is
avoided by low-pass filtering the time-continuous signal before sampling.

Difference equations
The relationship between the input ][
ku
and the output ][
ky
of a time-discrete system can be
described by a difference equation

][]1[]1[][]1[]1[][
011011
kubkubnkubkyakyankyanky
nn
++
+
+

+
=
+
+++−+++
−−
KK
(2.)
Z-transform
The z-transform )(
zU
of a time-discrete signal ][
ku
is defined as


=

=
0
][)(
k
k
zkuzU. (3.)

The z-transform of a signal ]1[ +ku that is shifted one time step forward is given by

]0[)(]}1[{ zuzzUkuZ −=+ . (4.)
Transfer functions of time-discrete systems
Consider a system described by the above difference equation and in equilibrium at
.0=k

Calculating the z-transform of equation (2.) yields

)()()( zUzHzY =, (5.)

where the transfer function is given by
u(k)
k
u(t)
t
ZOH
01
1
1
01
1
1
)(
)(
)(
)(
)(
bzbzbzB
azazazzA
zA
zB
zH
n
n
n
n
n
++=
+++=
=




K
K. (6.)

Discretization
Usually, digital controllers are used to control analog plants or processes. Since the control
algorithm can be described by a difference equation, there is a need to describe the process by
a difference equation too.

A digital controller with a zero-order-hold circuit gives an output signal that is piece-wise
constant. The analog process can therefore be replaced by a time-discrete system that has the
same step response at the sampling instants.

Consider as an example the analog process
1
1
)(
+
=
s
sG in closed loop with a digital
controller with sampling interval h. The step response of this process is
( )
)(1)(
1
)()(
tety
s
sGsY
t
µ

−=
=
. (7.)
The step response at the sampling instants is given by
(
)
][1)(][ kekhyky
kh
µ

−==. (8.)
The z-transform is given by
(
)
( )( )
(
)
( )( )
11
1
11
11
11
11
1
11
11
1
1
1
1
)(
−−−
−−
−−−
−−−
−−−
−−

=
−−
−−−
=



=
zez
ez
zez
zze
zez
zY
h
h
h
h
T
(9.)
The discrete transfer function is accordingly
( )
1
1
1
1
)(
)(
)(
−−
−−


==
ze
ez
zU
zY
zH
h
h
. (10.)


Questions
1. Simulate the sampling of a sinusoidal time-continuous signal function having the
frequency 1Hz. Vary the sampling frequency and observe when aliasing occurs.
2. Simulate a DC-motor with transfer function
( )
1
1
)(
+
=
xs
sG in closed loop with a
digital P controller with sampling interval 0.1 seconds.
3. Calculate the step response of a time-discrete system having the transfer function
( )
5.0
5.0
)(
+

=
zz
z
zH.
4. A time-continuous process with transfer function
( )
1
1
)(
+
=
xs
sG is in closed loop with
a digital controller. The output of the controller is piecewise constant due to the zero-
order-hold circuit. Calculate the transfer function of the time discrete system that gives
the same output at the sampling instants as the time-continuous system when the
sampling interval is 0.1 s. Check your calculation by simulating the step responses of
the discrete and continuous systems.