Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
82
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 503

29. ANALOG INPUTS AND OUTPUTS

Interfacing for Acquisition of Signals from Sensors and Generation of Signals for Actuators

Used by Computers, PLC’s, PID Controllers, etc.

Computers are designed to handle both input and output (I/O) data

Two main types of data I/O for computers

Analog

Digital

Voltage

analog

 

 

digital

 

t

29.1 ANALOG INPUTS

A Continuous signal is sampled by the computer

The computer uses approximation techniques to estimate the analog value during the sampling window.

An example of an A/D, D/A control of a process is shown below

page 504

Analog

 

Amp

to Digital

 

 

 

Converter

 

 

CPU

 

Water

Running

 

Supply

Control

 

 

Program

 

 

Analog

 

 

to Digital

Amp

Water Tank

Converter

 

 

 

 

pressure

 

transducer

Multiplexers are used when a number of signals are to be input to a single A/D converter. This allows each of a number of channels to be sampled, one at a time

Signal conditioners are often to amplify, or filter signals coming from transducers, before they are read by the A/D converter.

Output drivers and amplifiers are often required to drive output devices when using D/A

Sampling problems occur with A/D conversion. Because readings are taken periodically (not continually), the Nyquist criterion specifies that sampling frequencies should be twice the frequency of the signal being measured, otherwise aliasing will occur.

Since the sampling window for a signal is short, noise will have added effect on the signal read. For example, a momentary voltage spike might result in a higher than normal reading.

When an analog value is converted to or from digital values, a quantization error is involved. The digital numbering scheme means that for an 8 bit A/D converter, there is a resolution of 256 values between maximum and minimum. This means that there is a round off error of approximately 0.4%.

page 505

Voltage is sampled during these time periods

voltage

time

(Sampling Frequency)-1

Sampling time

29.1.1 Analog To Digital Conversions

When there are analog values outside a computer, and we plan to read these to digital values, there are a variety of factors to consider,

-when the sample is requested, a short period of time passes before the final sample value is obtained.

-the sample value is ‘frozen’ after a sample interval.

-after the sample is taken, the system may change

-sample values can be very sensitive to noise

-the continuous values of the signal loose some accuracy when conversion to a digital number

Consider the conversion process pictured below,

page 506

V( t)

 

 

Vmax

V2

 

V1

 

 

Vmin

 

t

 

τ

t1

t2

where,

 

V( t)

=

the actual voltage over time

τ

=

sample interval for A/D converter

t

= time

t1, t2

=

time at start,end of sample

V1, V2

= voltage at start, end of sample

Vmin, Vmax = input voltage range of A/D converter

N= number of bits in the A/D converter

Once this signal is processes through a typical A/D converter we get the following relations (these may vary slightly for different types of A/D converters).

page 507

R = 2N

 

 

 

 

 

 

Vin Vmin

 

 

 

 

 

 

 

 

 

 

 

 

 

VI

= INT

 

 

----------------------------

R

 

 

 

V

 

 

V

 

 

 

 

 

 

 

 

 

 

max

 

min

 

 

 

 

 

 

=

VI

 

 

 

 

 

 

 

V

 

( V

 

V

) + V

 

C

----

max

min

 

 

R

 

 

 

 

min

 

 

 

 

 

 

 

 

 

Vmax

Vmin

 

 

 

 

VERROR =

----------------------------

 

 

 

 

 

 

 

2R

 

 

 

 

 

where,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R =

resolution of A/D converter

VI = the integer value representing the input voltage

VC = the voltage calculated from the integer value

VERROR = the maximum quantization error

• Consider the example,

We are given a 12 bit analog input with a range of -10V to 10V. If we put in 2.735V, what will the integer value be after the A/D conversion? What is the error? What voltage can we calculate?

In most applications a sample is taken at regular intervals, with a period of ‘T’ seconds.

In practice the sample interval is kept as small as possible. (i.e., tau << T)

If we are sampling a periodic signal that changes near or faster that the sampling rate, there is a chance that we will get a signal that appears chaotic, or seems to be a lower frequency. This phenomenon is known as aliasing.

Соседние файлы в предмете Электротехника