Initial commit: Phase Angle Fixer with README, AGENTS.md, and Cursor rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michael-A-SloanandCursor committed 2026-09-03 17:12:25 -04:00
commit 0c8b61b27f
6 files changed
+1140

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
# Phase Angle Fixer
A single-page web app for checking and correcting **voltage and current phase angles** on three-phase power meters. Enter angles for Va, Ia, Vb, Ib, Vc, Ic and get diagnostics, wiring suggestions, meter settings, and phasor/time-domain visuals.
## Features
- **Phase angles (degrees)** — Input Va, Ia, Vb, Ib, Vc, Ic with optional CT/PT ratios and nominal voltage
- **Phase rotation** — Expects ABC (positive sequence): Vb−Va ≈ −120°, Vc−Va ≈ +120°; detects ACB or B/C swap
- **V–I phase angle & power factor** — φ = I − V, pf = cos(φ); labels resistive / inductive / capacitive
- **Unity PF mode** — Toggle “Expect close to unity power factor” for CT polarity (positive/negative) and meter phase correction suggestions
- **Wiring & CT/PT** — Suggestions for physical wiring, CT on wrong phase, S1/S2 polarity, and meter CT/PT ratio
- **Meter setup** — Optional CT ratio, PT ratio, nominal voltage, CT type (standard / Rogowski / residual); computed meter multiplier
- **Angle views** — Phasor diagram (radial) and sinusoidal waveform (time domain)
- **References** — Logic follows NASPI TR-006, electronics-tutorials phasors, NJIT Lab 3 phase sequence, EEP CW/CCW, Electrical Ampere
## How to run
No build step. Open in a browser:
```bash
# From repo root
open index.html
# or
start index.html
```
Or drag `index.html` into a browser, or use a local server (e.g. `npx serve .`).
## Project structure
```
.
├── README.md # This file
├── AGENTS.md # AI / agent-oriented project summary
├── index.html # Single-file app (HTML, CSS, JS)
├── .gitignore
└── LICENSE # MIT
```
## References (embedded in app)
- [NASPI TR-006](https://www.naspi.org/sites/default/files/reference_documents/naspi_2016_tr_006_phase_angle_calculations_final.pdf) — Phase angle calculations
- [Electronics-Tutorials: Phasors](https://www.electronics-tutorials.ws/accircuits/phasors.html)
- [Learnabout-Electronics: Phase and Phasors](https://learnabout-electronics.org/ac_theory/ac_ccts.php)
- [NJIT ECE 449 Lab 3: Phase Sequence](https://ecelabs.njit.edu/ece449/lab3.php)
- [EEP: Phase sequence CW/CCW](https://electrical-engineering-portal.com/proper-phase-sequence-cw-ccw-electric-motors-generators)
- [Electrical Ampere: Phase angle](https://electricalampere.com/phase-angle/)
## License
MIT — see [LICENSE](LICENSE).