Advertisement
Advanced Time: 8–10 weeks Electrical Engineering

Substation Protection Relay System

Build a digital protection relay implementing overcurrent, earth fault, and differential protection for a distribution substation.

Protection RelayOvercurrentDifferential ProtectionANSI 51IEC 61850Distance Relay
DifficultyAdvanced
Duration8–10 weeks
Components10 items
Steps3 steps

Introduction

Build a digital protection relay implementing overcurrent, earth fault, and differential protection for a distribution substation. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

Implement IDMT (Inverse Definite Minimum Time) overcurrent characteristic per IEC 60255: t = TMS × (K / ((I/Is)^α - 1)). Standard Inverse: K=0.14, α=0.02. Very Inverse: K=13.5, α=1. Extremely Inverse: K=80, α=2. Sample CT secondaries at 1600 Hz (32 samples per cycle). Calculate true RMS current each cycle. Compare against pickup setting (Is). When exceeded, start operate timer using IDMT formula. On timer expiry, issue trip command.

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
1STM32F407 Discovery BoardHigh-speed relay processing at 168MHzx1
2ADS1115 ADC (16-bit, 860 SPS)High-precision CT and VT signal samplingx4
3Precision Current Transformers (5A:5mA)Measurement-class CT for relay inputsx6
4Bourns Precision Voltage DividerVT secondary voltage scalingx6
5Output Relay Module (24V DC coil)Trip and alarm output contactsx8
6RS485 with IEC 61850 GatewaySubstation automation communicationx1
7GPS Receiver (synchronized timing)IEEE 1588 time sync for event recordsx1
8Ethernet Module (W5500)IEC 61850 GOOSE messagingx1
9Non-volatile FRAM (256kB)Fast event record and disturbance recordingx1
10Industrial Power Supply (24V/5A DIN)Relay auxiliary power supplyx1

Step-by-Step Implementation

Follow these 3 steps carefully.

1
Overcurrent Protection (ANSI 51) Algorithm

Implement IDMT (Inverse Definite Minimum Time) overcurrent characteristic per IEC 60255: t = TMS × (K / ((I/Is)^α - 1)). Standard Inverse: K=0.14, α=0.02. Very Inverse: K=13.5, α=1. Extremely Inverse: K=80, α=2. Sample CT secondaries at 1600 Hz (32 samples per cycle). Calculate true RMS current each cycle. Compare against pickup setting (Is). When exceeded, start operate timer using IDMT formula. On timer expiry, issue trip command.

2
Differential Protection (ANSI 87)

Compare currents entering and leaving a protected zone (transformer, busbar, motor). Under normal conditions: I_in = I_out (Kirchhoff's law). Fault inside zone: I_differential = |I_in - I_out| > threshold. Must compensate for CT ratio differences, transformer vector group (phase shift), and transformer no-load current. Use percentage-restrained differential: operate if I_diff > (k × I_restrain + I_min) to prevent false trips on through-fault with CT saturation.

3
Distance Protection (ANSI 21)

Measure apparent impedance Z = V/I. When a fault occurs on the transmission line, V drops and I increases, causing Z to fall within defined impedance zones. Zone 1 covers 80% of line length (instantaneous trip). Zone 2 covers 120% of line (trip after 0.3–0.5s time delay). Zone 3 covers 220% as backup. Implement MHO characteristic (circular impedance characteristic in R-X plane) for directional selectivity — only trips for faults in the forward direction.

Code & Implementation

Core code for protection_relay.cpp:

protection_relay.cpp C/C++
// IDMT Overcurrent protection implementation #include <math.h> float Is = 5.0;   float TMS = 0.5;   float idmt_time(float I) {   if(I <= Is) return 99999;       return TMS * (0.14 / (pow(I/Is, 0.02) - 1.0)); }  float sampleRMS(int adcChannel) {   float sum = 0; int N = 32;   for(int i=0; i<N; i++) {     float v = (analogRead(adcChannel) - 2048) * 0.005;      sum += v*v;     delayMicroseconds(625);    }   return sqrt(sum / N); }  unsigned long pickupTime = 0; bool pickedUp = false;  void protectionLoop() {   float I = sampleRMS(A0);   if(I > Is && !pickedUp) { pickupTime = millis(); pickedUp = true; }   if(I <= Is * 0.9) { pickedUp = false; }    if(pickedUp) {     float operate_ms = idmt_time(I) * 1000;     if(millis() - pickupTime >= operate_ms) {       digitalWrite(TRIP_RELAY, HIGH);        logEvent("OVERCURRENT TRIP", I, millis());     }   } }

Testing & Troubleshooting

Test Substation Protection Relay System by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*11kV/33kV distribution substation protection
*Transformer differential protection
*Motor protection relay (ANSI 49, 50, 51, 46)
*Generator protection schemes
*Busbar protection systems
*Feeder protection in distribution networks
*Industrial power system protection
*Renewable energy plant grid interface protection

Extensions & Next Steps

  • Implement IEC 61850 GOOSE messaging for peer-to-peer protection schemes
  • Add power swing detection and blocking for distance relay
  • Build a protection coordination study tool
  • Implement auto-recloser functionality for overhead line restoration
  • Add PMU (Phasor Measurement Unit) capability for wide-area monitoring

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

Why are protection relays so critical in power systems?
Without protection relays, any fault (short circuit, earth fault, overload) would cause equipment damage, fire, and extended power outages affecting thousands. Protection relays limit fault duration to milliseconds, minimizing equipment damage (fault energy = I² × t — reducing t from seconds to 50ms reduces damage 40×). They also isolate the faulted section while maintaining supply to healthy sections — called selective coordination or discrimination.
Advertisement