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
--- Quote Start --- the freq response is increasing at low freq --- Quote End --- Apparently I misunderstood your post, as others did, too. I would describe it as decreasing at respectively towards low frequencies. This had been my first understanding, thus I asked about the sequence length. This behaviour could be surely expected, if the sequence length is shorter than the FFT length, because the sequence would be repeated in this case. The other point is, that -180 dB seems to be an absurd low noise power. But it's no problem to me, as long as the spectrum is correct. My assumption has been, that LFSR generated pseudo random noise would be "white" downto f=1/sequence_duration. But this may be wrong. Matlab, Octave, or what ever you're using to process the data should be able to generate LFSR pseudo random noise as with variable sequence length, so you can check the spectra empirically. - Altera_Forum
Honored Contributor
the no of random number generated is same as the number i feed to FFT.
Regarding the -180dB, actually is -90, due to 20log Mag after square. I have use matlab to generate the white noise and plot into freq domain(FFT). It is totally flat. That make me wonder is the white noise i generated is wrong(decreasing)? i have no idea how to justify it. Even though it is not flat, but is not decreasing... dizzy.... - Altera_Forum
Honored Contributor
O.K. I took as granted, that you are using a maximum length LFSR. Apparently it's not the case. Read about primitive polynomials that
generate maximum length sequences, e.g. in:http://en.wikipedia.org/wiki/lfsr Altera has a LFSR generator in the DDR2 IP test design, you'll also find various HDL code eamples on the internet. - Altera_Forum
Honored Contributor
--- Quote Start --- 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 --- Quote End --- you can invert the spectrum by multiplying every other output sample by -1. for example if your ouputs are 1, 2, 3, 4 you will get 1, -2, 3, -4, then _|\/|_ turns into /|__| which would make your spectrum taper off near fs/2 rather than near DC. - Altera_Forum
Honored Contributor
Yes, but it can't increase the sequence length which is apparently too short due to an unsuitable generator polynomial or a coding error.
- Altera_Forum
Honored Contributor
well its a work around. :)
i've run into this before. i don't think i went through the work of finding a maximum length sequence as I just needed some audio dither. - Altera_Forum
Honored Contributor
A LFSR sequence, that is not maximum length will most likely have other unwanted properties. It surely won't use all possible output codings and may have irregular frequency or amplitude density distribution. Actually is much more easy to generate a maximum length sequence than any other specified behaviour.
- Altera_Forum
Honored Contributor
i wrote a maximum length 16 tap Fibonacci LFSR, ran 65536 iterations and at DC the output is ~5dB higher than at fs/4 where it is relatively flat until fs/2. i'm using a rectangular window but i don't think that's the issue.
- Altera_Forum
Honored Contributor
...hmmm i ran my simulation again and it looks beautiful. user error. :D