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.

Sensor-less FOC:
Sensorless position estimation techniques based on back-EMF require a minimum value of back-EMF to estimate the rotor's electrical position. The open-loop start-up procedure drives the PMSM until its speed reaches the minimum value where the back-EMF is sufficient to estimate the rotor position. During the open-loop start-up procedure, the speed loop is deactivated, and currents are controlled directly in the dq reference frame using assumed rotor position angles for transformations. The complete start-up procedure includes the following phases::
  1. 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.
  2. 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.
  3. Stabilization:

    • The PMSM is allowed to rotate at a constant open-loop speed.
    • This step ensures a smooth transition to closed-loop mode.
Sensored FOC:

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

ParamDescription
pParametersA pointer to the open loop start-up module parameter structure
directionThe direction of the motor rotation. Refer the generated header for the exact data type.
pIQrefPointer to the q-axis current reference. Refer the generated header for the exact data type.
pIDrefPointer to the d-axis current reference. Refer the generated header for the exact data type.
pAnglePointer to the rotor angle. Refer the generated header for the exact data type.
pSpeedPointer 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.