error in PSD of bandpass delta sigma modulator through pwelch function

I simulated a low pass Delta sigma modulator in Simulink and calculated its signal to noise ratio through pwelch function and the results were OK but when I used the same code to simulate a bandpass DSM the PSD plot wasnt right. It had no quantization noise and only had tones across the spectrum. The code used was:
[y,f] = pwelch(dsm_out,w,N/4,N,fs);
semilogx(f*1024,10*log(y*fs/N),'b')
w is blackmann harris window , N is number of fft points, dsm_out is output from simulink model of DSM, fs is sampling freq.
Can anyone help me? thanks alot!!

Answers (1)

You don't have to scale the output of pwelch() as you have done here. (y*fs/N) that scaling is taken care of inside pwelch().
Also, why are you using semilogx? and multiplying the frequencies by 1024?
Because you have specified the sampling frequency inside pwelch(), the frequency vector should be fine as is.
[y,f] = pwelch(dsm_out,w,N/4,N,fs);
plot(f,10*log10(y));
Still given your description, it doesn't sound like the problem is in the Welch estimate. Sounds like the simulation of the process itself is more likely the culprit.

Asked:

on 7 Oct 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!