CHAPTER2: CHAPTER2: Computer Architecture Foundation EKT303/4.
DCS Chapter2
-
Upload
abdin-yousif -
Category
Documents
-
view
216 -
download
0
Transcript of DCS Chapter2
-
8/14/2019 DCS Chapter2
1/57
CHAPTER 2
SIGNAL PROCESSING INDIGITAL CONTROL
-
8/14/2019 DCS Chapter2
2/57
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME.
A/D D/AComputer
Clock
Final
controlelement Plant
S/HAnti-aliasing
filterSensor
Digital
set -point
Disturbance Controlled
output
-
8/14/2019 DCS Chapter2
3/57
The analog feedback signal that comes from thesensor is usually of low frequency but often includehigh frequency noise.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Sensor
-
8/14/2019 DCS Chapter2
4/57
Anti-aliasing filter is a low pass filter that filters outhigh frequency noise from the analog signal that
comes from the sensor.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Anti-aliasing Filter
-
8/14/2019 DCS Chapter2
5/57
A/D conversion systemconverts the analog signal todigital signalafter anti-aliasing process.
A/D conversion system consists of A/D converterpreceded by sample and hold (S/H) device.
A/D converter converts a voltage or current amplitudeat its input into a binary code. However, theconversion is not instantaneous.
This input signal variationduring the conversion timeof the A/D converter can lead to erroneousresults.
Thus, high performance A/D conversion systemsinclude a S/H device which keeps the input to the A/D
converter constantduring the conversion time.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
A/D Conversion System
-
8/14/2019 DCS Chapter2
6/57
Digital computer processes the sequence ofnumbers by an algorithm and produces a newsequence of numbers.
Since data conversions and computations takestime, there is always computational delay thatdegrades the control system performance.
This can be minimized by the proper choice ofhardware and the proper design of software for thecontrol algorithm.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Computer
-
8/14/2019 DCS Chapter2
7/57
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
-
8/14/2019 DCS Chapter2
8/57
D/A conversion system converts the sequence ofnumbers in numerical code into a piecewise
continuous-time signal.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
D/A Conversion System
-
8/14/2019 DCS Chapter2
9/57
The output of the D/A converter is fed to the plantthrough the actuator (final control element)to controlits dynamics.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
Plant & Final Control Element
-
8/14/2019 DCS Chapter2
10/57
This basic control scheme shows a single feedback
loop and assumes a uniform sampling operation;
only one sampling rate exist in the system and thesampling period is constant.
A digital control system having multiple loops may
have multiple-rate sampling;different samplingperiods in different feedback paths.
CONFIGURATION OF THE BASIC
DIGITAL CONTROL SCHEME
-
8/14/2019 DCS Chapter2
11/57
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
MAIN IMPLEMENTATION
PROBLEMS IN DIGITAL CONTROL
QUANTIZATION
EFFECTS
SAMPLING
EFFECTS
-
8/14/2019 DCS Chapter2
12/57
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Quantization Effects
The conversion of signals from analog into digital
form and vice versa is performed by electronicdevices (A/D and D/A converters) of finiteresolution.
The analog signalgets tied to these finite number ofquantization levels in the process of conversion todigitalform.
As a result, a valuable part of information about thesignal is lost.
-
8/14/2019 DCS Chapter2
13/57
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Quantization Effects
In addition, any computer employed as a real-time
controller performs all the necessary calculationswith limited precision.
As a result, a truncation error occurs after each
arithmetic operation has been performed .
-
8/14/2019 DCS Chapter2
14/57
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Sampling Effects
Process of sampling and reconstructionaffects the
amount of information available to the computerand degrades the control system performance.
In sampling theorem, sampling period should be
chosen such that
where is the strict bandwidthof the
signal being sampled.
mT /m
-
8/14/2019 DCS Chapter2
15/57
IMPLEMENTATION PROBLEMS IN
DIGITAL CONTROL
Sampling Effects
This condition ensures that
a) there is no lossof information due to sampling
b) the continuous time signal can completely
recoveredfrom its sample by using an ideal lowpass filter.
-
8/14/2019 DCS Chapter2
16/57
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-limitedand 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.
-
8/14/2019 DCS Chapter2
17/57
PRINCIPLES OF SIGNAL CONVERSION
SIGNAL CONVERSION
ANALOG TO DIGITALSIGNAL CONVERSION DIGITAL TO ANALOGSIGNAL CONVERSION
-
8/14/2019 DCS Chapter2
18/57
ANALOG TO DIGITAL SIGNAL CONVERSION
Analog signal Discrete-time signal
Digital signal Digital word
Sampling
Quantization
Coding
-
8/14/2019 DCS Chapter2
19/57
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
An analog signalcannot be stored in digital computers.
Therefore it must be converted to a form that will beaccepted by digital computers.
.
-
8/14/2019 DCS Chapter2
20/57
-
8/14/2019 DCS Chapter2
21/57
The sampling intervalcorresponds to a sampling rate
of of 100 samples/sec. The choice of the sampling rateis important because it
determines how accurately the discrete-time signalcan represent the original signal.
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSION
Sampling
-
8/14/2019 DCS Chapter2
22/57
PRINCIPLES OF SIGNAL CONVERSION
The time axis of the discrete-time signalis labeled
by samplenumberand index k (k=0, 1, 2, )
ANALOG TO DIGITAL SIGNAL CONVERSIONSampling
-
8/14/2019 DCS Chapter2
23/57
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSIONSampling
The sample values can be represented by a sequence of numbersys,...}4.0,4.1,8.2,4.2,7.1{sy
-
8/14/2019 DCS Chapter2
24/57
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSIONSampling
In general, kkyys 0)},({
)(kywhere denotes the kth number in the sequence.This is a one-sided sequence, whereys=0 for k
-
8/14/2019 DCS Chapter2
25/57
-
8/14/2019 DCS Chapter2
26/57
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSIONQuantization
This signal is quantified to four quantization levels.
-
8/14/2019 DCS Chapter2
27/57
PRINCIPLES OF SIGNAL CONVERSION
ANALOG TO DIGITAL SIGNAL CONVERSIONCoding
. 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.
-
8/14/2019 DCS Chapter2
28/57
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-timecontinuous-amplitude
signal
Digital
words
Discrete-time
continuous-amplitude
signal
Discrete-time
discrete-amplitude
signal
-
8/14/2019 DCS Chapter2
29/57
D/A conversion is a process of producing an analogsignal from a digital signal.
Thus it is the reverse ofA/D conversionprocess.
D/A conversionis performed by D/A converter.
In a D/A converter:
a) the decoder generate output samples fromthe binary-form digital signals produced by the
machineb) the zero- order holdconverts these samples to
analog form
DIGITAL TO ANALOG SIGNAL CONVERSION
PRINCIPLES OF SIGNAL CONVERSION
-
8/14/2019 DCS Chapter2
30/57
DIGITAL TO ANALOG SIGNAL CONVERSION
DecoderZero-order
hold
Digital
words
Discrete-
time signal
Analog
signal
The operations performed by a D/A converter
Sampled sequence Analog output
-
8/14/2019 DCS Chapter2
31/57
-
8/14/2019 DCS Chapter2
32/57
Unit Sample Sequence
BASIC DISCRETE-TIME SIGNALS
Delayed unit sampled sequence
1 for k= n
0 otherwise )( nk
-
8/14/2019 DCS Chapter2
33/57
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()( krkrkrkr
0
)()(n
nknr
-
8/14/2019 DCS Chapter2
34/57
BASIC DISCRETE-TIME SIGNALS
Unit Step Sequence
0
1)(k
for k 0
otherwise
-
8/14/2019 DCS Chapter2
35/57
-
8/14/2019 DCS Chapter2
36/57
BASIC DISCRETE-TIME SIGNALS
Unit Ramp Sequence
0,0
0,)(
k
kkkr
-
8/14/2019 DCS Chapter2
37/57
BASIC DISCRETE-TIME SIGNALS
Sinusoidal Sequence)()cos()( kkAkr
where is the frequency in radians and is the phase.
-
8/14/2019 DCS Chapter2
38/57
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 outputsequencey(k).
Time-domain model is one of mathematicalrepresentations 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
-
8/14/2019 DCS Chapter2
39/57
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
A linear time-invariant discrete time systemcomposed
of n dynamic elements can be analyzed by using asingle nth-order difference equationas its model.
Difference Equation Models
-
8/14/2019 DCS Chapter2
40/57
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Difference Equation Models
-
8/14/2019 DCS Chapter2
41/57
The integral is approximated by
Subtracting equation (2.1) from equation (2.2),
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Difference Equation Models
1
00 )()()(
k
m
kT
mTTrdrkTc
TkT k
m
mTTrdrTkTc0
0
)()()(
)()()( kTTrkTcTkTc
(2.1)
(2.2)
(2.3)
-
8/14/2019 DCS Chapter2
42/57
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
In general, the nth order linear difference equationrelating the outputy(k)to input r(k)is given by:
The coefficients aiand bjare real constants; k, m, andnare integers with mn.
Difference Equation Models
)(...)1()( 1 kyankyanky n)(...)1()( 10 krbmkrbmkrb m (2.1)
-
8/14/2019 DCS Chapter2
43/57
For m=n, the nth order linear difference equation
relating the outputy(k)to input r(k)is given by:
Difference Equation Models
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
)(...)1()( 1 kyankyanky n
)(...)1()( 10 krbnkrbnkrb n (2.2)
-
8/14/2019 DCS Chapter2
44/57
Shifting the origin from k=n to k=0, the equivalentdifference equation modelis obtained:
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Difference Equation Models
)(...)1()( 1 nkyakyaky n )(...)1()( 10 nkrbkrbkrb 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 substitutingk=-n,-n+1, , -2, -1,inEqn. (2.2).
-
8/14/2019 DCS Chapter2
45/57
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
-
8/14/2019 DCS Chapter2
46/57
Letg(k) be the response of initially relaxed linear time-
invariantdiscrete-time system to an impulse (k).
Due to time-invariance property, the response to
(k-n) will beg(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()( kgrkgrkgrky
0
0);()(j
kjkgjr(2.4)
-
8/14/2019 DCS Chapter2
47/57
Equation (2.4) is usually called the convolution sum.
For a causal systemthe equation becomes:
(2.5)
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Impulse Response Models
k
j
kjkgjrky0
0);()()(
-
8/14/2019 DCS Chapter2
48/57
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
)()()(km
mgmkrky
k
m
mkrmgky
0
)()()(
-
8/14/2019 DCS Chapter2
49/57
If the weighting sequence is known, the discrete timesystems response to any input can be evaluated byusing convolution summation.
Convolution summation, c(k)is defined as:.
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Weighting Sequence of Linear Discrete
Systems
k
m
mkrmhkc0
)()()(
-
8/14/2019 DCS Chapter2
50/57
Consider the input and weighting sequence of the system:
Weighting Sequence of Linear Discrete
Systems
-
8/14/2019 DCS Chapter2
51/57
By convolution process:
*Note that k=3
-
8/14/2019 DCS Chapter2
52/57
The discrete-time system response to input r(m):
TIME-DOMAIN MODELS FOR
DISCRETE-TIME SYSTEMS
Weighting Sequence of Linear Discrete
Systems
-
8/14/2019 DCS Chapter2
53/57
Examples
Suppose a signal varies between 0
and 10 Volts (which is termeddynamic range) and it is required thatthe signal must be represented in the
digital computer to the nearest 5 mV,that is, the resolution is expected tobe 5 mV. Determine how many bitsthe ADC must have to achieve thisobjective.
-
8/14/2019 DCS Chapter2
54/57
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 directlytowards 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 oftravel of the aircraft, and his instructions consist
of course headings in integral degree values.
-
8/14/2019 DCS Chapter2
55/57
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?
-
8/14/2019 DCS Chapter2
56/57
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?
-
8/14/2019 DCS Chapter2
57/57
Quiz In a particular temperature control system
application, it is desired to measure thetemperature in the range -20 to 50C withan accuracy of 1C. Suppose a
temperature transducer with a gain of 0.02V/C and accuracy of 0.5C is used inthis system, determine the number of ADCbits for this system. Also determine the
mean-square-error quantization power.