How to characterize a filter? - Page 1
Forum section: electronics / rf-microwave

author: cellularmitosis
author_rank: Unknown
timestamp: February 09, 2018, 07:13:27 pm
content: 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!

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: February 09, 2018, 08:04:10 pm
content: 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.

author: slurry
author_rank: Regular Contributor
timestamp: February 09, 2018, 08:56:46 pm
content: 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.netwhich can be compared with expensive VNA's in many areas and it will open up a whole new area of mesuring possibilities.

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 10, 2018, 05:14:46 am
content: 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).

author: cellularmitosis
author_rank: Unknown
timestamp: February 10, 2018, 05:43:09 am
content: Thanks so much for the replies everyone!

author: hagster
author_rank: Frequent Contributor
timestamp: February 10, 2018, 08:34:15 am
content: What frequencies are you interested in?

author: David Hess
author_rank: Super Contributor
timestamp: February 10, 2018, 06:07:10 pm
content: 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.

author: cellularmitosis
author_rank: Unknown
timestamp: February 10, 2018, 08:44:10 pm
content: 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/

author: CopperCone
author_rank: Super Contributor
timestamp: February 10, 2018, 10:13:10 pm
content: 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.

author: eliocor
author_rank: Unknown
timestamp: February 11, 2018, 03:31:58 am
content: Maybe a not too expensive solution is to use the Analog Discovery 2 as a Network Analyzer:http://www.ni.com/pdf/manuals/AnalogDiscovery2NIDatasheet.pdfit can reach the max frequency of 10MHz, measuring Phase/Amplitude values

author: Kalvin
author_rank: Super Contributor
timestamp: February 11, 2018, 03:03:52 pm
content: 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.

author: Kalvin
author_rank: Super Contributor
timestamp: February 11, 2018, 03:40:41 pm
content: Quote from: cellularmitosis on February 09, 2018, 07:13:27 pmThis 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.

author: jjoonathan
author_rank: Frequent Contributor
timestamp: February 11, 2018, 04:18:38 pm
content: It looks like you can get AD8302 (log amp + phase detector to 2.4GHz) boards for $7 these days

author: Kalvin
author_rank: Super Contributor
timestamp: February 11, 2018, 04:37:25 pm
content: Quote from: jjoonathan on February 11, 2018, 04:18:38 pmHere 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.pdfSee page 13 for AD8302.

author: rhb
author_rank: Super Contributor
timestamp: February 24, 2018, 07:31:24 pm
content: 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.

author: tautech
author_rank: Super Contributor
timestamp: February 24, 2018, 07:47:56 pm
content: Quote from: cellularmitosis on February 09, 2018, 07:13:27 pmhttps://www.electronics-tutorials.ws/filter/filter_4.htmlThere'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/

author: donmr
author_rank: Regular Contributor
timestamp: February 26, 2018, 03:51:59 pm
content: You can also use a low cost wide-band noise generator with a spectrum analyzer.

author: IconicPCB
author_rank: Super Contributor
timestamp: February 28, 2018, 09:40:24 pm
content: 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.

author: Kalvin
author_rank: Super Contributor
timestamp: March 01, 2018, 06:21:36 am
content: 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.pdfFor example the LPC4370https://www.nxp.com/docs/en/data-sheet/LPC4370.pdfhas 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.

author: rhb
author_rank: Super Contributor
timestamp: March 01, 2018, 03:10:18 pm
content: 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.

author: 4CX35000
author_rank: Regular Contributor
timestamp: March 04, 2018, 01:43:31 pm
content: Quote from: cellularmitosis on February 10, 2018, 08:44:10 pmFor 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/logYou will not find many VNA's and spectrum analysers which work down at DC up to 1 KHz. Very expensive and rare.