Chapter 1 overview_of_control_system (Control Systems DAE 32103)
07 chapter 3_part_3_student2 (Control Systems DAE 32103)
-
Upload
jay-leong -
Category
Engineering
-
view
75 -
download
5
description
Transcript of 07 chapter 3_part_3_student2 (Control Systems DAE 32103)
04/05/2014
1
Data Distribution Systems
Digital Controller
Sampling
Example of Digital Control System
Muhammad Faizal bin IsmailDept. of Electrical Engineering
PPD, [email protected]
013-7143106
Demultiplexer
• Demultiplexer separates the composite output digital data from the digital controller into the original channels
• It (the demultiplexer) is synchronized with the input sampling signal
• Each channel is connected to a DAC to produce the output analog signal for the channel
2
Digital-to-analog converter (DAC)
• A device that converts a digital signal
(numerically coded data or binary numbers)
into an analog signal
• Needed as an interface between a digital
component and an analog component
• The output is the voltage signal
3
8 bit DAC
• Figure below shows the 8-bit DAC block
diagram
4
8-bit DAC block diagram
04/05/2014
2
Cont.
• Input is an 8-bit digital word
• Output is a current that is proportional to the binary input value and must be converted to a voltage with an op-amp
• A stable reference voltage (Vref) must be supplied to the DAC
• This voltage defines the maximum analog voltage that is, for a digital input of 11111111, Vout is essentially Vref
• If the input is 00000000, the Vout will be 0 Vdc
• For all values in between, the output voltage is a linear percentage of Vref
5
Equation to remember:
Vout is DAC output analog voltage
input is decimal value of the digital input
Vref is reference voltage to the DAC
6
12 −
×
=n
ref
out
VinputV
Example 1
Find the output value of 8-bit DAC if digital
input 10011001 is applied to it. The maximum
output of the DAC is 10 VDC.
Solution:
7
Example 2
Calculate the 12-bit DAC resolution and find
the binary value of the input if the output
shows 7 VDC over 12 Vref.
Solution:
8
04/05/2014
3
DAC method
• Two methods frequently used for digital-to-analog
conversion:
1. using weighted resistors (simple in circuit
configuration, poor in accuracy)
2. using the R-2R ladder network (complicated in
configuration, good accuracy)
• Following slide show the diagram of both method
and the operation
9
Weighted resistors
10
Schematic diagram of a DAC using weighted resistors
Operation:
• Switch b0 to b3 is the digital input of DAC that connect Vref to the resistor if receives binary 1 and connect Vref to the ground if receives binary 0
• Since in practice the signal is applied in parallel, all bits act simultaneously and generates analog output voltage by given digital voltage
• The equation connecting the digital input and analog output is given by
11
refout Vbbb
bR
RV
+++=
8
0
4
1
2
23
0
Question?
How the number of bit affecting the DAC
accuracy.
Answer:
12
04/05/2014
4
R-2R ladder circuit
13
n-Bit DAC using an R-2R Ladder Circuit
Operation:
• The operation is the same as previous method
instead only R and 2R resistor value are used
• This result a high level of accuracy and relation
between the digital input and analog output is
given by,
14
refnnnout VbbbV
+++=
−−− 0121
2
1.......
2
1
2
1
Hold
• Sampling operation produces an amplitude-modulated pulse signal
• The function of the operation is to reconstruct analog signal that has been transmitted as train of pulses samples
• The purpose of the hold operation is to fill in the spaces between sampling periods and thus roughly reconstruct the original analog input signal
15
Cont.
• Following diagram illustrates the staircase waveform
constructed from original input signal
16Output from a zero-order hold
Hold
Sample
Sample
04/05/2014
5
Cont.
• The hold circuit is designed to extrapolate the
output signal between successive points in
some prescribed manner
• The hold circuit that produces such a staircase
waveform is called a zero-order hold and is
mostly used due to its simplicity
17
6. Digital controller
• Digital controller main function is to control the closed-loop response of a system
• Digital controller is essentially a computer (or a microcontroller)
• Since computer cannot accept analog signal, ADC is needed to interface between computer and and feedback transducer
• Similarly, computer cannot generate analog signal which required DAC to interface the computer to the final control elements as following figure
18
Cont.
• A closed-loop control system with a digital
controller is shown in the following slide
19
Structure of a digital controller
Cont.
• The conventional analog controller has been replaced with computer software executing the control algorithm
• The purpose of the summation block is to generate the error signal as a difference of SP and MV values
20
Digital controller in a closed loop
04/05/2014
6
Cont.
• In practice, the summation block is replaced by a line of
computer code, which takes the numerical (digitized) set-
point data and subtracts measured values from that data
• Following figure shows detail of digital control loop
configuration
21
Digital control loop configuration
Cont.
• Digital controller accepts values form SP and MV from ADC
• It processes the information according to the software and generates appropriate output to DAC
• Software is coded to execute control algorithm for the closed-loop system under control
22
Ideal sampling
• The process of sampling of a band limited
analog signal and its spectra is shown as
below
23
Analog signal(band limited)
t
x(t)
X(f)
B-B
A
Sampling function
t
i(t)
ts
(1)(1)......
Ideally sampled signal
t
xI(t)
ts
S 2S-S
...
(S)
... f
(S)
I(f)
Spectra
...
S 2S-S
... ft
XI(f)
-B B
AS
FF F
Cont.
• Period of the impulse train (sampling
function)/sampling period:
• S: sampling rate
• The spectrum of ideally sampled signal is periodic
with period S
Ss
1 t T ==
24
04/05/2014
7
Shannon sampling theorem
• Analog signal band limited to a frequency B can be sampled without loss of information if the sampling rate S exceeds 2B.
• This is due to the spectrum of ideally sampled signal X1(f) consist of the spectrum of the original signal X(f) and its shifted replicas.
• The original signal can be obtained from the sample signal if the spectrum in the principal period (-0.5S to 0.5S) is extracted
25
Cont.
• The critical sampling rate SN = 2B is called the
Nyquist rate or Nyquist frequency
• The critical sampling interval tN = 1/SN = 1/2B
is called the Nyquist interval
• Three possibilities may occur to the spectrum
of the sampled signal when we do sampling:
26
Cont.
27
...
S-S
... f
XI(f)
-B B
oversampling
S > 2B
...
S-S
... f
XI(f)
-B B
critical
sampling
S = 2B
...
S-S
... f
XI(f)
-B B
undersampling
S < 2B
Possibilities for Spectrum of a Sampled Signal
Cont.
• In undersampling condition, the spectrum overlaps which causes interference which also referred as aliasing
• The spectrum in the principal period no longer exact replica of the spectrum of the original signal so that the original signal can not be recovered exactly from the sampled signal
28
04/05/2014
8
Example of digital control
system
29Example of digital control system
System description:
• Utilizing a microprocessor-based controller with parallel ports
• System has one output port and three input ports (each port has each own address)
• Output port is segmented: Six bits are converted in a DAC to provide the analog motor-speed signal, the seventh bit specifies motor direction (1 = clockwise, 0 = counterclockwise), the eighth bit turns on an audio alarm if some emergency situation is detected
30
Cont.
• The first input port detects the set-point data,
the second input port receives the ADC data
from the sensor, the third input port is various
1-bit logical variables
• Limit switches are used as a “backup” to
detect it if the load has gone out of the
designated range
31
System operation:
• Controller inputs the data from port 03 to determine if the start (or stop) button has been pressed
• If the start button has been pressed, then the set point is read in from port 01 and the digitized sensor data is read in from port 02
• controller outputs to port 00 a binary word representing the motor speed voltage
• This digital data is converted to an analog voltage with the DAC
• sequence is repeated over and over until the stop button is pushed
32