Thanks, great stuff. I tried this method but messed up as the figures I was getting were obviously wrong.Not having access to the original Scroggie article, I have done the maths myself. This is an estimate of the optimum number of poles. It could be off by one in some circumstances, but that probably doesn't matter too much.
Assume you have total R and C which gives you a ratio of 'a' when used as one pole; that is, ripple is reduced by 1/a. 'a' is approximately 2 pi f R C. If you split up the R and C N times you will get a ratio of approximately a/N^2 per pole, so the total will be (a/N^2)^N (assuming no interaction - approximately true). We want to maximise this.
Pretend for a while that N is not constrained to be an integer. Then to find a maximum (or minimum) we want the differential to be zero. In this particular case it is simpler to take logs; because 'ln' (natural logarithm) is a strictly monotonic function then maximising it is the same as maximising its argument.
Y = (a/N^2)^N
ln(Y) = N ( ln(a) - 2 ln(N) )
d/dN (ln(Y)) = ln(a) - 2 ( ln(N) + N/N ) = ln(a) - 2 ( ln(N) + 1 ) - using product rule
We require the differential to be zero so
ln(a) = 2 (ln(N) + 1 )
This gives
N = sqrt(a)/e
The result will need to be rounded to the nearest integer.
Putting this result back into where we started from, we find that the optimum ratio per pole is e^2 which about 7.4. This seems rather low, so it appears that most designers use a non-optimised smoothing scheme with fewer but bigger caps. This degrades ripple reduction, but may improve other things.
We can also invert the result to find what the best values for 'a' are: those which coincide with an integer N without rounding.
N=2 -> a=29.5
N=3 -> a=66.5
N=4 -> a=118.2
These appear to be about 2/3rds of the figures in MJ's table (after Scroggie) so maybe he used different approximations from me. (Or one of us has made a mistake).
Now you know what to say if anyone asks you what is the point of learning calculus!
A fairly common situation is where we want to control R, to control voltage drop and PSU impedance, but we have plenty of spare caps and would like to make most efficient use of them. In this case C becomes Cn, do the same maths, and the optimum becomes a/e, where the same cap is placed in each pole, no matter how many poles we use.
Yes, for unlimited numbers of caps but a given cap value the optimum appears to be N=a/e. However, 'a' scales by N too which complicates things.
Also, in this case it is more likely that the approximations I used will be poor. a=R/Xc only works for large R and large C. For smaller attenuations it should be a=sqrt(R^2+Xc^2)/Xc. I haven't done the calculation, but I suspect that the 'optimum' is an infinite number of poles, but with a very slow approach to the maximum ripple attenuation as N increases.
Also, in this case it is more likely that the approximations I used will be poor. a=R/Xc only works for large R and large C. For smaller attenuations it should be a=sqrt(R^2+Xc^2)/Xc. I haven't done the calculation, but I suspect that the 'optimum' is an infinite number of poles, but with a very slow approach to the maximum ripple attenuation as N increases.
Rethink for N using an unlimited number of a given C:
If 'a' is redefined as coming from Rtotal and Cpole (rather than Ctotal) then N=a/e. This means that attenuation per pole is 'e', which is a bit too low for the approximations used.
I think replacing a/N with a/sqrt(N^2+1) will be better.
Y= (a/sqrt(N^2+1))^N
ln(Y) = N ( ln(a) - 0.5*ln(N^2+1) )
d/dN (ln(Y)) = ln(a) - 0.5*( ln(N^2+1) + N/N 2N ) = ln(a) - N - 0.5*ln(N^2+1)
If N is sufficiently large then this can be approximated by
ln(a) - N - ln(N)
so
N + ln(N) = ln(a)
If 'a' is big enough, then N = ln(a). We can say that ln(a) is an upper bound for N.
If 'a' is redefined as coming from Rtotal and Cpole (rather than Ctotal) then N=a/e. This means that attenuation per pole is 'e', which is a bit too low for the approximations used.
I think replacing a/N with a/sqrt(N^2+1) will be better.
Y= (a/sqrt(N^2+1))^N
ln(Y) = N ( ln(a) - 0.5*ln(N^2+1) )
d/dN (ln(Y)) = ln(a) - 0.5*( ln(N^2+1) + N/N 2N ) = ln(a) - N - 0.5*ln(N^2+1)
If N is sufficiently large then this can be approximated by
ln(a) - N - ln(N)
so
N + ln(N) = ln(a)
If 'a' is big enough, then N = ln(a). We can say that ln(a) is an upper bound for N.
Interesting problem, but not an easy one if it has to be answered accurately.
DF96's attempt is brave, but it would be valid for sections having a very large RC product compared to the period of the signal to be filtered.
But it doesn't work when this condition is not met: each stage is loaded by the subsequent one, the components form a voltage divider, and the voltages across the caps and resistors are not in phase.
The interesting cases are precisely when capacitors and resistors have an impedance of similar magnitude, and one cannot dispense with the full calculations, which look pretty daunting.
Using simulation, I derived the "switch frequencies" for a number of poles up to 7 by looking at the intercept frequencies for poles n and n+1.
The frequencies are normalized to 1Hz: the cut off frequency for the total aggregated R and C is 1Hz.
The first intercept is 12Hz: if the frequency to be filtered is above 12Hz, it becomes interesting to split the total in two cells.
Here are the results:
n=2 12Hz
n=3 32.68Hz
n=4 62.72Hz
n=5 101.66Hz
n=6 149.4Hz
n=7 206.1Hz
So far, I have been unable to find the "law" hiding behind these figures. With some imagination, the ratio between the the first and second step could be e, but other than that, I cannot find anything consistent.
Do those figures match with Scroggie's?
DF96's attempt is brave, but it would be valid for sections having a very large RC product compared to the period of the signal to be filtered.
But it doesn't work when this condition is not met: each stage is loaded by the subsequent one, the components form a voltage divider, and the voltages across the caps and resistors are not in phase.
The interesting cases are precisely when capacitors and resistors have an impedance of similar magnitude, and one cannot dispense with the full calculations, which look pretty daunting.
Using simulation, I derived the "switch frequencies" for a number of poles up to 7 by looking at the intercept frequencies for poles n and n+1.
The frequencies are normalized to 1Hz: the cut off frequency for the total aggregated R and C is 1Hz.
The first intercept is 12Hz: if the frequency to be filtered is above 12Hz, it becomes interesting to split the total in two cells.
Here are the results:
n=2 12Hz
n=3 32.68Hz
n=4 62.72Hz
n=5 101.66Hz
n=6 149.4Hz
n=7 206.1Hz
So far, I have been unable to find the "law" hiding behind these figures. With some imagination, the ratio between the the first and second step could be e, but other than that, I cannot find anything consistent.
Do those figures match with Scroggie's?
Attachments
Those numbers look like a quadratic in n. Hang on.Interesting problem, but not an easy one if it has to be answered accurately.
DF96's attempt is brave, but it would be valid for sections having a very large RC product compared to the period of the signal to be filtered.
But it doesn't work when this condition is not met: each stage is loaded by the subsequent one, the components form a voltage divider, and the voltages across the caps and resistors are not in phase.
The interesting cases are precisely when capacitors and resistors have an impedance of similar magnitude, and one cannot dispense with the full calculations, which look pretty daunting.
Using simulation, I derived the "switch frequencies" for a number of poles up to 7 by looking at the intercept frequencies for poles n and n+1.
The frequencies are normalized to 1Hz: the cut off frequency for the total aggregated R and C is 1Hz.
The first intercept is 12Hz: if the frequency to be filtered is above 12Hz, it becomes interesting to split the total in two cells.
Here are the results:
n=2 12Hz
n=3 32.68Hz
n=4 62.72Hz
n=5 101.66Hz
n=6 149.4Hz
n=7 206.1Hz
So far, I have been unable to find the "law" hiding behind these figures. With some imagination, the ratio between the the first and second step could be e, but other than that, I cannot find anything consistent.
Do those figures match with Scroggie's?
Yeah, dead on correlation 0.999.
f=4.48n^2 - 1.48n - 3.05
Congratulations!Those numbers look like a quadratic in n. Hang on.
Yeah, dead on correlation 0.999.
f=4.48n^2 - 1.48n - 3.05
Now, your next mission (if you accept it) is to find the meaning of the coefficients in the equation: since it is normalized to 1Hz, they are certainly not some random figures: they have to be related to Π, e or something similar
- Status
- Not open for further replies.