Author Topic: Analog bandpass filter - bode plot for various filter types  (Read 2675 times)

0 Members and 1 Guest are viewing this topic.

Offline petertTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: de
Analog bandpass filter - bode plot for various filter types
« on: September 22, 2018, 06:39:36 pm »
Hi,

I have tried various calculators, and also calculated by hand, but when I simulate the circuit in LTSpice I do not get the expected results (passband bandwidth is not narrow enough, center frequency is off, or output voltage too low, etc.). So I'd like to take a more systematic approach.

Is there a program that can draw bode plots for all common analog filter types, for a given/set center frequency and passpand? What I found is usually limited to special circuits, or 4-stage opamp only circuits, but I haven't found an all in one solution, that allows easier comparison.

Great would be if it would consider crystal based filters, LCR based filters (or LC, LR), and those using opamps, and show their performance in comparison.
« Last Edit: September 22, 2018, 06:41:08 pm by petert »
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: Analog bandpass filter - bode plot for various filter types
« Reply #1 on: September 22, 2018, 08:26:49 pm »
Microchip FilterLab - but IIRC only does Bessel/Butterworth/Chebychev
 
The following users thanked this post: petert

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Analog bandpass filter - bode plot for various filter types
« Reply #2 on: September 22, 2018, 08:39:43 pm »
Is there a program that can draw bode plots for all common analog filter types, for a given/set center frequency and passpand? What I found is usually limited to special circuits, or 4-stage opamp only circuits, but I haven't found an all in one solution, that allows easier comparison.

For opamp based RC filters you shall try Analog Devices filter wizard. It has bode plot as well.

Professionals use commercial tools like Genesys to design and simulate circuits including passive filters. For amateur/hobby use there are many online filter calculators. Your results may differ due to different Q factor of components in design versus simulation and maybe impedance mismatch. Filter shall be fed and loaded using impedances it was designed for. I know that http://www.wa4dsy.net/filter/filterdesign.html does work correctly and LT spice simulations match. Thou I was using lowpass filter calc.

 
The following users thanked this post: petert

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Analog bandpass filter - bode plot for various filter types
« Reply #3 on: September 22, 2018, 09:05:58 pm »
Don't forget that filter tables don't account for inductor or capacitor Q (except those that do, but only to the extent that they can), and LTSpice has default values for components that you need to specify if you're doing other than those defaults.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline petertTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: de
Re: Analog bandpass filter - bode plot for various filter types
« Reply #4 on: September 22, 2018, 09:38:30 pm »
Thanks for the links.

I tried it, unfortunately with no luck. Probably doing some beginner mistakes. Edit: looks, better now. See post below.
« Last Edit: September 22, 2018, 09:44:08 pm by petert »
 

Offline petertTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: de
Re: Analog bandpass filter - bode plot for various filter types
« Reply #5 on: September 22, 2018, 09:41:57 pm »
Ok, I am stupid, I entered 77500 kHz, instead of 77500 Hz.

With the revised numbers, it looks much better. But on the link it looks much more flat than in the bode plot from LTSpice.

Is that related to the input/ouput impedance setting?

The results of the calculator from: http://www.wa4dsy.net/cgi-bin/lc_filter4?FilterResponse=Bandpass&poles=6&CF=77500&cfunits=HZ&cutoff=1&funits=KHZ&Z=50

I/O impedcance = 50.0 ohms
Center frequency = 77500.0 HZ
3 DB bandwidth = 1.0 KHZ
Geometric center freq = 77498.4 HZ
3dB Cutoff low = 77000.0 HZ
3dB Cutoff high = 78000.0 HZ
« Last Edit: September 22, 2018, 09:46:16 pm by petert »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Analog bandpass filter - bode plot for various filter types
« Reply #6 on: September 22, 2018, 09:49:37 pm »
Is that related to the input/ouput impedance setting?

Perhaps. In LTspice you shall put series 50ohm between signal source and filter output input, load filter (filter output to ground) using 50ohms resistor as well.
« Last Edit: September 22, 2018, 10:00:14 pm by ogden »
 
The following users thanked this post: petert

Offline petertTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: de
Re: Analog bandpass filter - bode plot for various filter types
« Reply #7 on: September 22, 2018, 10:01:42 pm »
Thanks, that worked. Is there a better way than using resistors, since it will attenuate the signal, which I get from an antenna?

And as I can see the part values are pretty odd. I assume it will be hard to find parts with those exact values. Any way to test out systematically what the closest match of common values would be?
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Analog bandpass filter - bode plot for various filter types
« Reply #8 on: September 22, 2018, 10:31:55 pm »
Thanks, that worked. Is there a better way than using resistors, since it will attenuate the signal, which I get from an antenna?

Signal from antenna supposedly shall come through 50 ohm cable, so you don't need any resistor here - connect cable straight into filter input. Well, maybe some lightning protector needed if you will be using external antenna. Filter output needs (summary) 50ohm load. Most likely next component after filter will have some impedance, so you need calculate load resistor so filter "feels" 50Ohms on output. Don't consider filter load as attenuator.

Quote
And as I can see the part values are pretty odd. I assume it will be hard to find parts with those exact values. Any way to test out systematically what the closest match of common values would be?

Yes, your filter shall be considered as quite low frequency for LC, it is VERY narrow as well. At least try to relax your filter requirement to 5KHz bandwidth or so. I doubt it will help to get sane inductor values anyway. Simulate with inductor values you can actually get. You shall check what comes out of AD filter wizard. Maybe you will like component types and values more.

