123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- /**
- * @file cmd_torque_gen.h
- * @author Zhang, Kai(zhangkai71@midea.com)
- * @brief Time task control
- * @version 0.1
- * @date 2021-09-27
- *
- * @copyright Copyright (c) 2021
- *
- */
- #ifndef CMD_TORQUE_GEN_H
- #define CMD_TORQUE_GEN_H
- #include "typedefine.h"
- /****************************************
- *
- * Definitions & Macros
- *
- ****************************************/
- /***************************************
- *
- * Type Definations
- *
- ***************************************/
- /**
- * @brief torque command input
- *
- */
- typedef struct
- {
- SWORD swTorqCmdRpm;
- SWORD swTorqNowPu;
- } CMD_TORQ_IN;
- /**
- * @brief torque command coefficient input
- *
- */
- typedef struct
- {
- ULONG ulAccelPu;
- ULONG ulDecelPu;
- SWORD swBrakeSpdDeltaPu;
- } CMD_TORQ_COF_IN;
- /**
- * @brief torque command output
- *
- */
- typedef struct
- {
- SWORD swNewTorqRefPu;
- SWORD swOldTorqRefPu;
- SWORD swNewCmdDir;
- SWORD swOldCmdDir;
- // FlagStatus blConsVolBrakeFlg;
- BOOL blConsVolBrakeFlg;
- SWORD swIntRefPu; // Q14, command pu ,(electrical value)
- SLONG slIntRefPu;
- SWORD swMotorDir;
- } CMD_TORQ_OUT;
- /**
- * @brief torque command coefficient
- *
- */
- typedef struct
- {
- ULONG ulAccelPu;
- ULONG ulDecelPu;
- SWORD swBrakeSpdDeltaPu;
- } CMD_TORQ_COF;
- typedef struct
- {
- CMD_TORQ_COF Coef; ///< Coefficient of current PI controller
- CMD_TORQ_OUT Out; ///< Output of current PU controller
- } CMD_TORQ_CONTROL;
- /****************************************
- *
- * Exported variable
- *
- ****************************************/
- /***************************************
- *
- * Function Definations
- *
- ***************************************/
- /**
- * @brief Process when switching state from Ready to Run
- *
- */
- void cmd_voTorqInit(void);
- /**
- * @brief Process of FSM during SysInit state
- *
- */
- void cmd_voTorqOut(void);
- /**
- * @brief Process of FSM during SysRdy state
- *
- */
- void cmd_voTorqCoef(void);
- #endif
|