LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering noise from a sinewave, how to compute introduced time lag (or is it phase shift)?

Filters were applied to a combined signal of:
1) 0.5 Hz sinewave (what I want to measure)
2) 10 Hz sinewave (unwanted input)
3) white noise (measurement & transmission)

I need to filter out the noise and the 10Hz sine wave and be able to see just the 0.5Hz sinewave.

I tested with the following filters:
Butterworth, Chebychev, Inverse Cheb., and Elliptic.

Results varied according to filter type and parameters used, but in general went something like this:

a) the higher the filter order, the more the first peak is shifted to the right (on the waveform graph x-axis: [time])

b) the lower the cut-off frequency, the more of same right-shift.

(actual program set
up and results of 4 test can be seen as .gif files @ http://www.stage-1.org/VIQs/ )

So filtering seems to introduce some time lag (a fraction of a second).

Question1: How can I compute the magnitude of this lag time? I need to know it quite precisely in order to translate from a stationary reference frame (where the measurement is taken) to a rotating one (where a disturbing force is generated).

Question2: the cutoff frequency had to be much lower than 10Hz to get rid of the 10Hz signal (unwanted input). That's ok if this signal has a much higher frequency than what I want to measure. But what if the two are close (like 2Hz and 0.5Hz)? Is there a way to filter out the 2Hz at all?

Thanks very much.
0 Kudos
Message 1 of 5
(3,756 Views)
If you could analyse your data afterwards, (so no instant computed result is needed) you could calculate/reconstruct the 2-AC signals from your measured data.
Take a look at the advanced analysis examples.
0 Kudos
Message 2 of 5
(3,756 Views)
Yegor wrote:

> Filters were applied to a combined signal of:
> 1) 0.5 Hz sinewave (what I want to measure)
> 2) 10 Hz sinewave (unwanted input)
> 3) white noise (measurement & transmission)
>
> I need to filter out the noise and the 10Hz sine wave and be able to
> see just the 0.5Hz sinewave.
>
> I tested with the following filters:
> Butterworth, Chebychev, Inverse Cheb., and Elliptic.
>
> Results varied according to filter type and parameters used, but in
> general went something like this:
>
> a) the higher the filter order, the more the first peak is shifted to
> the right (on the waveform graph x-axis: [time])
>
> b) the lower the cut-off frequency, the more of same right-shift.
>
> (actual program setup and results of 4 test can be seen as .gif files
> @ http://www.stage-1.org/VIQs/ )
>
> So filtering seems to introduce some time lag (a fraction of a
> second).
>
> Question1: How can I compute the magnitude of this lag time? I need
> to know it quite precisely in order to translate from a stationary
> reference frame (where the measurement is taken) to a rotating one
> (where a disturbing force is generated).
>
> Question2: the cutoff frequency had to be much lower than 10Hz to get
> rid of the 10Hz signal (unwanted input). That's ok if this signal has
> a much higher frequency than what I want to measure. But what if the
> two are close (like 2Hz and 0.5Hz)? Is there a way to filter out the
> 2Hz at all?
>
> Thanks very much.

###################

Hi Yegor,
maybe another approach to your soloution helps...
If I would have your Problem, I would try it this way.
Filtering, like you describe it, is able to filter out a part of the
unwanted signal, but mostly not all of it. In discrete, physical technics,
lock- in amplifiers are used to filter out unwanted periodical signals.
They neutralize the unwanted frequency by using a PLL (Phase Locked Loop)
to synchronize an internal signal generator with the incoming signal,
invert the generated signal and add it to the incoming signal.

So, if for instance your distortion 10 Hz Signal changes very little in
amplitude per cycle, go and write a VI, which generates the same frequency
and amplidude, negate the generated frequency and add it to your measured
signal.

Maybe this helps.

Ciao,
Rainer
0 Kudos
Message 3 of 5
(3,756 Views)
Yegor,

Your problem is not described very well yet.
Are you looking for amplitude, phase , or frequency of the 0.5Hz signal?
If you have a reference signal with a stable phase (=frequency) to the
expected signal you should use a lockIn amplifier which is able to detect
the amplitude and the phase to the reference and to average it. As a
filter a lockIn s kind of a narrow bandpass with the reference as the
central wavelength and (1/time constant) as the bandwith. The LockIn could
be bought and connected to the PC or it can be programmed in DAQ System
PC. Google for it, there are lot of information around.

Best Regards
Urs B�gli

www.aritron.ch

Yegor schrieb:

> Filters were applied to a combined signal of:
> 1) 0.5 Hz sinewave (what I want to measure)
> 2) 10 Hz sinewave (unwanted input)
> 3) white noise (measurement & transmission)
>
> I need to filter out the noise and the 10Hz sine wave and be able to
> see just the 0.5Hz sinewave.
>
> I tested with the following filters:
> Butterworth, Chebychev, Inverse Cheb., and Elliptic.
>
> Results varied according to filter type and parameters used, but in
> general went something like this:
>
> a) the higher the filter order, the more the first peak is shifted to
> the right (on the waveform graph x-axis: [time])
>
> b) the lower the cut-off frequency, the more of same right-shift.
>
> (actual program setup and results of 4 test can be seen as .gif files
> @ http://www.stage-1.org/VIQs/ )
>
> So filtering seems to introduce some time lag (a fraction of a
> second).
>
> Question1: How can I compute the magnitude of this lag time? I need
> to know it quite precisely in order to translate from a stationary
> reference frame (where the measurement is taken) to a rotating one
> (where a disturbing force is generated).
>
> Question2: the cutoff frequency had to be much lower than 10Hz to get
> rid of the 10Hz signal (unwanted input). That's ok if this signal has
> a much higher frequency than what I want to measure. But what if the
> two are close (like 2Hz and 0.5Hz)? Is there a way to filter out the
> 2Hz at all?
>
> Thanks very much.
0 Kudos
Message 4 of 5
(3,756 Views)
"Yegor" wrote in message
news:506500000008000000C63A0000-1011517314000@exchange.ni.com...
> Filters were applied to a combined signal of:
> 1) 0.5 Hz sinewave (what I want to measure)
> 2) 10 Hz sinewave (unwanted input)
> 3) white noise (measurement & transmission)
>
> I need to filter out the noise and the 10Hz sine wave and be able to
> see just the 0.5Hz sinewave.
>
> I tested with the following filters:
> Butterworth, Chebychev, Inverse Cheb., and Elliptic.
>
> Results varied according to filter type and parameters used, but in
> general went something like this:
>
> a) the higher the filter order, the more the first peak is shifted to
> the right (on the waveform graph x-axis: [time])
>
> b) the lower the cut-off frequency, the more of same right-shift.
>
> (actual program setup and results of 4 test can be seen as .gif files
> @ http://www.stage-1.org/VIQs/ )
>
> So filtering seems to introduce some time lag (a fraction of a
> second).
>
> Question1: How can I compute the magnitude of this lag time? I need
> to know it quite precisely in order to translate from a stationary
> reference frame (where the measurement is taken) to a rotating one
> (where a disturbing force is generated).
>
> Question2: the cutoff frequency had to be much lower than 10Hz to get
> rid of the 10Hz signal (unwanted input). That's ok if this signal has
> a much higher frequency than what I want to measure. But what if the
> two are close (like 2Hz and 0.5Hz)? Is there a way to filter out the
> 2Hz at all?
>
> Thanks very much.

Yegor,
A Butterworth filter should introduce a phase shift of -45 degrees per pole
at the input frequency.
A 2-pole and single-pole in series results in a phase shift of -135 degrees.
A 10 times your desired input frequency of 0.5Hz (5Hz), your signal should
be reduced by a factor of 1000. Thus, at 2Hz, it should be reduced to about
0.022 of the original amplitude.

If you wish to learn more, may I suggest Operational Amplifiers and Linear
Integrated Circuits by Coughlin and Driscoll.

I hope this helps.

Richard
Message 5 of 5
(3,756 Views)