flow "Generator" v1.0
# ---------- IDENTITY ----------
id: "power-system.generator"
category: "Engineering Entities / Power-System Entities"
entity_type: "Electrical Generator"
locale: "en-GB"
# ---------- AUTHORS ----------
authors: ["Mark Anthony Higgins", "Sky — Recursive AI"]
licence: "Kireth Research Open Research Licence; citation required"
# ---------- SOURCE ----------
source.url: "https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/power-system-entities/generator-ontology.html"
source.title: "Generator Ontology"
source.revised: "2026-08-04"
source.mode: "Newly constructed Flow Algebra representation; not verbatim page code"
citation_backlink: source.url
# ---------- PURPOSE ----------
purpose: "Represent a generator as an energy-conversion entity with measurable electrical output, operating states, interfaces, protection and failure reasoning."
# ---------- STATE_MODEL ----------
state S(t) = (I(t), R, B, K)
I(t) = {prime_mover_power, shaft_speed, terminal_voltage, output_current,
frequency, power_factor, winding_temperature, vibration,
breaker_state, excitation_state, protection_signals}
R = {energy_balance, voltage_regulation, frequency_relation,
thermal_limits, protection_logic, synchronisation_constraints}
B = {rated_voltage, rated_current, rated_power, rated_frequency,
insulation_class, permitted_temperature, vibration_limit,
manufacturer_limits, operating_procedures}
K = {generator_type, topology, winding_configuration, cooling_method,
prime_mover, excitation_system, connected_network, maintenance_history}
state.lifecycle: ["offline", "starting", "no_load", "synchronising",
"connected", "loaded", "stopping", "tripped", "maintenance"]
state.operational: ["normal", "derated", "warning", "fault", "isolated"]
# ---------- ENTITIES ----------
entity Generator: converts mechanical or other supplied energy into electrical energy
entity PrimeMover: supplies mechanical torque where applicable
entity Rotor: rotating electromagnetic component
entity Stator: stationary electromagnetic component
entity FieldSystem: provides excitation where applicable
entity Terminal: electrical output interface
entity VoltageRegulator: controls excitation or output voltage where applicable
entity Governor: regulates prime-mover speed where applicable
entity CoolingSystem: removes generator heat
entity ProtectionRelay: evaluates electrical and mechanical fault indications
entity CircuitBreaker: connects or isolates the generator from a network
entity PowerNetwork: receives generated electrical energy
entity Sensor: measures generator state
relation Generator -> has_component -> Rotor
relation Generator -> has_component -> Stator
relation Generator -> may_use -> FieldSystem
relation Generator -> receives_energy_from -> PrimeMover
relation Generator -> transfers_power_to -> PowerNetwork
relation Generator -> monitored_by -> Sensor
relation Generator -> protected_by -> ProtectionRelay
relation Generator -> connected_through -> CircuitBreaker
relation Generator -> cooled_by -> CoolingSystem
# ---------- PATHWAYS ----------
pathway "MechanicalToElectricalConversion":
input: {shaft_torque, angular_speed, losses}
derive mechanical_input_power = shaft_torque * angular_speed
derive electrical_output_power = mechanical_input_power - losses
require losses >= 0
require electrical_output_power <= mechanical_input_power
output: {mechanical_input_power, electrical_output_power}
pathway "ThreePhasePower":
when generator_type == "three_phase_ac" and measurements_valid
derive apparent_power = sqrt(3) * line_voltage_rms * line_current_rms
derive active_power = apparent_power * power_factor
derive reactive_power = apparent_power * sin(arccos(power_factor))
require -1 <= power_factor <= 1
output: {apparent_power, active_power, reactive_power}
pathway "SynchronousFrequency":
when generator_type == "synchronous_ac"
derive frequency_hz = (pole_count * rotational_speed_rpm) / 120
require pole_count > 0
output: frequency_hz
pathway "GridConnection":
input: {voltage_difference, frequency_difference, phase_angle_difference,
phase_sequence_match, protection_healthy, breaker_state}
when protection_healthy and phase_sequence_match
and within_approved_sync_limits(voltage_difference,
frequency_difference, phase_angle_difference)
infer synchronisation_permitted
else
infer synchronisation_blocked
constraint: "Never command breaker closure from an ontology inference alone."
pathway "ThermalMonitoring":
input: {winding_temperature, ambient_temperature, cooling_status}
when winding_temperature > permitted_temperature
infer overtemperature_alarm
infer load_reduction_or_protective_action_required
when cooling_status == "failed"
infer cooling_fault
infer operating_limit_review_required
pathway "ElectricalProtection":
input: {overcurrent, earth_fault, differential_fault, overvoltage,
undervoltage, underfrequency, overfrequency, reverse_power}
when any_confirmed_protection_trip
infer trip_required
infer generator_state = "tripped"
infer investigation_required_before_restart
# ---------- MINI_RECURSION_ENGINE ----------
engine "GeneratorStateReasoner":
initialise S(0) from validated measurements and equipment configuration
repeat each monitoring_cycle:
E(t) = expand(I(t), R)
V(t) = filter(E(t), B)
candidate(t) = argmax P(x | I(t), R, B, K) for x in V(t)
I(t+1) = update(I(t), candidate(t), new_measurements)
if critical_protection_signal then prioritise safe_isolation
if measurement_missing then flag uncertainty and request verification
if stable_state and no_new_evidence then stop_recursion
output: {classified_state, inferred_causes, confidence, evidence, safe_next_action}
# ---------- INFERENCE_RULES ----------
rule "Overload":
if measured_output > rated_output for validated_duration
then infer overload_condition; recommend load_review
rule "VoltageInstability":
if voltage_deviation_exceeds_approved_limit
then infer regulation_or_network_issue; inspect excitation_and_load_evidence
rule "ThermalDegradation":
if winding_temperature_trend == "rising" and load_trend == "stable"
then infer possible_cooling_or_internal_loss_issue
rule "MechanicalAnomaly":
if vibration > approved_vibration_limit
then infer mechanical_fault_risk; request specialist_inspection
rule "SensorUncertainty":
if sensors_disagree beyond measurement_tolerance
then infer measurement_conflict; prohibit_unsupported_diagnosis
# ---------- CONFIDENCE ----------
confidence.method: "Evidence-weighted, calibrated where validation data exists"
confidence.inputs: ["sensor_quality", "measurement_freshness", "rule_consistency",
"equipment_context", "independent_confirmation"]
confidence.low: "Insufficient evidence; no automatic operational decision"
confidence.medium: "Provisional interpretation; verify before action"
confidence.high: "Consistent verified evidence; still subject to safety controls"
# ---------- SEMANTIC_EQUIVALENCE ----------
semantic.alias "generator" ~ "electrical generator"
semantic.alias "alternator" ~ "AC generator" when context == "alternating_current"
semantic.alias "genset" ~ "generator set" when includes_prime_mover == true
semantic.distinguish "generator" != "power station"
semantic.distinguish "generator" != "electrical source" # generator is a subtype
semantic.distinguish "generator" != "motor" # energy conversion direction differs
# ---------- SAFETY_CONSTRAINTS ----------
safety.require: "Equipment-specific limits and approved protection settings"
safety.require: "Qualified personnel for testing, synchronising and maintenance"
safety.require: "Isolation, lock-off and verification before intrusive work"
safety.prohibit: "Bypassing protective trips or interlocks"
safety.prohibit: "Assuming a de-energised condition without verification"
safety.note: "Conceptual reasoning only; not an executable generator controller or engineering approval."
# ---------- FLOW_HASH ----------
flow_hash.method: "SHA-256 over canonical UTF-8 content, excluding flow_hash.value"
flow_hash.value: "c505fbb4d1c9742901e7f581dd5281805cdd221d048348d7e75220e034805b08"
# ---------- UPDATE_MODEL ----------
update.trigger: ["ontology_revision", "equipment_configuration_change",
"new_failure_evidence", "standard_revision", "validated_test_result"]
update.process: "Review evidence -> revise rules -> validate -> version -> publish"
update.version_policy: "Increment version when semantics or rules change"
update.provenance: "Preserve source URL, revision date, authors and change history"
# ---------- END FLOW ----------
Download Code
Copy to Clipboard