08-02-2009 02:38 PM
Hello all, I have simulated two sinusoidal speed signals. The first one switches between 8Hz or 800Hz. A fixed sampling rate of 8000Hz for both has been used and number of samples is 100000/8 and 100000/800 respectively. I run the VI and the output looks okay.
The second signal is a sweep sinusoidal signal similar to the first one only that the frequency ranges from 8Hz to 1000Hz unlike the first which only switches between 8Hz and 800Hz. I have trouble with the sampling info I think because from my VI, i have used the same sampling info from the fist signal which I think is the trouble.
With 8Hz frequency both signals are looking good but when I switch to 800Hz it distorts. My challenge is finding a suitable sampling rate that would maintain a smooth running signal for both signals because when I alter the sampling info, my first lovely looking waveform is distorted.
08-03-2009 12:27 AM
08-25-2009 09:10 AM
Hi Maxidivine
I have looked at your code and found that you are aliasing the signal you are trying to generate. When you select the frequency to 800 you are only generating 125 data points you must increase this to produce the correct signal can I suggest you determine the number of samples you want to have per period and multiply this by the frequency to give you the number of samples.
let me know if this helps
Philip
08-25-2009 11:24 AM
Philip.k wrote:Hi Maxidivine
I have looked at your code and found that you are aliasing the signal you are trying to generate. When you select the frequency to 800 you are only generating 125 data points you must increase this to produce the correct signal can I suggest you determine the number of samples you want to have per period and multiply this by the frequency to give you the number of samples.
let me know if this helps
Philip
Awesome. Nice job!
08-29-2009 04:32 AM
08-01-2012 07:56 AM
Hello all,
I simulate the generation of sin and cos signals with amplitude, frequency and phase entries. But while running the VI , I observed that changing the phase input on the Front panel didn't affect the signal plot, I need to stop the while loop to change takes place on the curve plot. I wonder why.
Thanks in advance for your responses
08-01-2012 08:21 AM - edited 08-01-2012 08:23 AM
You really should be opening a new thread as your issue has nothing to due with the problem of 3 years ago.
That said, those VIs have a "reset signal" input. Try wiring a TRUE to those inputs. Digging into the VI, you can see that the phase is ignored unless the reset signal is set to true.
08-01-2012 09:00 AM
Thank you, that works with the true value added at the reset input, but the signal stopped waving !
By the way I need to write data in the file but I need it to stop writing at a precise time, how doing it ?
Thanks.
05-29-2016 06:03 PM
please what is the relation between number of samples and sampling rate?
and how can we choose a suitable value of sampling rate?
05-29-2016 06:44 PM