Power System Fault Detection, Classification & Location using Neural Networks in Matlab.
- lms editor
- 4 days ago
- 6 min read
Power System Fault Detection, Classification & Location using Neural Networks
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
Reliable fault identification is essential for maintaining the safety, stability, and continuity of modern electrical power systems. Conventional protection methods can detect abnormal operating conditions, but intelligent techniques such as 𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤𝐬 can provide additional capabilities for automatic fault detection, fault type classification, and fault location estimation.
Power System Fault Detection, Classification & Location using Neural Networks

This MATLAB/Simulink-based system demonstrates an intelligent approach for analyzing faults in a 𝐭𝐡𝐫𝐞𝐞-𝐩𝐡𝐚𝐬𝐞, 𝐭𝐡𝐫𝐞𝐞-𝐛𝐮𝐬 𝐩𝐨𝐰𝐞𝐫 𝐬𝐲𝐬𝐭𝐞𝐦.
The developed model performs three major functions:
Detects whether a fault has occurred.
Classifies the type of electrical fault.
Estimates the location of the fault along the transmission line.
Uses bus voltage, current, and zero-sequence measurements as neural-network inputs.
Provides online fault assessment directly inside Simulink.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The simulated network contains 𝐭𝐡𝐫𝐞𝐞 𝐛𝐮𝐬𝐞𝐬 connected through a transmission network.
Parameter | Description |
System type | Three-phase power system |
Number of buses | 3 |
Bus 1 | Source-side bus |
Bus 2 | Source-side bus |
Bus 3 | Load bus |
Main transmission line | 10 km |
Fault application | Transmission line |
Intelligent technique | Neural network |
Simulation platform | MATLAB/Simulink |
Bus 1 and Bus 2 represent the source side of the network, while Bus 3 supplies the load.
Faults are introduced on the transmission line between the source and load sections to generate training and testing data.
𝐌𝐞𝐚𝐬𝐮𝐫𝐞𝐝 𝐈𝐧𝐩𝐮𝐭 𝐒𝐢𝐠𝐧𝐚𝐥𝐬
The neural-network system uses electrical measurements obtained from Bus 1.
The principal inputs include:
𝐑𝐌𝐒 𝐛𝐮𝐬 𝐯𝐨𝐥𝐭𝐚𝐠𝐞
𝐑𝐌𝐒 𝐛𝐮𝐬 𝐜𝐮𝐫𝐫𝐞𝐧𝐭
𝐙𝐞𝐫𝐨-𝐬𝐞𝐪𝐮𝐞𝐧𝐜𝐞 𝐯𝐨𝐥𝐭𝐚𝐠𝐞
𝐙𝐞𝐫𝐨-𝐬𝐞𝐪𝐮𝐞𝐧𝐜𝐞 𝐜𝐮𝐫𝐫𝐞𝐧𝐭
Phase quantities such as:
(V_A)
(V_B)
(V_C)
(I_A)
(I_B)
(I_C)
are also monitored within the Simulink model for fault analysis and dataset generation.
𝐅𝐚𝐮𝐥𝐭 𝐓𝐲𝐩𝐞𝐬 𝐂𝐨𝐧𝐬𝐢𝐝𝐞𝐫𝐞𝐝
The model can generate and analyze several common transmission-line faults.
Fault category | Examples |
Single line-to-ground | AG, BG, CG |
Line-to-line | AB, AC, BC |
Double line-to-ground | ABG, ACG, BCG |
Three-phase fault | ABC |
Three-phase-to-ground | ABCG |
Normal condition | No fault |
This enables the neural network to learn the characteristics of different fault conditions rather than recognizing only a single disturbance.
𝐃𝐚𝐭𝐚𝐬𝐞𝐭 𝐆𝐞𝐧𝐞𝐫𝐚𝐭𝐢𝐨𝐧
A MATLAB program is used to automate the fault-data collection process.
The program sequentially executes:
Normal operating conditions.
AG fault.
BG fault.
CG fault.
AB fault.
AC fault.
BC fault.
Double-line-to-ground faults.
Three-phase fault conditions.
Different fault locations along the transmission line.
The simulation is repeated under several line-length or fault-location conditions to create a diverse training dataset.
Dataset Structure
Two primary datasets are used:
Dataset | Purpose |
X data | Neural-network input measurements |
D data | Target fault class and location information |
The 𝐗 𝐝𝐚𝐭𝐚 contains the measured electrical features, while the 𝐃 𝐝𝐚𝐭𝐚 defines the expected output for each operating condition.
𝐅𝐚𝐮𝐥𝐭 𝐄𝐧𝐜𝐨𝐝𝐢𝐧𝐠 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
Fault classes are represented using binary target patterns.
The first four target values are used for 𝐟𝐚𝐮𝐥𝐭 𝐝𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧 𝐚𝐧𝐝 𝐜𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧, while an additional target value represents the 𝐟𝐚𝐮𝐥𝐭 𝐥𝐨𝐜𝐚𝐭𝐢𝐨𝐧.
Examples described in the model include:
Operating condition | Target representation |
Normal condition | 0000 |
AG fault | 1001 |
Location target | Based on fault distance |
This encoding allows the trained network to distinguish normal operation from different fault combinations.
𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤 𝐓𝐫𝐚𝐢𝐧𝐢𝐧𝐠
After generating the dataset, the information is imported into the MATLAB Neural Network Fitting Tool.
The basic training procedure is:
Open the neural-network fitting tool.
Select the generated 𝐗 𝐝𝐚𝐭𝐚 as the input.
Select the corresponding target data.
Configure the data orientation correctly.
Divide the samples into training, validation, and testing sets.
Train the neural network.
Examine regression performance.
Export the trained network to Simulink.
The exported network is then integrated directly into the complete power-system model.
𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞
Regression plots are used to evaluate the agreement between neural-network predictions and the desired target values.
Dataset | Regression coefficient |
Training | 0.97912 |
Validation | 0.9836 |
Test | 0.99327 |
Overall | 0.9818 |
The regression values are close to 𝐑 = 𝟏, indicating strong agreement between predicted and target values for the available dataset.
The test dataset achieves the highest reported regression coefficient of approximately 𝐑 = 𝟎.𝟗𝟗𝟑𝟐𝟕.
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The complete operating sequence can be summarized as:
Power System Measurements → Neural Network → Fault Detection → Fault Classification → Fault Location
During simulation:
Voltage and current measurements are collected continuously.
The trained neural network processes the measured signals.
The detection output determines whether the network is operating normally or under fault.
Classification outputs identify the faulted phases.
A separate neural-network output estimates the fault distance.
The results are displayed through Simulink scopes and display blocks.
𝐅𝐚𝐮𝐥𝐭 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧
The neural-network detection output is passed through a threshold.
Detection parameter | Value |
Fault detection threshold | 0.1 |
Output > threshold | Fault detected |
Output < threshold | Normal condition |
Therefore, an output exceeding 𝐨.𝟏 indicates the presence of a fault.
𝐅𝐚𝐮𝐥𝐭 𝐂𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧
The fault-classification network generates multiple output signals.
The first four classification outputs are converted into binary states using a threshold.
Classification parameter | Value |
Number of classification bits | 4 |
Binary conversion threshold | 0.5 |
Above threshold | Binary 1 |
Below threshold | Binary 0 |
A decoder then converts the resulting four-bit pattern into the corresponding fault type.
This allows automatic identification of faults including:
AG
BG
CG
AB
AC
BC
ABG
ACG
BCG
ABC
ABCG
𝐅𝐚𝐮𝐥𝐭 𝐋𝐨𝐜𝐚𝐭𝐢𝐨𝐧
A separate neural-network output estimates the physical location of the fault on the transmission line.
The estimated location is compared with the actual fault position used during simulation.
This makes the system useful not only for identifying 𝐰𝐡𝐚𝐭 𝐟𝐚𝐮𝐥𝐭 occurred, but also approximately 𝐰𝐡𝐞𝐫𝐞 𝐢𝐭 𝐨𝐜𝐜𝐮𝐫𝐫𝐞𝐝.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
Several fault locations were tested to verify the neural-network locator.
AB-Ground Fault Results
Actual fault location | Neural-network estimated location | Observation |
4 km | 3.8 km | Close to actual location |
6 km | 5.76 km | Close to actual location |
9 km | 8.8 km | Close to actual location |
The network successfully detected the fault, identified it as an 𝐀𝐁-𝐠𝐫𝐨𝐮𝐧𝐝 fault, and produced a location estimate close to the applied fault position.
B-to-Ground Fault Result
Fault type | Actual location | Estimated location |
BG fault | 9 km | 9.09 km |
For this test, the neural network correctly classified the 𝐁-𝐭𝐨-𝐠𝐫𝐨𝐮𝐧𝐝 fault and estimated the location as approximately 9.09 km.
𝐑𝐞𝐬𝐮𝐥𝐭 𝐇𝐢𝐠𝐡𝐥𝐢𝐠𝐡𝐭𝐬
The simulation demonstrates that the neural-network approach can perform all three protection-related functions within one coordinated model:
𝐅𝐚𝐮𝐥𝐭 𝐝𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧 identifies abnormal system conditions.
𝐅𝐚𝐮𝐥𝐭 𝐜𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧 determines the affected phases.
𝐅𝐚𝐮𝐥𝐭 𝐥𝐨𝐜𝐚𝐭𝐢𝐨𝐧 estimates the distance to the fault.
Regression values of approximately 0.98–0.99 indicate good neural-network fitting.
Estimated fault distances remain close to the actual applied locations.
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
MATLAB/Simulink-based three-bus power-system model.
Neural-network-based intelligent protection methodology.
Automatic fault dataset generation.
Support for several symmetrical and unsymmetrical faults.
RMS voltage and current monitoring.
Zero-sequence voltage and current analysis.
Neural-network-based fault detection.
Multi-class fault classification.
Transmission-line fault location estimation.
Binary fault coding and decoder-based classification.
Regression-based neural-network performance analysis.
Direct integration of the trained network into Simulink.
Online visualization of detection and classification results.
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This model can support learning and research in areas such as:
Power-system protection.
Transmission-line fault analysis.
Intelligent protective relaying.
Artificial intelligence in electrical engineering.
Neural-network applications in power systems.
Online fault monitoring.
Distribution and transmission-system diagnostics.
Smart-grid protection studies.
Condition monitoring and disturbance identification.
MATLAB/Simulink-based protection-system development.
𝐖𝐡𝐨 𝐂𝐚𝐧 𝐁𝐞𝐧𝐞𝐟𝐢𝐭?
The model is particularly useful for:
Electrical engineering students.
Power-system researchers.
Protection engineers.
MATLAB/Simulink learners.
Researchers working with artificial neural networks.
Engineers studying intelligent transmission-line monitoring.
Academicians demonstrating AI-based protection concepts.
𝐖𝐡𝐲 𝐔𝐬𝐞 𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤𝐬 𝐟𝐨𝐫 𝐅𝐚𝐮𝐥𝐭 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬?
Neural networks are well suited to power-system fault analysis because they can learn nonlinear relationships between electrical measurements and system conditions.
In this model, the neural network learns to associate measured voltage and current characteristics with:
Normal operating states.
Faulted operating states.
Specific fault combinations.
Different positions along the transmission line.
Once trained, the network can generate fault information rapidly without manually analyzing each waveform.
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The Power System Fault Detection, Classification & Location using Neural Networks model demonstrates an intelligent approach for transmission-line protection using MATLAB/Simulink.
The developed three-bus system combines electrical measurements, automated fault-data collection, neural-network training, binary fault classification, and fault-distance estimation within a single simulation environment.
The reported regression coefficients of approximately 𝐑 = 𝟎.𝟗𝟖–𝟎.𝟗𝟗 demonstrate good agreement between the neural-network outputs and the target data. Simulation cases also show that the estimated fault locations remain close to the actual fault positions, including estimates of 3.8 km for a 4 km fault, 5.76 km for a 6 km fault, 8.8 km for a 9 km fault, and 9.09 km for a 9 km BG fault.
Overall, the model provides a clear and practical platform for understanding how 𝐚𝐫𝐭𝐢𝐟𝐢𝐜𝐢𝐚𝐥 𝐧𝐞𝐮𝐫𝐚𝐥 𝐧𝐞𝐭𝐰𝐨𝐫𝐤𝐬 can be applied to intelligent power-system protection, fault classification, and transmission-line fault-location estimation.



Comments