07-26-2017 03:37 AM
Hi guys,
I generated two singals, their frequencies are 1HZ and 10HZ. The amplitude of the two signals is 1 . Now I want to remove the 10HZ signal, and I choose the FIR Windowed Filter PtByPt.vi .The result was not so ideally, the assigned value of the filtered signal should be 1, but it wasn't . What's wrong ? Can you help me? Thanks in advance.
07-26-2017 03:48 AM - edited 07-26-2017 03:49 AM
07-26-2017 04:05 AM
UdpRevLV.vi is my main vi, used to receive datas from MFC.
The X scale is signal's period. ((Hint: Why does the time scale/ x axis change by filtering the signal?) I don't understand your hint)
The correct result is : Filtered signal' amplitude should be 1, at least close to 1. But mine is not 1.
07-26-2017 05:19 AM
I'm not familiar with the data you're getting, but try different values for the low cutoff. Surely this should be between 1-10, not 0.0002? Is the sample rate correct at 10000? These probably have the most impact on the filtered data.
Also, you can replace all your logic for the valid data with an "Add Array Elements" function, the output of which you can just wire to your case structure.
Also, it looks like you are trying to process all the data 4 bytes at a time, however you request a new data packet each time via UDP. Is this what you want to do?
Should you have a stop button for the loop condition? Instead of wiring a false constant to it?
07-26-2017 05:42 AM
I have changed the values of the low cutoff. And the situation seems turned correct. What is the mean of low cutoff? Or what's the relationship with sample rate? I set the low cutoff frequency equal to 0.0002, because I see it as normalized frequency .(2 divided by 10000, that is my reason.)
My sample rate is 10000, I am sure. I use a timer send datas to my VI every 10ms one time, every time send 100 numbers.
Thank u for your attention ,I will add a stop button in my while loop.