12-06-2017 08:43 AM
Hi,
I'm trying to generate a signal which would represent the torque curve of a cyclist. To be as close as possible from the real torque curve, I need to add random low frequency noise to my sine. I've managed to add noise to my signal but I can't change the frequency (which is very high...). Anyone got an idea how should I proceed?
I add my vi which generate the signal
Here is an example of pedaling curve :
Thanks for your help
12-06-2017 08:55 AM
You could add a low pass filter to the noise and then add the real signal.
12-07-2017 09:49 AM
Do you have an idea about the frequency content of interest? If it is something like bicycling data, I'm guessing noise might be frequencies in the range of 2-20 Hz. I also assume you are sampling at some frequency, let's assume 100 Hz. So you could do the following:
Bob Schor
P.S. -- I've used a variant on this idea to build a "Sum-of-Sines" stimulus that, several decades ago when computers were a little slower, had no problems producing "random-like" (meaning "unpredictable") smooth stimuli.
12-07-2017 10:31 AM
Hi Bob,
Thanks for your answere, but you seems to be way more advanced than me in this domain. Could you try to explain your solution a bit more or eventually send me a .vi example?
Tkanks for the help.
Robin
12-08-2017 07:41 AM
Assume you are sampling a signal at 100 Hz, you think most of the "signal" is around 1 Hz, and you want to add some low-frequency "noise". What is "noise"? One definition could be an unpredictable signal, one that you don't want.
Let's say our Signal of Interest (here called "Signal") is 5 sin (2 pi 1 t) (amplitude 5, frequency 1 Hz). Consider the following Signal + Noise:
Signal + 1.2 sin (2 pi 5.36 t + 1.2) + 1.4 sin (2 pi 7.34 t + 0.3) + 0.9 sin (2 pi 9.24 t - 0.45).
There are three other sinusoids mixed in, with low amplitude, frequencies between 5 and 10 Hz (so low frequency), random phases (so they don't start "in sync"), and the frequencies are not multiples of each other (so the sum never repeats). So the sum represents Signal + noise. But what is "t"? Time starts at 0, and increments by 0.01 each sample (since you are sampling at 100 Hz). You should be able to code this in LabVIEW. In my earlier description, I had noise amplitude, frequency, and phase all "semi-randomly" chosen -- here, I just picked constants for illustration.
I wrote a simple VI to generate 10 seconds of such a signal. Since I was generating it to produce the picture below, I generated all 10 seconds of Signal and Noise using the Sinusoid Waveform Generator, but it would be equally simple to generate it in a point-by-point manner using the technique I discussed in my earlier response.
So here is the waveform I "made up" earlier. The White Trace is Signal, the Red is Signal + Noise. Note that (a) the Noise is "low frequency", (b) is "non-repeating" (hence arguably "random", even though we know it is strictly deterministic), and (c) easily generated.
Of course, just as I finished this and pasted the graph, I started thinking about other methods of generating low frequency noise (basically using the Low Pass Filter idea already mentioned). I'll need to play with this a bit more ...
Bob Schor
12-08-2017 07:56 AM
Thanks for the help! I will work a bit more on this solution but it is really close from the final result I'm looking for.
I will keep you update.
Thanks a lot!