flow "AutomationState" v1.0
# Kireth Research Semantic Library — original Flow Algebra representation
# Language: en-GB; encoding: UTF-8
IDENTITY:
id: "engineering.automation.automation_state"
name: "Automation State"
type: "EngineeringStateEntity"
domain: "Industrial Automation / Control Engineering"
version: "1.0"
AUTHORS:
primary: "Mark Higgins — Kireth Research"
collaborator: "Sky — Recursive AI"
licence: "Kireth Research Open Research Licence; attribution and citation required"
SOURCE:
canonical: "https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/automation-entities/automation-state-ontology.html"
citation_backlink: "https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/automation-entities/automation-state-ontology.html"
provenance: "Newly constructed engineering ontology; source-page text not verified"
PURPOSE:
definition: "Represent the current discrete operating condition of an automated system, its permitted transitions, evidence, command authority and safety invariants."
objectives:
- "Provide unambiguous state identification and auditable transition history"
- "Prevent invalid transitions and unsafe output activation"
- "Reconcile commanded, observed and inferred states"
- "Support fault containment, recovery and supervisory monitoring"
exclusions:
- "A state label alone is not evidence that physical equipment is safe"
- "Software interlocks do not replace independently engineered safety functions"
STATE_MODEL:
S_t: "(mode, phase, equipment_status, permissives, interlocks, faults, observations, commands, authority, timestamp, quality)"
modes: ["OFF", "INITIALISING", "READY", "AUTOMATIC", "MANUAL", "PAUSED", "STOPPING", "FAULT", "EMERGENCY_STOP", "MAINTENANCE"]
phase: "Application-specific sequence step or null"
equipment_status: "Measured or validated actuator/sensor states"
permissives: "Boolean conditions required before a transition or operation"
interlocks: "Constraints which inhibit or remove hazardous commands"
faults: "Active, latched, acknowledged and cleared fault records"
observations: "Timestamped input and feedback signals with quality indicators"
commands: "Requested operations with origin, sequence number and validity"
authority: "Local/remote, manual/automatic and role-based command ownership"
timestamp: "Monotonic event ordering with synchronised wall-clock metadata"
quality: "VALID | STALE | UNKNOWN | CONFLICTING | INVALID"
transition: "S_(t+1) = T(S_t, input_t, guard_t, event_t)"
invariant: "For every reachable state, safety_constraints(S_t) == true"
ENTITIES:
AutomationState:
fields: ["state_id", "mode", "phase", "entry_time", "source", "quality"]
StateMachine:
fields: ["machine_id", "state_set", "transition_set", "initial_state"]
Transition:
fields: ["from_state", "to_state", "trigger", "guard", "action", "priority"]
GuardCondition:
fields: ["predicate", "evidence", "validity_window", "failure_policy"]
Permissive:
fields: ["condition", "status", "provenance", "expiry"]
Interlock:
fields: ["hazard", "trip_condition", "inhibited_outputs", "reset_policy"]
Controller:
fields: ["controller_id", "scan_time", "watchdog", "health"]
Sensor:
fields: ["tag", "value", "unit", "timestamp", "quality"]
Actuator:
fields: ["tag", "command", "feedback", "safe_state", "health"]
OperatorCommand:
fields: ["command_id", "action", "issuer", "authority", "timestamp"]
Alarm:
fields: ["alarm_id", "severity", "active", "acknowledged", "latched"]
TransitionRecord:
fields: ["previous", "next", "reason", "evidence", "time", "actor"]
PATHWAYS:
- id: "P01_OBSERVE"
input: "Sensor and controller telemetry"
steps: ["Validate timestamps", "Check quality", "Normalise units", "Associate equipment tags"]
output: "Validated observations"
- id: "P02_CLASSIFY"
input: "Current state and validated observations"
steps: ["Resolve operating mode", "Determine sequence phase", "Check contradictory indications"]
output: "Observed or inferred state with confidence"
- id: "P03_REQUEST"
input: "Operator, PLC or supervisory transition request"
steps: ["Authenticate authority", "Check freshness", "Verify command sequence", "Record request"]
output: "Accepted or rejected transition proposal"
- id: "P04_GUARD"
input: "Transition proposal and current state"
steps: ["Check allowed edge", "Evaluate permissives", "Evaluate interlocks", "Check equipment readiness"]
output: "Authorised transition or inhibited action"
- id: "P05_EXECUTE"
input: "Authorised transition"
steps: ["Apply bounded commands", "Observe actuator feedback", "Enforce timeout", "Confirm completion"]
output: "New confirmed state or fault state"
- id: "P06_TRIP"
input: "Safety trip, watchdog fault or hazardous condition"
steps: ["Prioritise safety action", "Drive defined safe outputs", "Latch required faults", "Record evidence"]
output: "Protected state and diagnostic record"
- id: "P07_RECOVER"
input: "Fault resolution and reset request"
steps: ["Confirm cause removed", "Check safe physical condition", "Require authorised reset", "Re-enter READY via defined sequence"]
output: "Controlled recovery; never automatic restart by default"
- id: "P08_AUDIT"
input: "State and transition history"
steps: ["Preserve event order", "Detect gaps", "Reconcile command/feedback", "Publish trace"]
output: "Traceable automation state history"
MINI_RECURSION_ENGINE:
input: "S_t, events_t, sensor_data_t, command_t"
cycle:
- "Observe inputs and mark stale or invalid data"
- "Infer candidate state and enumerate admissible transitions"
- "Filter transitions by authority, guards, safety and timing"
- "Prioritise emergency-stop and fault transitions"
- "Execute one deterministic state transition per defined arbitration policy"
- "Validate feedback and update S_(t+1)"
- "Compare expected versus observed outcomes and retain discrepancies"
- "Log evidence and repeat on next bounded control cycle"
termination: "Controller shutdown, explicit stop, or transfer to independent safe control"
guarantees:
- "No command is authorised solely by a high confidence score"
- "Invalid data cannot silently satisfy a safety permissive"
- "Unconfirmed actuator motion cannot be treated as completed"
INFERENCE_RULES:
R01: "IF mode == OFF AND start_requested AND all_start_guards THEN mode := INITIALISING"
R02: "IF mode == INITIALISING AND self_tests_pass AND equipment_ready THEN mode := READY"
R03: "IF mode == READY AND automatic_requested AND authorised AND all_permissives THEN mode := AUTOMATIC"
R04: "IF mode == AUTOMATIC AND pause_requested THEN mode := PAUSED; outputs := defined_hold_policy"
R05: "IF mode == PAUSED AND resume_requested AND guards_revalidated THEN mode := AUTOMATIC"
R06: "IF stop_requested THEN mode := STOPPING; follow_orderly_stop_sequence"
R07: "IF safety_trip THEN mode := EMERGENCY_STOP; invoke_independent_safety_function"
R08: "IF critical_fault OR feedback_timeout THEN mode := FAULT; inhibit_hazardous_outputs"
R09: "IF signal_quality IN [STALE, INVALID, CONFLICTING] THEN reject_state_dependent_start"
R10: "IF requested_transition NOT_IN allowed_edges THEN reject_and_log"
R11: "IF command_authority_conflict THEN reject_remote_override_and_raise_alarm"
R12: "IF physical_feedback != expected_feedback AFTER validated_timeout THEN latch_discrepancy_fault"
R13: "IF fault_latched AND reset_requested THEN require_cause_clear_and_authorised_reset"
R14: "IF power_restored THEN require_defined_restart_policy; never assume previous outputs safe"
R15: "IF state_estimate_uncertain THEN mark UNKNOWN; use conservative operation policy"
R16: "IF maintenance_mode THEN inhibit automatic starts and apply isolation procedures"
CONTROL_CONSTRAINTS:
transition_priority: ["Independent safety function", "Emergency stop", "Protective fault", "Orderly stop", "Operational command"]
guard_evaluation: "Use current validated data; expired evidence fails closed where safety-relevant"
transition_atomicity: "Log state transition and associated command identity consistently"
timeout: "Bound every motion-confirmation and communication wait"
command_arbitration: "Deterministic ownership; prevent simultaneous incompatible commands"
reset: "Acknowledgement is distinct from fault clearance and permission to restart"
emergency_stop: "Design, validate and implement to applicable machinery safety requirements"
maintenance: "Use physical isolation/lockout procedures where required; software state is insufficient"
validation: "Verify hazard analysis, failure modes and safety integrity in the actual installation"
CONFIDENCE:
state_estimate:
HIGH: "Independent, fresh and consistent position/condition feedback"
MEDIUM: "Single validated feedback source consistent with commanded state"
LOW: "Command-only inference or incomplete observations"
UNKNOWN: "Conflicting, absent, stale or invalid evidence"
principle: "Confidence expresses evidence quality, not permission to bypass safety guards"
propagation: "Derived state confidence cannot exceed the weakest safety-critical observation"
SEMANTIC_EQUIVALENCE:
exact: ["Automation operating state", "Automated system state"]
related: ["PLC state", "Control mode", "Sequence step", "Equipment status", "Machine state"]
distinctions:
- "Control mode identifies authority or strategy; sequence phase identifies progress"
- "Requested state is not equivalent to confirmed physical state"
- "Alarm acknowledgement is not equivalent to safe fault reset"
- "Emergency stop state is not equivalent to electrical isolation"
FLOW_HASH:
method: "SHA-256 over canonical UTF-8 flow text excluding the FLOW_HASH digest field"
digest: "TO_BE_COMPUTED_BY_PUBLISHING_PIPELINE"
note: "No unverified hash value is asserted"
UPDATE_MODEL:
version: "1.0"
created: "2026-11-18"
review_triggers: ["Ontology revision", "Safety requirements change", "New transition mode", "New equipment feedback", "Incident or validation finding"]
update_steps: ["Review source", "Revise model", "Revalidate transitions", "Run fault-injection tests", "Recompute hash", "Publish revision with citation"]
compatibility: "Preserve stable entity identifiers; document changed transition semantics"
END_FLOW
Download Code
Copy to Clipboard