I am trying to implement a SDM using delsig toolbox. The following are the commands I try to run, along with the errors.
H = synthesizeChebyshevNTF(2,12.5,1,1.5,0);
>> stf = zpk([],[],1,1) ;
>> [a g b c] = realizeNTF(H,'CRFFD',stf)
Error using /
Matrix dimensions must agree.
I am trying to simulate a sixth order sigma delta modulator using the
"Delta Sigma Toolbox".
1) My desired NTF is a 6th order Chebyshev type II high pass filter.
Hence, I ran the following command :
>> ntf = synthesizeChebyshevNTF(6,64,2,1.5,0)
The toolbox outputs the function given below:
Zero/pole/gain:
(z^2 - 2z + 1) (z^2 - 1.999z + 1) (z^2 - 1.998z + 1)
-----------------------------------------------------------------------
(z^2 - 1.629z + 0.6655) (z^2 - 1.705z + 0.7437) (z^2 - 1.854z + 0.8979)
Sampling time: 1
2) I wish to implement the above NTF using the "CIFB" structure. So
I ran the following command:
>>[a,g,b,c] = realizeNTF(ntf,'CIFB')
which gives the output
a =
0.0001 0.0013 0.0124 0.0794 0.3223 0.8120
g =
0.0002 0.0022 0.0012
b =
0.0001 0.0013 0.0124 0.0794 0.3223 0.8120 1.0000
c =
1 1 1 1 1 1
3) I tried to construct the "CIFB" structure using the coefficient
values provided by the toolbox, mentioned in the previous step.
4) I try to analyse the frequency content of the output (y2 in the
simulink file attached with this mail). I ran the following commands :
>> NFFT = 2^nextpow2(length(y2)); % Next power of 2 from length of y
>> Y = fft(y2,NFFT)/length(y2);
>> f = 300e6/2*linspace(0,1,NFFT/2+1);
>> plot(f,2*abs(Y(1:NFFT/2+1)))
5) The output is more like a low pass filter and not a high pass expected.
Hence, i request you to kindly have look at the .mdl file and the
commands executed by me, and help me find the mistake that I have
committed.