0% found this document useful (0 votes)
7 views

Lecture 04

Uploaded by

s4nzr2cxtc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lecture 04

Uploaded by

s4nzr2cxtc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

Filtering

Filters reject unwanted noise/frequency within a certain frequency range.


Nearly all data acquisition applications are subject to some level of 50 or 60 Hz noise
picked up from power lines or machinery. Most signal conditioners include filters
specifically designed to provide maximum rejection of 50 to 60 Hz noise.
Filter classification according to implementation
● Active filters include op-amps and RC networks
• Suitable for low frequency, small signal
• Active filters are preferred since avoid the bulk and non-linearity of inductors and
can have gains greater than 0dB
• However, active filters require a power supply
● Passive filters consist of RCL networks
• Simple, more suitable for frequencies above audio range (20 Hz to 20,000 Hz),
where active filters are limited by the op-map bandwidth
● Digital filters
• Implemented in software
Filter classification according to frequency response
● Low-pass filter
● High-pass filter
● Band-pass filter
● Band-stop (Notch)
Normalized plot of low pass filter

=20 log(0.707) = -3dB


Low-pass filter

LPFs as the name suggests passes only low frequencies. That is, it limits or cuts-off the
high frequencies components. This area where the filter does not pass (ideally) certain
frequencies is called the cutoff frequency denoted as .

fc
The passive LPF
Passive, low pass filters are realized with resistors and capacitors. The realization of
single pole low pass filters are shown in figure below .

single pole passive low pass


filter
1
Zc j ωC 1
Vout = IZ c = Vin = Vin = Vin
R + Zc R+ 1 1 + j ω CR
j ωC
Vout 1
=
Vin 1 + jωCR

Vout 1
Magnitude of LPF =
Vin 1 + ω 2 R 2C 2

Vout ⎛ 1 ⎞
Phase of LPF ∠ = ∠⎜⎜ ⎟⎟ = ∠1 − ∠(1 + jωCR )
Vin ⎝ 1 + jωCR ⎠

Vout ⎛0⎞ ⎛ ωCR ⎞


∠ = tan −1 ⎜ ⎟ − tan −1 ⎜ −1
⎟ = − tan (ωCR )
Vin ⎝1⎠ ⎝ 1 ⎠
The cut-off frequency is where the response has fallen from its maximum by a factor of
This yields,
2

1 Vout 1
fc = at this frequency: = ,where ω = 2πf
2π RC Vin 2

In other words as the frequency f becomes bigger |Vout| becomes smaller and that is the
definition of a low pass filter. When f = 0, then Vin = Vout.
The output impedance of a passive low pass filter is relatively
high when compared to the active filter realization. For instance, a 1kHz low pass filter
which uses a 0.1µF capacitor in the design would require a 1.59kΩ resistor to complete
the implementation.

Another circuits of passive LPFs

1-st order passive LPF 2-nd order passive LPF


The active LPF
The op amp configuration can be slightly altered to include a capacitor to make a 1st
order LPF. The frequency response of these active filters is equivalent to a single pole
passive low pass filter. An operational amplifier in combination with two resistors
and one capacitor can be used to implement a 1st order filter.
−1
⎡ 1⎤ R2
Z1 = R1 , Z 2 = ⎢ j ωC + ⎥ =
⎣ R2 ⎦ 1 + jωR2C

R2
Vout Z 2 R1 A R2
= = = ,where A= τ, = R2C
Vin Z1 1 + jωR2C 1 + jωτ R1

1 ,
fc = ω = 2πf
2π R2C
Example of non-inverting Active Low Pass Filter
Design a non-inverting active low pass filter circuit that has a gain of ten at low
frequencies, a high frequency cut-off or corner frequency of 159Hz and an input
impedance of 10KΩ.
The voltage gain of a non-inverting operational amplifier is given as:

Assume a value for resistor R1 of 1kΩ rearranging the formula above gives a value
for R2 of:
The cut-off or corner frequency (ƒc) is given as being 159Hz with an input impedance
of 10kΩ. This cut-off frequency can be found by using the formula:
where ƒc = 159Hz and R = 10kΩ.
Simplified Inverting Amplifier Filter Circuit of Active Low Pass Filter
High-pass filter

The opposite of the low-pass is the high-pass filter, which rejects signals below its cutoff
frequency.

The passive HPF

Passive, high pass filters also realized with resistors and capacitors. The realization of
single pole high pass filters are shown in figure below.

1 , ω ⋅ R ⋅C
fc = Vout = Vin ⋅ ,where ω = 2πf
2π RC 2
1+ ω R C 2 2

as the frequency f becomes bigger |Vout| becomes bigger and that is the definition of a
high pass filter. When f = infinity, then Vin = Vout. This is obviously because
infinity/infinity is 1.
single pole passive high pass filter

