Author Topic: How to characterize a filter?  (Read 4066 times)

0 Members and 1 Guest are viewing this topic.

Offline cellularmitosisTopic starter

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
How to characterize a filter?
« on: February 09, 2018, 07:13:27 pm »
I'm a bit of an RF noob -- I hope this is the right place to ask such a basic RF question.

I'd like to be able to characterize a low-pass filter (specifically, for suppressing EMI).  I'd like to DIY a simple automated circuit to do this, rather than buy a piece of test equipment.

What are the typical approaches here?

The first thing which comes to mind is something which can generate a sine wave of a given frequency, run that through the filter, then have a peak detector on the other end and measure the amplitude.  Do this for as many frequencies as you'd like (using an Arduino to drive it and collect the data), then plot the data as a "sweep" response.

Are there other approaches?  I guess you could also try to throw wide-band white noise at the filter, and then use a spectrum analyzer to measure the output.  But I haven't invested in a spectrum analyzer yet.

My goal here is to be able to perform very basic, low precision measurements of various filters.  E.g. comparing RC filters, LC filters, ferrite beads, etc.

I'm guessing the approach will also be determined by how high of a frequency I want to sweep to.  I'm not really sure what my requirements are there.

If you know of any good resources for a beginner, please feel free to post them!
LTZs: KX FX MX CX PX Frank A9 QX
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: 00
  • mmwave RFIC/antenna designer
Re: How to characterize a filter?
« Reply #1 on: February 09, 2018, 08:04:10 pm »
Another thing that matters is what you want to know. Do you just care about the transmitted spectrum? Do you care about phase? What about reflections?

The standard way to measure filters is using a network analyzer. If you care about phase that becomes a vector network analyzer. But crudely put, a network analyzer is what you suggest - put in a number of tones and then figure out what power comes back out. A VNA adds some mixers for phase coherence.

A important thing is the impedance of the thing you use to measure. This could have an effect on the performance of your filters. If this impedance isn't well behaved over the frequency range of interest, it could contribute significant error to the measurements.
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 
The following users thanked this post: cellularmitosis

Offline slurry

  • Regular Contributor
  • *
  • Posts: 159
  • Country: se
Re: How to characterize a filter?
« Reply #2 on: February 09, 2018, 08:56:46 pm »
A VNA are still the most practical and most accurate way to characterise most RF components, the other simpler option is a scalar analyzer or a spectrum analyzer with a tracking generator.

If you have some funds but not huge funds i would recommend something simpler as this VNA:
https://www.sdr-kits.net which can be compared with expensive VNA's in many areas and it will open up a whole new area of mesuring possibilities.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11536
  • Country: my
  • reassessing directives...
Re: How to characterize a filter?
« Reply #3 on: February 10, 2018, 05:14:46 am »
apart from the VNA advice, if you wanna cheaper arse get a spectrum analyzer with tracking generator (no phase indicator), if you wanna cheaper cheaper arse, get a function generator with sweep function and view with oscilloscope (you can watch dave video on this, again no phase) if you want the phase you have to eyeball them piece by piece on the DSO and write down with hand line by line. or if you are lucky you can program the FG and DSO to download data to PC for automated plotting (gain and phase).
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline cellularmitosisTopic starter

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: How to characterize a filter?
« Reply #4 on: February 10, 2018, 05:43:09 am »
Thanks so much for the replies everyone!
LTZs: KX FX MX CX PX Frank A9 QX
 

Offline hagster

  • Frequent Contributor
  • **
  • Posts: 394
Re: How to characterize a filter?
« Reply #5 on: February 10, 2018, 08:34:15 am »
What frequencies are you interested in?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: How to characterize a filter?
« Reply #6 on: February 10, 2018, 06:07:10 pm »
At lower frequencies or at least frequencies within the range of your signal generator and oscilloscope, two channels of the oscilloscope can be used to measure both attenuation and phase between the input and output of the filter as the frequency is swept manually.
 

