To the folks having trouble compiling the Mex files on Windows with 64-bit Matlab (bizet74 perhaps?), you will need to define the '__STDC__' symbol. For example, to compile simulateDSM.c, you would do 'mex -D__STDC__
simulateDSM.c'
Regards,
Zhao
Comment only
29 Mar 2012
Delta Sigma Toolbox
High-level design and simulation of delta-sigma modulators
Respected Sir,
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.
Comment only
22 Nov 2011
Delta Sigma Toolbox
High-level design and simulation of delta-sigma modulators
If you're interested in this submission, you might also like the new, free mixed-signal library available from here: http://www.mathworks.com/programs/mixed-signal/index.html
Comment only
23 Oct 2011
Delta Sigma Toolbox
High-level design and simulation of delta-sigma modulators
Comment only