ADM/GW/src/Motor_Dymics_Logic/wheelSpd2.h

186 lines
7.1 KiB
C

/*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* File: wheelSpd2.h
*
* Code generated for Simulink model 'wheelSpd2'.
*
* Model version : 11.6
* Simulink Coder version : 9.9 (R2023a) 19-Nov-2022
* C/C++ source code generated on : Thu Sep 26 15:48:20 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: NXP->Cortex-M4
* Code generation objectives:
* 1. Execution efficiency
* 2. Debugging
* Validation result: Not run
*/
#ifndef RTW_HEADER_wheelSpd2_h_
#define RTW_HEADER_wheelSpd2_h_
#ifndef wheelSpd2_COMMON_INCLUDES_
#define wheelSpd2_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif /* wheelSpd2_COMMON_INCLUDES_ */
/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
#endif
#ifndef rtmSetErrorStatus
#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
#endif
/* Forward declaration for rtModel */
typedef struct Dynamics_tag_RTM Dynamics_RT_MODEL;
/* Block signals and states (default storage) for system '<Root>' */
typedef struct {
real_T Dynamics_Delay_DSTATE[2]; /* '<S22>/Delay' */
real_T Dynamics_Delay3_DSTATE[2]; /* '<S22>/Delay3' */
real_T Dynamics_Delay_DSTATE_f[2]; /* '<S14>/Delay' */
real_T Dynamics_Delay3_DSTATE_d[2]; /* '<S14>/Delay3' */
real_T Dynamics_d1_DSTATE; /* '<S7>/d1' */
real_T Dynamics_d_DSTATE; /* '<S7>/d' */
real_T Dynamics_d_DSTATE_c; /* '<S18>/d' */
real_T Dynamics_d1_DSTATE_e; /* '<S18>/d1' */
real_T Dynamics_d_DSTATE_h; /* '<S19>/d' */
real_T Dynamics_d1_DSTATE_p; /* '<S19>/d1' */
real_T Dynamics_d_DSTATE_g; /* '<S20>/d' */
real_T Dynamics_d1_DSTATE_a; /* '<S20>/d1' */
real_T Dynamics_Delay1_DSTATE; /* '<S22>/Delay1' */
real_T Dynamics_Delay2_DSTATE; /* '<S22>/Delay2' */
real_T Dynamics_d1_DSTATE_b; /* '<S21>/d1' */
real_T Dynamics_d_DSTATE_b; /* '<S21>/d' */
real_T Dynamics_d_DSTATE_hu; /* '<S10>/d' */
real_T Dynamics_d1_DSTATE_ad; /* '<S10>/d1' */
real_T Dynamics_d_DSTATE_c4; /* '<S11>/d' */
real_T Dynamics_d1_DSTATE_i; /* '<S11>/d1' */
real_T Dynamics_d_DSTATE_d; /* '<S12>/d' */
real_T Dynamics_d1_DSTATE_e0; /* '<S12>/d1' */
real_T Dynamics_d1_DSTATE_h; /* '<S13>/d1' */
real_T Dynamics_d_DSTATE_l; /* '<S13>/d' */
real_T Dynamics_Delay1_DSTATE_a; /* '<S14>/Delay1' */
real_T Dynamics_Delay2_DSTATE_b; /* '<S14>/Delay2' */
real_T Dynamics_PrevY; /* '<Root>/Input_Vx_RateLimiter' */
real_T Dynamics_PrevY_e; /* '<Root>/TargetSpd_RateLimiter' */
real_T Dynamics_PrevY_f; /* '<Root>/Brake_Out_RateLimiter' */
real_T Dynamics_Memory_PreviousInput;/* '<Root>/Memory' */
} Dynamics_DW;
/* External inputs (root inport signals with default storage) */
typedef struct {
real_T Dynamics_RPM; /* '<Root>/<RPM>' */
real_T Dynamics_TQ; /* '<Root>/<TQ>' */
real_T Dynamics_Brake_input; /* '<Root>/<Brake_input>' */
real_T Dynamics_Vx_Cmd; /* '<Root>/<Vx_Cmd>' */
real_T Dynamics_Vx_Limit; /* '<Root>/<Vx_Limit>' */
real_T Dynamics_VCU_Vx_Fbk; /* '<Root>/<VCU_Vx_Fbk>' */
real_T Dynamics_RC_GearPosition; /* '<Root>/<RC_GearPosition>' */
} Dynamics_ExtU;
/* External outputs (root outports fed by signals with default storage) */
typedef struct {
real_T Dynamics_Brake_cmd_out; /* '<Root>/Brake_cmd_out' */
real_T Dynamics_Torq_cmd_out1; /* '<Root>/Torq_cmd_out1' */
} Dynamics_ExtY;
/* Real-time Model Data Structure */
struct Dynamics_tag_RTM {
const char_T * volatile errorStatus;
};
/* Block signals and states (default storage) */
extern Dynamics_DW Dynamics_rtDW;
/* External inputs (root inport signals with default storage) */
extern Dynamics_ExtU Dynamics_rtU;
/* External outputs (root outports fed by signals with default storage) */
extern Dynamics_ExtY Dynamics_rtY;
/* Model entry point functions */
extern void wheelSpd2_initialize(void);
extern void wheelSpd2_step(void);
/* Real-time Model object */
extern Dynamics_RT_MODEL *const Dynamics_rtM;
/*-
* These blocks were eliminated from the model due to optimizations:
*
* Block '<S4>/BW_PI' : Unused code path elimination
* Block '<S4>/Constant1' : Unused code path elimination
* Block '<S4>/Constant16' : Unused code path elimination
* Block '<S4>/Constant17' : Unused code path elimination
* Block '<S4>/Constant2' : Unused code path elimination
* Block '<Root>/Vx_Cmd' : Unused code path elimination
* Block '<Root>/ControlFlag' : Eliminated nontunable gain of 1
* Block '<S4>/FBGain' : Eliminated nontunable gain of 1
* Block '<S16>/FFGain' : Eliminated nontunable gain of 1
* Block '<S23>/Constant1' : Unused code path elimination
* Block '<S23>/Constant2' : Unused code path elimination
* Block '<S23>/Switch' : Unused code path elimination
* Block '<S23>/Switch1' : Unused code path elimination
* Block '<S23>/Switch2' : Unused code path elimination
* Block '<S23>/Switch3' : Unused code path elimination
* Block '<S9>/Creeping_Flag' : Unused code path elimination
*/
/*-
* The generated code includes comments that allow you to trace directly
* back to the appropriate location in the model. The basic format
* is <system>/block_name, where system is the system number (uniquely
* assigned by Simulink) and block_name is the name of the block.
*
* Use the MATLAB hilite_system command to trace the generated code back
* to the model. For example,
*
* hilite_system('<S3>') - opens system 3
* hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
*
* Here is the system hierarchy for this model
*
* '<Root>' : 'wheelSpd2'
* '<S1>' : 'wheelSpd2/DOB'
* '<S2>' : 'wheelSpd2/DOB_Gain'
* '<S3>' : 'wheelSpd2/Error_Initalize_Brake'
* '<S4>' : 'wheelSpd2/FF_PID_Controller'
* '<S5>' : 'wheelSpd2/GearCondition_Brake'
* '<S6>' : 'wheelSpd2/Gear_pos_out'
* '<S7>' : 'wheelSpd2/LPFM'
* '<S8>' : 'wheelSpd2/Target_RPM'
* '<S9>' : 'wheelSpd2/Vx_Logic'
* '<S10>' : 'wheelSpd2/DOB/Dot3'
* '<S11>' : 'wheelSpd2/DOB/Dot4'
* '<S12>' : 'wheelSpd2/DOB/Dot5'
* '<S13>' : 'wheelSpd2/DOB/LPFM'
* '<S14>' : 'wheelSpd2/DOB/Second order LPF'
* '<S15>' : 'wheelSpd2/FF_PID_Controller/FB'
* '<S16>' : 'wheelSpd2/FF_PID_Controller/FF'
* '<S17>' : 'wheelSpd2/FF_PID_Controller/FB/P'
* '<S18>' : 'wheelSpd2/FF_PID_Controller/FF/Dot'
* '<S19>' : 'wheelSpd2/FF_PID_Controller/FF/Dot2'
* '<S20>' : 'wheelSpd2/FF_PID_Controller/FF/Dot3'
* '<S21>' : 'wheelSpd2/FF_PID_Controller/FF/LPFM'
* '<S22>' : 'wheelSpd2/FF_PID_Controller/FF/Second order LPF'
* '<S23>' : 'wheelSpd2/Vx_Logic/Creeping Control'
* '<S24>' : 'wheelSpd2/Vx_Logic/Vx_OutPut_Function'
*/
/*-
* Requirements for '<Root>': wheelSpd2
*/
#endif /* RTW_HEADER_wheelSpd2_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/