You are on page 1of 22

Analog Signal Processing

This week’s lecture looks at some further


ECTE212 non-idealities of op-amps:
Electronics Finite slew rate
Offset voltage and bias current
Week 2 Gain-bandwidth product
Dr. Daniel R. Franklin
We will then explore some circuits which can
accomplish some other interesting analog signal
processing tasks:
Comparators/discriminators
Precision rectifiers

ECTE212ElectronicsWeek 2 – p. 1 ECTE212ElectronicsWeek 2 – p. 2

Notes: Notes:
Finite Slew Rate Finite Slew Rate
Slew Rate refers to the maximum rate at which the Unfortunately this capacitor is a necessary inclusion
output voltage of an op-amp can change in the op-amp (you’ll see why later in the course)
This is primarily determined by internal capacitors Therefore, there is a maximum rate at which the
within the amplifier. Consider a capacitor C: output voltage may change
If the maximum output current of the op-amp is If you try to change the input such that the output
imax , then we know that tries to change at a rate greater than the slew rate,
dV something rather interesting happens
imax = C Consider a sinusoidal input signal
dt
Its maximum rate of change is on either side of
so the maximum rate of change of the output
the zero-crossing point
voltage is
dV imax
=
dt C ECTE212ElectronicsWeek 2 – p. 3 ECTE212ElectronicsWeek 2 – p. 4

Notes: Notes:
Finite Slew Rate Finite Slew Rate
1
Original signal
A sinusoid has become a triangular waveform with
Max dV/dt = 4 V/us
Max dV/dt = 2 V/us
reduced amplitude
0.5
This is a form of non-linear distortion
So for a given amplifier, if the frequency of the input
Amplitude (V)

signal is too high (i.e. dt is too small for a given dV )


0 OR if the output amplitude that you are trying to
achieve is too high (i.e. dV is too large for a given dt)
you will get this type of distortion
−0.5
If you have slew-rate problems you may need to
upgrade your op-amp
−1
0 0.5 1 1.5 2
Time (us)
ECTE212ElectronicsWeek 2 – p. 5 ECTE212ElectronicsWeek 2 – p. 6

Notes: Notes:
Offset Voltage Offset Voltage
The output of an ideal op-amp will be zero if the
difference between the potentials at the inputs is Rf
Vin R1 i=0
zero −
Vout

However, a real op-amp will have a small non-zero +

output voltage under these conditions Vos


It can be modelled as a small DC voltage in series
with one of the input terminals (usually the
non-inverting input for simplicity)
Unfortunately this voltage will be amplified along
with the input signal...
 
Rf Rf
Vout = − Vin + 1 + Vos
R1 R1
ECTE212ElectronicsWeek 2 – p. 7 ECTE212ElectronicsWeek 2 – p. 8

Notes: Notes:
Offset Voltage Compensation Input Bias Current
Vdd Depending on the amplifier, the assumption that
zero current enters or leaves the input terminals may
R2 not be quite valid
Rf Vss Rf
Vin R1 i=0 Vin R1 i=0
The effects of this can be modelled by adding
Vout Vout
− −
current sources between the input terminals of an
+ +
Vdd ideal op-amp and ground:
Vos Vos

R4 Rf
R2
Vin R1 i=0
Vss
Vout

+
The offset voltage may be compensated for by
adding a small DC offset to your input signal, either I b−
I b+
at the inverting or non-inverting input
ECTE212ElectronicsWeek 2 – p. 9 ECTE212ElectronicsWeek 2 – p. 10

Notes: Some op-amps have an offset-adjustment input terminal which allows you Notes: Input bias current is largely determined by the devices on the front-end (in-
to nullify the offset voltage. put stage) of the op-amp. If the device has a JFET input (typical for high precision
/ low noise devices) then it is quite safe to assume input bias current is zero. How-
The offset voltage is usually temperature-dependent - so you may not be able to
ever, FET-based input stages also suffer from a higher offset voltage than bipolar
completely eliminate it!
devices. In electronics, you frequently need to make some sort of trade-off.
Offset voltage compensation is frequently not needed - it really depends on the ap-
plication. Most modern general-purpose op-amps have very small offset voltages.
Input Bias Current Input Bias Current Compensation
Clearly Ib+ has no effect in this circuit. We will come A small modification to our circuit can help the
back to that momentarily. situation: suppose we now add a resistor R2
What about Ib− ? between the non-inverting input and ground:

Vin − 0 0 − Vout Rf
+ Ib− = Vin R1
R1 Rf i=0
Vout

Rf R2
∴ Vout = − Vin − Ib− Rf +

R1 I b−
I b+
So the effect of non-zero bias current is equivalent
to an additional offset voltage
We can use the techniques already discussed to Now we will have another offset voltage at the
nullify this - or use another clever fix non-inverting input of Ib+ R2
ECTE212ElectronicsWeek 2 – p. 11 ECTE212ElectronicsWeek 2 – p. 12

Notes: Notes:
Input Bias Current Compensation Gain-Bandwidth Product
The output voltage becomes The last major non-ideality which we will discuss is
  that of bandwidth; unfortunately, no amplifier has an
Rf Rf infinite bandwidth
Vout = − Vin − Ib− Rf + Ib+ R2 1 +
R1 R1
We will study this in much greater detail towards the
It is therefore only necessary to adjust R2 such that end of the course
second and third term cancel For now it will suffice to say that the product of gain
It is usually the case that Ib+ ≈ Ib− and bandwidth is approximately constant
In this case we can simply set R2 = R1 ||Rf For example, the TL074 has a GBP of 3 MHz
If you design an amplifier circuit with a gain of 10,
your bandwidth would be 300 kHz
If you reduce the gain to 3, bandwidth increases
to 1 MHz
ECTE212ElectronicsWeek 2 – p. 13 ECTE212ElectronicsWeek 2 – p. 14

Notes: Of course, in reality the bias currents will not be exactly equal. However, you Notes: Gain-bandwidth product is also sometimes called ’unity-gain bandwidth’
can still reduce the bias currents by an order of magnitude at least. This process is
entirely unnecessary with modern op-amps with FET-based input stages such as
the TL071/TL074. That said, the TL07x is roughly as old as I am... so there are
newer and better devices available from manufacturers such as Linear Technology,
Maxim, Analog Devices, Texas Instruments etc.
Comparators Comparators - Example Waveform
Often we need to interface some sort of real-world 1 Input Signal
measurement (temperature, pressure, colour) with a Threshold = 0.7 V
Comparator Output
digital device such as a microprocessor
0.5
We do this via the quantisation of an analog signal

Amplitude (V)
The simplest form of quantisation is 1-bit. Consider
an analog voltage v, which we want to digitise as a 0

single bit b:
if v > vth then b = 1 −0.5
else b = 0
A circuit which performs this operation is called a −1
comparator as it compares two analog quantities 0 0.5 1 1.5 2
(typically an input signal and a reference voltage) Time (s)
ECTE212ElectronicsWeek 2 – p. 15 ECTE212ElectronicsWeek 2 – p. 16

Notes: Of course the reference signal could also be a current. Notes:


Comparator Circuits Comparator Circuits
The simplest possible comparator circuit is based If one of the inputs is connected to a reference
around a single op-amp voltage (for example, a simple voltage divider or a
The output of an op-amp can be approximated as precision voltage source), the output will therefore
Aol (V+ − V− ) - but it is limited by the rail voltages go from negative rail to positive rail as the voltage
attached to the other input goes above or below the
Therefore, if V+ is slightly higher than V− , the output reference voltage
will saturate to the positive rail voltage
A comparator can directly interface with digital
Conversely, if V− is slightly lower than V+ , the output circuitry - almost
will saturate to the negative rail voltage
Digital circuits usually represent zeros and ones
using a DC voltage between 0 and 0.8 V to
represent ‘low’ and 2 to 5 V to represent ‘high’
You need to ensure that your comparator’s
ECTE212ElectronicsWeek 2 – p. 17
outputs are in these ranges ECTE212ElectronicsWeek 2 – p. 18

