English
Language : 

UM1561 Datasheet, PDF (31/39 Pages) STMicroelectronics – This document describes how the firmware to manage the 250 W micro-inverter demo
UM1561
Digital closed loop control and diagnostic functions implemented
break;
● In particular, the following states indicate the status of the power converter:
– STOPPING: the power board is going to stop the DC-DC and DC-AC section
– STOP: power board is off and is ready to restart
– START/BUSPRECHARGE: the DC-DC and DC-AC section are on. The burst
mode charges the bus capacitor before the grid insertion
– GRID INSERTION: the microinverter is grid connected and the MPPT algorithm is
enabled to transfer maximum power from the PV module
● Diagnostic states:
– DIAGNOSTIC AC LINE: it verifies the AC line voltage inside the range (Vac_rms,
Freq_vac)
– DIAGNOSTIC DC LINE: it verifies the PV module voltage inside the range
● Protection states:
– OUT CURRENT LIMIT: the output AC current reaches the maximum value
– PV VOLTAGE DVDT: the MCU detects low irradiance condition of the PV module
– PV VOLTAGE MIN: the PV module goes below the minimum voltage value
– FREQ OUT OF RANGE: the AC line frequency is out of range
– STOP WITH DELAY: the power board is waiting to stop the modulation after the
open-relay
– BUS FAULT: bus overvoltage or undervoltage protection state; the status changes
to STOPPING after modulation switch-off.
Closed loop control calculation
This is the main function for the closed loop control. It comprises the code to regulate the
bus voltage and to manage the output current in grid insertion mode. In particular, for the
greater part of the control, it is based on PID regulators such as the following:
● PID_Bus_Voltage(&BUS_Voltage_PID, Bus_Voltage);
● PID_Reactive_Power(&Reactive_Power_PID, Actual_QD_Power.Q_Reactive);
● PID_DirectCurrent(&Direct_Current_PID, Inverter_q_d.qI_Direct);
● PID_QuadratureCurrent(&Quadrature_Current_PID, Inverter_q_d.qI_Quadrature).
This part of the calculation, together with the reverse park transformation (with the circle
limitation), generates as the output the PWM duty cycle value for the DC-AC section. This
function is called at switching frequency.
void CalcAndSetACComponents(SystStatus_t state)
{
Quadrature_Current_PID.Reference=
PID_Bus_Voltage(&BUS_Voltage_PID,Bus_Voltage);
Direct_Current_PID.Reference = PID_Reactive_Power(&Reactive_Power_PID,
Actual_QD_Power.Q_Reactive);
Output_qId_Inverter= (s16)(PID_DirectCurrent(&Direct_Current_PID,
Inverter_q_d.qI_Direct));
Doc ID 023556 Rev 1
31/39