this presentation covers basics of group delay and compares spectre vs matlab. the default functions in matlab and spectre do not agree with hand analysis so I had to design my own methods based on the definition
3. Hand analysis for single pole (RC) case
Group delay phase delay
• Youtube link for following equations
• https://www.youtube.com/watch?v=m9tASJ9DaTY
4. One pole case
• Pole – 5e9
• Default cadence function is not giving expected results
• Written my own measurements
• Verfied the measurements vs hand analysis results from equation in above slide
• The same circuit as below is used for one pole and one zero case
• Inductor is made ‘0” for one pole case
procedure
Hand analysis
6. Matlab one pole case
• f_z1=[10^80]; % zero at infinite location
• f_p1=5e9;
• new=[];
• for i=1 % only one zero pole combination
• k=f_p1/f_z1(i);
• t_freq=logspace(1,11,100000);
• w_l=2*pi*t_freq;
• [b,a] = zp2tf(f_z1(i),f_p1,k);
• h=freqs(b,a,w_l);
• mag=20*log10(abs(h));
• subplot(2,1,1)
• semilogx(w_l,mag);
• hold on;
• phase = angle(h);
• pdiff =diff(phase);
• w_l_new=diff(w_l);
• grpdel = (pdiff./w_l_new)/(2*pi); % adding 2*pi since 2*pi get cancelled
between pdiff and w_l_new
• grpdel_max=max(grpdel);
• grpdel_min=min(grpdel);
• grpdel_pp=grpdel_max-grpdel_min
• new(i,1)=grpdel_pp;
• subplot(2,1,2)
• semilogx(w_l(1:end-1),grpdel)
• xlabel('Frequency (rad/s)')
• ylabel('Group delay (s)')
• end
• hold off
1. No matlab codes readily available for group delay
2. Default matlab codes (grpdelay) are for digital filters
1. https://www.mathworks.com/help/signal/ref/grpdelay.html
• Grpdelay function doesn’t give accurate results
• Waveform shapes from my code are same as that of spectre and also
handanalysis
• Got confused so much since both groupDelay (spectre) and grpdelay
(matlab) are inaccurate
• Finally settled with my methods by comparing with handanalysis
8. One pole and one zero case
• Pole – 5e9
• Zero – 2e9, 3e9,4e9,5e9,6e9,7e9
• Circuit to produce a zero (R and L) and a pole (R and C)
• Dc gain = 1 (R1.gm.R1)
• Gm=R1*R1
9. spectre results
• As zero location is moved, dc gain is 0 but peak ac gain is decreasing
• Group delay peak to peak (gdpp) is highest when zero is at 2G
• 3G vs 7G – delta is 2G but gdpp is different
11. Matlab results
• Frequency response matches with spectre results
• Peak gain when zero @ 2GHz – 7.94dB and 7Ghz - -2.9dB
• Matlab and spectre agree with each other