Data Structures | |
struct | SFRA_F32 |
Defines the SFRA_F32 structure. More... | |
Macros | |
#define | C2000_IEEE754_TYPES |
#define | SFRA_F32_inject _SFRA_F32_inject |
#define | SFRA_F32_collect _SFRA_F32_collect |
Typedefs | |
typedef float | float32_t |
typedef long double | float64_t |
Functions | |
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... | |
#define C2000_IEEE754_TYPES |
#define SFRA_F32_inject _SFRA_F32_inject |
#define SFRA_F32_collect _SFRA_F32_collect |
typedef float float32_t |
typedef long double float64_t |
void SFRA_F32_reset | ( | SFRA_F32 * | SFRA_F_obj | ) |
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.
*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 |
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.
*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 |
void SFRA_F32_resetFreqRespArray | ( | SFRA_F32 * | SFRA_F_obj | ) |
Resets the response data stored in the ol and plant phase and mag vector.
*SFRA_F_obj | Pointer to the SFRA_F32 structure pointer |
Updates injection amplitude.
*SFRA_F_obj | Pointer to the SFRA_F32 structure |
new_injection_amplitude | Injection amplitude |
float _SFRA_F32_inject | ( | float | ref | ) |
Injects small signal disturbance into the control loop.
ref | refernce value on which the injection is added |
void _SFRA_F32_collect | ( | float * | control_output, |
float * | feedback | ||
) |
Collects the response of the loop because of small signal disturbance injected.
*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 |
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.
*SFRA_F_obj | Pointer to the SFRA_F32 structure pointer |