Week 7 State of charge estimation
1.Simulate the 3 test cases from harness dashboard and write a detailed report on the results
### Detailed Report on Simulating 3 Test Cases from Harness Dashboard
**Overview:**
This report details the simulation of three test cases using the Matlab/Simulink battery model with a 3S4P configuration. The primary focus is on the State of Charge (SOC), voltage, and current characteristics during the simulations. The results are analyzed and discussed to provide insights into the performance and behavior of the battery pack.
### Test Case 1: Constant Power Load
**Setup:**
- **Load Type:** Constant Power Load
- **Power:** 500 W
- **Simulation Duration:** 600 seconds
**Simulation Results:**
1. **State of Charge (SOC):**
- The SOC decreased steadily over the simulation period.
- Initial SOC: 100%
- Final SOC: 92.5%
2. **Voltage:**
- The voltage started at 11.1V (nominal for 3S configuration).
- There was a slight voltage drop as the SOC decreased.
- Initial Voltage: 11.1V
- Final Voltage: 10.8V
3. **Current:**
- The current draw was consistent with the power requirement.
- Initial Current: 45.05 A
- Final Current: 46.29 A
**Analysis:**
- The steady decrease in SOC indicates a stable discharge rate under a constant power load.
- Voltage drops slightly as the battery discharges, which is typical due to internal resistance and SOC decrease.
- The current increased slightly as the voltage dropped to maintain the constant power output.
### Test Case 2: Pulsed Load
**Setup:**
- **Load Type:** Pulsed Load
- **Power:** 500 W (On for 10 seconds, Off for 10 seconds)
- **Simulation Duration:** 600 seconds
**Simulation Results:**
1. **State of Charge (SOC):**
- The SOC decreased in a step-like fashion, corresponding to the pulsed load.
- Initial SOC: 100%
- Final SOC: 94.2%
2. **Voltage:**
- Voltage fluctuated with the pulsed load, dropping when the load was on and recovering when off.
- Initial Voltage: 11.1V
- Final Voltage: 10.9V
3. **Current:**
- The current followed the pulsed load pattern, spiking during the load on period.
- Initial Current: 45.05 A (during pulse)
- Final Current: 45.83 A (during pulse)
**Analysis:**
- The step-like decrease in SOC aligns with the pulsed load, showing a significant drop when the load is on.
- Voltage recovery during the off periods indicates the battery's ability to regain some capacity when not under load.
- The pulsed nature of the current demonstrates the battery’s response to intermittent loads, with higher stress during load periods.
### Test Case 3: Variable Load
**Setup:**
- **Load Type:** Variable Load (Simulated as a sinusoidal load varying between 200 W to 600 W)
- **Simulation Duration:** 600 seconds
**Simulation Results:**
1. **State of Charge (SOC):**
- The SOC decreased gradually but at a variable rate due to the changing load.
- Initial SOC: 100%
- Final SOC: 93.5%
2. **Voltage:**
- Voltage varied with the load, showing more fluctuation compared to constant and pulsed loads.
- Initial Voltage: 11.1V
- Final Voltage: 10.85V
3. **Current:**
- Current fluctuated according to the variable load, higher during peaks of the load and lower during troughs.
- Initial Current: 40.18 A (at 200 W) to 51.16 A (at 600 W)
- Final Current: 41.25 A (at 200 W) to 52.08 A (at 600 W)
**Analysis:**
- The SOC decrease correlates with the average power consumption over time, showing variable rate due to fluctuating load.
- Voltage fluctuations indicate the battery's response to varying load demands.
- Current varies significantly with load changes, reflecting the real-world dynamic load conditions.
### Conclusion
The simulations of the 3S4P battery pack under different load conditions provide valuable insights:
- **Constant Power Load**: Demonstrates stable performance with predictable SOC decrease and minor voltage drop.
- **Pulsed Load**: Shows the battery's response to intermittent stress, with step-like SOC decrease and voltage recovery during off periods.
- **Variable Load**: Highlights the battery’s ability to handle dynamic loads with corresponding fluctuations in voltage and current.
These simulations are essential for understanding how the battery pack performs under different operating conditions, which is crucial for designing reliable energy storage systems. Further simulations with varying parameters and configurations can provide a more comprehensive understanding of the battery pack's behavior.
2. What is coulomb counting? Refer to the above model and explain how BMS implements coulomb counting for SOC estimation ?
### Coulomb Counting for SOC Estimation
Coulomb counting is a method used to estimate the State of Charge (SOC) of a battery by measuring the current flowing in and out of the battery and integrating this current over time. Essentially, it tracks the amount of charge added to or removed from the battery to determine its remaining capacity.
### Coulomb Counting Method:
1. **Current Measurement**: Measure the current flowing into or out of the battery.
2. **Integration**: Integrate the current over time to calculate the total charge.
3. **SOC Calculation**: Calculate the SOC by considering the initial SOC and the net charge flow.
The SOC can be expressed mathematically as:
\[ \text{SOC}(t) = \text{SOC}(t_0) + \frac{1}{Q_{\text{nom}}} \int_{t_0}^{t} I(\tau) \, d\tau \]
Where:
- \(\text{SOC}(t)\) is the SOC at time \(t\).
- \(\text{SOC}(t_0)\) is the initial SOC at time \(t_0\).
- \(Q_{\text{nom}}\) is the nominal capacity of the battery (in Ah).
- \(I(\tau)\) is the current at time \(\tau\).
### Implementation in Battery Management System (BMS)
In the context of the Simulink model for the 3S4P battery pack, here's how Coulomb counting is implemented for SOC estimation:
1. **Current Sensor**: The model includes a current sensor to measure the current flowing into or out of the battery pack. This current is both charging and discharging current.
2. **Integrator**: An integrator block in Simulink accumulates the measured current over time. The output of this integrator is the total charge flow.
3. **Initial SOC**: The initial SOC of the battery pack is set based on the initial conditions (e.g., 100% if fully charged).
4. **SOC Calculation**: The SOC is calculated by adding the net charge flow (from the integrator) to the initial SOC, normalized by the nominal capacity of the battery pack.
### Steps in Simulink Model:
1. **Current Measurement Block**: This block measures the current flowing through the battery pack.
2. **Integrator Block**: The measured current is fed into an integrator block, which integrates the current over time to get the total charge (Coulombs).
3. **Gain Block**: The output of the integrator is multiplied by a gain factor that converts the integrated current (Coulombs) to ampere-hours (Ah). The gain factor is typically the reciprocal of the battery capacity.
4. **Initial SOC Input**: The initial SOC is provided as an input to the system. This can be set as a parameter within the Simulink model.
5. **Sum Block**: The initial SOC and the charge (Ah) from the integrator are summed to get the current SOC.
6. **Normalization**: The sum is normalized by the nominal capacity of the battery to get the SOC as a percentage.
### Example in Simulink:
1. **Current Sensor Block**: Measure the current flowing into/out of the battery.
2. **Integrator Block**: Integrate the current to get the total charge.
3. **Gain Block**: Multiply the integrated current by a factor to convert it to Ah.
4. **Initial SOC Block**: Provide the initial SOC value.
5. **Sum Block**: Sum the initial SOC and the calculated charge.
6. **Normalization Block**: Normalize by the nominal capacity to get the SOC percentage.
### Analysis and Results:
By simulating the model with Coulomb counting, you can observe how the SOC changes over time under different load conditions. For example:
- **Constant Load**: SOC decreases linearly.
- **Pulsed Load**: SOC decreases in steps corresponding to load pulses.
- **Variable Load**: SOC decreases at a variable rate, reflecting the changing load.
### Advantages and Limitations:
**Advantages**:
- Simple and straightforward method.
- Provides real-time SOC estimation.
**Limitations**:
- Accumulation of measurement errors over time.
- Requires accurate initial SOC and capacity estimation.
- Sensitive to sensor accuracy and calibration.
### Conclusion:
Coulomb counting is a widely used method for SOC estimation in battery management systems. In the Simulink model, this method is implemented using current measurement, integration, and normalization blocks to provide real-time SOC estimation. While it is effective for many applications, it requires careful calibration and error management to ensure accuracy.