Forums

Binary white noise signal

Started by pa1kumar July 5, 2007
Hi,

I am trying to generate a random binary white noise signal such that when
we take the auto spectrum of the signal it should roll of at 2Hz. I tried
to do that by PWM but wasn't close. I was wondering if there is any better
way to do this?

I want to use this signal as an input in other software where the time is
taken as a default milliseconds(ms) and the time step is 0.01ms. Is there
a way to make my output in matlab compatible with the other software.

Any help regarding this would be great.

Thanks 
Pavan


pa1kumar wrote:
> Hi, > > I am trying to generate a random binary white noise signal such that when > we take the auto spectrum of the signal it should roll of at 2Hz. I tried > to do that by PWM but wasn't close. I was wondering if there is any better > way to do this?
If the spectrum isn't flat, the noise isn't white. What do you really want?
> I want to use this signal as an input in other software where the time is > taken as a default milliseconds(ms) and the time step is 0.01ms. Is there > a way to make my output in matlab compatible with the other software.
Default? Step? what step? I don't get it. ... Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On Jul 5, 8:48 am, Jerry Avins <j...@ieee.org> wrote:
> pa1kumar wrote: > > Hi, > > > I am trying to generate a random binary white noise signal such that when > > we take the auto spectrum of the signal it should roll of at 2Hz. I tried > > to do that by PWM but wasn't close. I was wondering if there is any better > > way to do this? > > If the spectrum isn't flat, the noise isn't white. What do you really want? > > > I want to use this signal as an input in other software where the time is > > taken as a default milliseconds(ms) and the time step is 0.01ms. Is there > > a way to make my output in matlab compatible with the other software. > > Default? Step? what step? I don't get it. > > ... > > Jerry
Too many jargons in the initial post, Jerry ;-). I think what Pavan wants is a bandlimited signal that is white over some portion of its bandwidth, is this correct? Strictly speaking, it is not "white". To Pavan: What is PWM? You can make Matlab print out its variables in ASCII, but what other software do you want to use to read the output?
julius <juliusk@gmail.com> writes:
> [...] > Strictly speaking, it is not "white".
A digital signal can never be white anyway... -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
> julius <juliusk@gmail.com> writes: >> [...] >> Strictly speaking, it is not "white". > > A digital signal can never be white anyway...
If you're going to be picky then no signal can ever be white, since it would require infinite power. Paul
Paul Russell <prussell@sonic.net> writes:

> Randy Yates wrote: >> julius <juliusk@gmail.com> writes: >>> [...] >>> Strictly speaking, it is not "white". >> A digital signal can never be white anyway... > > If you're going to be picky then no signal can ever be white, since it > would require infinite power.
It can on paper. A digital signal can never be white, even on paper. -- % Randy Yates % "Rollin' and riding and slippin' and %% Fuquay-Varina, NC % sliding, it's magic." %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Living' Thing', *A New World Record*, ELO http://home.earthlink.net/~yatescr

Randy Yates wrote:

>>>A digital signal can never be white anyway... >> >>If you're going to be picky then no signal can ever be white, since it >>would require infinite power. > > > It can on paper. A digital signal can never be white, even on paper.
You mean the cyclostationarity? BTW, the sampling does not have to be regular. It can be random as well. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes:

> Randy Yates wrote: > >>>>A digital signal can never be white anyway... >>> >>>If you're going to be picky then no signal can ever be white, since it >>>would require infinite power. >> It can on paper. A digital signal can never be white, even on paper. > > You mean the cyclostationarity?
Yes.
> BTW, the sampling does not have to be > regular. It can be random as well.
Hmm - that hurts the gray matter. -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Randy Yates wrote:
> julius <juliusk@gmail.com> writes: >> [...] >> Strictly speaking, it is not "white". > > A digital signal can never be white anyway...
In a sampled-time system if each sample is independent from all the rest and the mean is zero, then the power spectral density of the sampled-time signal will be flat. Further, if your output is in the form of a train of dirac impulses taking on the weighting of the sampled signals then the spectrum in continuous time will be flat, also. I think it's entirely fair to describe such a signal as "white", as long as you make sure folks know that it's in sampled time. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
pa1kumar wrote:
> Hi, > > I am trying to generate a random binary white noise signal such that when > we take the auto spectrum of the signal it should roll of at 2Hz. I tried > to do that by PWM but wasn't close. I was wondering if there is any better > way to do this? > > I want to use this signal as an input in other software where the time is > taken as a default milliseconds(ms) and the time step is 0.01ms. Is there > a way to make my output in matlab compatible with the other software. > > Any help regarding this would be great. > > Thanks > Pavan > >
By "binary" I assume that you mean a sampled-time signal that can take on values of only -1 and 1, or perhaps 0 and 1. If this is so, your problem is to generate a train of 0's and 1's, evenly sampled, whose spectrum is flat (more or less) out to 2kHz and rolls off from there. Do I have that right? What is your sampling rate? Do you want the roll-off to be internal, i.e. do you just care about the spectrum of the binary signal, or do you want to convert this to continuous-time, and do you then care about the spectrum of the real-world signal? Do you want to take the sinc(f) shaping of the output (I assume you're thinking of using a zero-order hold for the output) into account? Do you want to take aliasing into account? This is a problem that could occupy one for some time -- you're mixing a nonlinear process (something that _must_ have a binary output) with a means of analysis (spectral) that is centered on linear systems. You're not going to get away from having to deal with the nonlinear system part of this, no matter how you try. I think I would start by investigating a sigma-delta converter sort of topology, with a loop that contains an integrator and a 1-bit modulator. I'd feed the thing with "white" binary data (by my definition, Randy), and I'd see if I could find a gain for the integrator that would give me joy. I'd start by playing with it in simulation just to see if it looks possible. Then if I _really_ had to know what the spectral characteristics of the output were, I'd try to come up with a closed-form solution for the autocorrelation function and get a spectrum (either closed-form or numerical) from that. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html