Public functions of the Power Converter Control driver. More...
Functions | |
volatile uint16_t | v_loop_Initialize (volatile struct NPNZ16b_s *controller) |
Initializes controller coefficient arrays and normalization factors. More... | |
void | v_loop_Reset (volatile struct NPNZ16b_s *controller) |
Prototype of the Assembly routine '_v_loop_Reset' clearing the NPNZ16b controller output and error histories. More... | |
void | v_loop_Precharge (volatile struct NPNZ16b_s *controller, volatile fractional ctrl_input, volatile fractional ctrl_output) |
Prototype of the Assembly routine '_v_loop_Precharge' loading user-defined values into the NPNZ16b controller output and error histories. More... | |
void | v_loop_Update (volatile struct NPNZ16b_s *controller) |
Prototype of the Assembly feedback control loop routine helping to call the v_loop controller from C-code. More... | |
void | v_loop_PTermUpdate (volatile struct NPNZ16b_s *controller) |
Prototype of the alternate Assembly P-Term control loop helping to call the v_loop P-Term controller from C-code. More... | |
Public functions of the Power Converter Control driver.
This is the detailed description of public API functions of the Power Converter Control driver listing all available public functions of each individual feedback loop object.
volatile uint16_t v_loop_Initialize | ( | volatile struct NPNZ16b_s * | controller | ) |
Initializes controller coefficient arrays and normalization factors.
controller | Pointer to NPNZ Controller Data Object of type struct NPNZ16b_s |
This function needs to be called from user code at startup once to initialize coefficient arrays and number normalization settings of the v_loop controller object.
Definition at line 107 of file v_loop.c.
void v_loop_Precharge | ( | volatile struct NPNZ16b_s * | controller, |
volatile fractional | ctrl_input, | ||
volatile fractional | ctrl_output | ||
) |
Prototype of the Assembly routine '_v_loop_Precharge' loading user-defined values into the NPNZ16b controller output and error histories.
controller | Pointer to NPNZ16b data object of type struct NPNZ16b_s* |
ctrl_input | user-defined, constant error history value of type fractional |
ctrl_output | user-defined, constant control output history value of type fractional |
This function loads user-defined values into NPNZ16b controller output and error histories where the parameters ctrl_input and ctrl_output will written to the entire delay line of the filter emulating a pre-existing steady state operation under the user defined conditions.
void v_loop_PTermUpdate | ( | volatile struct NPNZ16b_s * | controller | ) |
Prototype of the alternate Assembly P-Term control loop helping to call the v_loop P-Term controller from C-code.
controller | Pointer to NPNZ16b data object of type struct NPNZ16b_s* |
This function has been added as extension function supporting the development process, introducing an alternative control loop able to replace the conventional compensation feedback loop with a simple P-Term controller, allowing users to perform measurements of the plant transfer function. To use this function, users may replace the default compensation feedback loop function call v_loop_Update by v_loop_PTermUpdate to perform the measurement.
This additional controller seamlessly fits into the controller data interface by using the same NPNZ16b_s data structure and does not need additional configuration or initialization.
void v_loop_Reset | ( | volatile struct NPNZ16b_s * | controller | ) |
Prototype of the Assembly routine '_v_loop_Reset' clearing the NPNZ16b controller output and error histories.
controller | Pointer to NPNZ16b data object of type struct NPNZ16b_s* |
This Assembly function clears the NPNZ16b controller output and error histories by settings all elements of the delay lines to zero. This resets the controller to ist default state. This function should be called every time before the control loop is started from a disabled, unbiased output.
void v_loop_Update | ( | volatile struct NPNZ16b_s * | controller | ) |
Prototype of the Assembly feedback control loop routine helping to call the v_loop controller from C-code.
controller | Pointer to NPNZ16b data object of type struct NPNZ16b_s* |
This function is the main controller function which must be called at the control frequency from the control interrupt service routine. It calculates the most recent control error and processes it in the compensation filter computation after which the new result is written to the control output target. Runtime control is provided through the NPNZ16b data object status & control word.