0
$\begingroup$

I am simulating a 3rd order SDM and I want to plot the PSD of the output.

As you may know, the output is a sequence of pulses ranging from -3 to +4. The number of samples is $N$.

The way I approached the problem is the following:

  1. Use fft on the output sequence
  2. normalize (divide by $N$)
  3. Square the above signal.
  4. multiply by 2 ( because I need the one-sided band -- not sure about this ).

The plot should then be $10\log_{10}(signal)$ if I am not mistaken.

Problem is that I get a big deviation from the ideal curve of the expected noise.

Am I doing something wrong?

$\endgroup$
  • $\begingroup$ How is it deviating? What software are you using? Might be a good idea to try a built-in PSD estimate if one is available, and then use that to check your own implementation... $\endgroup$ – Arnfinn Mar 8 '17 at 11:39
  • $\begingroup$ You approach to getting the PSD sounds correct. The squaring should be a complex conjugate multiplication which you may be doing. "As you may know": I did not know that the output HAD to be -3 to +4, This sounds like a 3rd order SDM with a 3 bit output quantizer. However I believe you could also implement a 3rd order SDM with other quantizer down to even 1 bit. I mention this in case there was confusion with the output levels and order; order refers to the number of integrations (accumulators) in the SDM. If you give your actual and expected results we may be able to provide more insight. $\endgroup$ – Dan Boschen Mar 8 '17 at 12:06
  • $\begingroup$ @Arnfinn I am using Scilab for the implementation of the system and the PSD plot. My curves are deviating from the curves shown in a paper , which should be the correct ones. Unfortunately, the only built-in function in Scilab is a periodogram() ( Matlab ) like function which is not functioning properly $\endgroup$ – NikosTS Mar 8 '17 at 12:48
  • $\begingroup$ @DanBoschen I didn't clear that up , you are right. The modulator is in MASH topology ( 3 cascaded 1st order modulators ) and every loop has an 1bit quantizer. As far as the expected results are concerned : According to the paper I am reading, the maximum deviation between the ideal curve and the PSD of the outputs of the modulator should should be around 8 dB. $\endgroup$ – NikosTS Mar 8 '17 at 12:51
  • $\begingroup$ @DanBoschen Argh, i passed the time limit of editing. Anyway, in the model i implemented ( in Scilab ) , that maximum deviation is around 12 dB. I am pretty sure the model is functioning properly , as i get the expected noise shaping and fractional output. So i though it must be a problem of PSD computation. $\endgroup$ – NikosTS Mar 8 '17 at 12:58
0
$\begingroup$

Everything you have written sounds correct so I assume you forgot to consider the BW for each FFT bin and are comparing to an expected spectral density that is per Hz. Without windowing or zero padding the BW in each bin will be 1/T where T is the time length of your signal (so in other words 1 bin wide). Therefore you want to reduce the total power measured in each bin by 10Log(1/T) to get the equivalent power per Hz spectral density.

If you are using windows you can refer to fred harris' classis paper on windowing for the Equivalent Noise BW of all common bins as well as windowing implementation loss for an accurate computation.

https://www.utdallas.edu/~cpb021000/EE%204361/Great%20DSP%20Papers/Harris%20on%20Windows.pdf

$\endgroup$
  • $\begingroup$ Remembering something i read a while back , someone suggested to subtract 10*log(binWidth) from the final plot , where binWidth=Sampling_frequency/Signal_Period. Is that what you are suggesting as well, if I am not misunderstanding? PS: Doing the above said, i get pretty close to the expected curve (~ 0.8 dB difference only) Thank you $\endgroup$ – NikosTS Mar 8 '17 at 13:52
  • $\begingroup$ Yes absolutely.Each FFT bin is a filter with a bandwidth of 1 bin. If a bin is 100 Hz wide, and your noise is a densitiy of 1mW/Hz, then you will have a total of 100 mW in that bin, (20 dB higher). Therefore to convert what you measure with the FFT to a noise density (meaning power per Hz) you need to subtract 10Log(BW) where BW is the width of each bin (which is Fs/N). If you don't window it is this straight forward; any windowing will widen the noise BW of each bin, but will also have a processing loss. Refer to the paper in my link. $\endgroup$ – Dan Boschen Mar 8 '17 at 14:07
  • $\begingroup$ I am not using any windows, so i guess that's all i need! ( thank you for the paper though). Thank you for your help! $\endgroup$ – NikosTS Mar 8 '17 at 14:11
  • $\begingroup$ Since you mentioned a small residual error of 0.8 dB I also want to mention to be careful that you are not using an approach that is squaring the average instead of averaging the square; squaring the average of AWGN will consistently under-measure the true variance by -1.05 dB. $\endgroup$ – Dan Boschen Mar 8 '17 at 14:16
  • $\begingroup$ Well, that should put my curve (almost) exactly on the one expected, right? $\endgroup$ – NikosTS Mar 8 '17 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.