enjoypercy
Newbie level 4
I designed a 2nd order sigma-delda ADC in matlab.but I don't know why the power spectrum of noise is so bad.could someone point out the problems? I would appriciate any help.here is my code:
k=100; %oversampling rate
fs=200; %the nyquist frequence
t=0:1/(k*fs):1;
x=sin(2*pi*100*t);
v1(1)=0; %2nd order ADC
v2(1)=0;
u2(1)=-1;
y(1)=1;
for n=2:length(x)
v2
=v2(n-1)+u2(n-1);
if v2
>=0
y
=1;
else y
=-1;
end
e
=y
-v2(n-1);
u1
=x
-y
;
v1
=v1(n-1)+u1
;
u2
=v1
-y
;
end
y_pinpu=20*log10(abs(fft
).^2/length
);%/max(abs(fft
)));
figure;
plot((1:200)/length(y_pinpu)*k*fs,y_pinpu(i));
how can I get the right result? thanks a lot!
k=100; %oversampling rate
fs=200; %the nyquist frequence
t=0:1/(k*fs):1;
x=sin(2*pi*100*t);
v1(1)=0; %2nd order ADC
v2(1)=0;
u2(1)=-1;
y(1)=1;
for n=2:length(x)
v2
if v2
y
else y
end
e
u1
v1
u2
end
y_pinpu=20*log10(abs(fft
figure;
plot((1:200)/length(y_pinpu)*k*fs,y_pinpu(i));
how can I get the right result? thanks a lot!