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.

[参考译文] LAUNCHXL-F28379D:双轴驱动器设置扭矩限制和速度恢复延迟

Guru**** 2390755 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1270920/launchxl-f28379d-dual-axis-drive-setting-torque-limitation-and-speed-recovery-delay

器件型号:LAUNCHXL-F28379D

您好、专家!

在双轴驱动项目中、在运行速度控制环路时、限制扭矩的正确方法是什么?

我们是否可以调整 PI_IQ 环路饱和限值(Umax 和 Umin)?-您能否确认?

我尝试减小 Umax 和 Umin、但正如预期的那样、当达到最大扭矩限值时、电机速度确实会降低。

此问题类似于用户在此线程中遇到的问题:

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1049698/tms320f28031-pmsm-foc-s-torque-pid-output-gets-saturated/3891229#3891229

正如预期的那样,一旦我们将速度设定点减小到较低的值,就只能恢复速度。 如何减少这种延迟? 此处调整 PID 增益可能不是最佳选择、因为我们已经将其调整为在没有扭矩限制条件发生时正常工作。是否有其他方法来解决该问题?

谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、AK、

    专家在周一之前不在办公室、请在周一之前等待回复。

    此致、

    奥普斯

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的。

    目前、我正在添加扭矩限制功能、如下所示:

    在速度环路内、就在速度 PID 之前、我检查扭矩限制。

    函数 torqueLimitCheck()执行以下操作:

    float32_t getTorqueLimit(MOTOR_Vars_t *pMotor)
    {
        float32_t torqueLimit = 0.0f;
        const float32_t torque2 = 6.0f;
        const float32_t speed2 = 10000.0f;
        const float32_t torque1 = 9.0f;
        const float32_t speed1 = 2000.0f;
        /*
         * Calculate slope
         * Calculate the slope based on two known data points.
         * Data point 1: At 2000 RPM, Max Torque can be 9 Nm
         * Data point 2: At 10000 RPM, Max torque ca be 6 Nm
         * Slope = (Torque2 - Torque1)/(RPM2 - RPM1)
         * Slope = (6 - 9)/(10000 - 2000) = -0.000375
         *
         * Ex If speed is 5000 RPM, What will be the torqueLimit?
         * Torque5000 = Torque1 + Slope*(RPM5000 - RPM1)
         * Torque5000 = 9 + (-0.000375*(5000 - 2000));
         */
        const float32_t slope = -0.000375f;
        torqueLimit = torque1 + (slope *(abs(pMotor->speed.SpeedRpm) - speed1));
        return torqueLimit;
    }
    
    void torqueLimitCheck(MOTOR_Vars_t *pMotor)
    {
    
    #if(DYNAMIC_TORQUE_LIMIT)
        /*
         * Dynamic torque limit.
         * Dynamic torque limit to achieve maximum possible acceleration, without breaching the OCP limit of the HW.
         * At the Moment with a fixed torque limit set point, the acceleration will depend on the load.
         * At the same fixed torque limit setpoint, No-load will have lower acceleration and
         * as the load is given the acceleration will change.
         * This is verified on the oscilloscope seeing the maximum amplitude of the motor phase current during Motor acceleration.
         */
        float32_t torqueLimitHigh = getTorqueLimit(pMotor);
        float32_t torqueLimitLow = -1.0f * torqueLimitHigh;
    #else
        /*
         * Fixed Torque Limit
         */
        float32_t torqueLimitHigh = SPEED_LOOP_TORQUE_LIMIT;
        float32_t torqueLimitLow = -1.0f * torqueLimitHigh;
    #endif
        float32_t reductionFactor = 0.0f;
    
        ***(pMotor);       //Calculate the torque from the Current(pi_iq.ref) and Motor constant Kt.
        if(pMotor->speedRef > 0)    //Clockwise Rotation
        {
            if (pMotor->TorqueNmRef > torqueLimitHigh)
            {
                //Calculate the torque reduction factor
                reductionFactor = __divf32(torqueLimitHigh, pMotor->TorqueNmRef);
    
                //Reduce the speed reference to maintain limited torque.
                pMotor->rc.SetpointValue *= reductionFactor;
            }
        }
        if(pMotor->speedRef < 0)    //Anti-Clockwise Rotation
        {
            if (pMotor->TorqueNmRef < torqueLimitLow)
            {
                //Calculate the torque reduction factor
                reductionFactor = __divf32(torqueLimitLow, pMotor->TorqueNmRef);
    
                //Reduce the speed reference to maintain limited torque.
                pMotor->rc.SetpointValue *= reductionFactor;
            }
        }
    }

    能否验证这是否是在速度环路内实施扭矩限制的正确方法。

    谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

     能帮你忙吗?

    我还找到了另一种限制最大扭矩的方法、这是限制 pi_iq.ref 值。

    有点像这样:

    #if(TORQUE_LIMIT_BY_CURRENT)
        TestTorqueLimit = getTorqueLimit(pMotor);
        if(pMotor->speedRef > 0.0f)    //Clockwise Rotation
        {
            pMotor->ptrFCL->pi_iq.ref = fminf(pMotor->ptrFCL->pi_iq.ref,TestTorqueLimit);
            if(pMotor->ptrFCL->pi_iq.ref == TestTorqueLimit)    //Speed loop Integral accumulation error reset
            {
                pMotor->pid_spd.data.ui = 0.0f;
                pMotor->pid_spd.data.i1 = 0.0f;
            }
        }
        if(pMotor->speedRef < 0.0f)    //Counter-Clockwise rotation
        {
            pMotor->ptrFCL->pi_iq.ref = fmaxf(pMotor->ptrFCL->pi_iq.ref,(-1.0f * TestTorqueLimit));
            if(pMotor->ptrFCL->pi_iq.ref == (-1.0f * TestTorqueLimit))  //Speed loop Integral accumulation error reset
            {
                pMotor->pid_spd.data.ui = -0.0f;
                pMotor->pid_spd.data.i1 = -0.0f;
            }
        }
        //Check Boundary condition of pi_iq.ref
        pMotor->ptrFCL->pi_iq.ref = limitToRange(pMotor->ptrFCL->pi_iq.ref, TestTorqueLimit, (-1.0f * TestTorqueLimit));
    
    #endif

    您能建议一下这种方式是否正确吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、

    可以。 从理论上讲、可以通过将 限制设置 为 IQ_ref 来设置转矩限值。 您是否有机会尝试一下这个实现方案? 性能是否符合您的预期?

    谢谢。

    嘉兴市

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的嘉兴:

    是的、我尝试通过限制电流(IQ_ref)来实现扭矩限制。 它确实工作得很好。

    我目前所做的一件事是、如果我将 IQ_ref 设置为以 pu 为单位的值、扭矩会受到限制、但我如何将其转换为以 Nm 为单位的实际扭矩?

    你能给我任何保证吗?

    谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您需要添加一个函数、以便根据转矩电流和电机参数计算转矩。 您可以 在电机控制教材中找到计算公式。