I have an actual flyback converter on a chip and I'm thinking of having a simulation platform to model the circuit on MATLAB. This is because somewhere down the road I intend to modify the inductor by biasing it with a permanent magnet in order to prevent premature saturation. It is hoped that this allows for the use of a smaller core in the transformer which will reduce the overall physical dimensions of my converter. My flyback converter operates in DCM. In any case, I have trawled the web and came across the following DCM buck-boost converter which can be modified slightly for my purposes. It basically compiles the state-space equations in a u-->y block and plots the graphs out. I have an oscilloscope so I was thinking of comparing my readings to the simulation graphs as a first pass. Barring things like losses I hope that my simulation graphs will closely approach my actual graphs. My questions are: -I know for a fact that my transformer turns ratio is 64:5, how do I incomporate this info in my buck-boost simulation to accurately simulate my turns ratio? -A slightly more challenging part is incorporating the physics of my biased inductor in the simulation: I intend to use FEMM to get flux-current relationships for my biased inductor -- any idea how to incorporate this in the model? Any suggestions/responses would be great, thanks.