I am trying to replicate a result from a textbook that I am using to study input filter design for buck converters. 
The parameters for the converter and filter are as follows:
- D = 0.5
- L = 100 μH
- C = 100 μF
- R = 3 Ω
- Lf = 330 μH
- Cf = 470 μF
The Bode plot in the textbook is shown below. 
I used MATLAB to create a similar Bode response, using this code:
opts = bodeoptions; opts.FreqUnits = 'Hz'; vd=5; R=3; D=0.5; vo_desired=D*vd; L=100e-6; C=100e-6; L_f=330e-6; C_f=470e-6; Gd0=vd; w0=1/sqrt(L*C); Q=R*sqrt(C/L); Gvd=tf(Gd0,[1/(w0)^2,1/(Q*w0),1]); Z=tf([L_f,0],[L_f*C_f,0,1]); ZN=tf(-R/D^2,1); ZD=tf([R*C*L,L,R],[C*R,1])/D^2; Gvd_new=Gvd*((1+Z/ZN)/(1+Z/ZD)); bode(Gvd,opts,'r--') hold on; dcm = datacursormode; dcm.Enable = 'on'; grid bode(Gvd_new,opts) legend('G_{vd}','G_{vd,new}') As you can see from the attached Bode plot I generated, the magnitude response seems to match what is shown in the textbook, but the phase response is significantly different. Am I missing something in my code or calculation?
