← |
↑ |
☜ |
⌂ |
III. Analog active filters - Examples |
→ |
Note: Do not save the schematics after usage because they may be used in later examples.
Note: Opening the schematics from the links is best done with a Click+Drag
over an existing opened instance of LTspice.
The following table lists some of the key parameters which, when set to zero, allow various optimizations possible. There can only be one null parameter at a time.
|
N=0 |
Ap=0 |
As=0 |
Asc=0 |
|
Bessel |
- |
- |
- |
constant time-delay |
Asc > 0 ⇒ frequency scaling |
Butterworth |
minimum order to meet the requirements + stop-band optimization |
- |
- |
pass-band optimization |
N, Asc > 0 ⇒ stop-band optimization |
Chebyshev |
minimum order to meet the requirements + stop-band optimization |
ripple optimization |
- |
corner frequency @Ap 1 |
N, Ap, Asc > 0 ⇒ stop-band optimization |
InvChebyshev |
minimum order to meet the requirements + stop-band optimization |
- |
stop-band optimization |
pass-band optimization |
N, As, Asc > 0 ⇒ stop-band optimization |
Cauer |
minimum order to meet the requirements + stop-band optimization |
ripple optimization |
stop-band optimization |
corner frequency @Ap 1 |
N, Asc, Ap, As > 0 ⇒ transition-band optimization |
1only if nT=-1
, otherwise it's fp@Asc-Ap
for even orders.
Any of the following examples can be used to verify the table.
- With mostly a theoretical value, a LP with a pole @
100Hz
and unity gain. These are the parameters to change:
sigma={sigma}
BWp={BWp}
G={G} N=40
sigma
, BWp
and G
are defined externally to be able to set the two Laplace sources for comparison. The parameter sigma
can be varied to provide a smoother, or a sharper knee in phase (and magnitude, for LP). Its effect can be viewed by uncommenting the .step sigma
line and re-running the simulation.
- A more practical use of this filter is as an integrator over the audio band. For a
0dB@100Hz
and considering this:
.param G=10 BWp=1
.param sigma=0.5
The log will reveal a much more precise rolloff. If the phase needs to be (better) matched to what V(pure_int) shows, sigma
can be lowered, but it will also have an effect on the amplitude.
As
mentioned, the parameter
N
extends or reduces the upper-frequency for the slope. With the last settings active,
N=10
will show a zero at approximately
1kHz
, marking the maximum frequency the filter can be used at.
This
schematic shows how noise from
<100Hz..10kHz>
is filtered in time domain. The filter at the input is a
HP with
fc=100Hz
and is not a part of the example.
- Example
Checking the
graphs, this requires setting
BWp=BWs
with
BWp>0
. E.g. a unity gain,
8th
order
AP at an arbitrary frequency of
1kHz
:
fc=0 Bwp=1k BWs=1k
G=1 Asc={0,1} N=8
As the
description for the
Bessel filter says,
Asc
here can be used with
0
and
1
to see the difference. For a better view,
Bessel2 can be chosen (a simple adding of a
2
at the end of the name by
RClick
-ing it) and the parameters changed like this for a
.step
run:
fc=0 BWp=1k BWs=1k
G=1 Asc={0,1} N={N}
.step param N 2 32 1
.meas phi find V(out) at=1k
- Example
For the other two all-pole filters, AP is used in the exact same manner as Bessel is, with the exception that, this time, Asc
has a full influence on the result. Example of a 4th
order Butterworth with BWp=BWs=1k
and 2dB@ωc
:
sim=x test=x
fc=0 BWp=1k BWs=1k
G=1 Asc=2 As=x N=4
- (reusing the previous schematic)
Even if Chebyshev APs are rare to nonexistant, it is configured just as Butterworth is with the addition of nT
and Ap
: for even orders, nT=-1
will show a 0dB-Ap
response (given G=1
), and for large values of Ap
(and N
) there will be a minor notch around the center frequency. With the example from the previous point, the only changes are: the name (Butterworth → Chebyshev), nT=0
(unity gain for all orders) and Ap=0.01
which has an impact on the phase response:
nT=0
sim=x test=x
fc=0 BWp=1k BWs=1k
G=1 Asc=2 Ap=0.01 As=x N=4
Ap
can be changed to
Ap={Ap}
and the following command added to the schematic for a view on the influence of
Ap
to the phase:
.step param Ap list 0.01 0.1 1 3
. Both schematics can be used to show the response for a sine input with the same frequency as the pass-band settings; changing the simulation cards is done with these
steps.
It's configured like a LP and only Bessel can be used like this. Here are the parameters for a 1ms@1kHz
, but with ~-3dB@ωc
:
fc=0 BWp=159.155 BWs=1k
G=1 Asc=0 N=29
The time domain response to a
1kHz
sine input can be viewed by changing the simulation cards between themselves. For the sake of demonstration,
here is another schematic: the alternate
Bessel2 is used to show how a train of impulses are filtered for orders ranging from
1
to
32
(the
.step
command), with (
Asc>0
) and without (
Asc=0
) frequency scaling.
Bessel cannot be used here because of
this.
To make this a
-3dB@ωc
LP,
Asc
must be
>0
. If an exact
gain
at the corner frequency is needed then
Asc={20*log10(gain)}
, but the
frequency scaling is done by polynomial approximation, which isn't exact.
- A minimum order for a
-3dB@1GHz
and -80dB@1.1GHz
InvChebyshev LP:
sim=x test=x
fc=0 BWp=1G BWs=1.1G
G=1 Asc=3 As=80 N=0
- Using the same values, the second approach, by specifying the order, results in this configuration:
sim=x test=x
fc=0 BWp=1G BWs=10G
G=1 Asc=3 As={value} N=23
This is a pole-zero filter so the value of
As
, if not
null, matters. For this
InvChebyshev case,
As=80
.
Choosing the first method for a Butterworth with -1dB@1kHz
and -60dB@500Hz
results in:
sim=x test=x
fc=0 BWp=1k BWs=0.5k
G=1 Asc=1 As=60 N=0
An arbitrary Cauer: 20dB
gain, unnormalized, 1MHz
center frequency, -3dB@150kHz
pass-band bandwith, relative to ωc
, with 0.01dB
ripple and 175kHz
stop-band bandwidth @-100dB
.
- Minimum order:
nT=-1
sim=x test=x
fc=1MHz BWp=150k BWs=175k
G=10 Asc=3 Ap=0.01 As=120 N=0
- Stop-bands internally determined (unlike
BWs
, As
needs specifying, it's a pole-zero filter):
nT=-1
sim=x test=x
fc=1MHz BWp=150k BWs=1G
G=10 Asc=3 Ap=0.01 As=120 N=15
As the
graphs show, transforming the previous example can be done by simply reversing the settings for the pass-band and stop-band frequencies, if the same values are required; otherwise,
BWs<BWp
.
The transient response to a swept sine input can be seen by
switching the simulation cards. It can be seen that, despite the one or two seconds delay during pre-simulation, the simulation itself isn't slow.
By switching over to the .TRAN
card, the test pins can be used. The schematic has been previously used and the order is known to be 23
. Since the simulation card is .TRAN 23n
⇒ sim=23n
⇒ the time scale will be divided into N
segments of 23ns/23 = 1ns
each; if the poles are denoted as σp[n]+jωp[n]
and the zeroes as jωz[n]
then, starting with the first segment of the time scale, V(real[p]) will output σp[1:N]
, V(imag[p]) will output ωp[1:N]
and V(imag[z]) will output ωz[1:N]
.
But, since this is a
LP, any value beyond
ceil(N/2)
is just
symmetry (the same goes for
HP). If the filter is "transformed" into a
BP (or
BS), for example, with
fc=1G
and
BWs=1.25G
(to allow an order less than the maximum permitted), then the voltages at the test pins will use all the time scale by having the poles/zeroes for the lower frequencies in the first half and the poles/zeroes for the upper frequencies in the second half.
©Vlad, 2008 - 2015