# PWM Average Voltage Calculator AI Agent Connect

> PWM Average Voltage Calculator is a specialized tool for power electronics engineers. It lets your AI client calculate per-cycle average voltage, effective duty cycles, and ripple components. You can use it to account for dead-time distortion, analyze frequency-dependent ripple, and compare different carrier alignments without manual math.

## Overview
- **Category:** power-electronics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_uUSMZvwKldfwOGmAmTQC22FKqT2R0cRbkYP3UFW3/ai-agent-connect
- **Tags:** pwm, voltage-ripple, duty-cycle, power-conversion, signal-analysis

## Description

You can use this MCP to handle the heavy lifting of Pulse Width Modulation (PWM) signal analysis. Instead of manually calculating voltage characteristics, you can ask your agent to run specific simulations for your power converter designs. It handles the math for per-cycle average voltage and effective duty cycles, including the impact of dead-time distortion and modulation limits. If you are tuning a converter, you can use it to see how changing the switching frequency affects voltage ripple or how different carrier conventions, like center-aligned versus edge-aligned, change your performance. It also helps you verify that your duty cycle sequences stay within the hardware limits of your specific modulation setup.

## Tools

### analyze_ripple_sensitivity
This tool calculates how voltage ripple shifts when you change switching frequencies or carrier alignments.

### calculate_pwm_metrics
This tool performs the core math for voltage characteristics based on your specific PWM configuration.

### compare_carrier_alignments
This tool evaluates the performance gap in average voltage and ripple between different carrier conventions.

### validate_modulation_bounds
This tool checks if your duty cycle sequences stay within the physical limits of your modulation hardware.

## Prompt Examples

**Prompt:** 
```
Calculate the PWM metrics for a 400V DC link with a 10kHz frequency and a duty cycle of 0.5.
```

**Response:** 
```
The per-cycle average voltage is 200.0V with an effective duty cycle of 0.5, assuming no dead-time distortion.
```

**Prompt:** 
```
What is the ripple amplitude for a 100V system with a 20kHz switching frequency and 0.01H inductance?
```

**Response:** 
```
The calculated ripple amplitude is 12.5V with a primary frequency dominance of 20kHz.
```

**Prompt:** 
```
Check if a duty cycle sequence of [0.1, 0.5, 0.9] is valid for limits of 0.05 to 0.95.
```

**Response:** 
```
The duty cycle sequence is valid and falls within the specified modulation bounds.
```

## Capabilities

### Voltage Characteristic Math
Your agent calculates per-cycle average voltage and effective duty cycles.

### Ripple Sensitivity Analysis
The tool determines how frequency changes impact voltage ripple.

### Carrier Convention Comparison
You can compare center-aligned and edge-aligned carrier performance.

### Hardware Limit Validation
Your agent checks duty cycle sequences against specific modulation hardware bounds.

## Use Cases

### Converter Design
Calculate average voltage and duty cycles for a new DC-DC converter design.

### Ripple Optimization
Analyze how switching frequency adjustments change the voltage ripple amplitude.

### Hardware Verification
Ensure a planned duty cycle sequence won't exceed the modulation limits of your hardware.

### Carrier Selection
Compare the ripple and voltage output of edge-aligned versus center-aligned carriers.

## Benefits

- Reduces manual calculation errors in PWM signal modeling.
- Accounts for real-world factors like dead-time distortion.
- Speeds up the comparison of different carrier alignment strategies.
- Automates the verification of duty cycle limits.

## How It Works

Connect the MCP to your AI client to start running power electronics calculations immediately.

1. Connect your AI client to the Vinkius-hosted MCP.
2. Provide the PWM parameters or duty cycle sequences to your agent.
3. Your agent calls the specific tool needed for the calculation.
4. The tool returns precise voltage, ripple, or validation data.
5. Your agent presents the results in your chat interface.

## Frequently Asked Questions

**What can this MCP calculate?**
It calculates per-cycle average voltage, effective duty cycles, and voltage ripple components for PWM signals.

**Does it account for dead-time distortion?**
Yes, the calculate_pwm_metrics tool allows agents to account for dead-time distortion and modulation limits.

**Can I use this to check hardware limits?**
Yes, the validate_modulation_bounds tool checks if duty cycle sequences are compatible with your specified hardware limits.

**How do I compare different carrier types?**
You can use the compare_carrier_alignments tool to evaluate the difference in average voltage and ripple between different carrier conventions.

**Which AI clients work with this MCP?**
This MCP works with any compatible client, including Claude, Cursor, Windsurf, and VS Code.

**How does dead time affect the voltage calculation?**
Dead time introduces a period where both switches are off, causing a deviation from the ideal voltage. You can use `calculate_pwm_metrics` to find the specific `deadTimeDistortion` value.

**Can I compare different carrier alignment methods?**
Yes, the `compare_carrier_alignments` tool allows you to evaluate the difference in average voltage and ripple between different carrier conventions.

**How do I check if my duty cycles are within hardware limits?**
Use the `validate_modulation_bounds` tool to verify if your duty cycle sequence stays within the specified minimum and maximum constraints.
