3.5.6 mcRpe_RotorPostionOffsetCalc

C


/* Rotor position offset calculation */
void mcRpe_RotorPostionOffsetCalc( const tmcRpe_Parameters_s * const pParameters, 
                                                    float32_t * const pF32Offset ) 	

Summary

Calculation of rotor position offset.

Description

This function calculates the rotor position offset based on the rotor's speed and back-EMF (Electromotive Force) during the calibration process. This function is part of the rotor position estimator (RPE) module and is used to track and compensate for integrator drift by adjusting the rotor position offset.

Precondition

None.

Parameters

ParamDescription
pParametersA pointer to the rotor position estimation module parameter structure
pF32OffsetA pointer to the variable where the calculated rotor position offset will be stored

Returns

None

Example

// Define the rotor position estimation module data structure
tmcRpe_Parameters_s rpeParameters;
float32_t rotorOffset = 0.0f;

/* Rotor position offset calculation */
mcRpe_RotorPostionOffsetCalc(&rpeParameters, &rotorOffset);
    

Remarks

None.