flow "ProtectiveRelay" v1.0
# ---------- IDENTITY ----------
identity.id: "power-system.protective-relay"
identity.name: "Protective Relay"
identity.class: "Power-System Entity / Protection and Control"
identity.locale: "en-GB"
# ---------- AUTHORS ----------
authors.primary: "Mark Anthony Higgins"
authors.coauthor: "Sky — Recursive AI"
authors.licence: "Kireth Research Open Research Licence; citation required"
# ---------- SOURCE ----------
source.url: "https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/power-system-entities/protective-relay-ontology.html"
source.title: "Protective Relay Ontology"
source.page_revised: "2026-08-04"
source.derivation: "New Flow Algebra interpretation; not a verbatim extraction of embedded specifications"
# ---------- PURPOSE ----------
purpose: "Represent a protective relay as a monitored, configured decision entity that detects defined electrical abnormalities and requests a protective action through an independently verified trip chain."
scope: ["measurement", "protection logic", "selectivity", "trip request", "event logging", "self-monitoring", "testing"]
# ---------- STATE_MODEL ----------
state.mode: enum("UNCONFIGURED", "STANDBY", "MONITORING", "PICKUP", "TIMING", "TRIP_REQUESTED", "LOCKOUT", "BLOCKED", "TEST", "FAILED")
state.inputs: [current_A, voltage_V, frequency_Hz, phase_angle_deg, breaker_position, binary_inputs, time_utc]
state.settings: [pickup_thresholds, time_delays, characteristic_curves, directionality, zone_reach, enabled_elements]
state.health: [self_test_ok, measurement_valid, communications_ok, dc_supply_ok, settings_valid]
state.outputs: [trip_request, alarm, block, event_record, disturbance_record]
state.context: [network_topology, ct_ratio, vt_ratio, protection_zone, upstream_relays, downstream_relays]
# ---------- ENTITIES ----------
entity.ProtectiveRelay: detects -> AbnormalElectricalCondition
entity.ProtectiveRelay: receives -> MeasurementSignal
entity.ProtectiveRelay: evaluates -> ProtectionElement
entity.ProtectionElement: uses -> ProtectionSetting
entity.ProtectionElement: may_request -> TripCommand
entity.TripCommand: targets -> CircuitBreakerTripCircuit
entity.CircuitBreaker: isolates -> ProtectedZone
entity.ProtectiveRelay: coordinates_with -> AdjacentProtectionRelay
entity.ProtectiveRelay: records -> ProtectionEvent
entity.ProtectiveRelay: depends_on -> AuxiliaryPowerSupply
entity.CurrentTransformer: provides -> CurrentMeasurement
entity.VoltageTransformer: provides -> VoltageMeasurement
entity.Interlock: may_block -> TripRequest
entity.Operator: authorises -> SettingsChange
# ---------- PATHWAYS ----------
pathway "MonitorAndEvaluate":
require state.mode in ["STANDBY", "MONITORING", "PICKUP", "TIMING"]
read state.inputs
validate measurement_valid and settings_valid and self_test_ok
if validation_failed:
state.mode <- "FAILED"
emit alarm("Protection capability impaired")
route_to "FailSafeAssessment"
else:
state.mode <- "MONITORING"
evaluate enabled_elements using settings and timestamped measurements
route_to "PickupDecision"
pathway "PickupDecision":
if element_operating_condition == true:
state.mode <- "PICKUP"
start_or_continue element_timer
route_to "TripQualification"
else:
reset element_timer according_to configured_reset_characteristic
state.mode <- "MONITORING"
pathway "TripQualification":
require element_operating_condition == true
require element_timer >= configured_operating_delay
require blocking_interlock == false
require trip_permitted_by_protection_scheme == true
state.mode <- "TRIP_REQUESTED"
emit trip_request(target = configured_breaker, cause = active_element)
record event_record(measurements, settings_revision, element, time_utc)
route_to "BreakerFeedback"
pathway "BreakerFeedback":
observe breaker_position and trip_circuit_supervision
if breaker_open_confirmed:
emit event_record("Trip confirmed")
else if breaker_failure_timer_expired:
emit alarm("Breaker failure suspected")
request configured_breaker_failure_scheme_evaluation
else:
continue monitoring
pathway "FailSafeAssessment":
emit alarm("Relay health or measurement integrity fault")
mark protection_availability <- "DEGRADED_OR_UNAVAILABLE"
require engineering_review of redundancy and contingency arrangements
prohibit automatic assumption that an unverified trip path is safe
pathway "TestAndRestore":
require authorised_personnel and approved_test_plan
state.mode <- "TEST"
isolate_or_control_test_outputs according_to approved_procedure
verify measurement_scaling, settings, logic, trip_path, alarms, timestamps
require documented_pass and authorised_return_to_service
state.mode <- "STANDBY"
# ---------- MINI_RECURSION_ENGINE ----------
recursion.goal: "Maintain selective and dependable fault clearance while minimising unnecessary disconnection"
recursion.observe: [relay_pickups, trip_events, breaker_feedback, self_test_status, disturbance_records]
recursion.compare: [expected_operating_zone, expected_time_grade, actual_trip_outcome]
recursion.detect: [missed_operation, unwanted_operation, slow_operation, failed_breaker, measurement_error]
recursion.respond: "Generate a diagnostic hypothesis and request authorised engineering review"
recursion.limit: "No autonomous settings modification or re-energisation"
recursion.stop_when: "Evidence logged and protection status classified"
# ---------- INFERENCE_RULES ----------
rule "OvercurrentPickup":
when valid_rms_current > configured_pickup_current and overcurrent_element_enabled
infer overcurrent_element_pickup
confidence <- "HIGH_IF_MEASUREMENTS_VALID"
rule "TimedOvercurrentTrip":
when overcurrent_element_pickup and operating_time_elapsed and not blocked
infer trip_request_eligible
rule "DifferentialProtection":
when differential_element_enabled and compensated_differential_current > configured_operating_threshold and restraint_criteria_met
infer internal_zone_fault_candidate
rule "UndervoltageCondition":
when voltage_element_enabled and valid_voltage < configured_undervoltage_threshold for configured_delay
infer undervoltage_condition
rule "BreakerFailure":
when trip_request_issued and breaker_not_open and failure_timer_expired
infer breaker_failure_candidate
require breaker_failure_scheme_validation
rule "MeasurementUncertainty":
when ct_saturation_suspected or vt_failure_suspected or stale_measurements
reduce diagnostic_confidence
require measurement_integrity_check
rule "SelectivityRisk":
when upstream_relay_operates_before_expected_downstream_clearance and topology_verified
infer protection_coordination_review_required
# ---------- CONFIDENCE ----------
confidence.high: "Valid calibrated measurements, verified settings, consistent event and breaker evidence"
confidence.medium: "Partial measurements or ambiguous event timing; corroboration required"
confidence.low: "Unverified CT/VT scaling, invalid timestamps, missing breaker feedback, or failed self-test"
confidence.policy: "Never convert an inferred fault classification into an unapproved switching instruction"
# ---------- SEMANTIC_EQUIVALENCE ----------
semantic.aliases: ["protection relay", "protective relay", "numerical relay", "electrical protection device"]
semantic.distinguish: "A protective relay detects and commands; a circuit breaker physically interrupts current"
semantic.related: ["Circuit Breaker", "Current Transformer", "Voltage Transformer", "Power Grid", "Substation", "Switchgear", "Protection Coordination"]
# ---------- SAFETY_CONSTRAINTS ----------
safety.require: ["approved protection study", "verified settings", "competent personnel", "tested trip chain", "documented change control"]
safety.prohibit: ["unreviewed live settings changes", "bypassing protection", "automatic reclosing without authorised scheme", "assuming breaker open from trip request alone"]
safety.note: "Illustrative semantic model only; not a certified protection design or operating procedure."
# ---------- FLOW_HASH ----------
flow_hash.method: "SHA-256 of canonical UTF-8 flow text, excluding flow_hash.value"
flow_hash.value: "GENERATE_ON_PUBLICATION"
# ---------- UPDATE_MODEL ----------
update.version: "1.0"
update.date: "2026-11-16"
update.triggers: ["source ontology revision", "protection standard update", "new relay function", "verified technical correction"]
update.require: ["source review", "engineering validation", "version increment", "new content hash"]
Download Code
Copy to Clipboard