Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

generate pink noise using Voss-McCartney algorithm

Status
Not open for further replies.

woeichee

Newbie level 5
Newbie level 5
Joined
Jan 17, 2010
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Malaysia
Activity points
1,348
Pink Noise

Hi. I am trying to generate pink noise using Voss-McCartney algorithm.

The way how i generate 1st row noise:
1. Call a random function
2. Update the output every 2 cycle. (e.g. 3,3, 57, 57, 100, 100...)
3. 1048576 samples was used in FFT

The fft output as attached:

The problem is:
1. I din get the ripple at high frequency as shown in https://www.firstpr.com.au/dsp/pink-noise/allan-2/spectrum2.html


Any problem with the flow above?

Thanks
 

Re: Pink Noise

Hi woeichee,

The spectrum you obtained is essentially the same as in the reference (https://www.firstpr.com.au/dsp/pink-noise/allan-2/spectrum2.html) for the Row 1. It looks different for these reasons:

1) Your spectrum goes from 0 to the Nyquist frequency (i.e. from bin 0 to 512K in your scale), while the reference shows the complete fft (up to the sampling frequency, i.e. 2*pi). So, the fall at the end of your plot is the notch at half the frequency in the reference (pi). Note that the normalizations (horizontal scale) are different in your plot and in the reference.

2) Your plot is linear in the hirizontal (frequency) axis while in the reference is log, so compressed in the right part and expanded in the left part.

3) In the reference is theoretical (smooth) while yours is an estimation from a single realization without averaging (fat yellow band).

With more rows it should look more "pink". Use log frequency scale for see it.
Regards

Z
 

From my understanding, there is no way to plot more than half sampling frequency. Besides, any freq above nyquist freq will be having a mirror of signal, right? Why there is a ripple instead of mirror image?

May i know how to plot more than half sampling frequency? So that i can see the ripple.

Besides, what is the ohm in horizontal scale represent?

thanks a lot
 

Hi woeichee,

woeichee said:
From my understanding, there is no way to plot more than half sampling frequency. Besides, any freq above nyquist freq will be having a mirror of signal, right?
Discrete (or Fast) Fourier Transforms calculates values for frequencies ranging from 0 to Fsampling (or alternatively from -Fsampling/2 to Fsampling/2).
It is true that for real signals the spectrum has simmetry around frequency 0 or Fsampling/2 (and then only one half is sufficient), but this is not the case for complex signals.


woeichee said:
Why there is a ripple instead of mirror image?
Please tell which figure are you speaking of.


woeichee said:
May i know how to plot more than half sampling frequency? So that i can see the ripple.
That depends of the application you use for the plot. There sould be a way to calculate and represent the whole spectrum.


woeichee said:
Besides, what is the ohm in horizontal scale represent?
"Omega" represents normalized angular frequency, measured in radians per sample. Nyquist frequency corresponds to Ω=pi; sampling frequency corresponds to Ω=2*pi.


woeichee said:
thanks a lot
You're welcome

Regards

Z
 

but this is not the case for complex signals.
How to determine a signal is complex signal or real signal? From my point of view, every value of each row generated by random function is real. So, it should be the real signal. May i know why you call it complex signal? Is it relates to the euler identity? Pls elaborate in details.


Please tell which figure are you speaking of.
In the case of complex signal, then what i ask is not valid d.



That depends of the application you use for the plot. There should be a way to calculate and represent the whole spectrum.
Can you suggest me a reference to me? so, that i can try to plot a graph that more than Nyquist frequency.


"Omega" represents normalized angular frequency, measured in radians per sample. Nyquist frequency corresponds to Ω=pi; sampling frequency corresponds to Ω=2*pi.
Since Ω=2*pi, why the graph shown in that website can plot unitl 10&#937?
If plot more than 2*pi, doesn't it will show the repeating signal?

I am just a beginner. So, pls tolerate if i ask a silly question... thx
 

woeichee said:
but this is not the case for complex signals.
How to determine a signal is complex signal or real signal? From my point of view, every value of each row generated by random function is real. So, it should be the real signal. May i know why you call it complex signal? Is it relates to the euler identity? Pls elaborate in details.
You are generating real signals, but you could generate complex as well with real and imaginary parts. Compex signals are used a lot in communications (I and Q components in modulation-demodulation, etc.) and signal processing. Look in communications and signal processing books.


woeichee said:
That depends of the application you use for the plot. There should be a way to calculate and represent the whole spectrum.
Can you suggest me a reference to me? so, that i can try to plot a graph that more than Nyquist frequency.
For example, fft functions in Matlab computes the whole spectrum. What program are using you?


woeichee said:
"Omega" represents normalized angular frequency, measured in radians per sample. Nyquist frequency corresponds to Ω=pi; sampling frequency corresponds to Ω=2*pi.
Since Ω=2*pi, why the graph shown in that website can plot unitl 10Ω?
If plot more than 2*pi, doesn't it will show the repeating signal?
The axis goes until 10 because it is in log scale and covers whole decades, but the plot stops at Ω=2*pi (6.28...).

Regards

Z
 

You are generating real signals, but you could generate complex as well with real and imaginary parts.

Basically, you are talking the pink noise plotted on that website is generated by complex signal, since you mention that the spectrum i attached is limited by Nyquist frequency. Am i right? if that is the case, how to generate a random number with imaginary part? Is it using a 2 random function: one as real part and another one is imaginary part?


For example, fft functions in Matlab computes the whole spectrum. What program are using you?
I am using Agilent VEE. e.g Perform 1024 point fft will generate 513 point (real and imaginary)
 

Hi woeichee,

woeichee said:
You are generating real signals, but you could generate complex as well with real and imaginary parts.

Basically, you are talking the pink noise plotted on that website is generated by complex signal, since you mention that the spectrum i attached is limited by Nyquist frequency. Am i right?
No. I intended to answer this question:
Besides, any freq above nyquist freq will be having a mirror of signal, right?
telling that Fourier Transforms of complex signals don't have that symmetry. Signal of the website seems to be real; its spectrum looks symmetrical.


woeichee said:
if that is the case, how to generate a random number with imaginary part? Is it using a 2 random function: one as real part and another one is imaginary part?
Yes.


woeichee said:
I am using Agilent VEE. e.g Perform 1024 point fft will generate 513 point (real and imaginary)
I don't know if it has an option for generate the whole spectrum. You have the spectrum from 0 up to Fsamp/2 for a real signal. This is OK for real signals. So, your spectra will look like the first half of those of the website. If you want to reproduce the figures of the website, you need the whole spectrum.

Regards

Z
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top