Offline cellularmitosisTopic starter

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: How to characterize a filter?
« Reply #7 on: February 10, 2018, 08:44:10 pm »
I’m mostly just interested in suppressing noise on the DC supply lines of a circuit, so phase doesn’t matter, and I’m not sure how high I need to go for frequency.  High enough to measure attenuation of switching spikes, I suppose?

I’ve crudely measured this sort of thing before for the ICL7660, but I’d rather be able to generate a plot of attenuation vs frequency. 

https://www.eevblog.com/forum/projects/an-evening-with-the-icl7660/
LTZs: KX FX MX CX PX Frank A9 QX
 

Offline CopperCone

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • *knock knock*
Re: How to characterize a filter?
« Reply #8 on: February 10, 2018, 10:13:10 pm »
If your operating near 50 ohms then a VNA would  be the best job. If you are operating other other impedance you probably want to use an impedance analyzer.

If your frequency is low you can use a regular function generator that has a sweep output to sweep the filter and display it on an oscilloscope. I have done this.

You can also just sweep a function generator and use a multimeter and take some number of data points to make a plot.

Past a few megahertz it gets really tricky. Just moving the cables around causes everything to go nuts. If you want real data at MHz frequencies you need some kind of test fixture that wont move around, with a shorting load for catagorization.
« Last Edit: February 10, 2018, 10:18:15 pm by CopperCone »
 
The following users thanked this post: cellularmitosis

Offline eliocor

  • Supporter
  • ****
  • Posts: 519
  • Country: it
    • rhodiatoce
Re: How to characterize a filter?
« Reply #9 on: February 11, 2018, 03:31:58 am »
Maybe a not too expensive solution is to use the Analog Discovery 2 as a Network Analyzer:
http://www.ni.com/pdf/manuals/AnalogDiscovery2NIDatasheet.pdf
it can reach the max frequency of 10MHz, measuring Phase/Amplitude values
 
The following users thanked this post: cellularmitosis

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to characterize a filter?
« Reply #10 on: February 11, 2018, 03:03:52 pm »
A sinewave signal generator and an oscilloscope is sufficient. If your oscilloscope doesn't go high enough frequency, just make a simple AM-detector which will rectify the high frequency signal and provide a voltage related to the high frequency amplitude. Using a sinewave is simple and straightforward as you can measure the filter's amplitude response directly over a frequency range. A cheap adjustable (analog or digital) sinewave generator works typically well enough for simple analysis. This is tried and true old school way of doing things. With dual channel oscilloscope you can even measure the phase if needed.

If the signal generator comes with a sweep functionality and the sweep voltage output (voltage related to the output frequency), you can use your oscilloscope as a simple spectrum analyzer: Hook the sweep voltage output to the X-channel and the filter output to Y-channel. If you have digital oscilloscope with math capability, you can probably perform some helpful calculations like log-function, too.
 
Using a wide bandwidth noise generator requires tuner-based receiver/detector or FFT. A simple SDR-dongle may be used if its frequency range is suitable for your measurement range. Some dongles can be modified so that they start at very low frequencies. Typically you will be able to obtain > 40 dB of dynamic range with inexpensive SDR-dongles with 8-bit ADC.

If you have a digital oscilloscope, the DSO may have also built-in FFT-functionality giving > 40 dB of dynamic range.

If you are performing this kind of analysis regularly, you may want to consider investing into a proper spectrum / network analyzer as they will provide better dynamic range and perform the time-consuming calculations automagically over wide bandwidth with good accuracy.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to characterize a filter?
« Reply #11 on: February 11, 2018, 03:40:41 pm »
I'm a bit of an RF noob -- I hope this is the right place to ask such a basic RF question.

I'd like to be able to characterize a low-pass filter (specifically, for suppressing EMI).  I'd like to DIY a simple automated circuit to do this, rather than buy a piece of test equipment.

What are the typical approaches here?

The first thing which comes to mind is something which can generate a sine wave of a given frequency, run that through the filter, then have a peak detector on the other end and measure the amplitude.  Do this for as many frequencies as you'd like (using an Arduino to drive it and collect the data), then plot the data as a "sweep" response.

