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.

Wide band 60 Hz noise with random amplitude

Status
Not open for further replies.

nakul8873

Newbie level 4
Joined
Apr 26, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
USA
Activity points
1,328
I have to generate wideband noise of 60 hz with random amplitude. I have to implement this in C#. I dont have any idea about wideband noise, so any relevant material would be a help.
 

I'm not sure what you mean by "wideband noise of 60 Hz"? Random amplitude is OK, since noise is by definition uncorrelated, random values.

Wideband noise is nice and simple to generate - a series of (really, i.e. unbiassed) random numbers, uniformly distributed over some interval with zero mean will satisfy the requirement of being spectrally "white" - that is, having an (approximately) uniform power spectral density. The "bandwidth" of the noise you thus generate is determined by your (arbitrarily) nominated sampling frequency.

For example, if you define a sequence of zero-mean random numbers like:

-0.2014 0.4391 -0.4371 0.1042 -0.3255 0.3500 -0.3209 0.0138 0.5109 -0.1330

...and declare them to represent samples taken at 1 ms intervals (i.e. Fs = 1 kHz), then you have just "generated" white noise over a bandwidth of 500 Hz (=Fs/2)!

"Real world" white noise is generally Gaussian distributed in nature, i.e. values closer to the mean (zero) are more probable than higher values, and this is called "Gaussian white noise". I'd recommend Chapter 7 of the (excellent) book: "Numerical Recipes in C" as a good starting point for theory and source code.

If you're after noise with a 60 Hz tone buried in it, simply add a sinusoid of 60 Hz to the white noise generated in accordance with the above. Starting with your (nominated) sampling frequency Fs, add to each sample:

w*sin(2*pi*60*n/Fs); where w = the desired amplitude weighting, and n = the sample number.
 

Thanks for your reply.

Basically I want a noise signal which is centered at 60 hz. I have generated a white noise using "randn" function now I want to implement a band pass filter centered at 60 hz, I don't know how to implement it in "octave".


Thank you.
 

I don't know about octave, in Matlab you can do something like this:
Code:
Fs = 1000;
t = 0:1/Fs:100;


white_noise = randn(size(t));


[b,a] = butter(8, 10*2/Fs)     % low-pass 10 Hz filter
x = filter(b, a, white_noise);  % band limited noise
x = x.*sin(2*pi*60*t);          % modulation to 60Hz +/- 10 Hz


Hs=spectrum.periodogram;
psd(Hs, x, 'Fs', Fs)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top