More ngspice experimentation: a harmonic filter

Goofing around while watching Battlestar Galactica (which incidently is one of the most depressing, soul-less, unfun thing to watch that I can imagine) and decided to look up George Dobbs’ QRP harmonic lowpass filter design, and see if I could get it to analyze using ngspice. I picked his design for 30m, and created the following ngspice model:


* low pass filter for 30m
VIN 1 0 ac 1 sin
C1 1 0 270pf
L2 1 2 1.09uH
C3 2 0 560pf
L3 2 3 1.257uH
C5 3 0 560pf
L6 3 4 1.09uH
C7 4 0 270pf
Rload 4 0 50
.ac lin 40 10000000 12000000
.plot ac 10*log10(v(4))
.end

Here’s the output, plotted on a logarithmic scale:

filt

Seems like it works pretty well, although the peak is actually just above the 30m band.

Addendum: Ah. The vertical axis isn’t correct, since I used the log instead of the log10 function. The overall shape is correct, but the scales are off. I updated the code above, and I’ll redo the graph in the morning using the appropriate labels. It might also be fun to screw up my amplifier design a bit by introducing clipping, and then combining it with this filter and see how it cleans up the waveform.

Addendum2: Here’s the updated filter response, charted over a much larger frequency range. This harmonic filter would be very effective.

filt1