Professional Documents
Culture Documents
SIGNAL PROCESSING IN
DIGITAL CONTROL
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
.
A/D D/A
Computer
Clock
Final
control
element
Plant
S/H
Anti-aliasing
filter
Sensor
Digital
set -point
Disturbance Controlled
output
The analog feedback signal that comes from the
sensor is usually of low frequency but often include
high frequency noise.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Sensor
Anti-aliasing filter is a low pass filter that filters out
high frequency noise from the analog signal that
comes from the sensor.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Anti-aliasing Filter
A/D conversion system converts the analog signal to
digital signal after anti-aliasing process.
A/D conversion system consists of A/D converter
preceded by sample and hold (S/H) device.
A/D converter converts a voltage or current amplitude
at its input into a binary code. However, the
conversion is not instantaneous.
This input signal variation during the conversion time
of the A/D converter can lead to erroneous results.
Thus, high performance A/D conversion systems
include a S/H device which keeps the input to the A/D
converter constant during the conversion time.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
A/D Conversion System
Digital computer processes the sequence of
numbers by an algorithm and produces a new
sequence of numbers.
Since data conversions and computations takes
time, there is always computational delay that
degrades the control system performance.
This can be minimized by the proper choice of
hardware and the proper design of software for the
control algorithm.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Computer
Real-time clock in the computer synchronizes all
the events of A/D conversion-computation-D/A
conversion.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Clock
D/A conversion system converts the sequence of
numbers in numerical code into a piecewise
continuous-time signal.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
D/A Conversion System
The output of the D/A converter is fed to the plant
through the actuator (final control element) to control
its dynamics.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Plant & Final Control Element
This basic control scheme shows a single feedback
loop and assumes a uniform sampling operation;
only one sampling rate exist in the system and the
sampling period is constant.
A digital control system having multiple loops may
have multiple-rate sampling;different sampling
periods in different feedback paths.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
MAIN IMPLEMENTATION
PROBLEMS IN DIGITAL CONTROL
QUANTIZATION
EFFECTS
SAMPLING
EFFECTS
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Quantization Effects
The conversion of signals from analog into digital
form and vice versa is performed by electronic
devices (A/D and D/A converters) of finite
resolution.
The analog signal gets tied to these finite number of
quantization levels in the process of conversion to
digital form.
As a result, a valuable part of information about the
signal is lost.
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Quantization Effects
In addition, any computer employed as a real-time
controller performs all the necessary calculations
with limited precision.
As a result, a truncation error occurs after each
arithmetic operation has been performed .
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Sampling Effects
Process of sampling and reconstruction affects the
amount of information available to the computer
and degrades the control system performance.
In sampling theorem, sampling period should be
chosen such that
where is the strict bandwidth of the
signal being sampled.
m
T e t / <
m
e
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Sampling Effects
This condition ensures that
a) there is no loss of information due to sampling
b) the continuous time signal can completely
recovered from its sample by using an ideal low
pass filter.
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Sampling Effects
However, there are two problems associated with
the use of this theorem in practical control systems:
a) Real signals are not band-limited and hence
strict bandwidth limits are not defined.
b) The ideal low-pass filter, needed for the
distortionless reconstruction of continuous-time
signals from its samples, is not physically
realizable. Practical devices, such as the D/A
converter, introduces distortions.
Thus, sampling process degrades the control system
performance.
PRINCIPLES OF SIGNAL CONVERSION
SIGNAL CONVERSION
ANALOG TO DIGITAL
SIGNAL CONVERSION
DIGITAL TO ANALOG
SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Analog signal Discrete-time signal
Digital signal Digital word
Sampling
Quantization
Coding
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
An analog signal cannot be stored in digital computers.
Therefore it must be converted to a form that will be
accepted by digital computers.
.
One common method to do this is to record the
sample values of the signal at equal spaced instants.
If this signal is sampled every 10msec, the discrete-
time signal is obtained.
.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Sampling
The sampling interval corresponds to a sampling rate
of of 100 samples/sec.
The choice of the sampling rate is important because it
determines how accurately the discrete-time signal
can represent the original signal.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Sampling
PRINCIPLES OF SIGNAL CONVERSION
The time axis of the discrete-time signal is labeled
by sample number and index k (k=0, 1, 2, )
ANALOG TO DIGITAL SIGNAL CONVERSION
Sampling
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Sampling
The sample values can be represented by a sequence of numbers y
s
,...} 4 . 0 , 4 . 1 , 8 . 2 , 4 . 2 , 7 . 1 { =
s
y
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Sampling
In general, < s = k k y y
s
0 )}, ( {
) (k y where denotes the kth number in the sequence.
This is a one-sided sequence, where y
s
=0 for k<0.
Throughout this discussion in digital control, it is assumed that the
system has a uniform sampling.
If the physical time corresponding to the sampling interval is T
seconds, then the kth sample y(k) gives the value of the discrete-
time signal at t=kT. Therefore, y(kT) can be used to denote a
sequence wherein the independent variable is the physical time.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Quantization
.
In quantization process, any value in the interval [0.5,
1.5) is rounded to 1, and so forth.
By this, after quantization process the signal will have
both discrete time and discrete amplitude.
The signals for which both time and amplitude are
discrete, are called digital signals.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Quantization
This signal is quantified to four quantization levels.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Coding
.
The final step in converting an analog signal to a
form acceptable by digital computers is coding.
The encoder maps each quantized sample value
into a digital word.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
.
Sampling, quantization and coding operation is performed
by an A/D converter.
Sampler Quantizer Encoder
Continuous-time
continuous-amplitude
signal
Digital
words
Discrete-time
continuous-amplitude
signal
Discrete-time
discrete-amplitude
signal
D/A conversion is a process of producing an analog
signal from a digital signal.
Thus it is the reverse of A/D conversion process.
D/A conversion is performed by D/A converter.
In a D/A converter:
a) the decoder generate output samples from
the binary-form digital signals produced by the
machine
b) the zero- order hold converts these samples to
analog form
DIGITAL TO ANALOG SIGNAL CONVERSION
PRINCIPLES OF SIGNAL CONVERSION
DIGITAL TO ANALOG SIGNAL CONVERSION
Decoder
Zero-order
hold
Digital
words
Discrete-
time signal
Analog
signal
The operations performed by a D/A converter
Sampled sequence Analog output
BASIC DISCRETE-TIME SIGNALS
Unit Sample Sequence
Unit sample sequence is often referred as discrete-time
impulse.
1 for k = 0
0 otherwise
= ) (k o
Unit Sample Sequence
BASIC DISCRETE-TIME SIGNALS
Delayed unit sampled sequence
1 for k = n
0 otherwise
= ) ( n k o
An arbitrary sequence can be represented by sum of scaled,
delayed unit sample sequence.
The sequence in this figure can be represented by:
BASIC DISCRETE-TIME SIGNALS
Unit Sample Sequence
... ) 2 ( ) 2 ( ) 1 ( ) 1 ( ) ( ) 0 ( ) ( + + + = k r k r k r k r o o o
=
=
0
) ( ) (
n
n k n r o
BASIC DISCRETE-TIME SIGNALS
Unit Step Sequence
=
0
1
) (k
for k 0
otherwise
BASIC DISCRETE-TIME SIGNALS
Unit Step Sequence
Delayed unit step sequence
=
0
1
) ( n k
for k n
otherwise
BASIC DISCRETE-TIME SIGNALS
Unit Ramp Sequence
<
>
=
0 , 0
0 ,
) (
k
k k
k r
BASIC DISCRETE-TIME SIGNALS
Sinusoidal Sequence
) ( ) cos( ) ( k k A k r | + O =
where is the frequency in radians and is the phase. O |
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
A discrete time system is defined mathematically as
a transformation or an operator that maps input
sequence r(k) into an output sequence y(k).
Time-domain model is one of mathematical
representations for linear time-invariant discrete-
time systems.
The time-domain models that will be discussed in
this lecture are:
a) Difference Equation Models
b) Impulse Response Models
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
A linear time-invariant discrete time system composed
of n dynamic elements can be analyzed by using a
single nth-order difference equation as its model.
Difference Equation Models
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Difference Equation Models
The integral is approximated by
Subtracting equation (2.1) from equation (2.2),
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Difference Equation Models
}
=
~ =
1
0
0
) ( ) ( ) (
k
m
kT
mT Tr d r kT c t t
}
+
=
~ = +
T kT
k
m
mT Tr d r T kT c
0
0
) ( ) ( ) ( t t
) ( ) ( ) ( kT Tr kT c T kT c = +
(2.1)
(2.2)
(2.3)
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
In general, the nth order linear difference equation
relating the output y(k) to input r(k) is given by:
The coefficients a
i
and b
j
are real constants; k, m, and
n are integers with msn.
Difference Equation Models
) ( ... ) 1 ( ) (
1
k y a n k y a n k y
n
+ + + + +
) ( ... ) 1 ( ) (
1 0
k r b m k r b m k r b
m
+ + + + + =
(2.1)
For m=n, the nth order linear difference equation
relating the output y(k) to input r(k) is given by:
Difference Equation Models
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
) ( ... ) 1 ( ) (
1
k y a n k y a n k y
n
+ + + + +
) ( ... ) 1 ( ) (
1 0
k r b n k r b n k r b
n
+ + + + =
(2.2)
Shifting the origin from k=n to k=0, the equivalent
difference equation model is obtained:
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Difference Equation Models
) ( ... ) 1 ( ) (
1
n k y a k y a k y
n
+ + +
) ( ... ) 1 ( ) (
1 0
n k r b k r b k r b
n
+ + + =
(2.3)
The initial conditions of this model are {y(-1), y(-2), ,
y(-n)}.
Given {y(-1), , y(-n)}, the initial conditions {y(0), ,
y(n-1)} of the model (2.2) can be determined by
successively substituting k=-n, -n+1, , -2, -1,in Eqn. (2.2).
In impulse response model, the system is assumed
to be linear, time invariant and initially relaxed.
A linear time-invariant initially relaxed system can be
characterized by its impulse response.
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Impulse Response Models
Let g(k) be the response of initially relaxed linear time-
invariant discrete-time system to an impulse o(k).
Due to time-invariance property, the response to
o(k-n) will be g(k-n).
By linearity property, the response to an input signal
r(k):
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Impulse Response Models
... ) 2 ( ) 2 ( ) 1 ( ) 1 ( ) ( ) 0 ( ) ( + + + = k g r k g r k g r k y
=
> =
0
0 ); ( ) (
j
k j k g j r
(2.4)
Equation (2.4) is usually called the convolution sum.
For a causal system the equation becomes:
(2.5)
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Impulse Response Models
=
> =
k
j
k j k g j r k y
0
0 ); ( ) ( ) (
Another important observation concerns the symmetry
of the situation. Let k-j=m in Eqn. (2.5), then
(2.6)
Reversing the order of summation,
(2.7)
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Impulse Response Models
=
=
0
) ( ) ( ) (
k m
m g m k r k y
=
=
k
m
m k r m g k y
0
) ( ) ( ) (
If the weighting sequence is known, the discrete time
systems response to any input can be evaluated by
using convolution summation.
Convolution summation, c(k) is defined as:.
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Weighting Sequence of Linear Discrete
Systems
=
=
k
m
m k r m h k c
0
) ( ) ( ) (
Consider the input and weighting sequence of the system:
Weighting Sequence of Linear Discrete
Systems
By convolution process:
*Note that k=3
The discrete-time system response to input r(m):
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Weighting Sequence of Linear Discrete
Systems
Examples
Suppose a signal varies between 0
and 10 Volts (which is termed
dynamic range) and it is required that
the signal must be represented in the
digital computer to the nearest 5 mV,
that is, the resolution is expected to
be 5 mV. Determine how many bits
the ADC must have to achieve this
objective.
Examples
Suppose a radar search antenna at the KLIA
rotates at 10 rev/min, and data points
corresponding to the position of flight MH 1001
are plotted on the controllers screen once per
antenna revolution. MH 1001 is traveling directly
towards the airport at 600 km/hr. A feedback
control system is established through the
controller who gives course corrections to the
pilot. The controller wishes to do so at 10 km of
travel of the aircraft, and his instructions consist
of course headings in integral degree values.
Examples
a) What is the sampling rate, in seconds, of the range
signal plotted on the radar screen?
b) What is the sampling rate, in seconds, of the
controllers instructions?
c) Identify the following signals as continuous, discrete,
or digital:
i) the aircrafts range from the airport.
ii) the range data as plotted in the radar screen.
iii) the controllers instructions to the pilot.
iv) the pilots actions on the aircraft control surfaces.
d) Is this a continuous, sampled data, or digital control
system?
Quiz#1
With a sampling frequency of 200 kHz,
what is the system output (DAC) for the
input signals having the following
frequencies
a) 157.6 kHz?
b) 261 kHz?
c) 54.9 kHz?
d) 500.7 kHz?
e) 184.2 kHz?
f) 100.1 kHz?
Quiz
In a particular temperature control system
application, it is desired to measure the
temperature in the range -20 to 50C with
an accuracy of 1C. Suppose a
temperature transducer with a gain of 0.02
V/C and accuracy of 0.5C is used in
this system, determine the number of ADC
bits for this system. Also determine the
mean-square-error quantization power.