Page 1 of 1

Explicit Stock-Flow Structure of the Pink Noise

Posted: Fri Mar 08, 2024 2:01 pm
by kleemax
I would like to know the explicit structure of the built-in Vensim function "RANDOM PINK NOISE" I am aware that it must be some form of stock-adjustment structure to build in the autocorrelation. But it seems to be different from the versions that Sterman has in its appendix to his textbook.
I have read the help information on the function, but could not quite make sense of it. It talks about a version by Ed Anderson and also about an article by Richardson and Pugh 1981. It might be helpful for me to know which two articles are meant here.

Re: Explicit Stock-Flow Structure of the Pink Noise

Posted: Fri Mar 08, 2024 2:08 pm
by Administrator
It comes from Tom's blog, but I think there was a slight modification before we put it directly into Vensim.

https://metasd.com/2010/03/pink-noise/

Code: Select all

:MACRO: RANDOM PINK NOISE(mean, std deviation, correlation time, seed)
RANDOM PINK NOISE = INTEG(updating pink noise,mean+std deviation*RANDOM NORMAL(-6,6,0,1,seed)) 
~ mean 
~ |

updating pink noise = (scaled white noise-RANDOM PINK NOISE)/correlation time 
~ mean/correlation time
~
|
scaled white noise =mean+white noise*std deviation*SQRT((2-time step$/correlation time)/(time step$/correlation time))
~ mean 
~ |

white noise = RANDOM NORMAL(-6,6,0,1,seed)
~ dmnl
~ |
:END OF MACRO: