Está en la página 1de 25

Example Real-Time Applications

Many real-time systems are control systems. Example 1: A simple one-sensor, one-actuator control system

reference input r(t)

A/D A/D
y(t) sensor

rk yk

control-law uk D/A computation u(t)


plant actuator
The system being controlled

Example Real-Time Applications

Transducer: physical variable electrical variable (analog current/voltage) (thermistor, photocell, pressure transducer, tachometers etc). Actuator: device/circuit that serves as an actuator to control the physical variable (valve, motor, etc).

DAC

Analog output = K x digital input Vout = (1V) x digital input K = a constant proportional factor K = Full-scale output / (2n 1)

DAC

Analog output = K x digital input Resolution = K /Full-Scale output % Resolution = K * 100%/ Full-Scale n is the number of bits

DAC

DAC

Vout = - (VD + 0.5VC + 0.25VB + 0.125VA)

DAC with Current Output

R/2R Ladder

R/2R Ladder
Example: Assume that Vref = 5V for the DAC R/2R Ladder. What are the resolution and full-scale output of this converter? Solution: The resolution is equal to the weight of the LSB, which can Determine by setting B = 00012 = 110 . Resolution = -5V x 1 /8 = -0.625 The full-scale output occurs for B = 11112 = 1510 Full-scale = -5V x 15/ 8 = -9.375V

R/2R Ladder
Example: A certain 8-bit DAC has a full-scale output of 2 mA and a full-scale error of 0.5% full-scale. What is the range of possible outputs for an input of 100000002?

Solution: The step size is 2 mA/255 = 7.84 A. Since 10000002 = 12810, the ideal output should be 128 x 7.84 A = 1004 A
The error ca be as mush as 0.5% x 2 mA = 10 A Thus, the actual output can be anywhere from 994 to 1014 A

R/2R Ladder
Example: A 10-bit DAC has a step size of 10 mV. Determine the full-scale Output voltage and the percentage resolution. Solution: With 10 bits, there will be 210 1 = 1023 steps of 10 mV each. The full-scale output will be therefore be: 10 mV x 1023 = 10.23 V .

% Resolution = 10 mV x 100% / 10.23 V 0.1%

Digital Ramp ADC

Digital Ramp ADC


Example: Assume the following values are applied: Clock frequency = 1MHz, VT = 0.1 mV, DAC has full-scale output = 10.23 V and a 10 bits input. Determine the following values: -The digital equivalent obtained for VA = 3.728 V - The conversion time - The resolution on this converter.

Solution: The DAC has 1 10-bit input and a 10.23 V FS output. Thus, the number of total possible steps is 210 1 = 1023, So the step size = 10.23 V/1023 = 10 mV. This means that VAX in steps of 10 mV as the counter counts up from 0.

Digital Ramp ADC


Since VA = 3.728 V and VT = 0.1 mV, VAX must reach 3.7281 or more before the comparator switches LOW. This will be require: 3.7281 V / 10 mV = 372.81 = 373 steps. At the end of the conversion, then the counter will hold the binary equivalent of 373 which is 0101110101. This is the desired digital equivalent of VA = 3.728 V. Conversion time = 373 clock pulses x (1/1 MHz clock freq.) = 373 s. The resolution on this converter = 1 x 100%/1023 = 0.1%

Successive-Approximation ADC

Successive-Approximation ADC

Digitizing an analog signal

Reconstructing the signal from the digital data

ADC Performance Issues


Aliasing

Nyguist frequency

Antialiasing filter Resolution


Limited dynamic range:
12-bit ADC with 0-10 volt range accurate to 0.024% (1 part in 4096) Only 2-bit ADC when sampling a 10 millivolt signal Use programmable-gain amplifier

Non-linear Ground reference and noise

Data-Acquisition Subsystems
Typical board
Contains ADC, DAC, and digital I/O Antialiasing filters Programmable gain amplifiers Sample/hold (one multiplexed or one per channel) Single-ended or differential input DMA control FIFO queues and buffers Timer/counters

Software
Lab Notebook Virtual Instrumentation

Simple Control System (contd)

Pseudo-code for this system:

set timer to interrupt periodically with period T; at each timer interrupt do do analog-to-digital conversion to get y; compute control output u; output u and do digital-to-analog conversion; end do

T is called the sampling period. T is a key design choice. Typical range for T: seconds to milliseconds.

Signal-Processing Systems
Signal-processing systems transform data from one form to another.

Examples: Digital filtering. Video and voice compression/decompression. Radar signal processing.
Response times range from a few milliseconds to a few seconds.

Example: Radar System


radar
sampled digitized data

memory
track records

DSP DSP DSP


signal processors

track records

control status

data processor

signal processing parameters

También podría gustarte