[From Richard Kennaway (2007.01.15.1311 GMT)]
There is no part 4.
-- Richard Kennaway
[From Richard Kennaway (2007.01.15.1311 GMT)]
There is no part 4.
-- Richard Kennaway
[From Rick Marken (2007.01.15.0820)]
[From Richard Kennaway (2007.01.15.1311 GMT)]
There is no part 4.
-- Richard Kennaway
Thanks Richard. I've actually used that method to generate random disturbances. The only reason I didn't use it is for "continuity" reasons; if I use a noise vector then when I loop around to the beginning there will be an abrupt change and if I just cycle back through there is still a high frequency spike when the change occurs.
But I think random disturbances are the way to go so I'll try to incorporate them into all my demos.
Best
Rick
On Monday, January 15, 2007, at 05:12 AM, Richard Kennaway wrote:
Richard S. Marken Consulting
marken@mindreadings.com
Home 310 474-0313
Cell 310 729-1400
[From Richard Kennaway (2007.01.15.1644 GMT)]
[From Rick Marken (2007.01.15.0820)]
[From Richard Kennaway (2007.01.15.1311 GMT)]
There is no part 4.
-- Richard Kennaway
Thanks Richard. I've actually used that method to generate random disturbances. The only reason I didn't use it is for "continuity" reasons; if I use a noise vector then when I loop around to the beginning there will be an abrupt change and if I just cycle back through there is still a high frequency spike when the change occurs.
Why loop round to the beginning? You can just generate an indefinitely long stream of random numbers.
If an experiment requires a precomputed finite loop, you can generate a finite sequence of independent random numbers, then apply the smoothing that I described, using an alternative definition of y as an infinite (or large enough) weighted sum of the x's, instead of a combination of the current x and the previous y. This will give a finite loop of smoothed random numbers with no glitches.
--
Richard Kennaway
[From Rick Marken (2007.01.15.0950)]
Richard Kennaway (2007.01.15.1644 GMT)
Why loop round to the beginning? You can just generate an indefinitely long stream of random numbers.
Yes, of course! Thanks.
Best
Rick
---
Richard S. Marken Consulting
marken@mindreadings.com
Home 310 474-0313
Cell 310 729-1400
[Martin Taylor 2007.01.15.12.50]
[From Richard Kennaway (2007.01.15.1644 GMT)]
[From Rick Marken (2007.01.15.0820)]
[From Richard Kennaway (2007.01.15.1311 GMT)]
There is no part 4.
-- Richard Kennaway
Thanks Richard. I've actually used that method to generate random disturbances. The only reason I didn't use it is for "continuity" reasons; if I use a noise vector then when I loop around to the beginning there will be an abrupt change and if I just cycle back through there is still a high frequency spike when the change occurs.
Why loop round to the beginning? You can just generate an indefinitely long stream of random numbers.
If an experiment requires a precomputed finite loop, you can generate a finite sequence of independent random numbers, then apply the smoothing that I described, using an alternative definition of y as an infinite (or large enough) weighted sum of the x's, instead of a combination of the current x and the previous y. This will give a finite loop of smoothed random numbers with no glitches.
Or you can create a waveform with a controlled spectrum (which could be random, flat, pink, or whatever) by using the random numbers to control the magnitudes of sinusoidal components and adding their sample values to get your time samples. You have a bit more control that way, especially useful if you suspect there might be effects of transport lags in the control loops.
If your signal is looping over a period T seconds, your fundamental frequency is 1/T Hz. Suppose you want to create a signal that is band-limited white noise, with bandwidth W, then generate two random numbers from a zero-centred gaussian distribution for each frequency k/T for k = 1 up to k/T = W. (That's easy in most development environments). Use these to set the amplitudes of a zero-phase sine and cosine at each frequency. You can compute the value of the sines and the cosines at any sample moments you like. Add them across all the sines and cosines at all frequencies, and you have your white noise waveform. If you want a flat spectrum, choose the values this way, but scale them at each frequency so that the sum of the squares of the two scaled numbers is unity (or whatever fixed value you like). If you want a shaped spectrum, do the same, but adjust the scaling value so that it's what you want for each frequency.
It's computationally more complicated than Richard's method, but gives you more control. Once set up as an algorithm, you can use it easily, to you heart's content.
Martin