LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High Pass Filter Settings

I am wanting to use a 4th order Butterworth Filter for some wavform data. The waveform was sampled at 5000hz and I would like to put a 50Hz highpass filter through it. I am a bit confused for a couple of reasons.
(1) Do the values I wire to the imputs have to be less then 1.0 for the frequency cut off? If so should the value be 0.5 for 50 hz
(2) For the sampling frequency of 5000hz what should I compute as the constant, 5.0 ??
(3) In the help section it states "high cutoff freq: fh is the high cutoff frequency. The VI ignores this parameter when filter type is 0 (Lowpass) or 1 (Highpass)" , I am not sure what this means??

Thank you for your help!!
0 Kudos
Message 1 of 8
(9,063 Views)
1) you can input your cut-off frequency of 50 Hz directly to the low cut-off input assuming that the sample rate (5 kHz) is passed correctly to your VI. This is done either using the 'sampling freq:fs' control if you are using the low-level 'Butterworth Filter.vi' (this seems to be your case) or using the dt of your waveform if you are using the high-level waveform based 'IIR Filter.vi'

2) 5000 Hz

3) for low-pass and high-pass filters you only need one cut-off value so you input that value to the 'low cut-off' control (just ignore the word 'low'). For bandpass and bandstop filters you need to specify both the low cut-off and the high cut-off of your pass/stop-band.
Message 2 of 8
(9,062 Views)
Thanks for the help, it seems to be working!! Can you describe to me the difference between a high level and low level waveform. Also is there an easy way to get the dt parameter from the waveform?

Cheers!!
0 Kudos
Message 3 of 8
(9,062 Views)
There are mainly three ways of doing analysis in LabVIEW, 'array based', 'waveform based' and using 'Express VIs'. Many analysis functions are supported in all three modes, presented in three different palettes. The upper-row in your Analyze palette is Waveform based, that is works on input Waveforms. A Waveform includes not only your data but also timing information in form of timestamp (start time) and dt (sampling interval = 1 / sample rate). So waveform based VIs are easier to use because they manage the necessary waveform information for you.

You also have a main palette called 'Waveform' where you can find various tools to manipulate your waveform and extract for example timestamp or dt values.

If you want to go the 'Express VIs' way,
check the Express palette.
0 Kudos
Message 4 of 8
(9,062 Views)
Thanks again! I have been for a while trying to figure out the build waveform function since I mostly work with arrays, however the Waveform based outputs seem very useful. I suppose I should have another look at them and figure them out. Thanks for the speedy and informative responce!
0 Kudos
Message 5 of 8
(9,062 Views)
I am still having some problems, not sure why but I am unable to get rid of this 50Hz noise. I have attached a simple VI which I am using as the base for my calcualtion. I am actually using a Butterworth 4th order Highpass filter of 53Hz which is recommended. I have attached one of my collection files, which contains several columns of data which you can scroll through with the numeric control.

I would really appreciate any help.

Cheers
0 Kudos
Message 6 of 8
(9,062 Views)
A 53 Hz high-pass filter (4th order Butterworth) will not attenuate a 50 Hz very much. To do so you have to increase your cut-off frequency. As an alternative, if you only want to remove the 50 Hz but don't mind other frequencies below 50 Hz, you may want to use a bandstop filter centered around 50 Hz.

I have modified your VI (see attachment) and added a bandstop filter (also 4th order Butterworth) with a stopband range 48 to 52 Hz]. Your tone is then completely removed.

If you want to monitor the actual filter response, you can select 'Transfer Function', 'Magnitude in dB' and 'Frequency log' on the configuration page of your Filter Express VI. The graph will then display the response of your filter.
0 Kudos
Message 7 of 8
(9,062 Views)
Thank you so much! That is fantastic, I had tried a bandstop but not appropriately!! Thanks again!!
0 Kudos
Message 8 of 8
(9,062 Views)