DSPRelated.com
Forums

Phase Noise and 1/f noise Generation

Started by ctao September 21, 2008
Hi everybody. I'm a new guy here. Nice to meet you all!

Recently I am working on Phase Noise generation in Matlab/Simulink. I
found so many topics here about phase noise or 1/f. One method that seems
useful to me is to pass the white noise through the 1/f shaped digital
filter. Here I will give the white noise generation and filter
implementation code followed by my problems.

%----------------------------------------------
%White Noise Generation

np = 2^16;  % number of samples to synthesize
n0=1e-20;   % white noise PSD
fs=2e6;     % sampling frequency
rms=sqrt(0.5*n0*fs);      % RMS of white noise
wnoise=rms*randn(1,np);   % generated white noise sequence
[p1,f]=pwelch(wnoise,[],[],[],fs,'onesided');    % white noise SSB PSD(in
V2/Hz) using Welch method,sampling frequency is 2Mhz
psd_wnoise=10*log10(p1);  % white noise SSB PSD (in dBc/Hz)
%----------------------------------------------

%----------------------------------------------
%Implementation of 1/f shaped Digtal Filter
% Reference: "A Procedure for Efficient Generation of 1/f^beta Noise
Sequences"
%http://www.springerlink.com/content/11w19001u31k25r1/fulltext.pdf
%(I think this is a good reference for such filter implementation.)

p=5;q=5; % Numerator and Denominator Order
c0=1;
L=1000;
fs=2e6;  % sampling frequency
Ts=1/fs;
alpha=0.5;   % alpha=beta/2, 1/(f^beta)
n=[1:L];
H=[(c0*Ts)^alpha,(Ts^alpha)*(n.^(alpha-1))/gamma(alpha)];
[b,a]=prony(H,q,p);   % get the Num. and Den. coeffeciency of filter 
pnoise=filter(b,a,wnoise);   % generated 1/f noise sequence
[p2,f]=pwelch(pnoise,[],[],[],fs,'onesided');  % 1/f noise SSB PSD(in
V2/Hz) using Welch method,sampling frequency is 2Mhz
psd_pnoise=10*log10(p2);  % 1/f noise SSB PSD (in dBc/Hz)
%----------------------------------------------

My question is:
1) Where should I set frequency offset and phase noise value in the code?
Because I found that the above filter code doesn't contain that
information.
2) Should the sampling frequency fs in the above two codes be the same?

Though I know that this topic has been discussed for many times here, I
really hope someone can help me on that.

Thanks a lot !
(My email: waosai@hotmail.com)


> 1) Where should I set frequency offset and phase noise value in the code? > Because I found that the above filter code doesn't contain that > information.
There should not be any frequency offset. The noise spectra should cover all the sampled spectrum (0-fs/2). The noise phase value is random, uniformly distributed betwee -pi/2 and pi/2. You should filter the white noise signal using the FILTFILT so that the IIR filter so that the filtered signal will have zero phase delay.
> 2) Should the sampling frequency fs in the above two codes be the same?
Yes
>> 1) Where should I set frequency offset and phase noise value in the
code?
>> Because I found that the above filter code doesn't contain that >> information. > >There should not be any frequency offset. The noise spectra should >cover all the sampled spectrum (0-fs/2). >The noise phase value is random, uniformly distributed betwee -pi/2 >and pi/2. >You should filter the white noise signal using the FILTFILT so that >the IIR filter so that the filtered signal will have zero phase delay. > > >> 2) Should the sampling frequency fs in the above two codes be the
same?
>Yes >
Thank you for your reply. But I am still confused about the question 1 because different application might have differen phase noise level. So where can I reflect this point in my modeling?
On Sep 22, 9:32&#4294967295;am, Ikaro <ikarosi...@hotmail.com> wrote:
> > 1) Where should I set frequency offset and phase noise value in the code? > > Because I found that the above filter code doesn't contain that > > information. > > There should not be any frequency offset. The noise spectra should > cover all the sampled spectrum (0-fs/2).
or, as much of that spectrum as possible/practical/necessary. you can filter white noise into pink with a 3-pole, 3-zero filter over 10 octaves from 0.0009*Nyquist to 0.9*Nyquist within +/- 0.3 dB error.
> The noise phase value is random, uniformly distributed betwee -pi/2 > and pi/2. > You should filter the white noise signal using the FILTFILT so that > the IIR filter so that the filtered signal will have zero phase delay.
not true at all. since the phase of the white noise signal going in is totally random, whatever phase that the filter adds to it does not matter. r b-j
> Thank you for your reply. But I am still confused about the question 1 > because different application might have differen phase noise level. So > where can I reflect this point in my modeling?
What do you mean by phase noise level? Can you give a specific example of an application that needs different phase noise levels?
> not true at all. &#4294967295;since the phase of the white noise signal going in > is totally random, whatever phase that the filter adds to it does not > matter.
You are right, whatever passes through the filter will also be random, however, I am not sure if the statistical properties of the phase will still be the same as that of the input...the FILTFILT method will yield a sufficient condition to maintain the statistical properties of the phase RV.
On Sep 24, 12:28&#4294967295;am, Ikaro <ikarosi...@hotmail.com> wrote:
> > not true at all. &#4294967295;since the phase of the white noise signal going in > > is totally random, whatever phase that the filter adds to it does not > > matter. > > You are right, whatever passes through the filter will also be random, > however, I am not sure if the statistical properties of the phase will > still be the same > as that of the input...the FILTFILT &#4294967295;method will yield a sufficient > condition to maintain the statistical properties of the phase RV.
i think we're talking about filtering white noise to become pink (or "1/f") noise, right? what *are* the statistical properties of the phase RV other than uniformly distributed between -pi and +pi (or any other contiguous segment of width 2*pi) and independent between samples? if you have an independent and uniform (between -pi and +pi) RV, add any number to the RV, and re-wrap it to be between -pi and +pi (adding any integer multiple of 2*pi to the phase changes it not), what, other than another RV that is uniformly distributed between -pi and +pi and independent of the other samples, will you get? r b-j