I am trying to design a 2nd Order CIFB DSM ADC on Simulink based off the values I have extracted from Richard Schreier's Delta Sigma Modulation Toolbox. However, when I ran the model according to the values I used, it seems like there is not a sufficient amount of noise shaping in the system. Since this is second-order noise shaping, I am expecting roughly 40 dB attenuation per decade in noise. But it seems like there is only ~15 dB noise-shaping in this system. Could anyone possibly point out a flaw in my judgment or system? Below are the images of the Simulink implementation, the parameters used in the system, and the signal output.
%% Create DSM Model close all; clear all; addpath('C:\Users\Prithvi\Documents\MATLAB\delsig'); OSR = 500; f = 5000; N = 10^7; fB = ceil(N/(2*OSR)); amplitude_list = [-120:10:-20 -15 -10:0]; order = 2; nlevl = 2^5; form = 'CIFB' ntf = synthesizeNTF(order, OSR, 1, 2); [sqnr, amp] = simulateSNR(ntf, OSR, , , nlevl); [a,g,b,c] = realizeNTF(ntf,form); ABCD = stuffABCD(a,g,b,c,form); ABCD = scaleABCD(ABCD,nlevl,,.5,,.9); [a,g,b,c] = mapABCD(ABCD,form); plot(amp, sqnr,'*') %% Simulate over MSA=.9 Sine Input u = .9*sin(2*pi*f/N*[0:N-1]); v = simulateDSM(u, ABCD, nlevl); t = 0:85; stairs(t, u(t+1),'g'); hold on; stairs(t,v(t+1),'b'); axis([0 85 -1.2 1.2]); ylabel('u, v'); spec=fft(v.*ds_hann(N))/(N/4); plot(linspace(0,0.5,N/2+1), ... dbv(spec(1:N/2+1))); axis([0 0.5 -150 0]); grid on; ylabel('dBFS/NBW') snr=calculateSNR(spec(1:fB),f); s=sprintf('SNR = %4.1fdB\n',snr); text(0.25,-90,s); s=sprintf('NBW=%7.5f',1.5/N); text(0.25, -110, s); %% Continuous Time Conversion