Notes: Notes:
Comparators - Basic Circuit Improved Comparators
Vdd (e.g. +12 V) Even assuming that we can do this, our simple
Vin i=0 comparator has two major limitations:
Vout
+ 1. If the input is noisy, then as the input crosses the
i=0 threshold voltage the output will rapidly switch
Vdd −
back and forth between the upper and lower
Vss (e.g. −12 V) maximum output voltages
R1
Vref Solution: add a hysteresis feedback circuit
known as a Schmitt trigger
R2 2. The op-amp is switches between two opposite
saturated states - which is slow - so the rate at
which it can switch is limited
Solution: use a clamping circuit to limit the
output voltage to prevent saturation
ECTE212ElectronicsWeek 2 – p. 19 ECTE212ElectronicsWeek 2 – p. 20

Notes: Notes:
Comparators - Noisy Waveform Hysteresis
1 Input Signal Hysteresis essentially is some form of memory - that
Threshold = 0.7 V is, at a given time, a system with hysteresis is in one
Comparator Output
particular state
0.5
This memory can be used to affect the operation of
Amplitude (V)

the device - unlike a memoryless system whose


0 output only depends on the input
For a comparator, we have two output states -
−0.5
representing the ‘less-than’ and ‘greater-than’ states
If we know what state the comparator is in, we can
use this to make it more resistant to noise
−1
0 0.5 1 1.5 2
Time (s)
ECTE212ElectronicsWeek 2 – p. 21 ECTE212ElectronicsWeek 2 – p. 22

Notes: Notes: For the purpose of this exercise we can ignore the mathematical distinction
between ‘less than’ and ‘greater than’. This is electronics, not pure maths, and
things are pretty dodgy at the best of times.
Hysteresis Comparators - Hysteresis Waveform
Define two thresholds - upper and lower trigger 1 Input Signal
points Upper threshold = 0.8 V
Lower threshold = 0.6 V
Comparator Output
If the comparator output is currently ‘less-than’, we
0.5
only switch when the signal rises above the upper

Amplitude (V)
trigger point
If the comparator output is currently ‘greater-than’, 0

we only switch when the signal falls below the lower


trigger point −0.5
A circuit which achieves this effect can be
constructed using an op-amp with positive feedback
−1
0 0.5 1 1.5 2
Time (s)
ECTE212ElectronicsWeek 2 – p. 23 ECTE212ElectronicsWeek 2 – p. 24

Notes: Notes:
Comparators - Hysteresis Circuit Hysteresis Analysis
Vdd (e.g. +12 V) Define the upper and lower trigger points as Vutp and
Vin i=0
Vltp respectively
Vout Vutp is the voltage at the V+ input when the output is

i=0 in the saturated positive state (Vdd )
+
R1
Vss Vutp = V1 + (Vdd − V1 )
R1 + R2
V1 R1 (e.g. −12 V)
Similarly, Vltp is the voltage at the V+ input when the
output is in the saturated positive state (Vss)
R2
R1
Vltp = V1 + (Vss − V1 )
R1 + R2
ECTE212ElectronicsWeek 2 – p. 25 ECTE212ElectronicsWeek 2 – p. 26

