60 Hz harmonics measurements - Bandpass filter + ADC - Page 1
Forum section: electronics / projects

author: akhi
author_rank: Newbie
timestamp: June 28, 2023, 03:25:53 pm
content: We are developing a 1-kV 60Hz motor driver. We want to well compensate harmonics, so we have to operate an FFT on the measured signal which is done by a 2.5V-8bits-ADC (after resistor divider and op-amp signal conditioning stages).Problem, is we do not have good resolution to operate a correct FFT. So, my idea is to design a band-pass filter cutting off fundamental (60Hz) and going up to 7th or 9th harmonic, and then amplify the signal before driving the ADC.Could you help with proposition or design guidelines of some efficient filter at such low frequencies? I have read some about multi-feedback filters. Are they adequate for this kind of application?Is it better to design the BP-Filter at the voltage divider stage or after the op-amp which drive the ADC?Maybe there are some design of THD measurements that could be helpful but I couldn't find any.

author: Benta
author_rank: Super Contributor
timestamp: June 28, 2023, 03:40:13 pm
content: How precise/stable are your 50 Hz?If it's stable, a medium-Q 50 Hz notch filter would be the simplest solution.Correction: I mean 60 Hz, of course.

author: TimFox
author_rank: Super Contributor
timestamp: June 28, 2023, 03:49:41 pm
content: An old-fashioned THD analyzer (e.g., -hp- 339A) will null out the 50 or 60 Hz fundamental and what remains goes to a front-panel output that can be digitized to see the harmonics.There will be some attenuation of the 2nd harmonic due to the null filter, but this is in the manual.The advantage of the 339A and similar is that they automatically tune to the fundamental frequency if it should drift.The 339A also has switchable lpf settings that can reduce the noise from higher frequencies than are of interest to your measurement (along with a switchable 400 Hz hpf that would kill everything for 50/60 Hz).The basic null filter in these analyzers is an R-C Wien bridge (not oscillator) with feedback to sharpen the notch.

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: June 28, 2023, 05:01:49 pm
content: What is the level of harmonic (dBc) you want to detect using the FFT. Even with 8 bits of ADC resolution, you can get very good results with input tone and harmonics if you take large enough samples.If the ADC is having a Vref of 2.5V , with 8 bits, running at say 2Ksps. The quantization noise is spread over 0 to 1000Hz.Assuming the ADC input can swing between -2.5V to 2.5V, the LSB size is about 20mV.The variance of the quantization noise is given by LSB^2/12 = 32e-6w (assuming 1ohms resistance)If the no of points in the FFT is 32768, then the noise power per bin is reduced to a very small value (32e-6/32768). So lower tone power can easily be resolved.However, due to the large LSB size, you may find discrete tones in the output FFT which are not present in the input signal. This is due to the clock and the input frequency having some correlation, as both are periodic signals.The remedy is to add extra noise into the input of the ADC along with your signal.I have written a small octave script to demonstrate this.Without the dithering noise, you will find multiple tones in the output FFT, which are not present in the input signal.%Octave script to detect AC mains harmonicspkg load signal;Ns = 1024*32; %32k samplesFs = 2.0e3;Fres = Fs/Ns;Ts = 1/Fs;t = [0:Ns-1]*Ts;n = [0:Ns-1];Nbits = 8;Vref = 2.5;f = Fs/2*(n-Ns/2)/Ns;LSB = Vref/(2^(Nbits-1));Dither_Noise = 0.5*LSB;f1 = 60;A1 = 0.8*Vref;f2 = 5*f1;A2 = A1 * 10^(-60/20); %5th harm is 60dBc below the fundamental of 60Hzx = round( (2^(Nbits-1)*( A1* sin(2*pi*f1*t) + A2* sin(2*pi*f2*t) + Dither_Noise*randn(1,Ns) ) ));x = x/(2^(Nbits-1));figure(1);subplot(2,1,1);plot(x);title("Captured input with added noise");subplot(2,1,2);fx = fftshift(1/Ns*fft(x.*hann(Ns)'));plot(f,20*log10(abs(fx)));title("FFT of Input");

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: June 28, 2023, 05:04:33 pm
content: " alt="" class="bbc_img" />FFT of the raw input signal (without adding the dithering noise)

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: June 28, 2023, 05:05:18 pm
content: The noise added is having a stdev of 0.5LSB and the 5th harmonic of the 60Hz is at -60dBc below the fundamental.You can add this noise into the circuit, just by using high noise opamp in your gain stage with large resistor values.

author: akhi
author_rank: Newbie
timestamp: June 29, 2023, 08:05:35 am
content: 60-Hz is a PWM signal filtered by motor inductor.notch filter is a band stop filter. What I want is going up to the 9th harmonic it will be sufficient, but I will consider your proposal and maybe I will reduce the anti-aliasing filter at the ADC Input.Do you have any suggestion if it is better to design the filter at the high voltage side (voltage divider) or after signal conditioning (low voltage side)?

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: June 29, 2023, 09:37:12 am
content: I recommend to have the filter on the low voltage side so that you can get cheaper components, which do not need to work at high voltages. Just use the ADC at 2ksps and have a 3rd order LPF with pole at 1Khz. Add an opamp as a summer with noise at one end, which can be generated by a high enough resistor.

author: Circlotron
author_rank: Super Contributor
timestamp: June 29, 2023, 09:43:39 am
content: Quote from: Benta on June 28, 2023, 03:40:13 pmYou could use something like a 4046 PLL to multiply up the mains frequency as a reference for the notch filter. That would track any drift frequency of the mains.

author: Bud
author_rank: Super Contributor
timestamp: June 29, 2023, 12:04:58 pm
content: You can have a 60Hz notch and ADC in one package like LTC2440. It is a more expensive part though, 24-bit.