A Flask web application that converts machine-generated Power Quality (PQ) reports into standardized Word documents compliant with IEEE 519-2022 standards for regulatory submission.
Transform raw harmonic analysis data into professional reports that meet regulatory authority requirements, featuring:
- Standardized table formatting per IEEE 519-2022
- Automatic violation detection and highlighting
- Professional Word document export
- Processes voltage and current harmonic measurements
- Maps raw data (V1N, V2N, V3N, I1, I2, I3) from PQ reports to standard R, Y, B phase notation
- Displays limit exceeded values in a separate section
- Professional Word document (.doc) export
- Excel for current file or all uploaded files' downloads
- CSV for harmonic violation reports
- Python 3.7+
- Flask
- Pandas
- Others (see requirements.txt)
Run exe.bat file to open application
- Upload PQ report files through the web interface
- View system metadata (component, block, bay/feeder info)
- Check violation summary and statistics
- Review formatted harmonic tables
harmonic-analysis-app/
├── app.py # Flask application main file
├── templates/
│ ├── base.html # Base template
│ ├── select_file.html # File selection page
│ └── results.html # Results display (integrated template)
├── static/
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
├── uploads/ # Uploaded files directory
├── utils/ # Processed data directory
└── requirements.txt # Python dependencies
| Table | Time Interval | Percentile | Measurement Type |
|---|---|---|---|
| Voltage Daily | 3-second | 99th | Voltage |
| Voltage Full | 10-minute | 95th | Voltage |
| Current Daily | 3-second | 99th | Current |
| Current Full 99 | 10-minute | 99th | Current |
| Current Full 95 | 10-minute | 95th | Current |
- Modern browsers (prefer Chrome)
- JavaScript-enabled functionality required
- File Upload Errors: Check file format and size limits
- Missing Data: Ensure input files contain required columns
- Violation Detection: Verify regulation limit data is present
- Export Problems: Check browser download permissions