The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> problem of delta sigma modulator simulation https://designers-guide.org/forum/YaBB.pl?num=1186491430 Message started by zhujun134 on Aug 7th, 2007, 5:57am |
Title: problem of delta sigma modulator simulation Post by zhujun134 on Aug 7th, 2007, 5:57am hi,everyone I am designing a 5 CIFF delat sigma modulator,and i meet some problem when i go to simulation of circuit.There is my simulation situation: input signal:sinusoidal signal:magnitude:1V,frequency:9.46KHZ;samoling clock:2.5MHz;Vdd=5V.and the circuit is full deffrential construction. i do the spectrum analysis to the output in candence.in the psd window,i set the time from 50.2u to 3327u,the sampling number is 8192;it just 31 cycles of input signal. the hanning window number is also 8192;then i got a good result of psd. but i got a bad result when i exported to matlab,i used the same spectrum analysis situation:i used the fuction of calcSNR in matlab.it is as follow: function [snrdB,ptotdB,psigdB,pnoisedB] = calcSNR(vout,f,fBL,fBH,w,N) fBL=ceil(fBL);% fBL: Base-band lower limit frequency bins fBH=ceil(fBH);% fBH: Base-band upper limit frequency bins signal=(N/sum(w))*sinusx(vout(1:N).*w,f,N); % Extracts sinusoidal signal noise=vout(1:N)-signal; % Extracts noise components stot=((abs(fft((vout(1:N).*w)'))).^2); % Bitstream PSD ssignal=(abs(fft((signal(1:N).*w)'))).^2; % Signal PSD snoise=(abs(fft((noise(1:N).*w)'))).^2; % Noise PSD pwsignal=sum(ssignal(fBL:fBH)); % Signal power pwnoise=sum(snoise(fBL:fBH)); % Noise power snr=pwsignal/pwnoise; snrdB=dbp(snr); norm=sum(stot(1:N/2))/sum(vout(1:N).^2)*N; % PSD normalization if nargout > 1 ptot=stot/norm; ptotdB=dbp(ptot); end if nargout > 2 psig=ssignal/norm; psigdB=dbp(psig); end if nargout > 3 pnoise=snoise/norm; pnoisedB=dbp(pnoise); end can you give me some advice?thank you! |
Title: Re: problem of delta sigma modulator simulation Post by Visjnoe on Aug 14th, 2007, 11:01am Dear, I don't think you are applying the Hanning window (as you did in the Cadence environment), unless this is executed by this sinusx() function call. Regards Petr |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |