mppt/App/inc/parameter.h

80 lines
3.7 KiB
C
Raw Normal View History

/*
* parameter.h
*
* Created on: 2024<EFBFBD><EFBFBD>10<EFBFBD><EFBFBD>12<EFBFBD><EFBFBD>
* Author: psx
*/
#ifndef APP_INC_PARAMETER_H_
#define APP_INC_PARAMETER_H_
#include "debug.h"
#include "math.h"
#include "uart_dev.h"
typedef struct _Mppt_controlparameter{
float_t constantVoltageV; /* <20><>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>ConstantVoltageV<65>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>FloatI + 0.1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD>(ConstantVoltageV - 0.2) <EFBFBD><EFBFBD><EFBFBD>к<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (V) */
float_t floatI; /* <20><>ѹ<EFBFBD><D1B9><EFBFBD>ڸ<EFBFBD>ConstantVoltageV<65>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FloatI<74><49><EFBFBD>и<EFBFBD><D0B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (A) */
float_t startSolarOpenCircuitV; /* ̫<><CCAB><EFBFBD>ܰ忪·<E5BFAA><C2B7>ѹ<EFBFBD><D1B9><EFBFBD>ڸõ<DAB8>ѹ<EFBFBD><D1B9>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD> (V) */
float_t stopSolarOpenCircuitV; /* ̫<><CCAB><EFBFBD>ܰ忪·<E5BFAA><C2B7>ѹ<EFBFBD><D1B9><EFBFBD>ڸõ<DAB8>ѹֹͣ<CDA3><D6B9><EFBFBD><EFBFBD> (V) */
float_t constantVoltageChargeV; /* <20><>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ (V) */
float_t FloatV; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ (V) */
float_t loopImpedance; /* <20><>·<EFBFBD><EFBFBD><E8BFB9>С (m<><6D>) */
float_t HighSideMosTemperature_stop; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶ȴﵽ<C8B4><EFB5BD>ֵʱ<D6B5><CAB1>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD> (<28><>C) */
float_t HighSideMosTemperature_end; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵʱ<D6B5><CAB1><EFBFBD><EFBFBD><EFBFBD>͹<EFBFBD><CDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>C) */
float_t HighSideMosTemperature_start; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶Ƚ<C2B6><C8BD>͵<EFBFBD><CDB5><EFBFBD>ֵʱ<D6B5><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>C) */
uint16_t sensorEnableBroadcastTime; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٴ<EFBFBD>ע<EFBFBD><D7A2><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> */
uint16_t checkSolarOpenCircuitVTime; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̫<EFBFBD><CCAB><EFBFBD>ܰ忪·<E5BFAA><C2B7>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> (S) */
uint16_t outputAgainFlagTime; /* <20><><EFBFBD>ֶ<EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3>ö<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ٴμ<D9B4><CEBC><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB>·<EFBFBD><C2B7><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD> (S) */
uint16_t excessiveLoadFlagTime; /* <20><><EFBFBD>ֹ<EFBFBD><D6B9>غ<EFBFBD><D8BA><EFBFBD><EFBFBD>ڸü<DAB8><C3BC><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ж<EFBFBD><D0B6>Σ<EFBFBD>2<EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9>أ<EFBFBD><D8A3><EFBFBD><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD> (S) */
uint16_t eLAgainTime; /* <20><><EFBFBD>ֹ<EFBFBD><D6B9>ع<EFBFBD><D8B9>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸü<DAB8><C3BC><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٴγ<D9B4><CEB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (S) */
} Mppt_controlparameter;
extern Mppt_controlparameter g_controlParameter;
typedef struct _Mppt_otherParameter{
/* SL */
uint8_t address[7]; /* <20><>ַ */
uint16_t Access_Node_Type; /* <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> */
uint16_t Communication_Methods; /* ͨ<>ŷ<EFBFBD>ʽ */
uint16_t Registration_Status; /* ע<><D7A2>״̬ */
uint32_t gw485_Baud; /* <20><><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD> */
uint32_t bat485_Baud; /* <20><><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD>,Ϊ0<CEAA><30><EFBFBD><EFBFBD>bms<6D><73>֧<EFBFBD><D6A7>ͨ<EFBFBD><CDA8> */
/* HY */
uint8_t hardwareID[6]; /* Ӳ<><D3B2>ID */
uint8_t communicationID[4]; /* ͨ<><CDA8>ID */
uint8_t protocolType; /* Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; 0x01<30><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ԴЭ<D4B4><D0AD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>9600) 0x02<30><32>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD><D0AD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>115200)*/
float_t Battery_Voltage; /* <20><><EFBFBD>ص<EFBFBD>ѹ (V) */
float_t Output_Voltage; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ */
float_t Charg_Current; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD>أ<EFBFBD> (A) */
float_t Discharg_Current; /* <20>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD> (A) */
float_t Input_Voltage; /* ̫<><CCAB><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ (V) */
float_t Solar_Open_Circuit_Voltage; /* ̫<><CCAB><EFBFBD>ܰ忪·<E5BFAA><C2B7>ѹ (V) */
float_t HighSideMos_Temperature; /* <20>߶<EFBFBD>mos<6F><73><EFBFBD><EFBFBD> (<28><>C) */
float_t Solar_In_Circuit_Voltage; /* ̫<><CCAB><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ (V) */
float_t Charg_BatteryCurrent; /* <20><><EFBFBD>س<EFBFBD><D8B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD> (A) */
float_t totalElectricityConsumption; /* <20>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
float_t totalChargCapacity; /* <20>ܳ<EFBFBD><DCB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
float_t SOC; /* ʣ<><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint16_t chargMos_State; /* <20><><EFBFBD><EFBFBD><E7BFAA>״̬ */
uint16_t DischargMos_State; /* <20>ŵ<EFBFBD>mos<6F><73>״̬ */
uint16_t MPPT_Mode; /* <20><><EFBFBD><EFBFBD>ģʽ */
uint8_t versionInformation[13]; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B1BE>Ϣ */
}Mppt_otherParameter;
extern Mppt_otherParameter g_otherParameter;
#endif /* APP_INC_PARAMETER_H_ */