Does this code work correctly to control a dc-dc converter? Hi guysI want to control a DC-DC converter with a PI controller and STM2F103 MCU; first, the ADC unit reads input and output voltage and inductor current, then we have two control loops; voltage control loop and current control loop. For the PI controller i use this Lib : github.com>Majid-Derhambakhsh>PID-LibraryThis is my main.c : /* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "pid.h"
//#include <stdlib.h>
#include <math.h>
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
long int k_Ds;
PID_TypeDef PID_Gvd;
PID_TypeDef PID_Gid;
unsigned char flag_1uS ;
uint32_t ADC_Value [3] ;
double V_High , V_Low , I_Lm ;
double V_High