• 第三阶段学习beiqi3


    滑行回馈力矩给定修改力矩

    1. if(1 == Vehicle_cmd.cmdmode.data.slip_feedback_flag)//滑行回馈
    2. {
    3. motor_regen_power = EV_MCU_Para.field.Motor_regen_power_slip_level;//滑行固定功率在 10kw *****11.22 这里除去2 5kw
    4. motor_regen_trq_lmt = _IQmpyI32(motor_regen_power, 9550) / 3000;//IQ10 10kw恒功率下的3000转速的 力矩31
    5. motor_regen_trq_lmt = _IQ10mpy(motor_regen_trq_lmt, SysBase.invtorque);//IQ24 乘以系数后的 最大力矩限制 31
    6. motor_regen_trq_throad = _IQmpyI32(10, SysBase.invtorque);//IQ24 10N的力矩系数
    7. if (motor_regen_trq_lmt > motor_regen_trq_throad)
    8. {
    9. motor_regen_trq_deta = motor_regen_trq_lmt - motor_regen_trq_throad;//IQ24 大概 21
    10. motor_regen_trq_start = motor_regen_trq_throad;//IQ24 大概 10
    11. }
    12. else
    13. {
    14. motor_regen_trq_deta = 0;//IQ24
    15. motor_regen_trq_start = motor_regen_trq_lmt;
    16. }
    17. if (speed >= 3000)//恒功率回馈
    18. {
    19. trq = _IQmpyI32(motor_regen_power, 9550) / speed;//IQ10 //此处可以调小功率,以致调小回馈
    20. sysCfgPara.TrqCmd_NEW = 0 - _IQ10mpy(trq, SysBase.invtorque);//IQ24
    21. }
    22. else if (speed >= 1500)//XN.m--->10N.m
    23. {/* 如下可以列出数学式子 最终得到 trq* (speed-1500)/ 1500 = k_tmp
    24. 大概是速度超出1500的余量 占据1500的比例 用这个比例获得trq力矩 */
    25. trq = motor_regen_trq_deta; //21的力矩 这里除去 5 减少滑行力矩 滑行回馈电流***************************************
    26. k_tmp = _IQdiv(trq, _IQmpyI32(1500, SysBase.invspeed));
    27. k_tmp = _IQmpy(_IQmpyI32((speed - 1500), SysBase.invspeed), k_tmp);
    28. trq = motor_regen_trq_start + k_tmp;//最终力矩 10+k_tmp
    29. sysCfgPara.TrqCmd_NEW = 0 - trq;
    30. }
    31. else if (speed >= 500)//10N.m--->0N.m
    32. {
    33. trq = motor_regen_trq_start;
    34. k_tmp = _IQdiv(trq, _IQmpyI32(1000, SysBase.invspeed));
    35. k_tmp = _IQmpy(_IQmpyI32((speed - 500), SysBase.invspeed), k_tmp);
    36. sysCfgPara.TrqCmd_NEW = 0 - k_tmp;
    37. }
    38. else
    39. {
    40. sysCfgPara.TrqCmd_NEW = 0;
    41. }
    42. if(sysCfgPara.TrqCmd_NEW < -trqLoopPara.Max_TorqueGen)//力矩下限保护
    43. {
    44. sysCfgPara.TrqCmd_NEW = -trqLoopPara.Max_TorqueGen;
    45. }
    46. }
    在1500判断中的大概分解

    令 SysBase.invspeed为s

    第一个 k_tmp=trq/(1500s)

    第一个 k_tmp=( trq/(1500s))* ((speed -1500)*s)消除有k_tmp= trq*(speed-1500)/1500

    所以k_tmp=trq*(speed-1500)/1500

    T =10+   T*(1500-speed)/1500   大概意思是   T增加 多余的速度占1500的比 的T力矩 

  • 相关阅读:
    PHP 变动:用于创建常量数组的 define() 与 const
    外贸人必备!最全英语口语汇总
    Centos下安装 oracle11g 博客2
    你的小程序为什么还是不被用户看好?
    分布式理论须知
    【十分钟】manim安装 2022
    C语言实现四元数的乘法(三维矢量、四元数以及旋转矢量与四元数相乘源码)
    使用 R 和 ggraph 自定义树状图
    MySQL - 为什么索引结构默认使用B+树,而不是其他?
    python基础语法(1)
  • 原文地址:https://blog.csdn.net/qq_36658033/article/details/134562261