Basic buck converter model Averaged model for Simulink Independent inputs Integration of state variables Outputs Embedded MATLAB code block: • Load inputs from u vector • Set circuit parameters • Calculate state equations and outputs • Place results in output y vector (used in current mode control)