LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

smooth a point-by-point sinus

Hello everybody,

I have a problem of sampling. I use labview 8.5 and a compactrio. In my application, I have to give a low frequency sinus point by point at the output of the module NI 9263. The output must control an loudspeaker. But in the compactrio target, I have a loop that run at 2ms, so I transmit a point every 2 ms on the fpga and then at the output. The problem is that my output sinus is not enough precisely sampled. So when I try to send my signal to the loudspeaker, I have a high frequency du to the steps of the sampled sinus. So, how can I smooth my sinus at the ouptut for not hearing any more this unwanted high frequency?

I thought of a lowpass filter on the fpga, but is it possible?

Thanks for your answer
0 Kudos
Message 1 of 2
(2,639 Views)
Hello,

The problem is that at the output of the module NI 9263, your sinus doesn't look like to a sinus any more, but it's more a quantified signal. The best you can do is to oversample your signal by 2, by adding a point in middle of 2 points, more exactely by interpolating your signal.
You could do that either by adding a shift register in your while loop, or you can directly use a VI function "linear interpolation" in FPGA Math & Analysis -> Utilities
This should eliminate the high frequency and as a consequence the noise in your loudspeaker.

Best Regards,


Laurent
NI Switzerland
0 Kudos
Message 2 of 2
(2,587 Views)