123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- /*
- * File: SOC.h
- *
- * Code generated for Simulink model 'SOC'.
- *
- * Model version : 1.24
- * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
- * C/C++ source code generated on : Thu Aug 12 17:54:23 2021
- *
- * Target selection: ert.tlc
- * Embedded hardware selection: Intel->x86-64 (Windows64)
- * Code generation objectives: Unspecified
- * Validation result: Not run
- */
- #ifndef RTW_HEADER_SOC_h_
- #define RTW_HEADER_SOC_h_
- #include <math.h>
- #ifndef SOC_COMMON_INCLUDES_
- #define SOC_COMMON_INCLUDES_
- #include "rtwtypes.h"
- #endif /* SOC_COMMON_INCLUDES_ */
- #include "SOC_types.h"
- /* Block signals for model 'SOC' */
- typedef struct {
- uint16_T Switch; /* '<S5>/Switch' */
- uint16_T Divide; /* '<S5>/Divide' */
- uint16_T Merge; /* '<S2>/Merge' */
- uint16_T Merge1; /* '<S2>/Merge1' */
- } B_SOC_c_T;
- /* Block states (default storage) for model 'SOC' */
- typedef struct {
- real_T UnitDelay_DSTATE; /* '<S11>/Unit Delay' */
- real_T UnitDelay_DSTATE_c; /* '<S14>/Unit Delay' */
- real_T UnitDelay1_DSTATE[4]; /* '<S11>/Unit Delay1' */
- real_T UnitDelay_DSTATE_o; /* '<S12>/Unit Delay' */
- real_T UnitDelay_DSTATE_e; /* '<S23>/Unit Delay' */
- real_T UnitDelay1_DSTATE_j[4]; /* '<S12>/Unit Delay1' */
- real_T UnitDelay2_DSTATE; /* '<S12>/Unit Delay2' */
- real_T UnitDelay1_DSTATE_h; /* '<S23>/Unit Delay1' */
- real_T UnitDelay3_DSTATE[2]; /* '<S12>/Unit Delay3' */
- real_T UnitDelay2_DSTATE_k; /* '<S11>/Unit Delay2' */
- real_T UnitDelay1_DSTATE_l; /* '<S14>/Unit Delay1' */
- real_T UnitDelay3_DSTATE_g[2]; /* '<S11>/Unit Delay3' */
- real_T Divide_DWORK4; /* '<S17>/Divide' */
- real_T Divide_DWORK4_c; /* '<S26>/Divide' */
- int32_T UnitDelay1_DSTATE_b; /* '<S4>/Unit Delay1' */
- uint16_T UnitDelay_DSTATE_i; /* '<S33>/Unit Delay' */
- uint16_T UnitDelay_DSTATE_l; /* '<S45>/Unit Delay' */
- uint16_T UnitDelay_DSTATE_h; /* '<S43>/Unit Delay' */
- uint16_T UnitDelay7_DSTATE; /* '<S6>/Unit Delay7' */
- uint16_T UnitDelay3_DSTATE_l; /* '<S6>/Unit Delay3' */
- uint16_T UnitDelay6_DSTATE; /* '<S6>/Unit Delay6' */
- uint16_T UnitDelay4_DSTATE; /* '<S6>/Unit Delay4' */
- uint16_T UnitDelay3_DSTATE_p; /* '<S32>/Unit Delay3' */
- uint16_T UnitDelay1_DSTATE_o; /* '<S44>/Unit Delay1' */
- uint16_T UnitDelay1_DSTATE_i; /* '<S42>/Unit Delay1' */
- uint16_T UnitDelay_DSTATE_b; /* '<S41>/Unit Delay' */
- uint8_T UnitDelay_DSTATE_m; /* '<S38>/Unit Delay' */
- uint8_T UnitDelay1_DSTATE_a; /* '<S6>/Unit Delay1' */
- uint8_T UnitDelay2_DSTATE_d; /* '<S6>/Unit Delay2' */
- boolean_T UnitDelay_DSTATE_et; /* '<S1>/Unit Delay' */
- boolean_T UnitDelay1_DSTATE_c; /* '<S1>/Unit Delay1' */
- boolean_T UnitDelay_DSTATE_j; /* '<S6>/Unit Delay' */
- boolean_T UnitDelay5_DSTATE; /* '<S6>/Unit Delay5' */
- boolean_T UnitDelay_DSTATE_cu; /* '<S44>/Unit Delay' */
- boolean_T UnitDelay_DSTATE_iz; /* '<S42>/Unit Delay' */
- } DW_SOC_f_T;
- /* Real-time Model Data Structure */
- struct tag_RTM_SOC_T {
- const char_T **errorStatus;
- };
- typedef struct {
- B_SOC_c_T rtb;
- DW_SOC_f_T rtdw;
- RT_MODEL_SOC_T rtm;
- } MdlrefDW_SOC_T;
- /* Model reference registration function */
- extern void SOC_initialize(const char_T **rt_errorStatus, RT_MODEL_SOC_T *const
- SOC_M);
- extern void SOC_MATLABFunction(real_T rtu_x, real_T *rty_y);
- extern void SOC_Init(DW_SOC_f_T *localDW);
- extern void SOC(B_SOC_c_T *localB, DW_SOC_f_T *localDW);
- /* Exported data declaration */
- /* Declaration for custom storage class: ExportToFile */
- extern int16_T ihd_I_curr;
- /* 电池包电流; */
- extern uint16_T ihd_V_cellUAvrg;
- /* 电池单体电压平均; */
- extern uint16_T ihd_V_cellUMax;
- /* 电池单体电压最大; */
- extern uint16_T ihd_V_cellUMin;
- /* 电池单体电压最小; */
- extern uint8_T ihd_st_workStat;
- /* 电池工作状态; */
- extern uint32_T ihd_tm_parkTime;
- /* 驻车时间; */
- extern uint16_T socd_pct_ahSoc; /* '<S4>/Saturation' */
- /* 安时SOC; */
- extern uint16_T socd_pct_battSoc; /* '<S6>/Signal Conversion' */
- /* 电池真实SOC; */
- extern uint16_T socd_pct_battSocEi;
- /* 电池真实SOC 读取量; */
- extern uint16_T socd_pct_battSocEo; /* '<S6>/Signal Conversion1' */
- /* 电池真实SOC 写入量; */
- extern uint16_T socd_pct_bcuSoc; /* '<S6>/Signal Conversion2' */
- /* 电池显示SOC; */
- extern uint16_T socd_pct_bcuSocEi;
- /* 电池显示SOC读取量; */
- extern uint16_T socd_pct_bcuSocEo; /* '<S6>/Signal Conversion3' */
- /* 电池显示SOC写入量; */
- extern uint16_T sohd_pct_bcuSoh;
- /* 电池SOH; */
- /*-
- * These blocks were eliminated from the model due to optimizations:
- *
- * Block '<S18>/Display' : Unused code path elimination
- * Block '<S27>/Display' : Unused code path elimination
- * Block '<S4>/Scope' : 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>' : 'SOC'
- * '<S1>' : 'SOC/SOC'
- * '<S2>' : 'SOC/SOC/EEcheck'
- * '<S3>' : 'SOC/SOC/EKF'
- * '<S4>' : 'SOC/SOC/EKF1'
- * '<S5>' : 'SOC/SOC/Inti_correct'
- * '<S6>' : 'SOC/SOC/bcusoc'
- * '<S7>' : 'SOC/SOC/estSOC'
- * '<S8>' : 'SOC/SOC/EEcheck/If Action Subsystem'
- * '<S9>' : 'SOC/SOC/EEcheck/If Action Subsystem1'
- * '<S10>' : 'SOC/SOC/EEcheck/Subsystem'
- * '<S11>' : 'SOC/SOC/EKF/EFKmax'
- * '<S12>' : 'SOC/SOC/EKF/EFKmin'
- * '<S13>' : 'SOC/SOC/EKF/EKF'
- * '<S14>' : 'SOC/SOC/EKF/EFKmax/初始'
- * '<S15>' : 'SOC/SOC/EKF/EFKmax/协方差更新'
- * '<S16>' : 'SOC/SOC/EKF/EFKmax/协方差计算'
- * '<S17>' : 'SOC/SOC/EKF/EFKmax/卡尔曼增益'
- * '<S18>' : 'SOC/SOC/EKF/EFKmax/状态修正'
- * '<S19>' : 'SOC/SOC/EKF/EFKmax/状态更新'
- * '<S20>' : 'SOC/SOC/EKF/EFKmax/电池参数'
- * '<S21>' : 'SOC/SOC/EKF/EFKmax/矩阵计算'
- * '<S22>' : 'SOC/SOC/EKF/EFKmax/矩阵计算/MATLAB Function'
- * '<S23>' : 'SOC/SOC/EKF/EFKmin/初始'
- * '<S24>' : 'SOC/SOC/EKF/EFKmin/协方差更新'
- * '<S25>' : 'SOC/SOC/EKF/EFKmin/协方差计算'
- * '<S26>' : 'SOC/SOC/EKF/EFKmin/卡尔曼增益'
- * '<S27>' : 'SOC/SOC/EKF/EFKmin/状态修正'
- * '<S28>' : 'SOC/SOC/EKF/EFKmin/状态更新'
- * '<S29>' : 'SOC/SOC/EKF/EFKmin/电池参数'
- * '<S30>' : 'SOC/SOC/EKF/EFKmin/矩阵计算'
- * '<S31>' : 'SOC/SOC/EKF/EFKmin/矩阵计算/MATLAB Function'
- * '<S32>' : 'SOC/SOC/bcusoc/SOCfit'
- * '<S33>' : 'SOC/SOC/bcusoc/keep'
- * '<S34>' : 'SOC/SOC/bcusoc/SOCfit/If Action Subsystem'
- * '<S35>' : 'SOC/SOC/bcusoc/SOCfit/If Action Subsystem1'
- * '<S36>' : 'SOC/SOC/bcusoc/SOCfit/If Action Subsystem2'
- * '<S37>' : 'SOC/SOC/estSOC/If Action Subsystem2'
- * '<S38>' : 'SOC/SOC/estSOC/Time++'
- * '<S39>' : 'SOC/SOC/estSOC/chrgCCV'
- * '<S40>' : 'SOC/SOC/estSOC/disChrgCCV'
- * '<S41>' : 'SOC/SOC/estSOC/chrgCCV/Subsystem'
- * '<S42>' : 'SOC/SOC/estSOC/chrgCCV/Subsystem2'
- * '<S43>' : 'SOC/SOC/estSOC/chrgCCV/keep'
- * '<S44>' : 'SOC/SOC/estSOC/disChrgCCV/Subsystem2'
- * '<S45>' : 'SOC/SOC/estSOC/disChrgCCV/keep'
- */
- #endif /* RTW_HEADER_SOC_h_ */
- /*
- * File trailer for generated code.
- *
- * [EOF]
- */
|