/* * 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 #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; /* '/Switch' */ uint16_T Divide; /* '/Divide' */ uint16_T Merge; /* '/Merge' */ uint16_T Merge1; /* '/Merge1' */ } B_SOC_c_T; /* Block states (default storage) for model 'SOC' */ typedef struct { real_T UnitDelay_DSTATE; /* '/Unit Delay' */ real_T UnitDelay_DSTATE_c; /* '/Unit Delay' */ real_T UnitDelay1_DSTATE[4]; /* '/Unit Delay1' */ real_T UnitDelay_DSTATE_o; /* '/Unit Delay' */ real_T UnitDelay_DSTATE_e; /* '/Unit Delay' */ real_T UnitDelay1_DSTATE_j[4]; /* '/Unit Delay1' */ real_T UnitDelay2_DSTATE; /* '/Unit Delay2' */ real_T UnitDelay1_DSTATE_h; /* '/Unit Delay1' */ real_T UnitDelay3_DSTATE[2]; /* '/Unit Delay3' */ real_T UnitDelay2_DSTATE_k; /* '/Unit Delay2' */ real_T UnitDelay1_DSTATE_l; /* '/Unit Delay1' */ real_T UnitDelay3_DSTATE_g[2]; /* '/Unit Delay3' */ real_T Divide_DWORK4; /* '/Divide' */ real_T Divide_DWORK4_c; /* '/Divide' */ int32_T UnitDelay1_DSTATE_b; /* '/Unit Delay1' */ uint16_T UnitDelay_DSTATE_i; /* '/Unit Delay' */ uint16_T UnitDelay_DSTATE_l; /* '/Unit Delay' */ uint16_T UnitDelay_DSTATE_h; /* '/Unit Delay' */ uint16_T UnitDelay7_DSTATE; /* '/Unit Delay7' */ uint16_T UnitDelay3_DSTATE_l; /* '/Unit Delay3' */ uint16_T UnitDelay6_DSTATE; /* '/Unit Delay6' */ uint16_T UnitDelay4_DSTATE; /* '/Unit Delay4' */ uint16_T UnitDelay3_DSTATE_p; /* '/Unit Delay3' */ uint16_T UnitDelay1_DSTATE_o; /* '/Unit Delay1' */ uint16_T UnitDelay1_DSTATE_i; /* '/Unit Delay1' */ uint16_T UnitDelay_DSTATE_b; /* '/Unit Delay' */ uint8_T UnitDelay_DSTATE_m; /* '/Unit Delay' */ uint8_T UnitDelay1_DSTATE_a; /* '/Unit Delay1' */ uint8_T UnitDelay2_DSTATE_d; /* '/Unit Delay2' */ boolean_T UnitDelay_DSTATE_et; /* '/Unit Delay' */ boolean_T UnitDelay1_DSTATE_c; /* '/Unit Delay1' */ boolean_T UnitDelay_DSTATE_j; /* '/Unit Delay' */ boolean_T UnitDelay5_DSTATE; /* '/Unit Delay5' */ boolean_T UnitDelay_DSTATE_cu; /* '/Unit Delay' */ boolean_T UnitDelay_DSTATE_iz; /* '/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; /* '/Saturation' */ /* 安时SOC; */ extern uint16_T socd_pct_battSoc; /* '/Signal Conversion' */ /* 电池真实SOC; */ extern uint16_T socd_pct_battSocEi; /* 电池真实SOC 读取量; */ extern uint16_T socd_pct_battSocEo; /* '/Signal Conversion1' */ /* 电池真实SOC 写入量; */ extern uint16_T socd_pct_bcuSoc; /* '/Signal Conversion2' */ /* 电池显示SOC; */ extern uint16_T socd_pct_bcuSocEi; /* 电池显示SOC读取量; */ extern uint16_T socd_pct_bcuSocEo; /* '/Signal Conversion3' */ /* 电池显示SOC写入量; */ extern uint16_T sohd_pct_bcuSoh; /* 电池SOH; */ /*- * These blocks were eliminated from the model due to optimizations: * * Block '/Display' : Unused code path elimination * Block '/Display' : Unused code path elimination * Block '/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 /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('') - opens system 3 * hilite_system('/Kp') - opens and selects block Kp which resides in S3 * * Here is the system hierarchy for this model * * '' : 'SOC' * '' : 'SOC/SOC' * '' : 'SOC/SOC/EEcheck' * '' : 'SOC/SOC/EKF' * '' : 'SOC/SOC/EKF1' * '' : 'SOC/SOC/Inti_correct' * '' : 'SOC/SOC/bcusoc' * '' : 'SOC/SOC/estSOC' * '' : 'SOC/SOC/EEcheck/If Action Subsystem' * '' : 'SOC/SOC/EEcheck/If Action Subsystem1' * '' : 'SOC/SOC/EEcheck/Subsystem' * '' : 'SOC/SOC/EKF/EFKmax' * '' : 'SOC/SOC/EKF/EFKmin' * '' : 'SOC/SOC/EKF/EKF' * '' : 'SOC/SOC/EKF/EFKmax/初始' * '' : 'SOC/SOC/EKF/EFKmax/协方差更新' * '' : 'SOC/SOC/EKF/EFKmax/协方差计算' * '' : 'SOC/SOC/EKF/EFKmax/卡尔曼增益' * '' : 'SOC/SOC/EKF/EFKmax/状态修正' * '' : 'SOC/SOC/EKF/EFKmax/状态更新' * '' : 'SOC/SOC/EKF/EFKmax/电池参数' * '' : 'SOC/SOC/EKF/EFKmax/矩阵计算' * '' : 'SOC/SOC/EKF/EFKmax/矩阵计算/MATLAB Function' * '' : 'SOC/SOC/EKF/EFKmin/初始' * '' : 'SOC/SOC/EKF/EFKmin/协方差更新' * '' : 'SOC/SOC/EKF/EFKmin/协方差计算' * '' : 'SOC/SOC/EKF/EFKmin/卡尔曼增益' * '' : 'SOC/SOC/EKF/EFKmin/状态修正' * '' : 'SOC/SOC/EKF/EFKmin/状态更新' * '' : 'SOC/SOC/EKF/EFKmin/电池参数' * '' : 'SOC/SOC/EKF/EFKmin/矩阵计算' * '' : 'SOC/SOC/EKF/EFKmin/矩阵计算/MATLAB Function' * '' : 'SOC/SOC/bcusoc/SOCfit' * '' : 'SOC/SOC/bcusoc/keep' * '' : 'SOC/SOC/bcusoc/SOCfit/If Action Subsystem' * '' : 'SOC/SOC/bcusoc/SOCfit/If Action Subsystem1' * '' : 'SOC/SOC/bcusoc/SOCfit/If Action Subsystem2' * '' : 'SOC/SOC/estSOC/If Action Subsystem2' * '' : 'SOC/SOC/estSOC/Time++' * '' : 'SOC/SOC/estSOC/chrgCCV' * '' : 'SOC/SOC/estSOC/disChrgCCV' * '' : 'SOC/SOC/estSOC/chrgCCV/Subsystem' * '' : 'SOC/SOC/estSOC/chrgCCV/Subsystem2' * '' : 'SOC/SOC/estSOC/chrgCCV/keep' * '' : 'SOC/SOC/estSOC/disChrgCCV/Subsystem2' * '' : 'SOC/SOC/estSOC/disChrgCCV/keep' */ #endif /* RTW_HEADER_SOC_h_ */ /* * File trailer for generated code. * * [EOF] */