Another circuits of passive HPFs

1-st order passive HPF 2-nd order passive HPF


The active HPF
Here is an example of a 1st order active HPF using an op amp.

1
Z1 = R1 + , Z 2 = R2
j ωC

R2
Vout Z 2 R2 R1 A
= = = =
Vin Z1 1 1 1
+ R1 1+ 1+
j ωC jωR1C jωτ
1 R2
fc = ω = 2πf ,where A= , τ = R2C
2π R1C
, R1
Second-order Low Pass Active Filter
As with the passive filter, a first-order low-pass active filter can be converted into a
second-order low pass filter simply by using an additional RC network in the input path.
The frequency response of the second-order low pass filter is identical to that of the
first-order type except that the stop band roll-off will be twice the first-order filters at
40dB/decade (12dB/octave). Therefore, the design steps required of the second-order
active low pass filter are the same.
Example: If the filters ƒc = 159Hz, design a suitable low pass filter Characteristics
given: R1 = R2, C1 = C2 and ƒc = 159Hz.
Choosing a suitable value of say, 10kΩ’s for the resistors, the resulting capacitor value
is calculated as:
High Pass Second Order Filters
Since second order high pass and low pass filters are the same circuits except that the
positions of the resistors and capacitors are interchanged, the design and frequency
scaling procedures for the high pass filter are exactly the same as those for the
previous low pass filter.
Rolloff: The slope of the filter’s response in the transition region between the pass-
band and stop-band. Rolloff is given in dB/octave (a doubling of frequency) or
dB/decade (ten times the frequency). If the response changes rapidly with frequency,
that rolloff is termed steep.
A general observation can be given that the rolloff rate of a filter will eventually approach
6 dB per octave per pole (20 dB per decade per pole). Therefore, a thirdorder filter (i.e.,
three-pole) eventually rolls off at a rate of 18 dB per octave (60 dB per decade).
ADC / DAC
Digital-to-Analog Converter (DAC)
DACs are electronic circuits that convert digital, (usually binary) signals (for example,
1000100) to analog electrical quantities (usually voltage) directly related to the digitally
encoded input number.
DACs are used in many other applications, such as voice synthesizers, automatic test
system, and process control actuator. In addition, they allow computers to communicate
with the real (analog) world.
Block diagram of a typical DAC shown in figure below.
• Register: Use to store the digital input (let it remain a constant value) during the
conversion period.
• Voltage switch: Similar to an ON/OFF switch. It is ‘closed’ when the input is ‘1’.
It is ‘opened’ when the input is ‘0’.
• Resistive Summing Network: Summation of the voltages according to different
weighting.
• Amplifier: Amplification of the analog according to a pre-determined output
voltage range. For example, an operation amplifier.
The two most popular types of resistive summing networks are:
• Weighted binary resistance type, and
• Ladder resistance (R-2R) type

Input Binary
Number
Analog Voltage
Output
Resistive
Register

Summing Amplifier
Voltage Network
Switch
Example:
Determine the output of the DAC in figure (a) if the waveforms representing a sequence of
4-bit numbers in figure (b) are applied to the inputs. Input D0 is the least significant bit
(LSB).
R-2R Ladder DAC
Another method of digital-to-analog conversion is the R / 2R ladder, as shown in figure
below for four bits. It overcomes one of the problems in the binary-weighted-input DAC
in that it requires only two resistor values.
Start by assuming that the D3 input is HIGH (+5 V) and the others are LOW (ground,
0 V). This condition represents the binary number 1000. A circuit analysis will show
that this reduces to the equivalent form shown in figure. Essentially no current goes
through the (2R) equivalent resistance because the inverting input is at virtual
ground. Thus, all of the current (I = 5 V / 2R) through R, also goes through (Rf), and
the output voltage is (-5 V). The operational amplifier keeps the inverting (-) input
near zero volts (0 V) because of negative feedback. Therefore, all current goes
through (Rf) rather than into the inverting input.
Figure shows the equivalent circuit when the D2 input is at (+5 V) and the others are at
ground. This condition represents 0100. If we thevenize looking from R8, we get (2.5 V)
in series with R, as shown. This results in a current through Rf of [I = 2.5 V / 2R], which
gives an output voltage of (-2.5 V). Keep in mind that there is no current into the op-amp
inverting input and that there is no current through the equivalent resistance to ground
because it has (0 V) across it, due to the virtual ground.
Figure shows the equivalent circuit when the D 1 input is at (+5 V) and the others are at
ground. This condition represents 0010. Again thevenizing looking from R8 you get (1.25
V) in series with R as shown. This results in a current through Rf of [I = 1.25 V / 2R],
which gives an output voltage of (- 1.25 V).
the equivalent circuit representing the case where D0is at (+5 V) and the other inputs
are at ground. This condition represents 0001. Thevenizing from R8 gives an equivalent
of (0.625 V) in series with R as shown. The resulting current through Rf is [I = 0.625 V /
2R], which gives an output voltage of (- 0.625 V).
ADC / DAC
Analog-to-Digital Converter (ADC)
An analog-to-digital converter, converts an analog voltage level to a digital number.
Numerous methods are used for converting analog signals to digital form.
ADC_ Nyquist-rate
• Staircase ramp(Slow speed, high resolution )
• Successive approximation (Medium speed, medium to high resolution)
• Dual slope (Slow speed, high resolution )
• Tracking ADC (Medium speed, medium to high resolution)
• Parallel or flash(Fast speed, low to medium resolution )
ADC_ Oversampled
•Sigma-delta converter (Slow speed, high resolution )
Nyquist ADC & Sigma-Delta ADC
• Nyquist Rate ADC
• fs ≥2fn
• Fast but limited to 10~12 bits due to mismatching & non-ideality
• Σ-ΔADC
• High resolution ( 16 bit and more )
• Over-sampling M = 8, 16, 32, ⋅⋅⋅, 256 )
• Noise shaping
• No Dedicated S/H
• Simple Analog Circuits & Robust
Flash Analog-to-Digital Converter

The flash method utilizes comparators that compare reference voltages with the analog
input voltage. When the input voltage exceeds the reference voltage for a given comparator,
a HIGH is generated. Figure below shows a 3-bit converter that uses seven comparator
circuits; a comparator is not needed for the all-0s condition. A 4-bit converter of this type
requires fifteen comparators. In general, [2n – 1] comparator are required for conversion to
an n-bit binary code. The number of bits used in an ADC is its resolution. The large number
of comparators necessary for a reasonable-sized binary number is one of the disadvantages
of the flash ADC. Its chief advantage is that it provides a fast conversion time because of a
high throughput, measured in samples per second (sps).
Example: Determine the binary code output of the 3-bit flash ADC in figure above for the
input signal in figure below and the encoder enable pulses shown. For this example, VREF. =
+ 8V.
Sampling of values on a waveform for conversion to binary code.
Solution: The resulting digital output sequence is listed as follows and shown in the
waveform diagram of figure below in relation to the enable pulses: 100, 110, 111, 110, 100,
010, 000, 001, 011, 101, 110, 111.
Other types of ADCs;
●Successive Approximation Register (SAR) AD
●Dual-Slope Analog-to-Digital Converter
●Tracking Analog-to-Digital Converter
Selection criteria of ADC
The selection of the ADC and DAC are extremely important determining the
performance and noise in a system.

For the selection of an IC ADC , there are several parameters (characteristics) that can
determine the suitability of a particular device. The most important are:

• Sampling frequency
• Quantization error
• Resolution
• Input Voltage Range
• Conversion Time
• Output Coding (usually binary)
Sampling Frequency (sampling rate)

Can be defined as a ‘Number of times per second a conversion occurs’.

●Sampling Frequency or Sampling Rate Fs = 1/Ts.


●Nyquist Sampling Rate
• Fs ≥ 2*Fmax , where Fmax is the max frequency of a signal
• 20 kHz signal must be sampled at 40 kHz or 40,000 times per sec
●Nyquist Frequency = 1/2 of the sampling rate of the system
●Number of channels affect maximum allowable sampling frequency per channel.
Number of digital bits in the conversion

This is the length of the digital word that the A/D conversion produces as its output.
Typical values for this are 8, 12 and 16 bits. The higher the number of bits the longer
the conversion takes and the more accurate it is. This number is fixed for a given
converter. The number of discrete values that can represented (quantized) by a given
length digital word is equal to 2 raised to the number of bits. For example, if the
converter is a 12 bit system then 212 = 4096 values can be represented.
Input voltage range

This is the total range in volts of the A/D converter and depends on the amount of gain
that the converter has. Typically the amount of gain is adjustable.
The analog-to-digital converter is only capable of performing an accurate conversion if
the analog input voltage is within the valid input range of the converter. If the input
voltage falls outside this range, the conversion value will be inaccurate. The input range
is set by high and low voltage references. These define the upper and lower limits of the
valid input range.
The choice of the input range value is critical in ensuring that we obtain enough
resolution to accurately measure the input signal.
Resolution

The resolution of an A/D conversion is defined as the smallest voltage difference


that can be detected.

Resolution is a function of the maximum input voltage to the number of data bits in
result.
Resolution of ADC:

Vin − max
resolution = n
2 −1
Example :
Max. input voltage =10V with 8 bits
Resolution= 10/255=0.03921V≈ 40 mV per bit, when using 8 bit of accuracy.
Example:
Consider the case of measuring a signal of 0.1 volts using a input voltage range of ±10 volts. The
percent error in our measurement of this signal using a 12 bit A/D is:
Resolution = 20 V / (2¹² - 1) = 0.0049 Volts
Resolution / Input Voltage Range * 100
0.0049 / 0.1 * 100 = 4.9 %
which is probably not acceptable.
Quantization error

Represents the difference between an actual analog value and its digital
representation. Ideally, the quantizing error should NOT be greater than ± ½ LSB.
Quantization error results because a continuously varying analog signal is represented
digitally as a series of discrete steps differing by the resolution of the conversion
process. Figure shows this. One can clearly see that the error, as signal is smoothly
increased, changes in a saw-tooth manner.
Signal to Quantization Noise Ratio

SQNR = 6.02 N + 1.76 dB ;where N- number of ADC bits


Conversion Time

A practical ADC cannot make an instantaneous conversion, the input value must
necessarily be held constant during the time that the converter performs a conversion
(called the conversion time).
In practice, an ADC is usually in form of an integrated circuit (IC).
Sampling and Quantization

• Sampling is capturing a signal at an instant in


time.
• Sampling means taking amplitude values of
the signal at certain time instances. (simply
taking voltage readings at fixed points in
time).
• Uniform sampling is sampling every T units of
time (sampling at regular intervals).

xk = x(kT ) = x(t ) t =0,±T ,±2T ,±3T ,


Sampling
frequency or 1
sampling rate F0 = time step or
T sample interval
Figure(7):

original signal

sampling pulses
0 or 1 from clock

sampled waveform

original waveform
reconstructed
from samples
The Sampling Theorem
• Nyquist’s theorem or C.E. Shannon
“Any signal can be represented by discrete samples if
the sampling rate is at least twice the bandwidth of
the signal ”
Sampling frequency > 2 × maximum frequency present
• Given a uniform sample rate of fs, the highest
frequency that can be unambiguously
represented is fs/2
➢ fs/2 is the Nyquist Frequency
Sampling too slowly misses high Sampling too slowly creates spurious low
frequency detail in the original signal frequencies (aliases)

Figure(8): Problems with sampling


Aliasing
•'Aliasing‘ (the production of spurious low
frequency components) occurs by sampling a high
frequency too slowly.
•Figure(9) shows a frequency display of a system
being sampled at frequency fs. For all input signals
below fs/2, such as the one at fo, we fully meet the
Nyquist criterion.
•But if we have a signal present at say, fa, which is
above fs/2, the sampling process will generate an
aliased image which will appear in the sampled data
at fs - fa.
f 0 will be correctly represented in the sampled data

f a above fs
2 , the sampling process will generate an

aliased image which will appear in the sampled data at


fs − fa

Figure(9)
Antialiasing Filters
• We have to filter (remove) any content above
the Nyquist Frequency (fs/2)
• The most straightforward way to prevent
aliasing is to use a low pass filter before
the A/D converter which removes all
signals above fs/2. This filter is called an
anti-aliasing filter seen in Figure(10).
Now the signal at fa is blocked so the A/D
converter never sees it.
Analog Sample
Antialiasing Sampled
signal and
Filter signal
Hold

Not digital devices!!!

Figure(10)
Digitizing samples

Figure(11)

The greater the number


of bits the better the
resolution
DECIBELS
Power Gain
Two levels of power can be compared using a unit of measure called the decibel, which is
defined by the following equation:

Voltage Gain
Decibels are also used to provide a comparison between voltage levels.

=20 log(0.707) = -3dB


Decibels are measured logarithmically. This is a way of counting or measuring
something that increases rapidly, or exponentially. 'A 10 db increase means 10 times
louder, a 20 db increase means 100 times louder'
capacitor
A capacitor is a device used to store electrical energy. The capacitance of a
capacitor determines the amount of charging a capacitor can achieve. The measure
of the opposition to alternating current by the capacitor is called Capacitive
Reactance. The unit of Capacitive Reactance is Ohms like resistance. The symbol
of Capacitive Reactance is XC .
Capacitive Reactance Formula is expressed by

Where in,
XC is the capacitance reactance measured in ohms
C = capacitance in farads
f = frequency in hertz
inductor

Inductive reactance is the resistance offered by the inductive circuit. It is the


opposition to a changing current flow offered by an inductor. The SI unit for
it is Ohm(Ω). The inductive reactance formula is:
Inductive reactance (XL) : 2π f L
where f is the frequency of the alternating current measured in Hertz(hz) and
L is the inductance measured in henry(h).

You might also like