I am trying to implement voltage control for a buck converter. I am using ADC pins on my 28379D launchpad to read the output voltage of my buck converter. I am then implementing the control as shown in figure below. I am then using the digital output pin GPIO DO to output the PWM.
I am using fixed step in the solver with step size being 1e-7. I am using 1e-7 because otherwise the signal generator does not output a proper sawtooth signal. With this step size I get the following error
But if I use auto step size the external mode runs. The problem is the signal generator does not output a proper sawtooth. I get more of a triangle wave. And I dont see any output at the GPIO DO pin.
Can anyone help me sort this issue? Or you can also suggest me a different approach to implementing the control.
Thanks,
Akarsh M