Professional Documents
Culture Documents
Digital Signals
Introduction
• Output from most sensors tends to be in analogue form varying
continuously with time
• Digital format offers several advantages: digital signal
processing, storage, use of computers, robust transmission, etc.
• most actuators operate with analogue inputs
• so the digital output from a microprocessor has to be converted
into an analogue form before it can be used as an input by the
actuator.
Instrumentation and Control Systems RGUKT Basar
• An analogue signal is continuous variable, changing smoothly over a
range of values.
DAC
Instrumentation and Control Systems RGUKT Basar
Digital to analogue (D/A) conversion
• Output voltage of an n bit converter
ER
E0 n d n 1 2n 1 d n 2 2n 2 ...... d1 21 d 0 20
2
Instrumentation and Control Systems RGUKT Basar
• Example: 5 bit DAC with digital input 10000
• Output voltage
ER
E0 16d 4 8d 3 4d 2 2d1 d 0
32
ER
E0 16
32
• For binary number 11000 ER
E0 24
32
• Example
• microprocessor gives an output of an 8-bit word. This is fed
through an 8-bit DAC to a control valve. The control valve
requires 6.0 V to be fully open. If the fully open state is
indicated by 11111111 what will be the output to the valve for a
change of 1 bit?
• The full-scale output voltage of 6.0 V will be divided into 28
intervals.
• A change of 1 bit is thus a change in the output voltage of 6.0/28
= 0.023 V.
Instrumentation and Control Systems RGUKT Basar
• Resolution
• Taking logarithms
• The current drawn through any one switch is always the same,
no matter if it is thrown up or thrown down.
1. sampling
– process of taking a sufficient number of discrete values at
point on a waveform that will define the shape of
waveform.
2. quantisation
– breaking down analog value in a set of finite states
3. encoding
– assigning a digital word or number to each state and
matching it to the input signal
Instrumentation and Control Systems RGUKT Basar
Sampling
Procedure
• clock supplies regular time signal pulses (Fig. C) to the
analogue-to-digital converter (ADC) and every time it receives
a pulse it samples the analogue signal (Fig. b).
• The result of the sampling is a series of narrow pulses (Figure
(d)).
• A sample and hold unit is then used to hold each sampled value
until the next pulse occurs, with the result shown in Figure (e).
• The sample and hold unit is necessary because the ADC
requires a finite amount of time, termed the conversion time, to
convert the analogue signal into a digital one.
Instrumentation and Control Systems RGUKT Basar
Instrumentation and Control Systems RGUKT Basar
Sampling theorem
• When the sampling rate is less than twice the highest frequency,
the reconstruction can represent some other analogue signal and
we obtain a false image of the real signal.
• This is termed aliasing.
Frequency of
original signal= 1Hz
where tsampled is the time when the switch was last opened.
Instrumentation and Control Systems RGUKT Basar
• Sampling begins when the switch is closed and ends when the
switch is opened.
• When the switch is opened, the input voltage present at that exact
moment will be stored in C.
• The op amp acts as a unity-gain amplifier (buffer), relaying the
capacitor’s voltage to the output but preventing the capacitor from
discharging (recall that ideally, no current enters the inputs of an op
amp).
• The length of time a sample voltage can be held varies depending on
how much current leaks out of the capacitor.
• To minimize leakage currents, use op amps with low input-bias
currents.
• Capacitors best suited for sample/hold applications include Teflon,
polyethylene, and polycarbonate dielectric capacitors to ensure low
leakage of currents.
Instrumentation and Control Systems RGUKT Basar
• In the sample state the output signal follows the input signal;
• In the hold state the output signal is held constant at the value of the
input signal at the instant of time the hold command is sent
Instrumentation and Control Systems RGUKT Basar
Quantisation
• Although the sample values are taken at discrete intervals of time, the
values yi can take any value in the signal range yMIN to yMAX
• In quantisation the sample voltages are rounded either up or down to
one of Q quantisation values or levels Vq, where q = 0, 1, 2, . . , Q−1.
• Quantum levels correspond to the Q decimal numbers 0, 1, 2, . ., Q−1.
• If V0 = yMIN and VQ−1 = yMAX, then there are (Q − 1) spacings
occupying a span of yMAX − yMIN.
Instrumentation and Control Systems RGUKT Basar
Encoding
• encoder converts the quantisation values Vq into a parallel digital
signal corresponding to a binary coded version of the decimal
numbers 0, 1, 2, . . . , Q − 1.
• Decimal number system
• any positive integer is expressed as a series of powers of 10
• There are eight possible words which can be used to represent the
analogue input; the number of possible words with a word length
of n bits is 2n.
• Thus maximum analogue voltage can be divide into eight parts
and one of the digital words corresponds to each.
• Each rise in the analogue voltage of (1/8) of the maximum
analogue input then results in a further bit being generated.
• Thus for word 000 we have 0 V input.
• To generate the next digital word of 001 the input has to rise to 1/8
of the maximum voltage.
• To generate the next word of 010 the input has to rise to 2/8 of the
maximum voltage.
Instrumentation and Control Systems RGUKT Basar
Resolution of ADC
VFS
Re solution n
2
VREF
VDAC 4 d3 23 d 2 22 d1 21 d 0 20
2
• VDAC = 8 V
• Vin >VDAC MSB is on (1)
• If Vin< VDAC, MSB is off (0)
• MSB-1 (bit 3)
• Initialize MSB MSB-1 MSB-2 LSB
1 1 0 0
VREF
VDAC 4 d 3 23 d 2 22 d1 21 d 0 20
2
• VDAC = 12 V
• Vin >VDAC MSB is on (1)
• If Vin< VDAC, MSB is off (0)
VREF
VDAC 4 d3 23 d 2 22 d1 21 d 0 20
2
• VDAC = 11 V
• Vin >VDAC MSB is on (1)
• If Vin< VDAC, MSB is off (0)