Because it's a list of filters, when first placing the symbol there will be a lot of listed parameters, which may be confusing, but no filter in particular will use every one of them. Some will be common, some won't, but unused parameters can be safely deleted or added anytime, there are builtin defaults for each.
Similarly, not all pins are used, or even needed but, no matter what type of filter, the most basic usage means using pins IN, OUT, and GROUND; the rest have various other uses. The GROUND pin must be used at all times!
The same is valid for the alternate way of setting the frequencies.
There are two filters available: Butterworth and Chebyshev (type I). They are LC ladders built in Cauer's form, singly- or doubly-terminated ports, and they can form lowpass, highpass, bandpass, or bandstop configurations. Trying to configure them as allpass (fp1=fs1>0, fp2=fs2=0) will result in "undefined behaviour". Whether they start with an inductance or a capacitance, or with a series or shunt element, it's established based on user input (internally autoconfigured), as shown below:
( Zin≤Zout & Zin>0 ) ^ Zin==-1 ^ Zout==0 |
( Zin>Zout & Zout>0 ) ^ Zin==0 |
The internal numbering of the elements doesn't consider the type of the element, L or C, only its position in the ladder.
Both filters use the same pins:
.TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
.TRAN
. For example, if the filter is a 6th order bandpass with equal terminating impedances (non-null), the lowpass prototype will be a Π CLC filter, and if the simulation card is .TRAN 30m
, then by setting sim=30m, the output will be a staircase-like voltage having three values: the first for the input shunt capacitor, the second for the series inductor, and the third for the terminating shunt capacitor.
Zin=<-1,0,0+..∞> | Ω | Input impedance. There are three possible settings:
|
Zout=<0,0+..∞> | Ω | Output impedance. There are two possible settings:
|
Only one of the impedances can be zero at a time! | ||
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
As | dB | Stopband attenuation, default 40 |
Asc | dB | Frequency-scaling attenuation. If Asc=0, N>0 the passband is optimized. Default 3.0103 |
N=<0:1:32> N=<0:2:64> |
- | Order of the filter, its value represents the order after the frequency transformations. For lowpass and highpass the maximum order is 32 and can take odd and even values. For bandpass and bandstop it's 64, but only even values are valid. If N=0 and Asc>0, the minimum order is determined based on the values of the frequencies and attenuations. Default 13 |
sim | s | Total .TRAN simulation time, default 1 |
Rpar, Rser | Ω | LTspice's specific for inductors and capacitors, common for both (i.e. setting Rser means inductors and capacitors, together, will have it set, same for Rpar), defaults <1g,0> |
Zin=<-1,0,0+..∞> | Ω | Input impedance. There are three possible settings:
|
Zout=<0,0+..∞> | Ω | Output impedance. There are two possible settings:
|
Only one of the impedances can be zero at a time! | ||
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
Ap | dB | Passband ripple. If Ap=0, N>0 the passband is optimized. Default 1 |
As | dB | Stopband attenuation. If As=0, N>0 the stopband is optimized. This is the same as As>0, N=0. Default 40 |
Asc | dB | Frequency-scaling attenuation. If Asc≤Ap, Ap will be considered. Default 3.0103 |
N=<0:1:32> N=<0:2:64> |
- | Order of the filter, its value represents the order after the frequency transformations. For lowpass and highpass the maximum order is 32 and can take odd and even values. For bandpass and bandstop it's 64, but only even values are valid. If N=0 and Ap>0 or As>0, the minimum order is determined based on the values of the frequencies and attenuations. Default 13 |
sim | s | Total .TRAN simulation time, default 1 |
Rpar, Rser | Ω | LTspice's specific for inductors and capacitors, common for both (i.e. setting Rser means inductors and capacitors, together, will have it set, same for Rpar), defaults <1g,0> |
.TRAN 5
and the filter is a Chebyshev type I with:
This results in a 10th order bandstop, thus a 5th order lowpass prototype. Probing the voltage at pin 0.2 will reveal a staircase voltage with 5 steps: 1.146813, 1.3712126, 1.9750031, 1.3712126, 1.146813 (as read by the cursor). Since the impedances are equal, the first element is a series inductance thus, after the frequency transformations, it's a parallel LC.
.TRAN
, pin 0.2 outputs the normalized values of the underlying Bessel polynomial. For best readings, sim should be set to match the total simulation time. These values appear as the recursive formula, starting from the highest valued coefficient (a0), to the lowest:fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
Asc | dB | Frequency-scaling attenuation, absolute values only.
|
N=<1:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. There is no automatic order calculation, therefore N must not be null. Default 13 |
G | - | Gain, linear, default 1 |
sim | s | Total .TRAN simulation time, default 1 |
Rpar | Ω | LTspice's specific for inductors and capacitors, default 1g |
.TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
.TRAN
, pin 0.2 will output the real parts of the poles, and 0.3 the imaginary parts of the poles of the lowpass prototype. For best readings, sim should be set to match the total simulation time. For example, a 10th order bandpass results from a 5th order lowpass prototype, and has 3 roots: 2 complex conjugate, and one real.
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
As | dB | Stopband attenuation, absolute values only, default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc=0, N>0 the passband is optimized. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, As>0, it determines the minimum order to meet specifications. Default 13 |
G | - | Gain, linear, default 1 |
sim | s | Total .TRAN simulation time, default 1 |
Rpar | Ω | LTspice's specific for inductors and capacitors, default 1g |
.TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
.TRAN
, pin 0.2 will output the real parts of the poles, and 0.3 the imaginary parts of the poles of the lowpass prototype. For best readings, sim should be set to match the total simulation time. For example, a 10th order bandpass results from a 5th order lowpass prototype, and has 3 roots: 2 complex conjugate, and one real.
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
Ap | dB | Passband ripple, absolute values only. If Ap=0, N>0 the passband is optimized. Default 1 |
As | dB | Stopband attenuation, absolute values only, default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc≤Ap, Ap is considered. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, Ap>0, As>0, it determines the minimum order to meet specifications. Default 13 |
G | - | Gain, linear, default 1 |
nT=<-1,0> | - | Tweak to mimic the response of a passive filter. Even order filters will have the gain at the corner frequencies:
|
sim | s | Total .TRAN simulation time, default 1 |
Rpar | Ω | LTspice's specific for inductors and capacitors, default 1g |
.TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
.TRAN
, pin 0.2 will output the real parts of the poles, 0.3 the imaginary parts of the poles, and 0.4 the imaginary parts of the zeroes of the lowpass prototype. For best readings, sim should be set to match the total simulation time. For example, a 10th order bandpass results from a 5th order lowpass prototype, and has 3 roots -- 2 complex conjugate, and one real --, and 2 zeroes -- the 3rd is null.
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
As | dB | Stopband attenuation, absolute values only. If As=0, Asc>0, N>0 the transition band is optimized. Default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc=0, As>0, N>0 the passband is optimized. If Asc≥As, As is considered. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, As>0, it determines the minimum order to meet specifications. Default 13 |
G | - | Gain, linear, default 1 |
sim | s | Total .TRAN simulation time, default 1 |
Rpar | Ω | LTspice's specific for inductors and capacitors, default 1g |
float
), but they do get noticeable for more extreme cases, such as high ripple + low stopband attenuation, or very small ripple + very large attenuations. In general, usage of Ap=<0.001..3> and As=<20..120> should not be problematic.
.TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
.TRAN
, pin 0.2 will output the real parts of the poles, 0.3 the imaginary parts of the poles, and 0.4 the imaginary parts of the zeroes of the lowpass prototype. For best readings, sim should be set to match the total simulation time. For example, a 10th order bandpass results from a 5th order lowpass prototype, and has 3 roots -- 2 complex conjugate, and one real --, and 2 zeroes -- the 3rd is null.
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
Ap | dB | Passband ripple, absolute values only. If Ap=0, As>0, Asc>0, N>0 the passband is optimized. If Asc≥As, As is considered. Default 3.0103 |
As | dB | Stopband attenuation, absolute values only. If As=0, Asc>0, N>0 the transition band is optimized. Default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc≥As, As is considered. If Asc≤Ap, Ap is considered. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, Ap>0, As>0, it determines the minimum order to meet specifications and optimizes the transition band. Default 13 |
G | - | Gain, linear, default 1 |
nT=<-1,0> | - | Tweak to mimic the response of a passive filter. Even order filters will have the gain at the corner frequencies:
|
sim | s | Total .TRAN simulation time, default 1 |
Rpar | Ω | LTspice's specific for inductors and capacitors, default 1g |
These are the bilinear transform versions of the analog counterparts: Butterworth, Chebyshev types I and II, and Cauer, so they inherit the same properties. They are implemented with built-in sampling clock and optional external synchronization. The delays are transmission-lines, so the filters behave as good as they do. There is no allpass, but all four filters support lowpass, highpass, bandpass, and bandstop. For bandpass and bandstop the matching of the frequencies at the higher end cannot be done, an implicit minor caveat from the bilinear transform.
Pin 0.4 (marked with a triangular arrow) allows for external synchronization, but even if connecting an external clock will override the internal one, it will not disable it; to avoid unnecessary slowdowns, set f0=< - external_clock_value > and SH=1. For example, if the external clock is 1024, then f0=-1024.
The test pins have the same function irrespective of the filter: pin 0.1 outputs the order (V in .TRAN
, dB/deg in .AC
), pin 0.2 and 0.3 output the numerator's and the denominator's terms (if sim>0).
The way the test pins work is a bit cumbersome. First, the maximum order is N=32. Second, the way the filters are implemented is by calculating the analog poles and zeroes, then applying the bilinear transform, then using spectral transformations. This means that what would be a 2nd order stage for a lowpass, or highpass, will become a 4th order for a bandpass, or bandstop:
Suppose the simulation card is .TRAN 80m
and sim=80m. The total simulation time will be divided into 80 steps (fixed internal number), thus 1ms/step. These steps will be groupped into 5 segments, each representing the maximum five possible terms of the transfer function, A0:4 for pin 0.2, or B0:4 for pin 0.3. Each segment will have 80/5=16 steps, representing the maximum number of stages. The terms will appear as this sequence at pin 0.2: {A0[1:16], A1[1:16], A2[1:16], A3[1:16], A4[1:16]}, similarly at pin 0.3. The step-values in the sequence will be, according the the above settings: A0[1] from 0 to 1ms, then A0[2] from 1ms to 2ms, then A0[3] from 2ms to 3ms, and so on until A0[16], then A1[1] will start from 16ms to 17ms, then A1[2] from 17ms to 18ms, etc. Similarly for pin 0.3.
This will be shown later but consider for example a 5th order lowpass. This means that there will be 3 2nd order stages, so the output of the test pins will have 3 step-values in the beginning representing A0[1:3], then a flat section which is to be ignored, until 16ms, where A1[1:3] are, then another section that is ignored, until 32ms, where A2[1:3] are, after which everything can be ignored since A3 and A4 (and their B counterparts) are only valid for bandpass and bandstop. The same for pin 0.3. The transfer function for the first stage is constructed from A0,1,2[1] and B0,1,2[1] (as shown in the transfer function above), then A0,1,2[2] and B0,1,2[2], and the last one with A0,1,2[3] and B0,1,2[3], which means that some value-chasing with the cursors will be needed, but it's for science...
In .TRAN
there are a few ways to use the IIR filters:
SINE
source as the external sync (e.g. SINE(0.5 0.5 {f0} 0 0 -1)
) ⇒ the timestep is smooth and the edges are not preserved, the output will be sampled, but not very pretty, and it tends to get even less so the longer the simulation. It will be faster than with a pulsed clock, though.f0 | Hz | Sampling frequency, set negative for external synchronization, default 5k |
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
As | dB | Stopband attenuation, absolute values only, default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc=0, N>0 the passband is optimized. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, As>0, it determines the minimum order to meet specifications. Default 13 |
G | - | Gain, linear, default 1 |
SH=<0,1> | - | Affects the internal sample&hold:
.AC analysis.
|
sim | s | Total .TRAN simulation time, default 1 |
tr | s | Rising edge for the internal clock, needs SH=1, default 1m/f0 |
td | s | Internal clock delay, default 0 |
f0 | Hz | Sampling frequency, set negative for external synchronization, default 5k |
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
Ap | dB | Passband ripple, absolute values only. If Ap=0, N>0 the passband is optimized. Default 1 |
As | dB | Stopband attenuation, absolute values only, default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc≤Ap, Ap is considered. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, Ap>0, As>0, it determines the minimum order to meet specifications. Default 13 |
G | - | Gain, linear, default 1 |
SH=<0,1> | - | Affects the internal sample&hold:
.AC analysis.
|
nT=<-1,0> | - | Tweak to mimic the response of a passive filter. Even order filters will have the gain at the corner frequencies:
|
sim | s | Total .TRAN simulation time, default 1 |
tr | s | Rising edge for the internal clock, needs SH=1, default 1m/f0 |
td | s | Internal clock delay, default 0 |
f0 | Hz | Sampling frequency, set negative for external synchronization, default 5k |
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
As | dB | Stopband attenuation, absolute values only. If As=0, Asc>0, N>0 the transition band is optimized. Default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc=0, As>0, N>0 the passband is optimized. If Asc≥As, As is considered. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, As>0, it determines the minimum order to meet specifications. Default 13 |
G | - | Gain, linear, default 1 |
SH=<0,1> | - | Affects the internal sample&hold:
.AC analysis.
|
sim | s | Total .TRAN simulation time, default 1 |
tr | s | Rising edge for the internal clock, needs SH=1, default 1m/f0 |
td | s | Internal clock delay, default 0 |
f0 | Hz | Sampling frequency, set negative for external synchronization, default 5k |
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1k> |
Ap | dB | Passband ripple, absolute values only. If Ap=0, As>0, Asc>0, N>0 the passband is optimized. If Asc≥As, As is considered. Default 3.0103 |
As | dB | Stopband attenuation, absolute values only. If As=0, Asc>0, N>0 the transition band is optimized. Default 40 |
Asc | dB | Frequency-scaling attenuation, absolute values only. If Asc≥As, As is considered. If Asc≤Ap, Ap is considered. Default 3.0103 |
N=<0:32> | - | Order of the filter. It represents the order of the lowpass prototype. For bandpass and bandstop, if N=5, it will actually be a 10th order. If N=0, Asc>0, Ap>0, As>0, it determines the minimum order to meet specifications and optimizes the transition band. Default 13 |
G | - | Gain, linear, default 1 |
nT=<-1,0> | - | Tweak to mimic the response of a passive filter. Even order filters will have the gain at the corner frequencies:
|
SH=<0,1> | - | Affects the internal sample&hold:
.AC analysis.
|
sim | s | Total .TRAN simulation time, default 1 |
tr | s | Rising edge for the internal clock, needs SH=1, default 1m/f0 |
td | s | Internal clock delay, default 0 |
SINE(0 1 300) ac 1
source. See the ouput for SH=<0,1> (set to zero to be able to view the .AC
response):
XU1 in 0 NC_01 clk SampledSource f0=8192 Freq=3k
where V(in) is the input to the filter and V(clk) is connected to pin 0.4 of Filter. Or use aSINE
source, as mentioned at point 2.b, and see how that influences the transitions.
They are built with the same goals in mind as the IIRs (built-in clock, external sync), but they are separated into several versions, each with their own baggage: FIR holds the majority of the windows and functions and allows a maximum 256th order, FIRx is an extended version of FIR that allows a maximum 1024th order, FIR2 has only the computational-heavy Dolph-Chebyshev window and many of FIR's functions, and a maximum 256th order, while FIR_FS implements the frequency-sampling method with the same maximum order of 256 and all the windows from FIR.
All of them make use of all of the available pins, with minor functional differences. Below is shown the pinout for all four FIRs:
The functions that the FIRs perform are: basic moving average, windowed FIR, pulse shaping, differentiator, and Hilbert transformer, and all of them can be lowpass, highpass, bandpass, and bandstop, while FIR_FS is atypical since it allows for any frequency-domain magnitude specifications. The same .TRAN
guidelines as for the IIRs apply here, as well.
The internal configuration is not restricted to symmetrical impulse responses, only, but in order to have anything else besides the already listed options, filter.sub needs to be edited by hand. One way to do it is to comment out the original impulse response function and add a custom one, for example:
.func hn(x) {table(x, ...)} ; where x=[0:N-1]
For the pulse-shaping filters, the setting of oversampling (OS), rolloff (β), and number of symbols (SPS) can be done in two ways (shown in the examples):
.TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
Win=<0:29> | - | Selects the window:
|
Func=<0:6> | - | Selects between the available functions:
|
f0 | Hz | Sampling frequency, set negative for external synchronization, default 5k |
fp1, fs1, fp2, fs2 | Hz | Corner frequencies for the passband and stopband, defaults <500,400,2k,2.5k> |
BWp, BWs, fc | Hz | Alternate frequency settings: passband bandwidth, stopband bandwidth, and center frequency, defaults are calculated based on the corner frequencies and, based on those, <1.5k,2.1k,1.3k> |
As | dB | Stopband attenuation, absolute values only. Only used by these windows:
|
N=<0:257> | - | Length of the filter. If N=0 the minimum order is determined based on:
|
G | - | Gain, linear, default 1 |
sigma | - | Factor for the parametric windows:
|
Norm=<0,1> | - | Enables or disables the gain normalization. This only applies for :
|
SH=<0,1> | - | Affects the internal sample&hold:
.AC analysis.
|
nT=<0,1:∞> | - | Has two roles:
|
sim | s | Total .TRAN simulation time, default 1 |
a0, a1, a2, a3, a4 | - | Terms for the generic cosine window, default <0.2, 0.4, 0.3, 53m, -3m> |
tr | s | Rising edge for the internal clock, needs SH=1, default 1m/abs(f0) |
td | s | Internal clock delay, default 0 |
ltline
with lininterp
instead of tline
, and N=<0:1025>
.
.func fspl(x) {...} ; x=[0..(N-3)/2+nT]
defined from 0 until Nyquist. There are a few examples in the subcircuit..TRAN
it's in V, and in .AC
it's in dB and deg. Zero resistance output.
Win=<0:29> | - | Selects the window:
|
f0 | Hz | Sampling frequency, set negative for external synchronization, default 5k |
As | dB | Stopband attenuation, absolute values only. Only used by these windows:
|
N=<1:257> | - | Length of the filter, default 33 |
G | - | Gain, linear, default 1 |
sigma | - | Factor for the parametric windows:
|
SH=<0,1> | - | Affects the internal sample&hold:
.AC analysis.
|
nT=<0,1> | - | Sets the sampling method:
|
sim | s | Total .TRAN simulation time, default 1 |
a0, a1, a2, a3, a4 | - | Terms for the generic cosine window, default <0.2, 0.4, 0.3, 53m, -3m> |
tr | s | Rising edge for the internal clock, needs SH=1, default 1m/abs(f0) |
td | s | Internal clock delay, default 0 |
Apply different windows through Win=<1:29>, in which case sigma, nT, and As might also need changed, depending on the window.
The resulting filter is a type II highpass and, while technically possible, that is not here, and not found in real life applications, so the order needs to be increased by one in order to see the highpass. The attenuation is too large, and by reducing it, the order also needs to be increased. This is a recursion that cannot be done in LTspice, so it falls to the user.
N = OSR*nsym + 1 = 4*12 + 1 = 49
fp1 = f0*nsym*(1 - β)/(2*OSR) = 3.84MHz*12*(1 - 0.22)/(2*4) = 4.4928MHz
fs1 = f0*nsym*(1 + β)/(2*OSR) = 3.84MHz*12*(1 - 0.22)/(2*4) = 7.0272MHz
Since the order is imposed, nT may be omitted.
If a single FIR is used, the resulting order is 502. Using a two-stage IFIR, the resulting orders will be:
.TRAN
card, the values will fill the entire timespan. The only differences between the frequency sampling and the rest of the FIRs is that the first will output the FIR type, the frequency-domain formula, and the impulse response, and the others will output the order, the weights, and the impulse response.
f0 | Hz | Inverse of the period of the sliding window, default 1k |
G | - | Gain, linear, default 1 |
Rpar | Ω | LTspice's specific for capacitors, default 1g |
lim | V | Internal limits to avoid clipping, default 1g |
.ic V(in)=0
When initial conditions fail, uic
is the only solution left (besides modifying the circuit to force a zero input prior to filtering).
f0 | Hz | Inverse of the period of the discrete integrator, default 1k |
G | - | Gain, linear, default 1 |
N | - | Number of samples per period, default 10 |
SIN(1 1 1k 0 0 90)
) and 10 samples long period. As it is, the filter will obviously give the wrong output, but forcing initial conditions to be zero for the filter's input don't work for this simple case, so add uic
to the simulation card:
fp1 | Hz | Corner frequency, default 100 |
BWp | Hz | Alternate frequency settings: passband bandwidth, default fp1 |
N=<0:1:32> | - | Number of series RC cells, default 32 |
sigma | - | Makes the response around the corner frequency smoother or sharper, default 1 |
nT | - | Sets the distance between the RC cells along the spectrum, and it's the base for the power of two, (2+nT)n, default 0 |
Rpar | Ω | LTspice's specific for capacitors, default 1G |
.ac dec 100 2 2meg
to view the response.
Due to the influence of sigma and nT, the corner frequency is shifted, so to correct it set fp1=1. For a better fidelity, set a higher N and lower (minimum -1) nT.