This is quite useful approach. With a cheap DDS-based sinewave generator controlled by Arduino and a simple AM-detector you can create a useful filter analyzer. Like you wrote above, just use Arduino to set the DDS frequency and measure the detector output voltage. Repeat the previous step over wanted frequency range. If you add an op amp to the detector output you can increase the dynamic range quite easily. Read the raw detector output and the amplified op amp output together:  Use the op amp output if the signal level is small, and use the raw detector output if the signal level is high and the op amp is saturated. You can probably find a cheap but sufficient DDS-generator from eBay etc. for the project. Build some preset attenuations (10dB, 20dB, 30dB at 50 ohm, for example) for the DDS-output so that you do not overdrive the filter, if you are using any active circuits in the future.
 

Online jjoonathan

  • Frequent Contributor
  • **
  • Posts: 780
  • Country: us
Re: How to characterize a filter?
« Reply #12 on: February 11, 2018, 04:18:38 pm »
It looks like you can get AD8302 (log amp + phase detector to 2.4GHz) boards for $7 these days  :-+
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to characterize a filter?
« Reply #13 on: February 11, 2018, 04:37:25 pm »
It looks like you can get AD8302 (log amp + phase detector to 2.4GHz) boards for $7 these days  :-+
Here is an application note on how to tweak the performance down to low-frequency range, even down to audio frequencies:
http://www.analog.com/media/en/technical-documentation/application-notes/AN-691.pdf
See page 13 for AD8302.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: How to characterize a filter?
« Reply #14 on: February 24, 2018, 07:31:24 pm »
An  old school approach if you had a scope with sufficient BW was to sweep the range of interest while triggering the scope set at a sweep speed to match the speed of the sweeper.  The HP 8601A was intended for such tasks.

You can do the same thing with a voltmeter, RF probe, signal generator and pad of paper.  But it's tedious.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28138
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: How to characterize a filter?
« Reply #15 on: February 24, 2018, 07:47:56 pm »
I'm a bit of an RF noob -- I hope this is the right place to ask such a basic RF question.

I'd like to be able to characterize a low-pass filter (specifically, for suppressing EMI).  I'd like to DIY a simple automated circuit to do this, rather than buy a piece of test equipment.

What are the typical approaches here?

The first thing which comes to mind is something which can generate a sine wave of a given frequency, run that through the filter, then have a peak detector on the other end and measure the amplitude.  Do this for as many frequencies as you'd like (using an Arduino to drive it and collect the data), then plot the data as a "sweep" response.

Are there other approaches?  I guess you could also try to throw wide-band white noise at the filter, and then use a spectrum analyzer to measure the output.  But I haven't invested in a spectrum analyzer yet.

My goal here is to be able to perform very basic, low precision measurements of various filters.  E.g. comparing RC filters, LC filters, ferrite beads, etc.

I'm guessing the approach will also be determined by how high of a frequency I want to sweep to.  I'm not really sure what my requirements are there.

If you know of any good resources for a beginner, please feel free to post them!
https://www.electronics-tutorials.ws/filter/filter_4.html
There's several filter types on that site and examples of the maths to design them.

When I have a mo I'm gunna build a band pass and sweep it with the Bode plot feature in the new SDS1004X-E.
Keep an eye out for it here:
https://www.eevblog.com/forum/testgear/siglent-sds1204x-e-released-for-domestic-markets-in-china/
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 
The following users thanked this post: medical-nerd

Offline donmr

  • Regular Contributor
  • *
  • Posts: 155
  • Country: us
  • W7DMR
Re: How to characterize a filter?
« Reply #16 on: February 26, 2018, 03:51:59 pm »
You can also use a low cost wide-band noise generator with a spectrum analyzer.
 

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1527
  • Country: au