Notes: Notes:
Hysteresis Analysis Relaxation Oscillator
Now define R1 A comparator with hysteresis is known as a Schmitt
ρ= trigger - they are widely used for cleaning up noisy
R1 + R2
signals
Given Vdd , Vss (supply rail voltages) and a desired
Vutp and Vltp we may now solve to find ρ and V1 : One simple application is to use the output of an
inverting Schmitt trigger to charge a capacitor via a
Vutp − Vltp Vdd · Vltp − Vss · Vltp resistor
ρ= , V1 =
Vdd − Vss Vdd − Vss − (Vutp − Vltp ) The capacitor voltage can then be used as the input
to the trigger...
To achieve an arbitrary V1 , you may use a voltage
divider between the supply rails connected to a Thus the R-C time constant (and the threshold
voltage follower voltages) set the frequency for a simple
rectangular-wave oscillator
Choose a value for R1 (say 1 kΩ) then solve for R2
ECTE212ElectronicsWeek 2 – p. 27 ECTE212ElectronicsWeek 2 – p. 28

Notes: Notes:
Relaxation Oscillator Avoiding Saturation
C R Saturation (where the output reaches the maximum
possible positive or negative output swing for this
i=0 Vdd amplifier) is undesirable as there is a significant
Vout
− recovery time
i=0
+
You may also wish to have specific output voltages
R1 Vss to represent the > and < states
R2 If a non-linear device is used in the feedback path of
an op-amp circuit, we can limit the output to less
than the rail voltages
The frequency of oscillation is (approximately)
One such device is a Zener diode
1
f≈
2.2RC
ECTE212ElectronicsWeek 2 – p. 29 ECTE212ElectronicsWeek 2 – p. 30

Notes: Notes:
Zener Limiter Zener Diode
A diode is a simple semiconductor device (which Current
you will look at in vastly greater detail next week)
A ‘normal’ diode may be crudely modelled as Anode (A) Cathode (K)
follows:
When the anode terminal is negative with respect Breakdown
to the cathode, or less than about 0.7 V positive Voltage

with respect to the cathode, the diode appears as A−K voltage


an open circuit (‘reverse-biased’) +0.7 V

At or above about +0.7 V anode-cathode potential


difference, the diode strongly conducts
(‘forward-biased’)
If the diode is very strongly reverse-biased it will
also start to conduct (‘breakdown’) ECTE212ElectronicsWeek 2 – p. 31 ECTE212ElectronicsWeek 2 – p. 32

A Zener diode is a silicon diode with a specific and


Notes: Zener diodes have many applications where an accurate reference voltage Notes:
is required - for example, voltage regulation circuits. The main drawback of Zeners
is that when they start to conduct they generate a great deal of noise
Zener Limiter Zener Limiter
Consider the following simple inverting comparator: To understand its operation, consider what happens
with the output voltage as the input rises just above
3.3 V Zener Diodes
zero:
The output voltage quickly starts becoming very
Vin R in
Vdd large and negative
i=0 Vout
− At some point, the diode pair starts to conduct -
i=0
+ when does it happen?
Vss Since we have one forward-biased diode (which
starts conducting with an anode-cathode potential
of about 0.7 V) in series with a reverse-biased
Without the Zener diode pair, the output of this diode (which conducts with an anode-cathode
circuit would toggle between Vdd and Vss depending potential of about -3.3 V), the pair will start when
on whether the input voltage was below or above 0 V the output drops to -4 V
ECTE212ElectronicsWeek 2 – p. 33 ECTE212ElectronicsWeek 2 – p. 34

Notes: Notes:
Zener Limiter Comparators - Final Notes
This current flows from left to right - as no current Rather than using a general-purpose op-amp as a
enters the input terminal of the op-amp, it all comes comparator, you can find ICs which are specifically
from the source (via R) designed for this role
This causes a voltage drop in R, such that the Generally they run on a single supply and will
voltage at the non-inverting input stays close to zero provide a TTL-compatible logic output - possibly
(the basic principle of feedback) open collector / open drain
Hence the output does not drop below -4 V Saturation is implicitly avoided - no need for a limiter
Similarly, when the input becomes negative, the Switching speed will be far superior to
output will not rise above +4 V general-purpose op-amps
The limiter idea can be combined with hysteresis,
but you should now use the limited outputs rather
than Vdd and Vss in your calculations
ECTE212ElectronicsWeek 2 – p. 35 ECTE212ElectronicsWeek 2 – p. 36

