Contains the interrupt routine and other functions called in the interrupt. More...
Files | |
file | pwrctrl_isr.c |
Contains Control loop interrupt Callback that acquires the ADC raw data and process it in the control loop, and use the control output for the PWM distribution for this converter. | |
file | pwrctrl_isr.h |
Contains public function relevant for power control interrupt. | |
file | pwrctrl_isr_extension.c |
Contains some of the functions used in the interrupt service routine of control loop. | |
Macros | |
#define | MIN_REFERENCE_THRESHOLD_IV (10) |
Executes the power converter control loop. | |
Functions | |
void | ControlLoop_Interrupt_CallBack (void) |
Executes the power converter control loop. | |
void | PwrCtrl_UpdateADConverterData (void) |
This function updates the DAB data members with ADC raw values. | |
void | PwrCtrl_10KHzVPLoopPrepareData (void) |
This function prepares the data for control loop and selects which control loop will be executed. | |
static void | PwrCtrl_AdaptiveGainUpdate (void) |
Updates the Adaptive gain for the power converter control loop. | |
void | PwrCtrl_PrimToSecPHDegree (void) |
This function updates the DAB data members with phase values normalized in degree. | |
void | PwrCtrl_DeadTimeAdjust (void) |
This function updates the DAB data members dead time based on load. | |
Variables | |
AVERAGING_t | vPrimAveraging |
Data Object of primary voltage averaging. | |
AVERAGING_t | vSecAveraging |
Data Object of secondary voltage averaging. | |
AVERAGING_t | iSecAveraging |
Data Object of secondary current averaging. | |
This document includes the interrupt function in power control.
#define MIN_REFERENCE_THRESHOLD_IV (10) |
This function is called to execute the control loop of the power converter. It comprise of Voltage Loop control (VLoop), Power Loop control (PLoop) and Current Loop Control (ILoop). Vloop and PLoop is ten times slower than the current loop with interleaved execution while Iloop is executed every time this function is called.
In reverse mode of power flow, voltage sensor is not working reliably below 100V.
In order to avoid possible voltage overshoot, checking needs to be done against a minimum voltage threshold When under voltage detected, makes it mandatory to ramp up reverse mode voltage very very slowly, without sensing Until voltage readings become reliable, P and I references are forced to minimum safe values. This achieves very slow ramp up of voltage across output capacitors.
Definition at line 213 of file pwrctrl_isr_extension.c.
void ControlLoop_Interrupt_CallBack | ( | void | ) |
This interrupt function is a timing interrupt executed every 100KHz and calls an ADC function that updates the DAB data member with ADC raw values. The fault check is also called in this function to detect any fault events. It is followed by the control loop execution for Voltage, Current and Power Loop Controllers. The end result of the control loop is handed over to the PWM distribution.
Definition at line 46 of file pwrctrl_isr.c.
void PwrCtrl_10KHzVPLoopPrepareData | ( | void | ) |
This function prepares the data for Voltage loop control and Power loop control. The enable bit of these control loops are manage in this function in which the VLoop and PLoop are enabled at 10KHz with 180 degrees phase.
Definition at line 112 of file pwrctrl_isr_extension.c.
|
static |
AGC is a specific method for tuning the overall feedback loop gain during runtime. This function handles the calculation of the gain at a particular input voltage. AGC is active when it is above the minimum AGC input voltage.
Definition at line 391 of file pwrctrl_isr_extension.c.
void PwrCtrl_DeadTimeAdjust | ( | void | ) |
This function updates the DAB data members dead time based on load. The phase and dead-time in this function is based on the actual board test.
Definition at line 460 of file pwrctrl_isr_extension.c.
void PwrCtrl_PrimToSecPHDegree | ( | void | ) |
This function updates the DAB data members with phase values normalized in degree. The calculated phase is scaled by 10x to have better phase resolution.
Definition at line 432 of file pwrctrl_isr_extension.c.
void PwrCtrl_UpdateADConverterData | ( | void | ) |
This function is called every 100KHz and triggers the ADC module. This also handles the updating of DAB data members with its latest ADC raw values and collection of data for averaging.
Definition at line 65 of file pwrctrl_isr_extension.c.
AVERAGING_t iSecAveraging |
The 'IsecAveraging' data object holds the averaging parameter of the Secondary Current.
Definition at line 50 of file pwrctrl_isr_extension.c.
AVERAGING_t vPrimAveraging |
The 'VprimAveraging' data object holds the averaging parameter of the Primary Voltage.
Definition at line 34 of file pwrctrl_isr_extension.c.
AVERAGING_t vSecAveraging |
The 'VsecAveraging' data object holds the averaging parameter of the Secondary Voltage.
Definition at line 42 of file pwrctrl_isr_extension.c.