simply replace
If u r doing in spice,
1) replace the power stage switch network with a average switch model ( just pick up the buck model given in erickson's and maksimovic's book on fundementals of power electronics.
2) Keep the Error Amp (compensator) as circuit in spice.
3) Replace the PWM comparator with 1/Vm gain where Vm is ramp height. And generate the average duty cycle with a vcvs (voltage controlled voltage source). Look at the last appendix of the book.
If u r doing in Matlab and want to do ac analysis,
1) Create the duty cycle to output voltage transfer function of the buck (standard formulae available everywhere in the web) or generate using state-space, average switch etc...lots of methods available
2) Write a transfer function of the compensator and and include 1/Vm and use bode for Gvd*Gc/Vm.
If u want switching waveform in Matlab,
1) Create a simulink of the switch network (just like in spice) and have a transfer function model of the error amp and 1/Vm.