04-22-2015 11:00 AM
Hi !
I am using a Agilent U2356A (acquisition central) to acquire a sinusoidal waveform, with a +/- 10 volts amplitude and 300 Hz frequency. The Agilent central acquires 8000 points at 7812 Hz frquency.
I need to filter the signal to mitigate it at +/- 1 Hz.
I use a low pass filter (Butterworth) with an 2 order and a cutoff frequency of 100 Hz .
The amplitude of the obtained signal is correct, but the filter completely shifts the signal and it is not centered on zero after filtering.
In attached, a VI containing a table of the acquired data and the curve after filtering these data.
Thanks for any help,
Danaé
04-22-2015 07:46 PM
04-23-2015 03:16 AM
Can you post vi as 2012 and/or a picture - hopefuly that will clarify your question as it is not entirely clear (if you are trying to acquire a 300Hz signal why do you have a 100Hz LP filter which will block the 300Hz? what is the +/-1Hz all about? the filter shifts the signal about zero - zero what? zero volts? zero Hz?)
04-23-2015 05:35 AM
Yes, I'm sorry I have not been very clear.
So it's not +/- 1 Hz, but +/- 1 volt.
In fact I use a filter with the cutoff frequency of 100 Hz on a much higher frequency signal in order to attenuate the amplitude of my signal.
I want to get the sine amplitude of 10V to 1V using the filter.
This works except that the filter shifts the signal which is no centered on 0 volts but on -1 volt.
So I have an output sinus with -2V / 0V amplitude but I would like a -1V / + 1V output sinus.
Thanks for your help,
Danaé
04-23-2015
06:38 AM
- last edited on
09-16-2025
12:51 PM
by
Content Cleaner
So I am guessing that you probably have a slight offset on your input signal, which will get passed through the filter. Below you see a 300Hz signal passed through a 100Hz filter. The initial signal had 1V offset which carries through to the result.
One way of removing this is taking a dc avarage and subtracting from the signal as given in this NI article
How Do I Remove a Dynamic DC Offset From My Acquired AC Signal?
04-23-2015 07:12 AM
Indeed, I had not thought to subtract the average. This is what I need!
Thanks a lot
04-24-2015 01:30 AM
Did I get it rigth, that you have a signal of a certain amplitude and you want to scale it to 1V peak amplitude?
Why do you use a filter? If the frequency is changing, so will the output amplitude of your filter.
My approach to such a problem would be:
Use tone detection to get frequency, amplitude and phase of the measured signal and use this information to:
- create a clean analytical sine of the needed amplitude (and phase)
- simply scale by dividing the signal with the found amplitude .....
or: LabVIEW has a dedicated vi for such a task.... to feed AWGs and AO tasks ...
04-24-2015 04:03 AM
The subtract average will work if your signal is steady but if it varies over time then another approach would be to change the low pass into a bandpass filter with the lower cutoff frequency as low as you want to include the frequency in your result. DC is in fact simply 0 Hz frequency component and gets filtered out that way.
04-24-2015 04:24 AM
In fact, I have created an acquisition software with Agilent centrals for a customer.
The acquired signals are linear (around 8 volts) and the client wanted to use a low pass filter to filter the acquired data (probably to remove noise).
I have to prove that the filter works, so the way to check this is to acquire a sinusoidal signal and filter it at lower, equal and higher frequencies than the cutoff frequency.
When I did that, I realized that the filter was shifting the DC component of my signal.
So I'm now wondering if the filter distorts the data of my continuous signals too...
04-24-2015 04:39 AM
When I did that, I realized that the filter was shifting the DC component of my signal.
Filters don't do this (at least not LP Butterworth filters). Any dc offset was already present, introduced by your frequency source or your acquisition system or ground shift or waveform distortion etc. The filter won't add dc offset to the input signal (ac or dc).
Also, testing using a 20Vp-p 'noise' signal in a system designed to measure an 8Vdc signal seems a little extreme. Why not use your function generator to generate an 8V dc component with and without a realistic noise added (eg. a 2Vp-p 300Hz ac signal with 8V dc offset). Measure your results from (a) plain 8Vdc in and (b) 8Vdc with 1V, 2V, 3V, etc. of 'noise' added and look at the results.