I'm developing PWM model in Matlab. To be more accurate I have alreday developed it but I have a small problem. During the simulation Matlab gives me a warning that a algebraic loop has been detected. The model is pretty simple and I really don't see the algebraic loop. I am sending the model of PWM (Matlab 7.1.) as an attachment. So if anyone can figure out what the problem is I would appreciate it a lot. Thnx.