Re: How to characterize a filter?
« Reply #17 on: February 28, 2018, 09:40:24 pm »
If You know  anyone with a Keysight DSOX1102G scope approach them to characterise the filter.
DSOX1102G has an onboard signal generator  ( frequency range from 0.1 Hz to 20MHz ) and bode plot functionality.
If I were in the states i would offer to do it for You ( I still do ) but i am somewhat remote to You.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to characterize a filter?
« Reply #18 on: March 01, 2018, 06:21:36 am »
One should be able to perform filter characterization up to 15 MHz with some DSP and Hilbert transformation using a cheap AD9850-based DDS sine wave generator and an MCU with to high-speed ADC inputs as shown in this document:

https://www.fmf.uni-lj.si/~ponikvar/STM32F407%20project/Ch24%20-%20Phase%20measurement.pdf

For example the LPC4370 https://www.nxp.com/docs/en/data-sheet/LPC4370.pdf has a 12-bit ADC capable of 80 Msps. With two channels it is possible to sample at 40 Msps, and obtain frequency range around 15 MHz (theoretical maximum is less than 20 MHz at 40 Msps).

The MCU has to be able to set and sweep the DDS output frequency. The generated sine wave is then fed into the ADC input (the reference signal) and into the filter under test. The output of the filter is fed into the other channel of the ADC.  The MCU will sample simultaneously the reference sine signal and the filtered signal with the ADC. The MCU will compute the Hilbert transform of the reference sine signal giving the cosine part of the complex quadrature signal. The reference sine and the derived cosine signals are then used for computing the phase information of the filtered signal.
 
The following users thanked this post: rhb

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: How to characterize a filter?
« Reply #19 on: March 01, 2018, 03:10:18 pm »
If you have a 2 channel DSO you can do what @Kalvin suggests using just an Arduino and a AD985x board from eBay.  The procedure would be as @Kalvin described, but done on a PC using Octave/MATLAB and a downloaded pair of DSO traces.

You also might want to check the FeelTech FY6600 thread.  They seem to be closing in on having open source FW for that unit.  I have a borked V 3.1 unit and hate to give them any business, but it appears that the FOSS  FW will have the ability to sweep to 60 MHz.  The spectrum is remarkably clean.  Their are SA plots around page 12-14 of that thread.

Of course, if you use the LPC4370 to build a dedicated VNA  as @Kalvin suggests you'll also have an  SDR capable of streaming DC-30 MHz  to a PC.  For an RFnut combining that with a 4K TV to make an 8Khz RBW  waterfall display of LF to HF would be a very cool decoration.  Never mind watching "a*  band, watch them all.

The LPC-Link2 can be used as an eval board for this device and costs a wildly extravagant $24 on Amazon.  My spider sense tells me I have another dev board coming.  I've wanted an ARM board with a fast 12 bit or better ADC.  80 MS/S is quite fast enough.
 

Offline 4CX35000

  • Regular Contributor
  • *
  • Posts: 107
  • Country: gb
Re: How to characterize a filter?
« Reply #20 on: March 04, 2018, 01:43:31 pm »
I’m mostly just interested in suppressing noise on the DC supply lines of a circuit, so phase doesn’t matter, and I’m not sure how high I need to go for frequency.  High enough to measure attenuation of switching spikes, I suppose?

I’ve crudely measured this sort of thing before for the ICL7660, but I’d rather be able to generate a plot of attenuation vs frequency. 

https://www.eevblog.com/forum/projects/an-evening-with-the-icl7660/

For this you would use a ordinary function generator and Oscilloscope with some log graph paper. Simple stuff done in most college first year labs. Change the frequency input at regular internals and check the output levels of your generator against the scope on channel 1 and then measure the output of the filter on channel 2 of your scope. Note down the figures on paper and then transfer to a log graph paper to gain idea of the bandwidth. As for range of frequencies then I suggest you do a simple test to see which frequency range the filter is working at, this can be viewed on the scope as the signal increases and decreases.
https://www.printablepaper.net/category/log

You will not find many VNA's and spectrum analysers which work down at DC up to 1 KHz. Very expensive and rare.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf