Final Year Project — Designed by Isaac-Great for a client of Deethunder Nexus
This project presents the design and simulation of a Sequence Time Domain Reflectometry (STDR) system for detecting and locating faults on 3-phase power transmission lines. STDR injects orthogonal pseudo-noise (PN) sequences simultaneously on all three phases and cross-correlates the reflected signals to determine the fault location.
The system is modelled in MATLAB/Simulink with a custom 3-phase channel model that supports selective fault injection (Line-to-Ground, Short Circuit, Open Circuit) at arbitrary distances. A Python-based post-processing pipeline generates performance tables and publication-quality plots for the results and discussion chapter.
The diagram below shows the high-level system overview:
The Simulink implementation of the system block diagram:
📦 STDR-3Phase-Fault-Detection
├── 📄 STDR_3Phase_Selective.slx # Main Simulink model
├── 📄 STDR.m # Batch simulation: Noise × FaultType × Distance sweep
├── 📄 selective_stdr.m # Multi-phase selectivity sweep
├── 📄 generatePN3phase.m # Helper: generates orthogonal 3-phase PN sequences
├── 🖼️ System Model.png # Simulink block diagram screenshot
├── 🖼️ block_diagram.png # System architecture diagram
├── 📄 .gitignore
└── 📁 analysis/
├── 📄 stdr_analysis.py # Python post-processing & plotting
├── 📄 README.md # Python pipeline documentation
Three orthogonal maximal-length PN sequences (length 1023, chip rate 500 kHz) are generated using different generator polynomials:
- Phase A:
x¹⁰ + x³ + 1 - Phase B:
x¹⁰ + x⁵ + 1 - Phase C:
x¹⁰ + x⁷ + 1
Each sequence is upsampled by a factor of 20 and injected simultaneously onto the 3-phase line.
The Simulink model contains a Channel_3Phase subsystem that:
- Delays the transmitted signal by
Ndelaysamples (determined by fault distance and propagation speedv = 2×10⁸ m/s) - Scales the reflected signal by a reflection coefficient Γ depending on fault type:
| Fault Type | Γ |
|---|---|
| Line-to-Ground (LG) | −0.6 |
| Short Circuit (SC) | −1.0 |
| Open Circuit (OC) | +1.0 |
- Adds AWGN noise at configurable power levels
Each phase correlates its received signal with its own transmitted PN sequence. The lag at the peak of the cross-correlation gives τ, and the fault distance is recovered as:
d = (τ × v) / 2
Only one phase is faulted at a time while the other two remain healthy. The three detectors are observed to confirm that only the faulted phase detector registers a hit — validating cross-phase selectivity.
- MATLAB R2021b or later (R2024b recommended)
- Simulink
- Communications Toolbox (required by
generatePN3phase.m)
% Open MATLAB, navigate to the project folder, then run:
STDRRuns 60 simulation scenarios (3 noise levels × 4 fault types × 5 distances) and saves:
STDR_Noise_Sweep_Results.csvSTDR_Error_AllPhases.pngSTDR_Linearity_AllPhases.png
selective_stdrRuns 27 scenarios (3 faulted phases × 3 fault types × 3 distances) and saves:
STDR_Full_Selectivity_Study.csvSTDR_CrossPhase_Selectivity.png
After running the MATLAB simulation, use the Python analysis pipeline to generate thesis-quality tables and figures. See analysis/README.md for full instructions.
cd analysis
pip install pandas numpy matplotlib seaborn
python stdr_analysis.py| Condition | Outcome |
|---|---|
| Ideal (no noise) | ✅ 100% accuracy across all fault types and distances (300 m – 2700 m) |
| Low noise (σ² = 10⁻⁶) | ✅ Negligible accuracy degradation |
| High noise (σ² = 10⁻⁴) | |
| Cross-phase selectivity | ✅ Each detector responds exclusively to faults on its own phase |
| Code | Fault Type | Description |
|---|---|---|
| LG | Line-to-Ground | Single phase shorted to ground |
| SC | Short Circuit | Phase-to-phase short |
| OC | Open Circuit | Broken/disconnected conductor |
| LL | Line-to-Line | Phase-to-phase fault (noise sweep only) |
| Parameter | Value |
|---|---|
| PN Sequence Length | 1023 chips |
| Chip Rate | 500 kHz |
| Samples per Chip | 20 |
| Sampling Frequency | 10 MHz |
| Signal Propagation Speed | 2 × 10⁸ m/s |
| Fault Distances Tested | 300, 750, 1500, 2250, 2700 m |
| Noise Levels Tested | 0 (ideal), 10⁻⁶, 10⁻⁴ |
This project was done by Deethunder Nexus ventures.
- Website: www.deethundernexus.org
- Email: info@deethundernexus.org
Proprietary / All Rights Reserved
This project was developed as an academic final-year submission. All intellectual property rights are strictly reserved by the respective institution and the student developer.
- No Reproduction or Legal Use: This codebase, models, and associated documentation may not be copied, reproduced, distributed, or repurposed for any commercial, non-commercial, or legal use.
- Client Confidentiality: Due to strict client confidentiality privileges, any request for reproduction, reference, or access to proprietary assets must be formally directed to the organization.
For permissions and inquiries, please contact Deethunder Nexus ventures prior to any intended usage.

