hhq414
Member level 1
Hi all,
When I use simulink to simulate a MASH111 SDM for pll, the output are digital for example ...-2,-1,0,1,2,3..., and I want to convert this value to output quantization noise. The code I used to do convertion is as follow:
Fref=1e6
NFFT=8096
SIMOUTave=mean(simout)
y=(simout(1:NFFT)-SIMOUTave).*hanning(NFFT);
Y=fft(y,NFFT)/NFFT;
pyy=Y.*conj(Y);
f = Fref/2*linspace(0,1,NFFT/2+1);
semilogx(f,10*log10(pyy(1:1:NFFT/2+1)));
axis([100 1e6 -250 -90]);
xlabel('frequency');
ylabel('quantization noise')
grid on
And the result is also attached. The blue line represent what I get using the above code, and the red line is by direct calculation(attached).But there is a great differece in power. Is anyone know what is wrong with the above code?
When I use simulink to simulate a MASH111 SDM for pll, the output are digital for example ...-2,-1,0,1,2,3..., and I want to convert this value to output quantization noise. The code I used to do convertion is as follow:
Fref=1e6
NFFT=8096
SIMOUTave=mean(simout)
y=(simout(1:NFFT)-SIMOUTave).*hanning(NFFT);
Y=fft(y,NFFT)/NFFT;
pyy=Y.*conj(Y);
f = Fref/2*linspace(0,1,NFFT/2+1);
semilogx(f,10*log10(pyy(1:1:NFFT/2+1)));
axis([100 1e6 -250 -90]);
xlabel('frequency');
ylabel('quantization noise')
grid on
And the result is also attached. The blue line represent what I get using the above code, and the red line is by direct calculation(attached).But there is a great differece in power. Is anyone know what is wrong with the above code?