3.3.21.3 mcSupI_OpenLoopStartup
C
/* Perform open loop start-up : Floating point version */ tmcTypes_StdReturn_e mcSupI_OpenLoopStartup( const tmcSup_Parameters_s * const pParameters, float32_t direction, float32_t * const pIQref, float32_t * const pIDref, float32_t * const pAngle, float32_t * const pSpeed ) /* Perform open loop start-up : Fixed point version */ tmcTypes_StdReturn_e mcSupI_OpenLoopStartup( const tmcSup_Parameters_s * const pParameters, int16_t direction, int16_t * const pIQref, int16_t * const pIDref, uint16_t * const pAngle, int16_t * const pSpeed )
Summary
This function performs the open loop start-up of the motor control application.
Description
This function initiates and manages the open-loop start-up sequence in the motor control application. It assesses the current stage of the start-up process and executes tasks according to the Field-Oriented Control (FOC) mode, whether sensorless or sensored.
-
Initial Field Alignment:
- The PMSM rotor is locked to a specified position by maintaining a fixed rotor position angle.
- A defined d-axis or q-axis current is gradually ramped to a specified value to avoid over-current issues.
-
Open-loop Ramp:
- The rotor position is incrementally adjusted based on a user-defined ramp time to achieve the minimum required speed for the BEMF observer.
- The minimum ramp time and speed depend on the PMSM drive's electrical and mechanical parameters. This stage is critical, as any mistuning of reference speed and acceleration can lead to start-up failure.
-
Stabilization:
- The PMSM is allowed to rotate at a constant open-loop speed.
- This step ensures a smooth transition to closed-loop mode.
In a sensored Field-Oriented Control (FOC) system, the start-up process is simplified by the direct availability of precise rotor position information from the sensor. At startup, it is crucial to determine the motor's initial position, which is unknown initially. The PMSM rotor is locked into a specified position by maintaining a fixed rotor position angle. A defined d-axis or q-axis current is gradually ramped up to a specified value to prevent over-current issues. Once the position sensor is enabled and the position is accurately detected, the system transitions to closed-loop mode.
Precondition
The open loop start-up module must be initialized and enabled.
Parameters
Param | Description |
---|---|
pParameters | A pointer to the open loop start-up module parameter structure |
direction | The direction of the motor rotation. Refer the generated header for the exact data type. |
pIQref | Pointer to the q-axis current reference. Refer the generated header for the exact data type. |
pIDref | Pointer to the d-axis current reference. Refer the generated header for the exact data type. |
pAngle | Pointer to the rotor angle. Refer the generated header for the exact data type. |
pSpeed | Pointer to the rotor speed. Refer the generated header for the exact data type. |
Returns
Returns the open loop start up status:
- StdReturn_Progress: Operation in progress
- StdReturn_Success: Operation successful
- StdReturn_Fail: Operation failed
- StdReturn_Complete: Operation completed
Example
// Define the speed control module data structure tmcSup_Parameters_s supParameters; // Define the parameters for floating point open loop start-up float32_t direction = 1.0f; float32_t iqRef, idRef, angle, speed; tmcTypes_StdReturn_e status; // Define the parameters for fixed point open loop start-up int16_t direction = 1; int16_t iqRef, idRef, angle, speed; tmcTypes_StdReturn_e status; /* Perform open loop start-up */ status = mcSupI_OpenLoopStartup(&supParameters, direction, &iqRef, &idRef, &angle, &speed); if (status == StdReturn_Complete) { // Open-loop start-up is complete }
Remarks
Refer the generated header file for the exact function signature.