flow "PowerMeter" v1.0
# ---------- IDENTITY ----------
identity.id: "engineering.power_system.power_meter"
identity.name: "Power Meter"
identity.class: "Power-System Entity"
identity.locale: "en-GB"
identity.status: "research_model"
# ---------- AUTHORS ----------
authors.primary: "Mark Anthony Higgins"
authors.collaborator: "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/power-meter-ontology.html"
source.title: "Power Meter Ontology"
source.revised: "2026-08-04"
source.derivation: "New Flow Algebra interpretation; not verbatim page code"
# ---------- PURPOSE ----------
purpose.primary: "Represent electrical power measurement, energy accumulation, metering integrity and reasoning about measured power-system behaviour."
purpose.scope: ["active_power", "reactive_power", "apparent_power", "energy", "voltage", "current", "frequency", "power_factor", "meter_quality"]
purpose.exclusions: ["unverified_billing_certification", "automatic_protection_trip", "live_switching_control"]
# ---------- STATE_MODEL ----------
state.S: (I, R, B, K)
state.I: "Input readings, time stamps, wiring topology, calibration metadata and device status"
state.R: "Electrical relationships, validation rules and inference pathways"
state.B: "Measurement limits, electrical safety, unit conventions and confidence boundaries"
state.K: "Known meter configuration, rated characteristics and historical measurements"
state.lifecycle: ["unconfigured", "configured", "measuring", "degraded", "fault", "isolated", "maintenance"]
state.observation: (timestamp, voltage_rms, current_rms, phase_angle, frequency, active_power, reactive_power, apparent_power, energy_import, energy_export, quality)
state.transition: "unconfigured -> configured -> measuring"
state.exception: "measuring -> degraded | fault"
state.recovery: "degraded | fault -> maintenance -> configured"
# ---------- ENTITIES ----------
entity.PowerMeter: "Instrument that measures electrical power and optionally energy over time"
entity.MeasurementChannel: "One measured voltage/current input pair or logical channel"
entity.CurrentTransformer: "Instrument transformer scaling measured current"
entity.VoltageTransformer: "Instrument transformer scaling measured voltage"
entity.ElectricalLoad: "Consumer or sink of electrical power"
entity.ElectricalSource: "Producer or supplier of electrical power"
entity.ElectricalNetwork: "Connected conductors and nodes being measured"
entity.ActivePower: "Average rate of useful electrical energy transfer, W"
entity.ReactivePower: "Oscillating energy exchange component, var"
entity.ApparentPower: "Magnitude of complex power, VA"
entity.EnergyRegister: "Accumulated energy import/export, Wh or kWh"
entity.PowerFactor: "Ratio of active to apparent power, where defined"
entity.MeterAccuracy: "Specified error performance under stated conditions"
entity.QualityFlag: "Validity, missing data, saturation, reverse polarity or uncertainty"
entity.CalibrationRecord: "Traceable evidence of metrological verification"
# ---------- PATHWAYS ----------
pathway.measure:
input: ["sampled_voltage", "sampled_current", "timestamp", "meter_configuration"]
require: "valid_sampling AND configured_scaling AND timestamp_present"
derive: "electrical_quantities -> quality_assessment -> recorded_measurement"
output: ["P", "Q", "S", "power_factor", "quality_flag"]
pathway.single_phase_sinusoidal:
require: "steady_state AND sinusoidal_waveforms AND rms_values_valid"
derive.P: "V_rms * I_rms * cos(phi)"
derive.Q: "V_rms * I_rms * sin(phi)"
derive.S: "V_rms * I_rms"
derive.pf: "P / S IF S > 0"
note: "For distorted waveforms, compute true active power from instantaneous v(t)*i(t) and distinguish displacement factor from total power factor."
pathway.three_phase:
require: "phase_channels_available"
derive.P_total: "sum(P_phase for each measured phase)"
derive.Q_total: "sum(Q_phase for each measured phase)"
derive.S_total: "sqrt(P_total^2 + Q_total^2) ONLY for applicable sinusoidal conditions"
guard: "Do not assume balanced phases without evidence"
pathway.energy_integration:
input: ["P(t)", "time_interval", "measurement_quality"]
derive.E_Wh: "integral(P_W dt_hours)"
derive.E_kWh: "E_Wh / 1000"
branch.import: "P > 0 under declared import-positive sign convention"
branch.export: "P < 0 under declared import-positive sign convention"
guard: "Reject missing intervals or flag estimated integration; do not silently interpolate"
pathway.instrument_scaling:
input: ["ct_ratio", "vt_ratio", "channel_readings"]
derive: "primary_equivalent = secondary_measurement * applicable_ratio"
guard: "Verify polarity, phase mapping, burden and ratio configuration"
pathway.quality_validation:
input: ["reading", "rated_range", "timestamp", "diagnostics"]
test: ["range", "continuity", "phase_consistency", "clock_integrity", "saturation", "calibration_status"]
output: ["valid", "suspect", "invalid", "missing"]
# ---------- MINI_RECURSION_ENGINE ----------
recursion.seed: "Latest validated observation and known meter configuration"
recursion.expand: "Find related channels, network entities, calibration history and prior quality flags"
recursion.evaluate: "Apply physical equations, measurement limits and topology checks"
recursion.filter: "Exclude contradictory or unsupported inferences"
recursion.rank: "Prefer directly observed and independently verified interpretations"
recursion.update: "Append evidence, uncertainty and state transitions"
recursion.stop: "Stable classification OR bounded_iteration_limit OR insufficient_evidence"
recursion.max_depth: 5
# ---------- INFERENCE_RULES ----------
rule.01: "IF S > 0 AND valid(P) THEN power_factor = P / S"
rule.02: "IF S = 0 THEN power_factor = undefined"
rule.03: "IF abs(P) > S + tolerance under applicable measurement model THEN flag = inconsistent_measurement"
rule.04: "IF ct_polarity_reversed THEN flag = potential_sign_error"
rule.05: "IF voltage_missing OR current_missing THEN power_measurement = incomplete"
rule.06: "IF timestamp_nonmonotonic THEN energy_integration = suspect"
rule.07: "IF calibration_expired THEN confidence = reduced; do_not_claim_certified_accuracy"
rule.08: "IF measurement_outside_rated_range THEN flag = invalid_or_overrange"
rule.09: "IF phase_imbalance_detected THEN request_phase_resolved_analysis"
rule.10: "IF energy_register_decreases unexpectedly AND no_rollover_or_reset THEN flag = register_anomaly"
rule.11: "IF telemetry_unavailable THEN preserve_last_valid_with_stale_label"
rule.12: "IF quality_invalid THEN suppress_automated_billing_or_control_decision"
# ---------- CONFIDENCE ----------
confidence.inputs: ["sensor_accuracy", "calibration_validity", "sampling_quality", "configuration_verified", "timestamp_integrity"]
confidence.high: "Calibrated, within range, consistent and independently validated"
confidence.medium: "Plausible readings with limited supporting evidence"
confidence.low: "Missing channels, configuration uncertainty, saturation or contradictory evidence"
confidence.policy: "Never convert a confidence score into a safety or billing certification"
# ---------- SEMANTIC_EQUIVALENCE ----------
semantic.aliases: ["electricity_meter", "power_monitor", "electrical_power_meter", "energy_meter"]
semantic.distinguish: "Power (W) is instantaneous/averaged rate; energy (Wh) accumulates over time"
semantic.distinguish_2: "Power meter is not automatically a revenue-grade energy meter"
semantic.relationships: ["measures -> electrical_network", "observes -> electrical_load", "observes -> electrical_source", "uses -> measurement_channel", "records -> energy_register", "validated_by -> calibration_record"]
# ---------- SAFETY_CONSTRAINTS ----------
safety.01: "Measurement is not proof of safe isolation or absence of voltage"
safety.02: "Instrument transformer secondaries require correct handling; never open-circuit an energised current-transformer secondary"
safety.03: "Observe appropriate ratings, insulation, protective equipment and qualified procedures"
safety.04: "Do not authorise switching or protective trips from unverified meter data"
safety.05: "Revenue billing requires applicable meter certification and regulatory compliance"
# ---------- FLOW_HASH ----------
flow_hash.algorithm: "SHA-256"
flow_hash.scope: "Canonical UTF-8 content; compute after final publication"
flow_hash.value: "PENDING_CANONICAL_HASH"
# ---------- UPDATE_MODEL ----------
update.version: "1.0"
update.date: "2026-11-16"
update.trigger: ["ontology_revision", "meter_standard_revision", "new_measurement_model", "verified_error_correction"]
update.require: ["source_review", "rule_consistency_check", "safety_review", "new_hash"]
update.provenance: "Kireth Research / Sky — Recursive AI"
# ---------- END FLOW ----------
Download Code
Copy to Clipboard