Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

zero phase filter

Hello, I search forum but I can not find the proper answer.

It is about digital filtering.

I have one channel with analog low pass filter of 10Hz and the same channel without any filter.

I would like to replace the analog filter and do all in software.

For that I need filter without phase delay.

When I use zero phase filter it almost good but not as channel where is analog filter

If would be good if I can match idealy both channel.

 

Any proposal ?

Regards

0 Kudos
Message 1 of 8
(4,060 Views)

Hello Sasko,

 

I apologize for the late reply.

 

Could you please describe the analog filter you use? Most analog filters introduce some kind of delay as well.

 

Also, could you please describe your application a little more? Maybe send a VI with comments what data do you expect and what you receive? Unfortunately I am not sure if I understood the screenshots from the PDF correctly. Did you make sure you don't introduce any delays accidentally in the code?

 

Also, if you want to have both channels synchronized, it might be useful to delay the non-filtered channel, so the filtered one could remain delayed.

 

Please also check out this discussion thread: No-delay filter.

 

Sorry again for the late reply and I hope to hear from you soon!

Zenon Kuder
Applications Engineering
National Instruments
0 Kudos
Message 2 of 8
(3,983 Views)

You can use a filter with a constant group delay ( example: kaiser FIR) and do a time correction in software (shift the samples) depending on your way of sampling ( read blocks or point by point) there a different ways to do it.

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 8
(3,976 Views)

Hello,

 

Thanks for answer.

 

I will try to explain my application.

I have to measure the same voltage in two modes, the "AC" mode when I dont have a filter and slow "DC" mode where I put an analog filter of 10Hz, simple RC filter buffered.

I would like to remove this analog filter and measure only AC signal and with help of software get DC mode of measuring. Then I can select corner frequency on not only 10Hz, but also 1Hz, 100 Hz and so on.

For the first trial I measure AC channel and DC channel whch is the same voltage but with analog filter.

 

Ideally the AC channel with software filter of 10Hz and DC channel with hardware filter of 10Hz should be the same,I hope...

Now I dont have this case.

 

If you take a look into my VI you will see at bottom right side a slide which define a software corner freq. When it has a value of 10Hz the bottom graphs are almost identical but not 100%, the right graph has a small hill on center.

If I choose a bigger corner frequence , let say a 100Hz then I get a tails on both side of software filtered signal.

I try to  use a zero phase filter but it did not help.

 

I mean that I did not introduce any delay in my signal.

Also I don see connection between tails and delay of signal ?

 

Thanks in advance.

 

Regards

 

 

 

 

0 Kudos
Message 4 of 8
(3,974 Views)

Any example ?

 

 

0 Kudos
Message 5 of 8
(3,972 Views)

If you want to rebuild (simulate) your analog filter to get the same (or very close to it)  reading you have to know the complex frequency response of the analog filter.

The only usecase I know is , where sometimes it's needed to rebuild standard (ISO etc) measurements where the analog filter is specified.

 

Or do you want to measure the 'short time' DC and AC value of your signal?  Why is the phase delay of importance ? Stepresponse?

If you can specify your measurement task a bit more, then there might be better/easy ways to get there.

 

Have you tried the

Averaged DC-RMS VI

Owning Palette: Waveform Measurements VIs

Requires: Full Development System

Calculates the DC and RMS values of an input waveform or array of waveforms. This VI is similar to the Basic Averaged DC-RMS VI, but this VI gives more precise control over the individual DC and RMS calculations.

 

 

To your vi:

No chance to exit while loop.

Index array can do the jop without your for loops. for more examples see here

Do you need to whrite the DO on every loop interation?

 

 

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 8
(3,955 Views)

Thanks for answer.

 

The analog filter is simple RC filter so I assume that LV already defined this somewhere..

I attach a block diagram of my  measurement to explain better my problem.

I don't want to measure short time DC or AC value, I need samples filtered in hardware way and filtered in software way.

Phase delay ? It does not seems so important, also step response.

 

The averaged DC rms gives me an one point as value not array of samples.

 

Thanks for assistance

0 Kudos
Message 7 of 8
(3,926 Views)

Hi Sasko,

 

A RC filter is an analog Infinite impulse response filter (more on Wikipedia). You should be able to approximate such filter with a digital IIR filter.

 

You can create a IIR filter in LabVIEW using the Express VI Filter (from Express-> Signal Analysis palette) as used in this demo: Simulation Demo: Filters - LPF and HPF. You can configure this Express VI as low-pass butterworth filter and also see the transfer function etc.

 

Nevertheless, this doesn't necessarily mean the signals will be synchronized or matched. To do so would require analysis of every delay caused by every particular element of your system.

 

Hope this helps, have a great day!

Zenon

 

Zenon Kuder
Applications Engineering
National Instruments
0 Kudos
Message 8 of 8
(3,840 Views)