Skip to content

Add cross-engine transient trajectory validation - #145

Open
BurhanAbdullah wants to merge 1 commit into
Power-Agent:mainfrom
BurhanAbdullah:feat/cross-engine-transient-validation-v2
Open

BurhanAbdullah wants to merge 1 commit into
Power-Agent:mainfrom
BurhanAbdullah:feat/cross-engine-transient-validation-v2

Conversation

@BurhanAbdullah

Copy link
Copy Markdown
Contributor

Summary

This PR adds a common comparison layer for validating time-domain simulation results across power-system engines.

Different simulators can produce results using different time steps and event timestamps. Comparing their raw outputs directly can therefore be misleading. This implementation aligns the trajectories around the same physical event and compares equivalent channels over their common time interval.

The comparison reports:

  • Mean absolute error and root mean square error
  • Maximum absolute error and integrated absolute error
  • Peak values from both simulations
  • Missing channels, unit mismatches and insufficient overlap
  • Whether each channel meets the configured tolerance

Implementation

The new powermcp.dynamic_validation module provides three main data structures: ChannelSeries, DynamicSnapshot and DynamicComparisonReport.

It uses linear interpolation within the observed time range and does not extrapolate. Channel identifiers and units must match explicitly; the implementation does not silently convert units or assume that differently named signals are equivalent.

The comparison also supports channel-specific tolerances and places a limit on the number of alignment points.

Tests

Added focused tests covering different solver time steps, event-time alignment, partial overlap, missing channels, unit mismatches, invalid inputs, tolerance handling and trajectory differences.

Scope

This PR establishes the comparison core. It does not yet include PSS/E or ANDES extraction adapters, nor does it claim to establish stability equivalence from waveform similarity alone. Metrics such as damping ratio, critical clearing time and rotor-angle stability can be added once the engine-specific outputs and study definitions are validated.

The aim is to provide a reliable foundation for cross-engine dynamic validation without making assumptions about simulator outputs.

@BurhanAbdullah BurhanAbdullah changed the title Feat/cross engine transient validation v2 Add cross-engine transient trajectory validation Oct 30, 2026
@BurhanAbdullah
BurhanAbdullah force-pushed the feat/cross-engine-transient-validation-v2 branch from 185d512 to 98c7490 Compare October 31, 2026 18:50
@BurhanAbdullah
BurhanAbdullah force-pushed the feat/cross-engine-transient-validation-v2 branch from d71c499 to 738ed5e Compare October 31, 2026 18:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant