Battery pack current sensor installation error detection and fault tolerant control method
By employing a multi-dimensional joint diagnostic and graded protection strategy, the problem of incorrect current direction judgment caused by reversed polarity of the current sensor was solved, enabling high-precision state-of-charge estimation and safe and reliable operation of the battery management system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI JIANGHUAI AUTOMOBILE GRP CORP LTD
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-14
Smart Images

Figure CN122379299A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power battery management technology, specifically to a method for detecting and controlling the reverse installation of a battery pack current sensor. Background Technology
[0002] With the rapid development of new energy vehicles and energy storage systems, the role of the Battery Management System (BMS) in vehicle safety and performance is becoming increasingly crucial. Among the core sensing components of the BMS, the current sensor is primarily used to collect charging and discharging current information of the battery pack, serving as a vital basis for state of charge (SOC) estimation, charge / discharge control, and safety protection strategies. In actual production and assembly processes, due to unreasonable connector design or human error, current sensors may be installed with reversed polarity or wiring. Such problems will lead to incorrect current direction determination, affecting SOC estimation results and system control logic, and in severe cases, may even cause safety hazards such as overcharging and over-discharging.
[0003] In existing technologies, methods for handling current sensor anomalies often employ judgment strategies based on a single signal, such as comparing the direction of the charge / discharge control command with that of the acquired current for fault identification. However, such methods rely on a single judgment dimension and are easily affected by instantaneous current fluctuations or changes in operating conditions, leading to misjudgments or missed judgments. They also struggle to accurately distinguish between genuine sensor polarity reversal faults and normal dynamic changes. Furthermore, some solutions directly implement high-voltage disconnection or shutdown protection strategies upon detecting anomalies. While this avoids further safety risks, it lacks fault tolerance, impacts vehicle availability, and fails to address the issue of SOC calculation distortion. In addition, existing technologies generally lack SOC correction and continuous recovery mechanisms for polarity errors, resulting in long-term deviations in battery state estimation, further affecting system control accuracy and lifespan. Therefore, existing technologies still have significant shortcomings in fault diagnosis accuracy, system fault tolerance, and SOC correction mechanisms, requiring further improvement.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a method for detecting and controlling the reverse installation of a battery pack current sensor, so as to solve the problems in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor, comprising the following steps: Perform battery pack power-on initialization, collect battery pack total voltage, individual cell voltage, temperature, bus current and current state of charge, and simultaneously obtain charging commands and discharge permission status; Based on the charging command, discharge permission status and bus current, it is determined whether the current polarity is opposite to the command status. Combined with the battery pack voltage change trend and the state of charge change trend within a continuous preset time, a joint verification is performed. When the current direction is abnormal in the charging state or the current direction is abnormal in the discharging state, and the voltage change trend is opposite to the state of charge change trend, it is determined that the current sensor has a fault of reverse installation or reverse polarity connection. Based on the determination of a fault, the bus current amplitude, individual unit voltage and temperature status are classified and processed. When only the current polarity is reversed, the bus current is inverted to obtain the actual current and the current ampere-hour integral data is frozen. When overcurrent or sampling deviation exceeds the limit at the same time, the charging and discharging current is limited. When individual unit voltage or temperature rise is abnormal at the same time, the high voltage circuit is cut off. Based on the actual current after sign inversion and the frozen ampere-hour integral data, the original ampere-hour integral calculation is stopped. The state of charge is corrected by the relationship between the battery pack open-circuit voltage and temperature. After the ampere-hour integral is cleared, the integral calculation is recalculated according to the actual current. After the fault is cleared or the actual current stabilizes, the state of charge is calibrated. When the battery pack reaches a fully charged state and is maintained for a preset time, it is calibrated to the full value. When the battery pack discharges to the cutoff voltage, it is calibrated to the zero value and normal operation is restored.
[0007] Preferably, to address the potential for transient fluctuations during current polarity anomaly identification, a time-duration determination mechanism is constructed to improve judgment stability. The steps are as follows: Establish the correspondence between charging commands and bus current direction, and at the same time establish the matching rules between discharge allowable state and bus current direction, and mark the current direction as positive or negative. The detected abnormal current direction is continuously sampled and recorded. The abnormal state is marked and the duration is accumulated in each sampling period. A time counter register is set up to accumulate the count of consecutive abnormal states, and to clear the interrupt abnormal state. The cumulative time value is compared with the preset time threshold on a cycle-by-cycle basis. When the continuous time reaches the set threshold, a polarity abnormality judgment signal is output.
[0008] Preferably, considering the susceptibility of current sampling signals to noise, a data validity screening strategy is introduced to improve the reliability of polarity determination. The steps are as follows: The acquired bus current signal is subjected to multi-stage filtering, including a first moving average and a second low-pass filtering, to obtain stable current data. Set the current amplitude judgment range, including the minimum effective threshold and the upper limit boundary, and classify the current values into ranges; Data with amplitudes below the minimum threshold or fluctuations exceeding the set range are marked and removed, while consecutive outliers are counted. The filtered valid current data is input into the polarity determination logic and participates in the subsequent direction consistency analysis.
[0009] Preferably, a trend analysis method is established based on the physical consistency characteristics of the relationship between voltage and state of charge changes to enhance anomaly identification capabilities. The steps are as follows: Obtain the total voltage sampling sequence of the battery pack within a fixed-length time window, and sort and cache the data by time. Perform differential operations on the voltage sequence to calculate the change between adjacent sampling points and extract the sign of the change direction; Synchronous differential processing is performed on the state of charge data within the corresponding time window to obtain a sequence of state of charge change directions. The voltage change direction sequence and the charge state change direction sequence are matched point by point, the number of inconsistencies is counted, and a trend judgment result is formed.
[0010] Preferably, the inconsistent states between the voltage change direction sequence and the charge state change direction sequence are continuously recorded to construct a direction consistency identifier sequence. The consistency identifier sequence is divided into intervals and continuous consistent segments are selected. The continuous consistent segments are processed for trend confirmation and the polarity determination auxiliary result is output.
[0011] Preferably, a smooth transition processing mechanism is designed to ensure computational continuity in response to potential data abrupt changes during current polarity correction. The steps are as follows: Read the raw bus current data within the current sampling period and store the historical period current data as a reference value; Perform a sign reversal operation on the original current to generate a corrected current, and calculate the difference between the currents before and after the correction. The current difference is limited, and the current change is adjusted in segments according to the preset slope constraint. The processed current data is continuously monitored and then output to the ampere-hour integration and control calculation stage.
[0012] Preferably, considering the influence of open-circuit voltage and temperature on the state of charge estimation results, a temperature-segmented lookup table method is introduced to improve the correction accuracy. The steps are as follows: Collect the open-circuit voltage value of the battery pack and data from multiple temperature sampling points, and perform averaging or weighted processing on the temperature data; Select the corresponding SOC-OCV calibration curve based on the processed temperature value, and determine the corresponding temperature range. Find the corresponding voltage interval in the selected curve, and calculate the state of charge value by linear interpolation or piecewise interpolation; The calculated charged state is processed with boundary constraints and then output to the state update module.
[0013] Preferably, by combining the characteristics of the charging end state, a stability determination condition is introduced to ensure the accuracy of the full charge calibration trigger, and the steps are as follows: The battery pack voltage, current, and charging status are continuously sampled, and the start time of the constant voltage charging phase is identified. Statistical analysis was performed on the current changes during the constant voltage stage to calculate the current fluctuation range and stable interval. The duration of the constant pressure state is accumulated and compared with a preset time threshold for judgment; When the time and current stability conditions are met, a full charge calibration process is performed on the current state of charge.
[0014] Preferably, by continuously comparing the current change amplitude within the sampling period and setting a stable interval judgment condition, and simultaneously constraining the voltage change rate, when the current fluctuation remains within the set range and the voltage change is in a smooth state, the full charge calibration process is triggered, thereby limiting the joint judgment condition of current and voltage in the full charge calibration triggering process.
[0015] Preferably, to meet the state recognition requirements of the discharge termination phase, a multi-condition joint judgment mechanism is constructed to ensure reliable triggering of venting calibration, with the following steps: The voltage during the battery pack discharge process is continuously sampled, and the voltage drop rate is calculated. Detect whether the voltage has reached the preset cutoff threshold and mark the state when the threshold has been reached; The amplitude and fluctuation range of the current discharge current are determined, and it is confirmed that the current is in a stable range. When both voltage and current conditions are met, a discharge calibration process is performed on the state of charge.
[0016] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention constructs a multi-dimensional joint diagnostic mechanism that combines "charge and discharge commands, current polarity, voltage change trends, and state of charge change trends" to accurately identify faults such as reversed installation or reversed polarity of current sensors. Compared to traditional methods that rely solely on a single signal for judgment, this method effectively reduces the risk of misjudgment due to instantaneous current fluctuations or complex operating conditions, while improving the stability and reliability of fault identification. It fundamentally solves the problems of single diagnostic dimensions and insufficient accuracy in existing technologies, significantly enhancing the system's ability to identify abnormal states.
[0017] This invention, when detecting abnormal current polarity without posing a safety risk, achieves adaptive polarity correction at the software level by inverting the sign of the sampled current, thereby ensuring that the current data aligns with the actual energy flow direction. Based on this, the system can continue normal operation, avoiding power interruption caused by directly disconnecting the high-voltage circuit, effectively improving the continuity of vehicle operation. Simultaneously, this mechanism supports maintaining basic functions even in abnormal conditions, meeting the practical need for vehicles to "limp home" and significantly improving the user experience.
[0018] This invention introduces a closed-loop mechanism in state-of-charge (POC) calculation, combining frozen integration, open-circuit voltage-based POC correction, and subsequent automatic calibration. When an anomaly occurs, erroneous integration paths are promptly blocked, the POC is corrected using a voltage-temperature mapping relationship, and boundary calibration is performed after system recovery through full charging and discharging processes. This ensures the continuity and accuracy of the POC calculation. This mechanism effectively avoids long-term POC deviations caused by incorrect current polarity, ensuring more stable and accurate POC calculation results.
[0019] This invention constructs a three-tiered protection strategy, combining hardware error-proofing design with software diagnostic fault-tolerant mechanisms, forming a comprehensive protection system from source prevention to operational correction. It employs fault-tolerant operation, power-limiting control, and high-voltage cutoff measures under different fault severity levels, ensuring both safety and system availability. Furthermore, this solution is applicable to various current sensor types, including Hall effect and shunt types, and can be widely applied to new energy vehicle power battery systems and energy storage systems, demonstrating good versatility and engineering application value. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0021] Figure 1 This is a flowchart of the reverse installation detection process for the battery pack current sensor of the present invention. Detailed Implementation
[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0023] This invention provides, for example Figure 1The method for detecting and controlling the reverse installation of a battery pack current sensor, as shown, includes the following steps: During the power-on operation of the battery management system, initialization configuration and data acquisition preparation are completed first. The initialization phase includes configuring and verifying the sampling circuit, communication interface, and internal state variables to ensure that the voltage, current, and temperature sampling units are in normal working order. Simultaneously, stored parameters are loaded and the system operating environment is established. After initialization, the system enters the real-time data acquisition phase to continuously monitor the battery pack's operating status. The acquired data includes the total battery pack voltage, individual cell voltages, temperature information at key locations, and bus current data. Voltage data reflects the battery's energy state and balance, temperature data assesses thermal safety, and bus current characterizes charging / discharging behavior and power flow.
[0024] While acquiring basic electrical parameters, the system simultaneously acquires operational control signals issued by the vehicle control unit, including charging commands and discharge permission status. These signals reflect the current system operating mode and energy flow direction. By correlating control commands with real-time acquired current data, a mapping relationship between control intent and actual execution can be established, providing crucial information for subsequent anomaly identification. Furthermore, during the initial stage of system operation, the current state of charge (SOC) needs to be initialized. This initial value can be derived from historical operating data, open-circuit voltage estimation results, or factory calibration values, serving as the starting point for subsequent dynamic updates to the SOC.
[0025] To ensure the accuracy and stability of data acquisition, necessary preprocessing of the sampled signals is required, including filtering, noise reduction, and rationality verification. For example, moving averages or low-pass filtering can be applied to voltage and current data to reduce the impact of sampling noise on the judgment results; upper and lower limit verification can be performed on the collected data to remove obvious outliers; and the continuity of time can be considered to determine whether data changes conform to physical laws, thereby improving data reliability. Based on this, a unified data caching and update mechanism should be established to store real-time acquired data according to time series, providing support for subsequent trend analysis.
[0026] Through the initialization and data acquisition process described above, a multi-dimensional operational data set covering voltage, current, temperature, and control commands can be formed, providing a reliable data foundation for judging the rationality of current direction, analyzing the trend of voltage and state of charge changes, and identifying abnormal operating conditions. This process is not only a prerequisite for subsequent fault diagnosis and control strategy execution, but also a crucial foundation for ensuring the safe and stable operation of the battery system.
[0027] After completing the basic data acquisition, a multi-dimensional comprehensive diagnosis of current polarity anomalies is required to improve the accuracy and stability of fault identification. The diagnostic process is based on charge / discharge control signals and real-time acquired data. By establishing a consistency relationship between the control intent and the actual current response, and combining the dynamic changes in voltage and state of charge, it determines whether the current sensor has reversed polarity or is physically installed incorrectly. Specifically, when the system is in a valid charging command state, the bus current should theoretically reflect the charging direction; if the current direction is continuously detected to be opposite to the charging direction, an anomaly is initially determined. Similarly, under the discharge permission state, if the current direction is inconsistent with the discharge direction, it can also serve as an initial basis for anomaly determination. However, relying solely on the relationship between the current direction and the control command is easily affected by short-term fluctuations, control delays, or complex operating conditions. Therefore, it is necessary to further incorporate the changing trends of voltage and state of charge for joint verification.
[0028] During trend analysis, the voltage-state-charge (SPC) coupling relationship is established by monitoring the rate of change of the total battery pack voltage and the rate of change of SPC within a continuous time window. When charging, the battery pack voltage typically increases, and the SPC should increase accordingly; when discharging, the battery pack voltage generally decreases, and the SPC decreases synchronously. If, within a certain time interval (e.g., 3 consecutive seconds), a contradiction is detected between the voltage and SPC trends—for example, the voltage continuously increases while the SPC decreases, or the voltage decreases while the SPC increases—it indicates that the direction of SPC calculation based on current integration may be incorrect, further confirming an anomaly in current polarity. By jointly analyzing control commands, current direction, and the trends of voltage and SPC changes, misjudgments caused by instantaneous disturbances, sensor noise, or brief switching of operating conditions can be effectively eliminated.
[0029] To further enhance diagnostic reliability, a time continuity constraint can be introduced into the judgment process. This means that a polarity anomaly determination result is only output if the aforementioned abnormal phenomenon persists within a preset time window, thus avoiding false alarms caused by short-term interference. Furthermore, a reasonable threshold can be set for the current amplitude. When the current is close to zero or within a small fluctuation range, it is excluded from polarity judgment, reducing uncertainty under low-signal conditions. Simultaneously, filtering the voltage sampling data ensures that trend judgments are based on smooth and reliable data changes, improving overall diagnostic stability.
[0030] In this multi-dimensional joint judgment mechanism, control commands provide the desired energy flow direction, current direction reflects the actual energy flow direction, and the trends in voltage and state of charge reflect the evolution of the battery's internal energy state. These three factors are inherently consistent. If any one of these relationships is violated over a long period, an anomaly can be identified. Compared to traditional methods relying solely on a single signal, this multi-dimensional cross-validation significantly improves the accuracy of fault identification, effectively distinguishing between current sensor polarity reversal and other types of anomalies such as sensor drift, poor contact, and line noise. For example, sensor drift typically manifests as current deviation while maintaining a consistent direction, while polarity reversal manifests as a long-term completely opposite direction; line interference is mostly short-term abrupt and lacks persistent characteristics. By introducing trend and time constraints, different types of anomalies can be effectively differentiated.
[0031] Furthermore, this diagnostic method exhibits excellent engineering adaptability, enabling complex fault identification through software algorithms without incurring additional hardware costs. Multi-dimensional data fusion not only improves diagnostic accuracy but also provides a reliable basis for subsequent fault-tolerant control and state-of-charge correction. Once a polarity anomaly is confirmed, subsequent control strategies can be directly triggered to correct erroneous data and adjust the system's operating state, thereby ensuring the battery system retains a certain level of operational capability even under abnormal conditions.
[0032] In summary, by constructing a multi-dimensional joint diagnostic mechanism that integrates control commands, current direction, voltage and state of charge change trends, and combining time continuity and data validity constraints, it is possible to accurately identify faults such as reversed current sensor installation or reversed polarity connection, effectively avoiding misjudgment and missed judgment, providing a solid data and logical foundation for subsequent fault-tolerant control and state correction, and significantly improving the safety and reliability of the battery management system.
[0033] After identifying current polarity anomalies, a tiered control strategy needs to be implemented based on the degree of impact of the fault on system safety and operational status, balancing safety and system availability. The core of tiered handling lies in expanding the polarity anomaly from a single fault to a multi-dimensional state assessment process. This involves combining current amplitude, individual unit voltage status, and temperature changes to comprehensively determine the fault risk and implement differentiated control measures accordingly. This avoids operational interruptions caused by simple shutdowns while preventing the escalation of potential safety risks.
[0034] When only the current direction is detected to be inconsistent with the control intention, while the current amplitude is within the normal range, the cell voltage is neither over-voltage nor under-voltage, and the temperature change is stable and within limits, a mild abnormal state can be identified. This type of situation usually corresponds to an incorrect physical installation orientation of the current sensor or reversed polarity of the sampling line, but it has not yet had a substantial impact on the battery's operational safety. Under these conditions, by reversing the sign of the collected bus current data, the original sampled current is converted into a current value that conforms to the actual energy flow direction, thereby achieving polarity correction at the software level. At the same time, the current ampere-hour integration calculation based on the original current data is stopped, and the existing accumulated value is frozen to prevent the erroneous current direction from continuing to participate in the integration, causing the state of charge to deviate further from the true value. After the current direction correction is completed, all subsequent current-based calculations use the corrected current data, thereby restoring the correctness of the current information without changing the hardware structure and ensuring that the system can continue to operate normally. This processing method can achieve fault adaptive handling without interrupting power output, significantly improving the continuity of vehicle operation.
[0035] When an abnormal current polarity is detected, accompanied by a current amplitude exceeding the safety threshold or a significant increase in sampling deviation, it indicates that the abnormal state has already affected system operation and may further evolve into a safety risk. In this case, a medium-risk control state needs to be entered, reducing the system load level by limiting charging and discharging capabilities. Specifically, this involves constraining the bus current, prohibiting high-power charging or discharging, and controlling the operating current within a safe range, thereby reducing internal battery stress and thermal load. Simultaneously, an abnormality alert can be sent to the upper-level control unit via vehicle communication, guiding the user to perform maintenance as soon as possible. The focus at this stage is on reducing risk while continuing operation, preventing further escalation of the abnormality while preserving basic system functions and ensuring the vehicle has the necessary driving capability. By reasonably limiting the operating power, the potential hazards caused by the superimposed polarity and current abnormalities can be effectively reduced, providing a buffer time for subsequent maintenance.
[0036] When abnormal current polarity is further accompanied by significant safety risks such as overvoltage, undervoltage, or rapid temperature rise in individual cells, it indicates that the system has entered a high-risk operating state, posing a risk of overcharging, over-discharging, or even thermal runaway. In this situation, immediate mandatory protection measures must be taken, disconnecting the high-voltage main relay to cut off the connection between the battery pack and the external circuit, putting the battery system into a safety lockout state. Rapid disconnection of the high-voltage circuit effectively blocks energy flow, preventing abnormal current from continuously acting on the battery interior, fundamentally eliminating safety hazards. Simultaneously, the current fault state is locked and recorded to prevent the system from re-entering the operating state without troubleshooting. Only after fault diagnosis is completed and sensor polarity is confirmed to have returned to normal can the system initialization and state-of-charge calibration procedures be re-executed to restore normal operation.
[0037] Through the aforementioned tiered handling mechanism, current polarity anomalies are expanded from a single fault into a multi-layered risk management issue. Control strategies are dynamically adjusted according to different operating conditions, achieving progressive protection from fault-tolerant operation to restricted operation and finally to safe disconnection. This strategy not only effectively avoids the impact of a single anomaly directly triggering a shutdown, but also intervenes in a timely manner as safety risks gradually increase, forming a multi-level protection system from soft to hard. Compared to traditional simple protection methods, this tiered handling approach significantly improves the system's robustness and adaptability while ensuring battery safety, enabling battery management to possess higher stability and reliability under complex operating conditions.
[0038] After an anomaly in current polarity is identified, a systematic correction of the state of charge (SOC) calculation process is necessary to prevent the cumulative error caused by incorrect current direction from continuously expanding, thereby affecting the reliability of battery state assessment and subsequent control strategies. Since SOC typically relies on current integration, a reverse current direction error will directly lead to the reverse accumulation of the integration result, causing the SOC to gradually deviate from its true value. Therefore, it is essential to construct a complete correction mechanism to intervene in the original integration path and restore accurate calculations while ensuring data continuity.
[0039] In the initial stage of an anomaly, the existing ampere-hour integral is first frozen. The purpose of freezing is to immediately stop the further accumulation of erroneous data and prevent erroneous integrals from continuing to participate in the state of charge calculation, causing greater deviations. During the freezing process, the currently accumulated ampere-hour value is retained but not updated, thus limiting the error to a controllable range. This approach can prevent the further spread of errors without losing historical information, providing a stable benchmark for subsequent corrections.
[0040] After freezing, a state-of-charge (SOC) correction method based on open-circuit voltage is introduced. There is a relatively stable mapping relationship between open-circuit voltage and the actual SOC of the battery. Given known temperature conditions, it can be estimated inversely using a pre-calibrated SOC-OCV curve. By collecting the current open-circuit voltage and temperature information of the battery pack and performing lookup calculations based on the calibration curve, a SOC estimation result closer to the true value can be obtained. This estimation process does not rely on current data, thus effectively avoiding the influence of current polarity errors. Using this estimated value as a new reference benchmark allows for rapid correction of previous deviations, bringing the system back to a reasonable range.
[0041] After completing the state of charge correction, the ampere-hour integral system needs to be rebuilt to restore dynamic update capability. During reconstruction, the accumulated ampere-hour values are first reset to zero, and then the integral calculation is restarted based on the polarity-corrected current. After sign reversal, the current accurately reflects the actual energy flow direction, ensuring the integral result is consistent with the actual charging and discharging process. The ampere-hour integral calculation relationship is as follows: in: This represents the cumulative ampere-hour value, which reflects the change in battery charge over a period of time and is an important basic variable for calculating the state of charge. This represents the actual current value after polarity correction. Its direction is now consistent with the actual energy flow direction, and it is the core input parameter for integral calculation. This represents the integration time interval, which usually corresponds to the sampling period or discrete time step. Its size directly affects the integration accuracy and response speed.
[0042] In practical implementation, continuous integration is usually approximated using a discrete form. That is, within each sampling period, the product of the current value and the time interval is accumulated to gradually approximate the integration result. In this way, real-time power calculation can be efficiently implemented in embedded systems.
[0043] In the above integration process, the key is to ensure the correctness and stability of the direction of the input current data. The current value after polarity correction directly determines the positive or negative trend of the integration result; therefore, current direction correction must be completed before resuming integration. Simultaneously, the current signal can be filtered to reduce noise interference and improve integration stability. For the time parameter dt, the sampling period should be kept stable to avoid integration errors caused by fluctuations in the time base.
[0044] By employing a continuous processing flow of freezing the original integral – correcting based on open-circuit voltage – rebuilding the integral, the state of charge (SOC) can be rapidly restored without interrupting system operation, ensuring a smooth correction process. Throughout the process, the SOC does not exhibit abrupt changes or jumps, but rather transitions continuously to the corrected numerical range. This is particularly important for battery management systems, as abrupt changes in SOC can trigger false protection or affect the vehicle's control strategy.
[0045] Furthermore, after the integral reconstruction is completed, the residual error can still be further corrected by combining the full charge and discharge calibration mechanisms during subsequent operation, thereby achieving closed-loop accuracy recovery of the state of charge. This mechanism, through recalibration at extreme state points, gradually converges the long-term integral error, improving the overall calculation accuracy.
[0046] In summary, by freezing the ampere-hour integral, correcting the state based on open-circuit voltage, and re-establishing the integral system, the problem of continuous distortion of the state of charge under abnormal current polarity conditions can be effectively solved. While ensuring operational continuity, this achieves rapid recovery and long-term stability of the state estimate, providing reliable data support for subsequent control strategies and significantly improving the robustness and safety of the battery management system under abnormal operating conditions.
[0047] After completing current polarity correction or software fault tolerance processing, the state of charge (POC) calculation system needs further restoration and accuracy reconstruction to eliminate residual errors caused by previous anomalies and ensure the long-term accuracy and stability of POC estimation during subsequent operation. This stage is based on Coulomb integral recovery and introduces an automatic closed-loop calibration mechanism. Through characteristic point calibration under typical operating conditions, the POC gradually returns to the true value range, realizing the transition from temporary correction to accuracy restoration.
[0048] After the current direction is restored to correct, the state of charge (SOC) update method based on current integration is reactivated. Since current polarity correction and integration system reconstruction have been completed previously, the current data at this point accurately reflects the battery's charging and discharging behavior. Therefore, coulomb integration can continue to be the primary means of dynamic SOC update. During the integration recovery process, it is necessary to ensure the stability and continuity of the current signal, while continuously accumulating it in conjunction with a time reference, so that the SOC gradually adjusts with changes in battery energy. In this process, the SOC no longer relies on a single correction value but re-enters a real-time dynamic update state, providing a foundation for subsequent calibration.
[0049] To further eliminate accumulated biases caused by model errors, measurement errors, and historical anomalies, an automatic calibration mechanism based on boundary states is introduced. This mechanism utilizes the physical characteristics of the battery under specific operating conditions to recalibrate the state of charge, thereby achieving error convergence. First, during battery charging, as the battery gradually approaches full charge and enters the constant-voltage charging stage, the battery voltage stabilizes, the charging current gradually decreases, and the system enters a float charging state. If this stage continues for a preset time (e.g., more than 30 minutes), the battery can be considered to have reached near-full charge. At this point, the current state of charge is directly calibrated as 100%, serving as the full-charge calibration point. This process leverages the battery's stable characteristics during the constant-voltage stage, accurately reflecting the battery's maximum usable capacity, thus effectively correcting previous integration errors.
[0050] During discharge, as the battery continues to discharge with a small current and gradually approaches the cutoff voltage, the energy that can be released inside the battery is nearing its lower limit. This state can be used as a reference point for discharge. When the battery voltage reaches a preset cutoff threshold and the current is in a low-amplitude stable state, the battery can be considered to be nearly completely discharged. Under this condition, the current state of charge is calibrated as 0%, serving as the discharge calibration point. This calibration process can correct errors in the low-charge region and compensate for deviations caused by integral drift or model mismatch.
[0051] Full charge calibration and discharge calibration correspond to the upper and lower boundaries of the state of charge (SOC), respectively. By calibrating at these two extreme points, a complete closed-loop calibration system can be formed. In actual operation, the battery may not experience full charge and discharge simultaneously in every cycle, thus the calibration process has a gradual characteristic. After the system has experienced different boundary states multiple times, the SOC error will gradually converge to a smaller range, achieving long-term accuracy recovery. This closed-loop mechanism can not only correct deviations caused by single anomalies but also compensate for errors accumulated over long-term operation, improving the overall estimation reliability.
[0052] During automatic calibration, the effects of factors such as temperature and current rate on battery characteristics must also be considered. For example, the actual capacity of the battery may change under high or low temperature environments. Therefore, when performing full charge or discharge calibration, appropriate corrections can be made based on temperature conditions to improve calibration accuracy. Meanwhile, under high current conditions, battery polarization is significant, and the voltage may not accurately reflect the true state. Therefore, calibration is usually triggered under low current or stable conditions to ensure the reliability of the calibration results.
[0053] Furthermore, to prevent instability caused by frequent calibrations, reasonable constraints can be set on calibration triggering conditions. For example, requiring stable conditions to be met continuously for a certain period of time, or setting a minimum time interval between two calibrations. These constraints can prevent calibrations from being triggered due to short-term fluctuations or misjudgments, thereby ensuring the stability of system operation.
[0054] After calibration, if the current polarity anomaly has been resolved and the relevant parameters have returned to normal range, the anomaly flag can be cleared, and the system enters normal operation. At this point, the state of charge (SOC) calculation has been restored to a state based on correct current integration and corrected by boundary calibration, which can accurately reflect the remaining battery capacity. In subsequent operation, coulomb integration and the automatic calibration mechanism will continue to work together to achieve long-term stable estimation of SOC.
[0055] Overall, by introducing an automatic closed-loop calibration mechanism during the operation phase after current correction, the residual state-of-charge deviation under abnormal operating conditions can be effectively resolved, enabling the system to gradually recover from usable to a high-precision state. This process does not rely on additional hardware; calibration can be completed solely through operational data and typical operating condition identification. It is characterized by its simplicity and adaptability, while significantly improving the reliability and accuracy of the battery management system under complex operating conditions.
[0056] In the overall protection system for current sensor polarity abnormalities, in addition to software diagnostics and fault-tolerant control, it is also necessary to carry out source prevention design at the hardware structure level to reduce the risk of misassembly caused by human operation or structural symmetry during assembly. By introducing foolproof design into the sensor and connection structure, incorrect installation paths can be limited at the physical level, fundamentally reducing the probability of current polarity reversal problems, thereby improving the overall reliability and consistency of the system.
[0057] In the structural design of Hall current sensors, an asymmetrical D-shaped opening structure can be adopted to provide a clear directional constraint when the busbar passes through the opening. This structure, by adding a planar tangent to a circular base, makes the opening directionally unique, ensuring that the busbar can only pass through in the specified direction. When attempting reverse installation, the busbar cannot pass through the opening due to the geometric mismatch, physically preventing incorrect installation. This design method requires no additional electronic components; the foolproof function can be achieved solely through structural optimization, offering advantages such as simplicity, low cost, and high reliability.
[0058] In shunt current sampling structures, reverse connection protection can be achieved through differentiated electrical connection interfaces. For example, different numbers of pins, different arrangements, or different shapes can be used in the sampling terminal design to ensure a unique match between the positive and negative sampling terminals at the physical interface level. When the connector attempts to plug in the opposite direction, the connection cannot be completed due to structural incompatibility, thus avoiding the problem of reverse polarity. Furthermore, the foolproof effect can be further enhanced through differences in terminal size, positioning groove structures, or key designs, providing clear directional guidance and physical constraints during the connection process.
[0059] By combining the aforementioned Hall sensor structure error-proofing and shunt interface error-proofing design, a dual protection mechanism can be built at the hardware level, effectively preventing problems such as reversed current sensor installation or reversed sampling line connection. This type of design works in conjunction with software diagnostic mechanisms to reduce the probability of failure at the source, and in extreme cases, software can still identify and correct the problem, thus forming a complete multi-layered protection system that significantly improves the safety and reliability of the battery management system in engineering applications.
[0060] This invention establishes a multi-dimensional joint diagnostic mechanism that combines charging / discharging commands, current polarity, voltage change trends, and state of charge change trends to accurately identify faults in current sensors, such as reverse installation or reverse polarity connection. Compared to traditional methods that rely solely on a single signal for judgment, this method effectively reduces the risk of misjudgment due to instantaneous current fluctuations or complex operating conditions, while improving the stability and reliability of fault identification. It fundamentally solves the problems of single diagnostic dimensions and insufficient accuracy in existing technologies, significantly enhancing the system's ability to identify abnormal states.
[0061] This invention, when detecting abnormal current polarity without posing a safety risk, achieves adaptive polarity correction at the software level by inverting the sign of the sampled current, thereby ensuring that the current data aligns with the actual energy flow direction. Based on this, the system can continue normal operation, avoiding power interruption caused by directly disconnecting the high-voltage circuit, effectively improving the continuity of vehicle operation. Simultaneously, this mechanism supports maintaining basic functions even in abnormal conditions, meeting the practical need for vehicles to "limp home," and significantly improving the user experience.
[0062] This invention introduces a closed-loop mechanism in state-of-charge (POC) calculation, combining frozen integration, open-circuit voltage-based POC correction, and subsequent automatic calibration. When an anomaly occurs, erroneous integration paths are promptly blocked, the POC is corrected using a voltage-temperature mapping relationship, and boundary calibration is performed after system recovery through full charging and discharging processes. This ensures the continuity and accuracy of the POC calculation. This mechanism effectively avoids long-term POC deviations caused by incorrect current polarity, ensuring more stable and accurate POC calculation results.
[0063] This invention constructs a three-tiered protection strategy, combining hardware error-proofing design with software diagnostic fault-tolerant mechanisms, forming a comprehensive protection system from source prevention to operational correction. It employs fault-tolerant operation, power-limiting control, and high-voltage cutoff measures under different fault severity levels, ensuring both safety and system availability. Furthermore, this solution is applicable to various current sensor types, including Hall effect and shunt types, and can be widely applied to new energy vehicle power battery systems and energy storage systems, demonstrating good versatility and engineering application value.
[0064] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor, characterized in that, Includes the following steps: Perform battery pack power-on initialization, collect battery pack total voltage, individual cell voltage, temperature, bus current and current state of charge, and simultaneously obtain charging commands and discharge permission status; Based on the charging command, discharge permission status and bus current, it is determined whether the current polarity is opposite to the command status. Combined with the battery pack voltage change trend and the state of charge change trend within a continuous preset time, a joint verification is performed. When the current direction is abnormal in the charging state or the current direction is abnormal in the discharging state, and the voltage change trend is opposite to the state of charge change trend, it is determined that the current sensor has a fault of reverse installation or reverse polarity connection. Based on the determination of a fault, the bus current amplitude, individual unit voltage and temperature status are classified and processed. When only the current polarity is reversed, the bus current is inverted to obtain the actual current and the current ampere-hour integral data is frozen. When overcurrent or sampling deviation exceeds the limit at the same time, the charging and discharging current is limited. When individual unit voltage or temperature rise is abnormal at the same time, the high voltage circuit is cut off. Based on the actual current after sign inversion and the frozen ampere-hour integral data, the original ampere-hour integral calculation is stopped. The state of charge is corrected by the relationship between the battery pack open-circuit voltage and temperature. After the ampere-hour integral is cleared, the integral calculation is recalculated according to the actual current. After the fault is cleared or the actual current stabilizes, the state of charge is calibrated. When the battery pack reaches a fully charged state and is maintained for a preset time, it is calibrated to the full value. When the battery pack discharges to the cutoff voltage, it is calibrated to the zero value and normal operation is restored.
2. The method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 1, characterized in that, To address the potential transient fluctuation interference during current polarity anomaly identification, a time-duration determination mechanism is constructed to improve judgment stability. The steps are as follows: Establish the correspondence between charging commands and bus current direction, and at the same time establish the matching rules between discharge allowable state and bus current direction, and mark the current direction as positive or negative. The detected abnormal current direction is continuously sampled and recorded. The abnormal state is marked and the duration is accumulated in each sampling period. A time counter register is set up to accumulate the count of consecutive abnormal states, and to clear the interrupt abnormal state. The cumulative time value is compared with the preset time threshold on a cycle-by-cycle basis. When the continuous time reaches the set threshold, a polarity abnormality judgment signal is output.
3. The method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 2, characterized in that, Considering the susceptibility of current sampling signals to noise, a data validity screening strategy is introduced to improve the reliability of polarity determination. The steps are as follows: The acquired bus current signal is subjected to multi-stage filtering, including a first moving average and a second low-pass filtering, to obtain stable current data. Set the current amplitude judgment range, including the minimum effective threshold and the upper limit boundary, and classify the current values into ranges; Data with amplitudes below the minimum threshold or fluctuations exceeding the set range are marked and removed, while consecutive outliers are counted. The filtered valid current data is input into the polarity determination logic and participates in the subsequent direction consistency analysis.
4. The method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 3, characterized in that, Based on the physical consistency characteristics of the relationship between voltage and state of charge changes, a trend analysis method is established to enhance anomaly identification capabilities. The steps are as follows: Obtain the total voltage sampling sequence of the battery pack within a fixed-length time window, and sort and cache the data by time. Perform differential operations on the voltage sequence to calculate the change between adjacent sampling points and extract the sign of the change direction; Synchronous differential processing is performed on the state of charge data within the corresponding time window to obtain a sequence of state of charge change directions. The voltage change direction sequence and the charge state change direction sequence are matched point by point, the number of inconsistencies is counted, and a trend judgment result is formed.
5. The method for detecting and fault-tolerant control of reverse installation of a battery pack current sensor according to claim 4, characterized in that, The inconsistent states between the voltage change direction sequence and the charge state change direction sequence are continuously recorded, a direction consistency identifier sequence is constructed, the consistency identifier sequence is divided into intervals and continuous consistent segments are selected, the continuous consistent segments are processed for trend confirmation and the polarity determination auxiliary result is output.
6. The method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 4, characterized in that, To address potential data abrupt changes during current polarity correction, a smooth transition mechanism is designed to ensure computational continuity. The steps are as follows: Read the raw bus current data within the current sampling period and store the historical period current data as a reference value; Perform a sign reversal operation on the original current to generate a corrected current, and calculate the difference between the currents before and after the correction. The current difference is limited, and the current change is adjusted in segments according to the preset slope constraint. The processed current data is continuously monitored and then output to the ampere-hour integration and control calculation stage.
7. The method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 6, characterized in that, Considering the impact of open-circuit voltage and temperature on the state of charge estimation results, a temperature-segmented lookup table method is introduced to improve the correction accuracy. The steps are as follows: Collect the open-circuit voltage value of the battery pack and data from multiple temperature sampling points, and perform averaging or weighted processing on the temperature data; Select the corresponding SOC-OCV calibration curve based on the processed temperature value, and determine the corresponding temperature range. Find the corresponding voltage interval in the selected curve, and calculate the state of charge value by linear interpolation or piecewise interpolation; The calculated charged state is processed with boundary constraints and then output to the state update module.
8. The method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 7, characterized in that, Based on the characteristics of the charging end state, a stability judgment condition is introduced to ensure the accuracy of the full charge calibration trigger. The steps are as follows: The battery pack voltage, current, and charging status are continuously sampled, and the start time of the constant voltage charging phase is identified. Statistical analysis was performed on the current changes during the constant voltage stage to calculate the current fluctuation range and stable interval. The duration of the constant pressure state is accumulated and compared with a preset time threshold for judgment; When the time and current stability conditions are met, a full charge calibration process is performed on the current state of charge.
9. A method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 8, characterized in that, By continuously comparing the current change amplitude within the sampling period and setting the stable interval judgment condition, and simultaneously constraining the voltage change rate, when the current fluctuation remains within the set range and the voltage change is in a smooth state, the full charge calibration process is triggered.
10. A method for detecting and fault-tolerantly controlling the reverse installation of a battery pack current sensor according to claim 8, characterized in that, To address the state identification requirements during the discharge termination phase, a multi-condition joint determination mechanism is constructed to ensure reliable triggering of venting calibration. The steps are as follows: The voltage during the battery pack discharge process is continuously sampled, and the voltage drop rate is calculated. Detect whether the voltage has reached the preset cutoff threshold and mark the state when the threshold has been reached; The amplitude and fluctuation range of the current discharge current are determined, and it is confirmed that the current is in a stable range. When both voltage and current conditions are met, a discharge calibration process is performed on the state of charge.