添加电池欠压保护
This commit is contained in:
parent
3758a65139
commit
d95bb1c141
|
@ -47,6 +47,7 @@ typedef struct _config_parameter{
|
|||
float softStartVolt; /* 软启动阈值电压 */
|
||||
float MPPTConstantVoltage; /* MPPT恒定输出电压 */
|
||||
float MPPTReduceConstantVoltage; /* MPPT降功率运行时控制输入电压稳定值 */
|
||||
float underVoltageProtection; /* 电池欠压保护电压 */
|
||||
|
||||
/* SL */
|
||||
uint16_t Access_Node_Type; /* 接入节点类型 */
|
||||
|
|
|
@ -150,6 +150,10 @@ void insertEventsOrderRecord(eventsOrderRecordMode mode)
|
|||
soeInfo.insertData->temp = getSolarInCircuitVoltage();
|
||||
}
|
||||
|
||||
else if (mode == underVoltageProtection) {
|
||||
soeInfo.insertData->temp = getBatteryVoltage();
|
||||
}
|
||||
|
||||
else {
|
||||
soeInfo.count++;
|
||||
return;
|
||||
|
|
|
@ -281,6 +281,7 @@ void config_info_start(void)
|
|||
g_cfgParameter.softStartVolt = 18.5f;
|
||||
g_cfgParameter.MPPTConstantVoltage = 17.0f;
|
||||
g_cfgParameter.MPPTReduceConstantVoltage = 20.0f;
|
||||
g_cfgParameter.underVoltageProtection = 12.0f;
|
||||
|
||||
/* 读取的回路阻抗无效则回路阻抗设置为0 */
|
||||
float fTemp;
|
||||
|
|
|
@ -362,7 +362,27 @@ void Task_refreshJudgeData(void)
|
|||
num = 0;
|
||||
setSOC();
|
||||
}
|
||||
|
||||
|
||||
/* 欠压保护 */
|
||||
/* 连续两次电池电压过低,则关闭输出 */
|
||||
static uint8_t numLow = 0;
|
||||
static uint8_t volageLowFlag = 0;
|
||||
if (getBatteryState() && getBatteryVoltage() < g_cfgParameter.underVoltageProtection) {
|
||||
numLow++;
|
||||
}
|
||||
else {
|
||||
numLow = 0;
|
||||
}
|
||||
if (numLow == 2) {
|
||||
setPowerOutput(FALSE);
|
||||
insertEventsOrderRecord(underVoltageProtection);
|
||||
volageLowFlag = 1;
|
||||
}
|
||||
/* 电压过低后,再次恢复正常电压,则打开输出接口 */
|
||||
if (volageLowFlag && getBatteryState() && getBatteryVoltage() > g_cfgParameter.underVoltageProtection + 0.5f) {
|
||||
setPowerOutput(TRUE);
|
||||
volageLowFlag = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ typedef enum {
|
|||
InputProtection, //软件防反输入保护
|
||||
startEvent, //启动
|
||||
abnormalControl, //异常控制
|
||||
underVoltageProtection, //电池的欠压保护
|
||||
}eventsOrderRecordMode;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue