LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

appropriate filter

Dear LabVIEW Community members,

I am a labview 7.1 user and I am trying to measure the applied magnetic field as DC voltage with time domain.  I  applied step  voltage  and measure the  DC  voltage output  as in  the  labView  program .  I used  different filter types to remove the ripples and unfortunately, it is unsuccessful. I wonder, if you kindly sugeest me the better way to remove these ripples.

I am looking forwards to your kind suggestions.

regards,
Toyota
Download All
0 Kudos
Message 1 of 23
(4,325 Views)
Looks like you have a nice low frequency sine with some spikes that are high
frequency. I'd try to apply a low pass filter. Something like the
"Equi-Ripple LP.vi".

I would sample some data, and use "normal" filters before I try to convert
it to PtByPt, to simplify the process. Then I'd try to get the PtByPt
working with presampled data, and then I'd make the final version with the
actual data aqcuisition.

Regards,

Wiebe.


0 Kudos
Message 2 of 23
(4,304 Views)
It is important to note that all filters have a transient response as well as the steady state response. Since you are starting your experiment with a step, your filter will have a transient at that time. The duration of the transient is dependent on the bandwidth of the filter. It appears that your low frequency signal has a period of about 400 time units and the high frequency spikes have periods of 10-20 time units. From your question it is not clear whether both time varying components are undesirable or only the higher frequency spikes.

Any filter which can attenuate the high frequency spikes significantly will likely introduce some phase shift and possibly some attenuation on the lower frequency signal. If you need to eliminate both components, you will likely need a few thousand time units to get stable data.

Alternatively, if you know what causes the undesired components, perhaps they can be eliminated or compensated by some other means. Often that is a better approach than filtering after the signal has been corrupted.

Lynn
0 Kudos
Message 3 of 23
(4,293 Views)
Thanks for all the kind suggestions. Actually, I am new user to LabVIEW still under learning from the trials. I will try with both approach and let you know , whenever I get  reflections from  the changes.

regards,

Toyota
0 Kudos
Message 4 of 23
(4,266 Views)
I have been trying to use the LPF filters and median point by point  filters .But I could not eliminate the spikes as shown in HP.jpeg  in 200 ms and 400 ms. And also I have attached the resulted hysterisis loop. Could you kindly suggest me how to set up and eliminate these spikes.

regards,
Toyota
Download All
0 Kudos
Message 5 of 23
(4,244 Views)

The high freq spikes look to be maybe 15x-20x the freq of the low freq sine wave. This is good news.  You should be able to tweak your filter parameters to fully pass your low freq signal while highly attenuating the high freq signal.  There are shipping examples that give you a chance to play around and observe the effects of several of the filter parameters and a few of the filter types.

One little tidbit to mention is that median filtering has the unique (I think) property of not inducing phase shift.  It can work terrifically well in certain situations (it tends to preserve sharp-edged transients rather than rounding them off), but it may not be as good a choice for your case. 

Finally, the discussion is getting into filter details but your original post sounded like your goal is not so much to keep the low freq sine while rejecting the high freq, but to reject both and characterize the average DC level.  What aspect of the signals you've posted interest you?  Just the average DC level?  Or do you need to know the amplitude and/or freq of the sine waves? 

Depending on your answers, there may be better approaches than just filtering...

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 23
(4,228 Views)
Could you post the critical part of the VI? For instance an array with
sampled data (do make the values default, or use a constant) and your
algorithm.

Seems to me the output is exactly the same as the input, witch to me means
you are doing something wrong.

Regards,

Wiebe.


0 Kudos
Message 7 of 23
(4,214 Views)
Dear Mr.Wiebe & Mr.Kevin,

I have uploaded the critical labView VI that I am facing problems. Normally, the curve should be smooth as in attached screensot word file. My main gail is to eliminate the spikes in 200 and 400 ms time interval. But I am not able to eliminate these by appropriate filters and how to set up the X values and Filtered X values by using this filter. 

I hope these spikes are cause of step voltages that I used from the step voltage VI.  The step voltage VI is normally controlling the Power supply Unit by step-by-step.

Thanks you all for your time and suggestions.

regards,

Toyota
Download All
0 Kudos
Message 8 of 23
(4,191 Views)
Toyota,

Is the desired signal truly sinusoidal? If so, an alternative approach is to fit a sine curve to the data using the Lev-Mar Curve Fitting VIs. The name varies slightly depending on your version of LV. I have found that fitting to a sine function works reasonably well for datasets which have less than one full cycle and the fit gets worse as the number of cycles increases. For your data the fitting might work best if you used a sliding window about 250-300 ms long and updated it every 50 - 100 ms.

Can you post a dataset? Either save the data to a text file or run your data collection VI and make the data in Applied Magnetic Field vs Time default, then save the VI. Then you can remove the data collection stuff (which we cannot use since we do not have your instruments) and change the indicator to a control. Even posting a VI with just the control with default data is enough. That allows us to look at and manipulate the data.

Lynn

Message Edited by johnsold on 10-05-2007 09:47 AM

0 Kudos
Message 9 of 23
(4,182 Views)
Dear Lynn,

I have attached the data set of  applied magnetic field vs. Time( without filter) in text file format. Is it the data set you want? For run the data collection VI, could you kindly suggest me how to do it?  I will try it.  I will try also with curve fitting and let you know the results.

regards,
Toyota
0 Kudos
Message 10 of 23
(4,164 Views)