Here is the list of APIs used for Digital Control Library
|
void | SFRA_F32_reset (SFRA_F32 *SFRA_F_obj) |
| Resets internal data of SFRA_F32 module. More...
|
|
void | SFRA_F32_config (SFRA_F32 *SFRA_F_obj, float32_t isrFrequency, float32_t injectionAmplitude, int16_t noFreqPoints, float32_t fraSweepStartFreq, float32_t freqStep, float32_t *h_magVect, float32_t *h_phaseVect, float32_t *gh_magVect, float32_t *gh_phaseVect, float32_t *cl_magVect, float32_t *cl_phaseVect, float32_t *freqVect, int16_t speed) |
| Configures the SFRA_F32 module. More...
|
|
void | SFRA_F32_initFreqArrayWithLogSteps (SFRA_F32 *SFRA_F_obj, float32_t fra_sweep_start_freq, float32_t freqStep) |
| Initailizes the freq vectors with points that are log step apart. More...
|
|
void | SFRA_F32_resetFreqRespArray (SFRA_F32 *SFRA_F_obj) |
| Resets the response data stored in the ol and plant phase and mag vector. More...
|
|
void | SFRA_F32_updateInjectionAmplitude (SFRA_F32 *SFRA_F_obj, float32_t new_injection_amplitude) |
| Updates injection amplitude. More...
|
|
float | SFRA_F32_inject (float ref) |
| Injects small signal disturbance into the control loop. More...
|
|
void | SFRA_F32_collect (float *control_output, float *feedback) |
| Collects the response of the loop because of small signal disturbance injected. More...
|
|
void | SFRA_F32_runBackgroundTask (SFRA_F32 *SFRA_F_obj) |
| Runs the background task, this routine executes the state machine when a frequency sweep is started and is responsible for changing the frequency points and saving the measured results in an array. More...
|
|
◆ IEEE754_TYPES
◆ float32_t
◆ float64_t
◆ SFRA_F32_reset()
void SFRA_F32_reset |
( |
SFRA_F32 * |
SFRA_F_obj | ) |
|
Resets internal data of SFRA_F32 module.
- Parameters
-
SFRA_F_obj | Pointer to the SFRA_F32 structure |
◆ SFRA_F32_config()
void SFRA_F32_config |
( |
SFRA_F32 * |
SFRA_F_obj, |
|
|
float32_t |
isrFrequency, |
|
|
float32_t |
injectionAmplitude, |
|
|
int16_t |
noFreqPoints, |
|
|
float32_t |
fraSweepStartFreq, |
|
|
float32_t |
freqStep, |
|
|
float32_t * |
h_magVect, |
|
|
float32_t * |
h_phaseVect, |
|
|
float32_t * |
gh_magVect, |
|
|
float32_t * |
gh_phaseVect, |
|
|
float32_t * |
cl_magVect, |
|
|
float32_t * |
cl_phaseVect, |
|
|
float32_t * |
freqVect, |
|
|
int16_t |
speed |
|
) |
| |
Configures the SFRA_F32 module.
- Parameters
-
*SFRA_F_obj | Pointer to the SFRA_F32 structure |
isrFrequency | Frequency at which SFRA routine in called, typically the control ISR rate |
injectionAmplitude | Per Unit (PU) injection amplitude |
noFreqPoints | Number of frequency points sweeped |
fraSweepStartFreq | Start frequency of SFRA sweep |
freqStep | Multiplier used to keep frequency points log step apart |
*h_magVect | Pointer to array that stores plant FRA magnitude data |
*h_phaseVect | Pointer to array that stores plant FRA phase data |
*gh_magVect | Pointer to array that stores OL FRA magnitude data |
*gh_phaseVect | Pointer to array that stores OL FRA phase data |
*cl_magVect | Pointer to array that stores OL FRA magnitude data |
*cl_phaseVect | Pointer to array that stores OL FRA phase data |
*freqVect | Pointer to array that stores the freq points for the sweep |
speed | indiactes the speed of the sweep |
◆ SFRA_F32_initFreqArrayWithLogSteps()
Initailizes the freq vectors with points that are log step apart.
- Parameters
-
*SFRA_F_obj | Pointer to the SFRA_F32 structure |
fra_sweep_start_freq | Start frequency of SFRA sweep |
freqStep | Multiplier used to keep frequency points log step apart |
◆ SFRA_F32_resetFreqRespArray()
void SFRA_F32_resetFreqRespArray |
( |
SFRA_F32 * |
SFRA_F_obj | ) |
|
Resets the response data stored in the ol and plant phase and mag vector.
- Parameters
-
*SFRA_F_obj | Pointer to the SFRA_F32 structure pointer |
◆ SFRA_F32_updateInjectionAmplitude()
void SFRA_F32_updateInjectionAmplitude |
( |
SFRA_F32 * |
SFRA_F_obj, |
|
|
float32_t |
new_injection_amplitude |
|
) |
| |
Updates injection amplitude.
- Parameters
-
*SFRA_F_obj | Pointer to the SFRA_F32 structure |
new_injection_amplitude | Injection amplitude |
◆ SFRA_F32_inject()
float SFRA_F32_inject |
( |
float |
ref | ) |
|
Injects small signal disturbance into the control loop.
- Parameters
-
ref | refernce value on which the injection is added |
- Returns
- Routine returns the reference plus the injection when SFRA sweep is active, when SFRA sweep is not active that is if SFRA state is 0 it returns the the refernce without any change
◆ SFRA_F32_collect()
void SFRA_F32_collect |
( |
float * |
control_output, |
|
|
float * |
feedback |
|
) |
| |
Collects the response of the loop because of small signal disturbance injected.
- Parameters
-
*control_output | pointer to the variable where control output is saved note though the parameter is passed by reference it is unchanged by the module |
*feedback | pointer to the variable where control output is saved note though the parameter is passed by reference it is unchanged by the module |
◆ SFRA_F32_runBackgroundTask()
void SFRA_F32_runBackgroundTask |
( |
SFRA_F32 * |
SFRA_F_obj | ) |
|
Runs the background task, this routine executes the state machine when a frequency sweep is started and is responsible for changing the frequency points and saving the measured results in an array.
- Parameters
-
*SFRA_F_obj | Pointer to the SFRA_F32 structure pointer |