# Battery SoC & OCV Calculator AI Agent Connect

> Battery SoC & OCV Calculator MCP provides high-precision battery state estimation. It reconciles terminal voltage with Open-Circuit Voltage profiles by accounting for internal resistance, thermal shifts, and hysteresis. Your AI client can use this to track State of Charge accurately across different temperatures and current histories.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_N7ZXQXlcXsNS12zalh48nDmNAdyVSn9moI5vRlVR/ai-agent-connect
- **Tags:** battery, soc, ocv, voltage, thermal

## Description

You can use this MCP to handle complex battery state estimation tasks that require more than simple voltage lookups. It bridges the gap between raw terminal voltage and true Open-Circuit Voltage by factoring in internal resistance, thermal changes, and hysteresis effects. If you are building or testing battery management systems, this tool handles the heavy lifting of reconciling measured data with theoretical OCV profiles. Your agent can check if a battery has stabilized after a load, verify that your OCV curves are mathematically sound, and apply necessary corrections for voltage lags. It is built for engineering workflows where temperature fluctuations and current history make simple SoC calculations unreliable.

## Tools

### calculate_relaxation_status
This tool checks if a battery has had enough time to reach its OCV based on recent activity.

### get_hysteresis_offset
This tool calculates the specific voltage offset needed to correct for hysteresis effects.

### get_soc_estimate
This tool provides the primary SoC estimate by combining voltage, current, and environmental data.

### validate_ocv_profile
This tool ensures your OCV curve is mathematically valid and ready for use in calculations.

## Prompt Examples

**Prompt:** 
```
Calculate the SoC for a battery with a terminal voltage of 3.7V, using an OCV curve where 3.7V corresponds to 50% SoC, at 25°C, assuming it is relaxed.
```

**Response:** 
```
The estimated State of Charge (SoC) is 50.0%.
```

**Prompt:** 
```
Check if my OCV curve is valid: [{'soc': 0.0, 'voltage': 3.0}, {'soc': 1.0, 'voltage': 4.2}]
```

**Response:** 
```
The OCV curve is valid and ready for use.
```

**Prompt:** 
```
What is the hysteresis offset for a SoC of 0.8 in charge-direction mode?
```

**Response:** 
```
The calculated hysteresis offset is 0.015V.
```

## Capabilities

### State of Charge Estimation
Your agent calculates SoC by looking at voltage, current, and temperature.

### Hysteresis Correction
The MCP calculates voltage offsets to fix lags caused by hysteresis.

### Thermal Adjustment
It accounts for thermal shifts to keep estimates accurate as temperatures change.

### Stability Checking
The tool determines if a battery has reached a stable state after use.

### Profile Validation
It verifies that OCV curves are mathematically sound before you run calculations.

## Use Cases

### BMS Algorithm Testing
Run SoC estimation simulations using various temperature and current profiles.

### Battery Health Monitoring
Use the tool to track how SoC accuracy changes as the battery ages or temperature shifts.

### Data Validation
Verify that experimental OCV data is mathematically consistent before using it in models.

### Post-Load Analysis
Check if a battery has stabilized enough to take an accurate OCV reading.

## Benefits

- Accounts for internal resistance and thermal shifts for better accuracy.
- Corrects for hysteresis to prevent voltage lag errors.
- Automates the verification of OCV curves.
- Determines battery relaxation status to ensure data integrity.

## How It Works

You connect the MCP to your AI client and start sending battery data for processing.

1. Connect your AI client to the MCP via Vinkius.
2. Provide battery parameters like terminal voltage, current, and temperature.
3. Your agent calls the necessary tools to calculate offsets or check stability.
4. The MCP returns precise SoC or OCV data to your agent.

## Frequently Asked Questions

**How does this MCP handle temperature changes?**
It uses thermal correction to adjust SoC estimates based on environmental temperature shifts.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any MCP-compatible client like Claude, Cursor, or Windsurf.

**What is the purpose of the hysteresis offset?**
It calculates the specific voltage offset needed to correct for voltage lags during battery cycling.

**How do I know if my battery is ready for an OCV reading?**
You can use the relaxation status tool to see if the battery has had enough time to stabilize.

**Does this MCP host the data?**
Vinkius hosts and manages the MCP, so it is ready to use immediately after you connect your client.

**How does the tool handle temperature changes?**
The `get_soc_estimate` tool applies thermal correction factors to adjust the OCV curve based on the provided temperature, ensuring accuracy even in extreme conditions.

**What is the purpose of the relaxation check?**
The `calculate_relaxation_status` tool determines if the battery has reached a stable state after current flow, which is necessary to accurately identify the true OCV.

**Can I use my own custom OCV curves?**
Yes, you can provide custom OCV curves. It is highly recommended to use `validate_ocv_profile` first to ensure your curve is monotonic and within valid SoC bounds.