I would just make first stage LC 2nd order lowpass filter with 120KHz cutoff frequency or so - to use 100uH inductor from my scrapbox. Just few tries in calculator are enough to approximately "hit" desired inductor value for 2nd order design. Add 1st order series capacitor hi-pass filter and I would name result as good enough for initial experiments.
 
The following users thanked this post: petert

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Analog bandpass filter - bode plot for various filter types
« Reply #9 on: September 23, 2018, 08:25:31 am »
The source and load are supposed to be 50 ohms, and their voltages will drop by 50% when matched.  That's simply power transfer at work.

Insertion loss is normalized to this.  In a simulation, you'll usually start with a 2V source (or 2V/50 ohms current source, for a Norton equivalent), which when loaded with 50 ohms gives 1V and 20*log(1/1) = 0dB insertion loss, of course.  If you get less than 1V output from your filter (peak in the passband), that's loss.  (You probably won't measure any with ideal simulated components.)

So topology, those values are plausible but you'll need quite high Q, which isn't so plausible.  Narrow filter you want a coupled resonator topology.  Example:
https://www.jrmagnetics.com/rf/doubtune/doubccl_c.php
Of course this is only a 2nd order filter, not 3rd.

Basic design, consider: 1kHz width, 77kHz center, 77/1 = Q required.  The actual loaded Q of each resonator may be higher or lower than this, but they will all average to this (geometric average).  The loaded Qs are spread apart a bit to get the desired filter profile (Butterworth in this case).  The component Q must be many times higher than this -- if you use an ideal capacitor, and an inductor of Q = 77, you have 50% loss on each resonator, you'll actually get a loaded Q of 38, and you get a very sloppy bandwidth of more than 2kHz.  Probably a lot worse than that because there's three of them.

The impedance of the resonators doesn't matter much, because you'll be using an impedance matching network to go from 50 ohms to the resonator.  The above uses a capacitive divider.  Tapped or coupled inductors can be used, or any other divider sort of network you can put together without adding more resonant modes.

The impedance of a resonator doesn't matter too much anyway, because the number of turns and thickness of wire is variable, for an inductor of a given size.  Nominal impedances (say 20 to 2000 ohms) are easier to implement with real materials (because of resistivity of copper, parasitic capacitance and so on).

But really, for such a narrow bandwidth, you may find it's better to use a wide filter that's easy to build, and use another method to narrow the bandwidth further.  Example, say you use a 10kHz bandwidth (which can be implemented with Q ~ 30 commercial parts just fine), then detect it, or hetrodyne it down to baseband, and use an active filter (Rs and Cs and opamps).  Or do it DSP with a microcontroller doing equivalent-time sampling, which might not be doable on an ATmega based Arduino, but pretty much anything ARM based will do.

Or sticking with passive filters, you're probably not going to find a mechanical filter or resonator at quite that frequency (unless it's a standard thing that I don't know about -- in which case, bonanza!), but upconverting it to 455kHz to use AM BCB filters, or the low MHz for quartz crystals*, would be another option.

*Or 32.768kHz, but you'd probably never get the bandwidth wide enough?  The impedance is really high, too.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: ogden, petert

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Analog bandpass filter - bode plot for various filter types
« Reply #10 on: September 23, 2018, 05:26:43 pm »
Yes, oldskool approach is impractical. I would suggest Tayloe mixer (detector) + SDR approach. Much more fun definitely.

Here you can taste (hear) how one of simplest DIY Software Defined Radio works: http://hackgreensdr.org:8901/

Quite detailed description of hardware: http://hackgreensdr.org:8901/bunker-system.pdf

DCF77 is so slow that you can do all the DSP on Arduino and have spare CPU time left.
 
The following users thanked this post: petert

Offline petertTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: de
Re: Analog bandpass filter - bode plot for various filter types
« Reply #11 on: September 24, 2018, 02:45:09 pm »
Thanks for all that great info. I'll need time to process all of it.

SDR is definitely a route I want to go (I recorded the DCF77 radio signal using a soundcard before, and processing in software is no problem).
But this is a project to learn more about analog electronics, so I want to stick with it.

I saw that crystal oscillators can be used as resonating filter with a very narrow bandwidth. A pierce oscillator seems reasonably simple.
http://thehackerworkshop.com/?p=364
https://www.mikrocontroller.net/topic/78005 (German, but useful info on crystal oscillators).

PCB of a crystal filter with soldered BNC jacks: http://www.philipstorr.id.au/radio/technical/Crystals%20Techo.pdf

Test a crystal and tune a pierce oscillator: https://www.electronicdesign.com/test-measurement/simple-tester-provides-readout-crystal-frequency

A crystal oscillator circuit with completely specified parts and values: http://www.z80.info/uexosc.htm

I didn't find a calculator for such a pierce oscillator, any idea?
« Last Edit: October 05, 2018, 12:47:13 am by petert »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Analog bandpass filter - bode plot for various filter types
« Reply #12 on: September 24, 2018, 05:47:27 pm »
But this is a project to learn more about analog electronics, so I want to stick with it.

I saw that crystal oscillators can be used as resonating filter with a very narrow bandwidth.

Do not try to build 77.5KHz carrier detector with needle-sharp bandpass filter. Learn heterodyne receivers instead - it's still analog electronics.
 

Offline petertTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: de
Re: Analog bandpass filter - bode plot for various filter types
« Reply #13 on: September 26, 2018, 03:42:30 pm »
Regarding impedance matching, I'll add a good video here for (future) reference:

Measuring output impedance:
« Last Edit: September 26, 2018, 03:49:06 pm by petert »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf