Closed loop bode plot

Can anyone help ?.
I am trying to plot the bode of closed loop output impedance and I am failing really hard.
I can plot the open loop stuff just fine, only issue is with the closed loop.
I am sensing the output voltage with two resistors. feeding the required voltage value to an analog PID, then feeding the control signal onto a comparator with carrier signal.
The model is assuming that all components are ideal.


Please find the attached schematic files which dealt with input and output impedance of peak current mode controlled dc-dc buck converter.

Hope this can help with your converter!

AmitBuck AC sweep Input Impedance.psimsch (87.3 KB) Buck AC sweep Output Impedance.psimsch (89.7 KB) parameters-Peak Current Mode Buck.txt (796 Bytes)