# Relay Autotuning Parameter Calculator AI Agent Connect

> Relay Autotuning Parameter Calculator MCP handles the heavy math of control theory. It lets your AI client analyze stable limit cycles to find critical process characteristics. You can extract oscillation properties, find ultimate gain and period, and generate specific PID tuning tables like Kp, Ti, and Td without manual calculation.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_WJqu42NxhAxXTjZqPngkr5JNrRLvffKSe0pEYaMf/ai-agent-connect
- **Tags:** pid, autotuning, control-theory, relay, process-control

## Description

If you work with process control, you know that getting PID parameters right is a headache. This MCP simplifies the relay autotuning method by letting your AI agent do the math. Instead of manually crunching numbers from a scope or a data log, you feed the oscillation data to your AI client. It analyzes the limit cycles to pull out the exact values you need for your controller. You can verify if your data is actually stable enough to use before you commit to a tuning set. It's built for engineers who need to move from raw oscillation data to a finished tuning table quickly and accurately. You provide the peaks, period, and hysteresis, and the MCP handles the rest.

## Tools

### calculate_limit_cycle
This tool extracts oscillation properties from your raw data. It identifies the core characteristics of the limit cycle.

### compute_ultimate_quantities
Use this to find the ultimate gain and the ultimate period. It calculates these specific values from the analyzed oscillation.

### generate_pid_tuning_table
This tool produces specific PID parameters like Kp, Ti, and Td. It uses the calculated quantities to build a complete tuning set.

### validate_oscillation_stability
This tool checks if your captured oscillation data is reliable. It ensures the data is stable enough for accurate tuning.

## Prompt Examples

**Prompt:** 
```
Calculate the PID parameters for a system with a relay amplitude of 5, peaks at 10 and 2, a period of 12, and hysteresis of 0.5 using Ziegler-Nichols.
```

**Response:** 
```
The calculated PID parameters are: Proportional Gain (Kp) = 1.25, Integral Time (Ti) = 3.0, and Derivative Time (Td) = 0.45.
```

**Prompt:** 
```
Is my oscillation stable? High peak is 50, low peak is 10, period is 5, and hysteresis is 1.
```

**Response:** 
```
Yes, the oscillation is stable with a high confidence level.
```

**Prompt:** 
```
What is the ultimate gain if the limit cycle amplitude is 40 and the describing function gain is 0.5 with an oscillation period of 10?
```

**Response:** 
```
The ultimate gain is 0.125 and the ultimate period is 10.
```

## Capabilities

### Oscillation Validation
Your agent checks if the captured data is stable enough for tuning.

### Limit Cycle Analysis
Your agent extracts oscillation properties from raw process data.

### Ultimate Quantity Calculation
Your agent computes the ultimate gain and period from the limit cycle.

### PID Parameter Generation
The MCP builds a full tuning table including Kp, Ti, and Td.

## Use Cases

### System Characterization
You use the tool to find the ultimate gain and period of a process during a relay test.

### Controller Tuning
You generate a complete PID tuning table using Ziegler-Nichols methods.

### Data Verification
You check if a captured limit cycle is stable before applying new parameters.

### Parameter Extraction
You pull oscillation properties from a recorded signal to prepare for tuning.

## Benefits

- Eliminates manual calculation of Kp, Ti, and Td.
- Provides a stability check to prevent tuning on bad data.
- Converts raw oscillation measurements into actionable PID tables.

## How It Works

Connect your AI client to Vinkius and start calculating immediately.

1. Connect your preferred MCP-compatible client to Vinkius.
2. Provide your oscillation data, such as peaks, period, and hysteresis, to your AI agent.
3. Your agent uses the MCP to validate stability and calculate ultimate quantities.
4. Your agent generates the final PID tuning parameters for your controller.

## Frequently Asked Questions

**What can this MCP calculate?**
It calculates ultimate gain, ultimate period, and specific PID parameters like Kp, Ti, and Td.

**Which AI clients can use this MCP?**
You can use this with any MCP-compatible client, including Claude, Cursor, Windsurf, and VS Code.

**How do I know if my oscillation data is good?**
You can use the validate_oscillation_stability tool to ensure the data is reliable for tuning.

**Does this work with Ziegler-Nichols tuning?**
Yes, the tool can generate PID tuning tables based on the calculated quantities.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP for you. You connect and use it.

**What is the purpose of this tool?**
It calculates PID controller parameters and process characteristics from observed relay-induced oscillations.

**How do I use the PID tuning feature?**
First, use `calculate_limit_cycle` to get oscillation data, then `compute_ultimate_quantities` to find the ultimate gain and period, and finally `generate_pid_tuning_table` to get the PID parameters.

**Can I use this for live plant control?**
No, this tool is for calculating parameters based on observed data and should not be used to directly control a live plant.
