Ladder-like bandpass filter theoretical analysis problem

20 replies · 3K views · last reply
room_
Messages
11
Reaction score
0
TL;DR
I find the transfer function of the band-pass filter and its inverse Laplace yields not an impulse response but transient one.
I consider the band-pass filter of the following configuration (the ##u_m## is a voltage controlled voltage source):
Circuit schematic of one bandpass filter stage: input u_i feeds a capacitor C in series, then a resistor R to ground with output u_m; a voltage-controlled source u_m drives a series resistor R and a shunt capacitor C with output u_o.
The transfer function is
$$K_1(p)=\hat{U}_o(p) = \frac{p}{RC(p+1/RC)^2} = \frac{\omega_c p}{(p+\omega_c)^2}, \quad \omega_c=\frac{1}{RC}.\qquad (1)$$

Now I connect ##n## such filters in a row (using the ##u_o## of a previous one as a source for next's ##u_i## by means of the controlled voltage source), which means that the transfer function becomes
$$ K_n(p)=\frac{\omega_c^{n}p^{n}}{(p+\omega_c)^{2n}}. \qquad (2)$$
To compensate the decrease in voltage on cutoff (same as center here) frequency ##\omega_c## I add ##2^n## factor (since every filter decreases voltage twice):
$$ K_n(p)=\frac{2^n\omega_c^{n}p^{n}}{(p+\omega_c)^{2n}}.\qquad (3)$$
In some operational calculus handbook (russian one, not sure if it's reasonable to link) I find
Table of Laplace transform pairs, rows 1.148 to 1.153, with the image function in p on the left and the original function of t on the right, including Laguerre polynomial and incomplete gamma terms.
I assume there is no problem in substituting ##n## for ##2n## in ##1.152##:
$$\hat{S}(p)=\frac{p}{(p+a)^{2n}}\div \frac{t^{2n-1}}{(2n-1)!}e^{-at}=s(t). \qquad(4) $$
Note that all of the derivatives of ##s(t)## up to ##n-2## order are equal to zero at ##t=0##. Finally I get the impulse response (using previous statement)
$$p^{n-1}2^n \omega_c^n \frac{p}{(p+\omega_c)^{2n}}-\sum_{k=0}^{n-2}p^{n-2-k} s^{(k)}(0) \div \frac{d^{n-1}}{dt^{n-1}} s(t),\qquad (5) \\
K_n(p)= \frac{2^n \omega_c^np^n}{(p+\omega_c)^{2n}}\div \frac{2^n\omega_c^n}{(2n-1)!}\frac{d^{n-1}}{dt^{n-1}}(e^{-\omega_c t}t^{2n-1})=k_n(t).\qquad (6)$$
I don't know why, but ##(6)## yields transient response (if to leave out the ##2^n## factor) ##h_n(t)## for my filter. i.e.
$$h_n(t)=\frac{\omega_c^n}{(2n-1)!}\frac{d^{n-1}}{dt^{n-1}}(e^{-\omega_c t}t^{2n-1}), \qquad (7)$$
although it is known that ##k(t)=\dfrac{d}{dt}h(t)##.
It is clear at least for ##n=1##. I plotted it in Matlab for ##n<30## (because Matlab refuses to calculate derivative of a higher order) and it looks
the way the simulation in NI Multisim gives. Here's ##n=49## (in Multisim):
Simulation plot titled Transient of voltage in volts against time in seconds, from 0.4m to 1.4m s, showing a damped oscillating pulse that peaks near 90 mV at about 0.8 ms and near -97 mV at about 0.85 ms, decaying to zero at both ends.
It's predecessors (smaller ##n##'s) look alike, just having "less waves". WolframAlpha inverse Laplace suggestion (check my previous post) for transient response works for ##n\approx30\div50##, which is not satisfying. I assume there's something wrong with my reasoning, so I ask you to help me to find the mistake. Been struggling with it for a while and I need a fresh look on the problem. Thank you in advance.
 
Cascading identical filter sections is not normally done because it increases the in-band ripple, while cascading odd/even order filters, or frequency staggering filters will flatten the pass-band.

Is the transient seen the tuned peak of the cascaded identical sections, or the Gibb's phenomenon.
https://en.wikipedia.org/wiki/Gibbs_phenomenon

A filter can attenuate unwanted energy by reflection from the input, or by internal resistive dissipation. You need to pay careful attention to the impedance matching of the filter sections.

That matching cannot be satisfied between stages if the match is one dimensional, such as a voltage buffer with infinite input impedance and zero output impedance.
 
  • Like
  • Informative
Likes   Reactions: dlgoff, room_ and berkeman
Baluncore said:
Is the transient seen the tuned peak of the cascaded identical sections, or the Gibb's phenomenon.
What it has to do with the Gibbs phenomenon in this case? I may be missing the point.
Baluncore said:
You need to pay careful attention to the impedance matching of the filter sections.

That matching cannot be satisfied between stages if the match is one dimensional, such as a voltage buffer with infinite input impedance and zero output impedance.
Would you please describe it in a little simpler manner? I don't understand why the matching cannot be satisfied and what does that mean. I don't work with real network here, I only play around with the ideal simulation and I wish to understand the process behind. Thank you for response.
 
room_ said:
What it has to do with the Gibbs phenomenon in this case? I may be missing the point.
Gibbs phenomenon is seen when an infinite expansion is terminated at a finite term, or all harmonics above a certain frequency are heavily attenuated. The limitations of Matlab 30, or Multisym 49, indicates that Gibbs phenomenon is a possibility.

You are isolating each HP and each LP section by a voltage follower, so no impedance matching is involved.
Examining the red trace impulse response. The oscillation has a period of about 0.1m sec which is a frequency of 10 kHz. That tells me the R and C were specified as something other than unity.
The risetime of the envelope is about 4 cycles which tells me the Q of the cascade is about 4.
The group delay of 49 stages is about 0.85 msec, or 17.34 usec per stage.
I assume it is stimulated by a narrow impulse at time = 0.

You have synthesised a narrow band delay line.
The transient response is very close to what I would expect for the cascade of 49 modules.

Why do you not trust your model?
Was the stimulus a unit area impulse?
Can you tell me what values of R and C you used to generate the red trace transient response?
 
Baluncore said:
The limitations of Matlab 30, or Multisym 49, indicates that Gibbs phenomenon is a possibility.
There was no limitation seen in Multisim, 49 is just an example, yet it was the biggest I went because it's quite hard for my PC to run simulation with that many filters. Speaking of Matlab, I think it's the "large numbers" limitation, since it is clear that all of derivatives exist and can be calculated directly.
Baluncore said:
I assume it is stimulated by a narrow impulse at time = 0.
Baluncore said:
Was the stimulus a unit area impulse?
I seek for transient response, so it was stimulated by Heaviside step function ##1(t)##
Baluncore said:
Why do you not trust your model?
My reasoning brings me to the fact that transfer function yields transient response (instead of impulse one), which indicates that either my reasoning is wrong, or the inverse Laplace transform table has a mistake.
Baluncore said:
Can you tell me what values of R and C you used to generate the red trace transient response?
Here's one cascade
Schematic of a cascade of RC filter stages between IN and OUT, each with a series 80nF capacitor, a 220Ω resistor to ground, a unity-gain buffer (1V/V) and a 220Ω series resistor to a shunt capacitor; the final stage is a 2V/V amplifier with output OUT and ground GND.
 
Simulation of 49 cascaded modules with LTspice agrees with your transient response.
Stimulation is a 1 volt step at time = 0. PARAM Cx=80n Rx=220R
Zoom in on response shows; Centre frequency = 9.040 kHz Group delay = 862.70 usec
Bandwidth between -3.01dB points = 2.1642 kHz

LTspice schematic of a cascaded ladder filter: AC source V1 feeds alternating series capacitors C1, C2, C3, C4, C5 and resistors R2, R4 with shunt resistors R1, R3, R5 and dependent voltage sources E1 to E5, labelled Cx and Rx. Directive reads .ac dec 1000 1k 100k .param Cx=80n Rx=220.


Simulated transient voltage waveform labelled V(out), a decaying oscillation with envelope peaking near 0.8 to 0.9 ms, axes in mV versus ms from 0.4 ms to 1.4 ms.

Transient response; Total computation elapsed time = 0.341 seconds.

Transfer function; Total computation elapsed time = 0.198 seconds.
LTspice plot of V(out) in dB against frequency from 7.5 kHz to 10.8 kHz, with phase on the right axis. A single green bandpass curve peaks at 0.0 dB near 9.0 kHz and falls to about -4.4 dB at the plot edges.


LTspice AC plot titled V(out) on a log frequency axis from 1KHz to 100KHz: a solid green bandpass curve peaking near 0dB around 9KHz, and a dashed green phase curve falling from about 0 to -8.0K degrees.
 
Last edited:
  • Like
Likes   Reactions: room_
Baluncore said:
Simulation of 49 cascaded modules with LTspice agrees with your transient response.
How many filters can you add more? Is it possible to go for ##n=100,200##? It would be very interesting to see.
 
For 100 modules it produces the transfer function in 0.374 seconds.
-1.3k dB at 10 kHz; -1.5k dB at 100 kHz.
-535.7u dB at Fo, so there is still some dynamic range.

The transient response takes 0.469 seconds to compute.
Simulator plot titled V(out) showing a green oscilloscope-style time-domain waveform from 1.0 ms to 2.7 ms, with an amplitude envelope that rises to a peak near 1.8 ms and then decays.
 
The transient response of 200 modules takes 0.769 seconds to compute.
Simulator plot titled V(out) of a green transient voltage waveform: a short burst of oscillation peaking near 47 mV around 3.6 ms, decaying on both sides, with x-axis from 2.4 ms to 4.8 ms and y-axis from -60 mV to 60 mV.
 
  • Wow
Likes   Reactions: room_
This is getting silly. The graphical interface is now a bit slow.
The transient response for 400 modules takes 4.497 seconds to compute.
Simulator plot titled V(out) of a green transient waveform: a short burst of oscillation that grows to about ±33 mV near 7.2 ms, then decays, on a time axis from 5.2 ms to 9.2 ms.
 
  • Like
Likes   Reactions: room_
Baluncore said:
This is now getting silly. The graphical interface is now a bit slow.
The transient response for 400 modules takes 4.497 seconds to compute.
View attachment 263113
It is clear now how the impulse behaves with the growth of ##n##. What would you recommend to try to compute ##(7)## formula in the post? As previously mentioned, Matlab spits out 0 for ##n>30##, but I really want to see if it's the same as your results for ##n=100,200,400##.
 
room_ said:
What would you recommend to try to compute (7)(7)(7) formula in the post?
You arrived at the transient stage by mathematics and questioned if it was correct. If a mathematician had followed you, they might have fallen into the same hole(s). I arrived at the same transient stage via a different path, which to some extent confirms your result.

It appears to me that your Hn(t), eqn 7, would need to be evaluated the hard way. Not being a mathematician leaves me at a disadvantage so I would need to go study for a day or two before writing the code. If you could expand eqn 7 into a computational process, that would help.
 
Baluncore said:
If you could expand eqn 7 into a computational process, that would help.
##(7)## can be expressed in terms of generalized Laguerre polynomials (here I add ##2^n## factor)
$$h_n(t)= 2^n\omega_c^n \frac{(n-1)!}{(2n-1)!}t^n e^{-\omega_c t} L_{n-1}^{(n)}(t),$$
I guess there are procedures for computing them, hope it helps.
 
room_ said:
$$h_n(t)= 2^n\omega_c^n \frac{(n-1)!}{(2n-1)!}t^n e^{-\omega_c t} L_{n-1}^{(n)}(t),$$
Sorry, the formula has to be
$$h_n(t)= 2^n\omega_c^n \frac{(n-1)!}{(2n-1)!}t^n e^{-\omega_c t} L_{n-1}^{(n)}(\omega_c t),$$
 
The following paper refers to a Fortran 90 module (LaguerrePol)
Where can I find a copy of the source code for that module?

Efficient computation of Laguerre polynomials. A. Gil, J. Segura, N. M. Temme. 2016
https://arxiv.org/abs/1609.00829
 
Baluncore said:
The following paper refers to a Fortran 90 module (LaguerrePol)
Where can I find a copy of the source code for that module?

Efficient computation of Laguerre polynomials. A. Gil, J. Segura, N. M. Temme. 2016
https://arxiv.org/abs/1609.00829
Files are at:
https://md-datasets-cache-zipfiles-prod.s3.eu-west-1.amazonaws.com/3jkk659cn8-1.zip
(only had to dig about 6 layers deep for that one! :rolleyes:)

The article with live links for the references is at:
https://kundoc.com/pdf-efficient-computation-of-laguerre-polynomials.html

Cheers,
Tom
 
  • Like
Likes   Reactions: room_ and Baluncore
Baluncore said:
The following paper refers to a Fortran 90 module (LaguerrePol)
Where can I find a copy of the source code for that module?

Efficient computation of Laguerre polynomials. A. Gil, J. Segura, N. M. Temme. 2016
https://arxiv.org/abs/1609.00829
As the paper present, this algorithm works for large ##n## and small ##\alpha##, whereas in this case we have ##(\alpha) = (n) > n-1##. They suggest that the input parameters are ##-1\leq \alpha \leq 5, \ n\geq 0##, which allows us to compute as much as ##L_{4}^{5}(\omega_c t)##. This result can be easily obtained using Matlab, or just explicit differentiation.
Here's some other fortran library for computing Laguerre polynomials, haven't checked its efficiency yet because I don't know how to properly install libraries for fortran. It is also unknown whether it works for large ##n## and ##\alpha##.

Also, the problem stated in the first message in this thread is now solved. For anyone interested: the table I presented has a mistake - ##1.152##'s original should be the one for ##1.151##, therefore the formula obtained is correct and the only thing left is to come up with a way to compute Laguerre polynomials (or ##(7)##) to see whether the result is satisfying.
 
I wrote LTspice subcircuits, nested with local parameters for the model. By eliminating the analysis of graphical connections I took the number of stages cascaded to 5000, (without hitting a limit). The result is what is expected. As the bandwidth is reduced, frequencies on either side of the pass-band that would sum destructively to cancel the centre frequency, become closer in frequency, so more cycles at the centre frequency are seen over a longer period. Also, the available step energy falling in the narrower bandwidth is reduced, so the output amplitude falls.
LTspice simulation plot of voltage V(b) in millivolts against time from 83ms to 96ms, showing a green sinusoid whose envelope rises to a peak near 9.5mV around 89.5ms and decays symmetrically back to zero.


LTspice schematic showing an AC voltage source, a pulse source, a 10k resistor R1, and nested subcircuit netlists stage1, stage10, stage100, stage1000 and stage5000, with simulation timing notes.
 
  • Like
Likes   Reactions: room_
@room_
What do you consider to be large n?

n, (2^n) * (n-1)! / (2n-1)!
1, 2.00000000000000000
2, 0.66666666666666667
3, 0.13333333333333333
4, 0.01904761904761905
5, 0.00211640211640212
6, 0.00019240019240019
7, 0.00001480001480001
8, 0.00000098666765333
9, 0.00000005803927373
10, 0.00000000305469862
11, 0.00000000014546184
12, 0.00000000000632443
13, 0.00000000000025298
14, 0.00000000000000937
15, 0.00000000000000032
 
Baluncore said:
What do you consider to be large n?
##n>>1##, ##n\sim100## and above I guess can be considered as large.