This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069M: Maximum current setting for force angle

Part Number: TMS320F28069M

Hi experts,

My customer wants to set the maximum current at force angle.

The project is lab10b.

Is it possible to set the maximum current at force angle separately from the USER_MOTOR_MAX_CURRENT in this project?

They want to know how to set the current at force angle lower than USER_MOTOR_MAX_CURRENT.

Best regards,
Sasaki

  • Yes, the USER_MOTOR_MAX_CURRENT is for all running process. You might find the following code in lab10b.c.

    _iq Is_Max_squared_pu = _IQ((USER_MOTOR_MAX_CURRENT*USER_MOTOR_MAX_CURRENT)/ \
    (USER_IQ_FULL_SCALE_CURRENT_A*USER_IQ_FULL_SCALE_CURRENT_A));
    _iq Id_squared_pu = _IQmpy(CTRL_getId_ref_pu(ctrlHandle),CTRL_getId_ref_pu(ctrlHandle));

    // Take into consideration that Iq^2+Id^2 = Is^2
    Iq_Max_pu = _IQsqrt(Is_Max_squared_pu-Id_squared_pu);

    //Set new max trajectory
    CTRL_setSpdMax(ctrlHandle, Iq_Max_pu);

    And then add some codes as below with a setting current to Iq_Max_force_pu for force running.

    if(gMotorVars.Speed_krpm< _IQ(0.1))

    {

    CTRL_setSpdMax(ctrlHandle, Iq_Max_force_pu);

    }

    else

    {

    CTRL_setSpdMax(ctrlHandle, Iq_Max_pu);

    }

  • Hi Luo-san

    Thank you for your information.

    I will contact the customer with this information.

    Best regards,
    Sasaki

  • Hi Luo-san,

    The customer has added the following code. They want to suppress the current at force angle to 10A.
    The USER_MOTOR_MAX_CURRENT is 20A.

    --------------------------------------------------------

    _iq Is_Max_squared_pu = _IQ((USER_MOTOR_MAX_CURRENT*USER_MOTOR_MAX_CURRENT)/ \
    (USER_IQ_FULL_SCALE_CURRENT_A*USER_IQ_FULL_SCALE_CURRENT_A));
    _iq Id_squared_pu = _IQmpy(CTRL_getId_ref_pu(ctrlHandle),CTRL_getId_ref_pu(ctrlHandle));

    // Take into consideration that Iq^2+Id^2 = Is^2
    Iq_Max_pu = _IQsqrt(Is_Max_squared_pu-Id_squared_pu);

    _iq Is_Max_squared_force_pu = _IQ((10*10)/  \                              (USER_IQ_FULL_SCALE_CURRENT_A*USER_IQ_FULL_SCALE_CURRENT_A));

    Iq_Max_force_pu = _IQsqrt(Is_Max_squared_force_pu-Id_squared_pu);

    if(gMotorVars.Speed_krpm< _IQ(0.1))

    {

    CTRL_setSpdMax(ctrlHandle, Iq_Max_force_pu);

    }

    else

    {

    CTRL_setSpdMax(ctrlHandle, Iq_Max_pu);

    }

    --------------------------------------------------------

    Even if Iq_Max_force_pu is set, it will increase to near the current value set in USER_MOTOR_MAX_CURRENT.

    Is there an error in the above code description?

    Best regards,
    Sasaki

  • You might add a time delay on the condition code as below to make sure that the force angle process is finished.

    if(gMotorVars.Speed_krpm< _IQ(0.1)) && (delay_time > delay_time_set))

  • Thank you for your support.

    What values should I set for delay_time  and delay_time_set?

  • delay_time is a timer counter that need to be cleared every start motor. delay_time_set is the delay time to change the maximum current.

    The delay_time_set depends on the values of gMotorVars.MaxAccel_krpmps, USER_ZEROSPEEDLIMIT, and USER_FORCE_ANGLE_FREQ_Hz. You might tune the value of delay_time_set according to the motor and system.

  • Hi Luo-san,

    Thank you for your reply.

    I have one more question.

    I want the current at force angle to be 10A. Is the code below correct?

    _iq Is_Max_squared_force_pu = _IQ((10*10)/  \

                                  (USER_IQ_FULL_SCALE_CURRENT_A*USER_IQ_FULL_SCALE_CURRENT_A));

    Iq_Max_force_pu = _IQsqrt(Is_Max_squared_force_pu-Id_squared_pu);

    Is there any code other than the above code required to set the maximum current at force angle to 10A?

    Best regards,
    Sasaki

  • Yes, it's correct. Set the right value to the maximum speed controller output as the code in project file.

    //Set new max trajectory
    CTRL_setSpdMax(ctrlHandle, Iq_Max_pu);

  • Hi

    I got additional information from the customer.

    The customer does not limit the force angle current to 10A by changing the value of CTRL_setSpdMax (). Do you know anything about this cause?

    Also, regarding the following variables that are thought to be related to the maximum output current,
    Please tell me what kind of role it is used for.

    • VelCtlHandle   cfg.OutMax,
    • GMotorVars.SpinTAC.VelCtlOutputMax_A

    Best regards,
    Sasaki

  • Yes, you might try to change the value of gMotorVars.SpinTAC.VelCtlOutputMax_A to limit Iq reference.

    // set the maximum and minimum values for Iq reference
    STVELCTL_setOutputMaximums(stObj->velCtlHandle, _IQmpy(gMotorVars.SpinTAC.VelCtlOutputMax_A, _IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)), _IQmpy(gMotorVars.SpinTAC.VelCtlOutputMin_A, _IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));

  • Hi Luo-san,

    Thank you for special support.

    The customers can now limit the current during force angles by changing the "gMotorVars.SpinTAC.VelCtlOutputMax_A" value.

    They also have additional questions.
    Is it correct to change VelCtlOutMax_A along with Iq_Max_force_pu as below?

    if(gMotorVars.Speed_krpm< _IQ(0.1))

    {

          CTRL_setSpdMax(ctrlHandle, Iq_Max_force_pu);

          gMotorVars.SpinTAC.VelCtlOutputMax_A = _IQ(10);

          gMotorVars.SpinTAC.VelCtlOutputMin_A = _IQ(-10);

    }

     

    else

    {

          CTRL_setSpdMax(ctrlHandle, Iq_Max_pu);

          gMotorVars.SpinTAC.VelCtlOutputMax_A = _IQ(20);

          gMotorVars.SpinTAC.VelCtlOutputMin_A = _IQ(-20);

    }

    Also, if the current at the force angle is lowered, startup failure will be less likely to occur if the value of USER_MOTOR_Rs deviates.

    How much can this value be lowered?

    They would like to know if there is a standard for setting this value.

    Best regards,
    Sasaki

  • Is it correct to change VelCtlOutMax_A along with Iq_Max_force_pu as below?

    Correct.

    How much can this value be lowered?

    That depends on the motor and adding load. You might try to use half of the maximum current first, and tune the value according to the test.