# Actuator Fault Residual Calculator AI Agent Connect

> Actuator Fault Residual Calculator MCP provides the mathematical engine your agent needs to analyze plant performance. It calculates the gap between predicted and actual behaviors, scores potential failure scenarios, and verifies if discrepancies hit statistical limits. You can use it within any MCP-compatible client to automate fault detection and signal richness checks.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_totebdJkc3IiUB0llDwuay5LKWxaQopzDIzHmtCO/ai-agent-connect
- **Tags:** fault-detection, residuals, actuators, plant-modeling, control-theory

## Description

You can use this MCP to bridge the gap between theoretical plant models and real-world sensor data. Instead of manually calculating error margins, you let your AI client handle the heavy lifting of residual math. It works by comparing what your model expects to happen against what the plant actually does. 

Once the discrepancies are calculated, your agent can move straight to diagnostics. You can test different failure modes to see which one best explains the current data, or check if your input signals are actually rich enough to support a reliable assessment. It also handles the statistical side, checking if your residuals are drifting outside of acceptable bounds. This makes it a practical tool for anyone managing control loops or monitoring actuator health in real time.

## Tools

### calculate_residuals
This tool computes the core discrepancy between your predicted plant behavior and the actual measured output.

### check_excitation_status
Use this to determine if your current input data provides enough signal richness for a reliable fault assessment.

### evaluate_fault_hypotheses
This tool scores various failure scenarios to see which one most accurately explains the observed residuals.

### validate_residual_bounds
This tool compares your calculated residuals against statistical limits to flag potential anomalies.

## Prompt Examples

**Prompt:** 
```
Calculate the residuals for a plant model with these inputs and measurements.
```

**Response:** 
```
The predicted output is [1.0, 1.1, 1.2] and the calculated residual is [0.05, -0.02, 0.08].
```

**Prompt:** 
```
Check if the current excitation level is enough to detect a fault.
```

**Response:** 
```
The excitation level is 0.85, which is sufficient for reliable fault assessment.
```

**Prompt:** 
```
Are the residuals within the expected statistical bounds?
```

**Response:** 
```
The residuals are within the expected statistical limits.
```

## Capabilities

### Discrepancy Calculation
Your agent uses this to find the mathematical difference between model predictions and real data.

### Fault Hypothesis Scoring
Your agent evaluates which specific failure mode is most likely causing the observed errors.

### Signal Richness Verification
Your agent checks if the input data is sufficient to make a valid diagnosis.

### Anomaly Detection
The tool flags when residuals exceed established statistical boundaries.

## Use Cases

### Actuator Health Monitoring
Monitor real-time residuals to detect when an actuator is drifting from its commanded position.

### Fault Diagnosis
Score different failure modes to pinpoint exactly why a plant is behaving unexpectedly.

### Data Quality Assurance
Verify that input signals are sufficiently rich to allow for accurate fault detection.

### Anomaly Flagging
Automatically check if residuals have crossed statistical thresholds that indicate a problem.

## Benefits

- Automates the math required to find discrepancies between models and reality.
- Provides a scoring mechanism to rank potential failure scenarios.
- Ensures data quality by checking excitation status before making assessments.
- Flags statistical anomalies through automated bound validation.

## How It Works

Connect your client to Vinkius and start running diagnostics immediately.

1. Connect your preferred MCP-compatible client to the Vinkius platform.
2. Provide your plant model data and measurements to your agent.
3. Run the residual calculation to find the error between prediction and reality.
4. Use the scoring and validation tools to diagnose the specific cause of the fault.

## Frequently Asked Questions

**What does this MCP actually calculate?**
It calculates the residuals, which are the differences between what your plant model predicts and what the actual plant is doing.

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

**How does it help with fault detection?**
It provides tools to score fault hypotheses and check if residuals have moved outside of their statistical bounds.

**Do I need to host the math engine myself?**
No, Vinkius hosts the MCP and manages everything. You connect and use the tools.

**What is excitation status?**
It is a check to see if your input data is rich enough to allow for a reliable assessment of a fault.

**What is a residual in this context?**
A residual is the difference between the actual measured output of a plant and the output predicted by the mathematical model.

**How do I know if my input data is sufficient for analysis?**
You can use the `check_excitation_status` tool to determine if the commanded inputs provide enough signal richness to distinguish between different fault scenarios.

**Can I test specific failure scenarios?**
Yes, by using `evaluate_fault_hypotheses`, you can score how well predefined fault models, such as loss of effectiveness, explain the observed residuals.
