<br>
# Charge to min SOC -> Optimize Self-Consumption

Initial State: `Charge to min SOC`  
Target State:  `Optimize Self-Consumption`  

## Test Procedure

1. The battery is discharged below 20% SOC
2. `Min SOC` is set to 20%
3. A production surplus is simulated by setting the `Grid setpoint` to a positive value (1200W)
4. Wait until the `SOC` exceeds 22%

## Expected Outcome

The system assumes the `Charge to min SOC` state and charges with high power (~2000W), until it reaches `Min SOC`.  
Once it reaches `Min SOC` it does the following:

- it changes into the `Optimize Self-Consumption` state 
- it continues to charge the battery with an average of 1200W 
- charging power does not fluctuate by more than 250W once it has stabilized

## Tested Outcome

The system reacted as exactly as expected and switched to `Charge to min SOC` and charged as fast as possible till reaching the `Min SOC`.  
Once the `Min SOC` is reached, the battery switches to `Optimize Self-Consumption`, where the charging power fluctuations don't exceed 200w.  

![Charge to mind SOC -> Optimize Self-Consumption](Test3.png)