Use of a PID for a digital control of the power converter on mbed

Hello,

Your project is very interesting because it uses mbed to control a power converter;
Did you use a controller like a PID in order to regulate tensions and or current? If so, do you use the duty cycle as the command and where can we find the code?
It seems that you use pwm of 20-30kHz.Did you try to control tensions and or current with higher values of frequency with mbed?
I tell that because I have some difficulties to make a pid on mbed in order to regulate a tension of a buck converter with the variation of the duty cycle for high frequençies of pwm (more than some khz).I tried with PID.h and dsp.h from CMSIS_dsp without success at high frequençy.The explanations of the pid functions of these libraries are not complete and examples are lacking on this subject.

Regards,

Victor

Hey Victor, that’s very interesting that you ask this question right now. I just mentioned in the other thread that improved MPPT control is an open point in the firmware development :slight_smile:

We just started to build up a control simulation of the DC/DC power stage using Matlab (should also mostly work with GNU Octave). You can find the current work in progress here. Once the simulation is ready, we’ll probably implement the PID manually… actually I didn’t know that there is a CMSIS DSP library, I should probably have a look.

The current charge controller firmware can be found here. The MPPT control is very basic and does not use any PID or DSP libraries at the moment. Switching frequency is 50-70 kHz, depending on the charge controller.