Notes: Of course you can also use a non-zero reference voltage - but remember Notes:
that due to feedback, the limit imposed by the diode combination applies to the
potential difference between the output and the reference voltage!

There are many other limiter architectures which you might like to use - such as
those suggested in [1].
Precision Rectifier Precision Rectifier Version 1
Suppose you need an ideal diode - a device which is
a short-circuit when a positive potential difference is
applied and an open circuit when a negative Vin −

potential is applied +
Vout RL
Real diodes do not significantly conduct below +0.7 Analysis is straightforward: start by assuming that
V forward bias (in fact the actual V-I relation is the diode does is not conducting - hence the output
exponential - more on this next week) voltage is zero
To get a better approximation to an ideal diode, you If we now connect a negative potential to the input,
can create a precision rectifier using a real diode the output of the op-amp will be large and negative
and an op-amp
Hence the diode will be reverse-biased and will not
conduct - so for negative inputs, the output stays at
zero
ECTE212ElectronicsWeek 2 – p. 37 ECTE212ElectronicsWeek 2 – p. 38

Notes: Notes:
Precision Rectifier Version 1 Precision Rectifier Version 2
For positive inputs, the op-amp output will be large R2
and positive - hence the diode will start to conduct
The voltage across the load will increase to the point
where the difference between the input terminals
reduces to nearly zero R1 D2
Therefore, for positive inputs, the output is equal to
Vin −
Vout
the input
+
Voa D1
Unfortunately, there is a problem - our old friend
saturation
This modified version is an inverting precision
Because a negative input causes the output of the rectifier which avoids the saturation problem
op-amp to be negatively saturated, there is a large
recovery time You can see that the circuit is based on an inverting
ECTE212ElectronicsWeek 2 – p. 39 amplifier ECTE212ElectronicsWeek 2 – p. 40

Notes: This device is not strictly a diode - it is a signal rectifier. There is no relation Notes:
(ideally) between the input current (which should be close to zero) and the output
current (limited by the capabilities of the op-amp).
Precision Rectifier Version 2 Precision Rectifier Version 2
Suppose D2 was open-circuited and D1 was If we now include D2 , you can see that the inverting
short-circuited input is a virtual ground (due to feedback around R2 )
We would then have a normal inverting amplifier - hence D2 is reverse biased and does not conduct
R2 Now suppose the input changes to a positive voltage
with a gain of − R 1

Now if we add D1 , when the op-amp output The op-amp output swings negative, turning D1 off -
Voa ≥ +0.7 V (i.e. the input is negative), D1 will hence Vout is zero for any positive input
conduct and Vout will be positive When the output drops below -0.7 V, D2 turns on -
Because the feedback loop includes this diode, the keeping Voa one diode drop below the virtual ground
R2
output must still be equal to − R1 Vin - the op-amp This achieves the desired effect of preventing
output will be 0.7 V above this voltage. op-amp saturation
The improved circuit has much better frequency
ECTE212ElectronicsWeek 2 – p. 41
response ECTE212ElectronicsWeek 2 – p. 42

Notes: Notes: Reversing the direction of both diodes will give you an output which is
R
negative - so when the input is positive, you will have a negative output − R2 Vin ,
1
and when the input is negative, you will have zero output. If you would prefer to
have a non-inverting amplifier you can ground the input resistor and connect your
R
input signal to the non-inverting input - but of course you will have a gain of 1 + R2
1
Precision Rectifier Version 2 Notes:

6
Input
Op−Amp Output References
Output
4
[1] Paul Horowitz and Winfield hill. The Art of Electronics. Cambridge University
Press, 1999.
Amplitude (V)

2
[2] Adel S. Sedra and Kenneth C. Smith. Microelectronics. Oxford University
Press, 2004.
0

−2

−4

0 0.2 0.4 0.6 0.8 1


Time (ms)
ECTE212ElectronicsWeek 2 – p. 43

You might also like