04-26-2011 09:03 AM
Hi,
The simplest filter that can be built is a Moving Average Filter (FIR with equal coefficients = 1/N, N=filter order). You have an example in the attachment.
For building other filters you have to:
- search on internet for sites which have applets for filter coefficient computing. You have to choose filter type (IIR, FIR), characteristic (low pass, band pass..) and frequencies (Fc, Fs ..) and you'll get the coefficients
- implement the filter using one (for IIR) or two (for IIR) shift register. A shift register is an array which is shifted after each sample (FIFO).
Paul
04-26-2011 10:25 AM
Thanks Lynn,
I dont know exactly what you mean by smoothing technique. It would be great if you could give me some example.
Thanks.
04-26-2011 10:30 AM
Thanks Paul,
Unfortunately I cannot open this file. My labview is 2009.
04-26-2011 10:46 AM
Now it should work also under 9.0
04-26-2011 10:49 AM
Yeah. It works.
Thanks Paul.
04-26-2011 11:01 AM
I am trying to figure out how it works. So what is the cut-off frequency of this filter? and how can I see the output in a graphical indicator (it doesn't give me the option)? I know some of my questions may look primitive, but I am new to labview.
04-26-2011 11:06 AM
Asking questions is how you learn. We were all new to LV once.
04-26-2011 11:09 AM
Oh, Thanks. That was encouraging.
04-26-2011 11:16 AM
Baran,
On this topic you are all by yourself. There is nothing that LabView can help you with filters, especially if you have the the basic version.
For digital filters, the cutting frequency is strong related to the sampling frequency. Using the same filter at different sampling frequency you'll get different cutting frequency. The Moving Average Filter is far away of being the best choice but it's ok, and works for most of the cases where advance signal analyze is not required.
You have to search on internet some Digital Filter basics. Building a Digital Filter is easy, you need to add, multiply some value and to shift some samples.You just need to understand some basics.
You can use the VI as a subvi and to connect to input (Array Input) a Sine + Noise and to add at output a Graph.
Paul
04-26-2011 11:33 AM
I found out how to have a graphical indicator, just replaced it in front panel. But I am still wondering why in block diagram it doesn't give me the option to have a graphical indicator!
anyway, thanks. I guess I got it now. just one last thing. You said I can use it as subVI in other VIs. Is it a way I can group them together and save them for future use (like functions), or I just can copy/paste them anytime I need to use.
Thanks again.