Forum Discussion
White Noise Spectrum
I have use a simple LFSR to generare random number to generate white noise. Set of random number are pass through to FFT(power in db vs freq). However, the freq response is increasing at low freq. Then only maintain roughly flat for higher freq. Is there any problem with increasing at low freq?
the white noise spectrum is attached. If yes may i know the reason? FYI, i have seen lot of white noise freq response is almost flat from low to high freq. Thanks20 Replies
- Altera_Forum
Honored Contributor
hi,
--- Quote Start --- However, the freq response is increasing at low freq. Then only maintain roughly flat for higher freq. Is there any problem with increasing at low freq? --- Quote End --- I'd assume, that the decreasing power of the spectrum at lower frequencies is common to all LFSR Generators. You may lower the frequency, where the non-flat part of the spectrum starts, by increasing the length of the LFSR. cheers, WK - Altera_Forum
Honored Contributor
hi WK, i have different set of length of LFSR. However, the spectrum doesn't change.
Is this a problem or normal when using the LFSR to generate random number? thanks - Altera_Forum
Honored Contributor
Moin,
--- Quote Start --- hi WK, i have different set of length of LFSR. However, the spectrum doesn't change. --- Quote End --- What are the different lengths? Are you sure, that the feedback is in a way, that the repetition rate gets minimal for each length? --- Quote Start --- Is this a problem or normal when using the LFSR to generate random number? --- Quote End --- This is higly depending on your application. Consider e.g. a LFSR with 8 bit length, which you'll use to obtain an 8 bit random number with each clk. Then the prediction of the next number based on the current number is pretty easy with a probability of 50% - that's of course a very bad random generator. But if you perform more clk cycles between sampling random numbers and you increase the length of the LFSR, quality of your random numbers will increase too. So it depends on your requirements of the random numbers, at which length the Generator will be sufficient. But of course it will never be a "real" random, regardless of the length. cheers, WK - Altera_Forum
Honored Contributor
Without telling the LFSR sequence and FFT length, the problem can't be discussed seriously. It's obvious however, that a LFSR can't generate frequency components below 1/T, where T is the sequence duration.
- Altera_Forum
Honored Contributor
if you'd rather see the tapering near the half sample rate, flip the sign of every other sample. in this case i think you'll have a DC offset.
- Altera_Forum
Honored Contributor
Previously attachment only take 1024 point for FFT.
I use the 16bit to generate the random numbers. So, it generates 65535 random number and it repeats. The attachment below i take 65535 point for FFT Even though use different set of length(bit), the power spectrum still increasing at low freq(curve going up) WK: Quote "you perform more clk cycles between sampling random numbers" I din get it. Can you explain more? thepancake: Quote "if you'd rather see the tapering near the half sample rate, flip the sign of every other sample. in this case i think you'll have a DC offset." I have no idea abt it. Can you explain in details? thanks a lot - Altera_Forum
Honored Contributor
Can you please clarify the power scaling of the FFT output? How you calculate a negative power? It appeared to me as a decreasing towards low frequencies.
Now it also looks to me also as a simple DC offset problem, produced by feeding unsigned (positive only) random numbers to the FFT. Of course, the input should be DC balanced. You can calculate the FFT of a constant input to understand the problem. - Altera_Forum
Honored Contributor
FvM,
1. The signed random data/32678(normalized) is feed to FFT. 2. Get the Magnitude of it 3. Absolute the Magnitude 4. Square it 5. 20* log 10 (Square Value) - attachement have a mistake Note: Should be 10*log 10 Any problem with this step above? - Altera_Forum
Honored Contributor
1. In other words, the normalized range is -1..+1, and the average should be around zero?
3. Magnitude, this is in my understanding sqrt(real² + imaginary²), should be already positive? 4+5. 20*log10(magnitude) should give the same result? --- Quote Start --- Any problem with this step above? --- Quote End --- None, except this: How do you get a result range of -360..-180, and why do you think, -360 is larger than -180 ("increasing")? - Altera_Forum
Honored Contributor
What do u mean by getting the -360 and -180?
the spectrum increases from -360 to -180. Obviously -180 is bigger than -360. Random no. generated by LFSR suppose to like this? i really cant figure out why? Any other method to generate white noise? thanks