@prefix ctl: <https://hamborg.github.io/ctl-ontology#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix s223: <http://data.ashrae.org/standard223#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

dcterms:creator a owl:AnnotationProperty .

dcterms:description a owl:AnnotationProperty .

dcterms:issued a owl:AnnotationProperty .

dcterms:license a owl:AnnotationProperty .

dcterms:modified a owl:AnnotationProperty .

dcterms:title a owl:AnnotationProperty .

vann:preferredNamespacePrefix a owl:AnnotationProperty .

vann:preferredNamespaceUri a owl:AnnotationProperty .

owl:versionInfo a owl:AnnotationProperty .

skos:example a owl:AnnotationProperty .

ctl:activationCondition a owl:DatatypeProperty ;
    rdfs:label "activation condition"@en ;
    rdfs:comment "The condition under which the documentation says a function is active, as text, for example 'at outdoor temperature below 6 °C'."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:actuates a owl:ObjectProperty ;
    rdfs:label "actuates"@en ;
    rdfs:comment "Relates a function's output property to the device role it acts on. Used for binding by role, when one function drives every device that fills the role (for example one outdoor-temperature curve setting the minimum position of all facade radiator valves)."@en ;
    rdfs:domain s223:Property ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:DeviceRole .

ctl:appliesTo a owl:ObjectProperty ;
    rdfs:label "applies to"@en ;
    rdfs:comment "Relates a compensation function to the applicability scope it applies to."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:ApplicabilityScope .

ctl:fillsRole a owl:ObjectProperty ;
    rdfs:label "fills role"@en ;
    rdfs:comment "Relates a device or space to a device role it belongs to. A device that fills a role is governed by the functions whose output actuates that role or a role it specialises."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:DeviceRole .

ctl:fillsSlot a owl:ObjectProperty ;
    rdfs:label "fills slot"@en ;
    rdfs:comment "Relates an installed point or sensor (for example a Brick point) to a property that a function description uses as an input without naming the installed point (for example 'the outdoor temperature'). This binds the documented input to the measured time series."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range s223:Property .

ctl:hasBreakpoint a owl:ObjectProperty ;
    rdfs:label "has breakpoint"@en ;
    rdfs:comment "Relates a curve to one of its breakpoints. A curve has at least two."@en ;
    rdfs:domain ctl:Curve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:Breakpoint .

ctl:hasPlacement a owl:DatatypeProperty ;
    rdfs:label "has placement"@en ;
    rdfs:comment "Where a terminal unit sits relative to the building, as stated in the documents, for example 'beneath facade window'. Used to decide whether a device meets a role's selection criterion."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:instanceOf a owl:FunctionalProperty,
        owl:ObjectProperty ;
    rdfs:label "instance of"@en ;
    rdfs:comment "Relates a per-device or per-room copy of a compensation function to the template function it copies. Used for binding by instance, when every device or room has its own input and output (for example one CO2 compensation per room, with the room's own CO2 sensor as input). The copy has its own s223:hasInput and s223:hasOutput and normally the same curve as the template."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:CompensationCurve .

ctl:intent a owl:ObjectProperty ;
    rdfs:label "intent"@en ;
    rdfs:comment "Relates a compensation function to the purpose stated for it."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:Intent .

ctl:interpolation a owl:FunctionalProperty,
        owl:ObjectProperty ;
    rdfs:label "interpolation"@en ;
    rdfs:comment "Relates a curve to how its output is computed between breakpoints."@en ;
    rdfs:domain ctl:Curve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:InterpolationMethod .

ctl:priorityStatement a owl:DatatypeProperty ;
    rdfs:label "priority statement"@en ;
    rdfs:comment "What the documentation says about a function's priority over other functions acting on the same actuator, as text."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:remainsActiveInMode a owl:ObjectProperty ;
    rdfs:label "remains active in mode"@en ;
    rdfs:comment "Relates a compensation function to an operating mode in which, according to the documentation, it stays active (for example downdraught compensation that stays active while the plant is stopped)."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:OperatingMode .

ctl:role a owl:FunctionalProperty,
        owl:ObjectProperty ;
    rdfs:label "role"@en ;
    rdfs:comment "Relates a compensation function to how its output acts on the actuator: as the demand itself or as a limit."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:OutputRole .

ctl:scopeDescription a owl:DatatypeProperty ;
    rdfs:label "scope description"@en ;
    rdfs:comment "The text that describes an applicability scope, for example the control panel and areas a function description covers."@en ;
    rdfs:domain ctl:ApplicabilityScope ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:selectionCriterion a owl:DatatypeProperty ;
    rdfs:label "selection criterion"@en ;
    rdfs:comment "The text by which a function description selects the devices of a role, for example 'telestats at the facades'. It records why devices fill the role."@en ;
    rdfs:domain ctl:DeviceRole ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:sourceLabel a owl:DatatypeProperty ;
    rdfs:label "source label"@en ;
    rdfs:comment "The name a curve or function has in the source document, for example 'Kuldedrop' or 'Luftkvalitet'. Kept verbatim so the graph can be traced back to the document."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:specialises a owl:ObjectProperty,
        owl:TransitiveProperty ;
    rdfs:label "specialises"@en ;
    rdfs:comment "Relates a device role to a broader role it narrows, for example 'radiator valves at the facades' to 'radiator valves'. Whatever fills the narrower role also belongs to the broader one."@en ;
    rdfs:domain ctl:DeviceRole ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:DeviceRole .

ctl:textDescription a owl:DatatypeProperty ;
    rdfs:label "text description"@en ;
    rdfs:comment "The passage of the source document that describes a function, verbatim."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:usesCurve a owl:ObjectProperty ;
    rdfs:label "uses curve"@en ;
    rdfs:comment "Relates a compensation function to the curve it applies. Several functions, for example one per room, can use the same curve."@en ;
    rdfs:domain ctl:CompensationCurve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:Curve .

ctl:withinScope a owl:ObjectProperty ;
    rdfs:label "within scope"@en ;
    rdfs:comment "Relates a device role to the applicability scope it is defined in."@en ;
    rdfs:domain ctl:DeviceRole ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range ctl:ApplicabilityScope .

ctl:x a owl:DatatypeProperty,
        owl:FunctionalProperty ;
    rdfs:label "x"@en ;
    rdfs:comment "The input value of a breakpoint, in the curve's x unit."@en ;
    rdfs:domain ctl:Breakpoint ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:decimal .

ctl:xQuantityLabel a owl:DatatypeProperty ;
    rdfs:label "x quantity label"@en ;
    rdfs:comment "The name of a curve's input quantity as written in the source document, for example 'Udetemperatur (°C)'."@en ;
    rdfs:domain ctl:Curve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:xUnit a owl:FunctionalProperty,
        owl:ObjectProperty ;
    rdfs:label "x unit"@en ;
    rdfs:comment "The unit of a curve's input quantity, as a QUDT unit (for example unit:DEG_C or unit:PPM)."@en ;
    rdfs:domain ctl:Curve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range qudt:Unit .

ctl:y a owl:DatatypeProperty,
        owl:FunctionalProperty ;
    rdfs:label "y"@en ;
    rdfs:comment "The output value of a breakpoint, in the curve's y unit."@en ;
    rdfs:domain ctl:Breakpoint ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:decimal .

ctl:yQuantityLabel a owl:DatatypeProperty ;
    rdfs:label "y quantity label"@en ;
    rdfs:comment "The name of a curve's output quantity as written in the source document, for example 'Ventilstilling (%)'."@en ;
    rdfs:domain ctl:Curve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range xsd:string .

ctl:yUnit a owl:FunctionalProperty,
        owl:ObjectProperty ;
    rdfs:label "y unit"@en ;
    rdfs:comment "The unit of a curve's output quantity, as a QUDT unit (for example unit:PERCENT)."@en ;
    rdfs:domain ctl:Curve ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:range qudt:Unit .

s223:Function a owl:Class ;
    rdfs:label "Function (ASHRAE 223P)"@en ;
    rdfs:isDefinedBy <http://data.ashrae.org/standard223> .

ctl:Intent a owl:Class ;
    rdfs:label "Intent"@en ;
    rdfs:comment "The purpose stated for a control function, for example 'reduce the CO2 level in the room' or 'compensate for cold downdraught from windows'."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:Linear a owl:NamedIndividual,
        ctl:InterpolationMethod ;
    rdfs:label "linear"@en ;
    rdfs:comment "Straight lines between consecutive breakpoints."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:MaximumPosition a owl:NamedIndividual,
        ctl:OutputRole ;
    rdfs:label "maximum position"@en ;
    rdfs:comment "The output is an upper limit on the actuator position."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:MinimumPosition a owl:NamedIndividual,
        ctl:OutputRole ;
    rdfs:label "minimum position"@en ;
    rdfs:comment "The output is a lower limit on the actuator position: the actuator follows its own controller but never closes below this value (for example a radiator valve's minimum opening for downdraught compensation)."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:OperatingMode a owl:Class ;
    rdfs:label "Operating mode"@en ;
    rdfs:comment "An operating mode of a plant or controller named in a function description, for example 'Stop', 'Comfort' or 'Night'."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:PositionDemand a owl:NamedIndividual,
        ctl:OutputRole ;
    rdfs:label "position demand"@en ;
    rdfs:comment "The output is the position demand sent to the actuator (for example the VAV damper position from CO2 compensation)."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:Step a owl:NamedIndividual,
        ctl:InterpolationMethod ;
    rdfs:label "step"@en ;
    rdfs:comment "The output keeps the y value of the last breakpoint passed until the next breakpoint is reached."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

s223:Property a owl:Class ;
    rdfs:label "Property (ASHRAE 223P)"@en ;
    rdfs:isDefinedBy <http://data.ashrae.org/standard223> .

qudt:Unit a owl:Class ;
    rdfs:label "Unit (QUDT)"@en ;
    rdfs:isDefinedBy qudt: .

ctl:ApplicabilityScope a owl:Class ;
    rdfs:label "Applicability scope"@en ;
    rdfs:comment "The part of a building or plant that a function description applies to, for example a control panel and the rooms it serves."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:Breakpoint a owl:Class ;
    rdfs:label "Breakpoint"@en ;
    rdfs:comment "One point (x, y) of a curve. Between breakpoints the curve follows its interpolation method; outside the first and last breakpoint the output is held at the nearest breakpoint's y value."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:InterpolationMethod a owl:Class ;
    rdfs:label "Interpolation method"@en ;
    rdfs:comment "How a curve's output is computed between two breakpoints."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    owl:oneOf ( ctl:Linear ctl:Step ) .

ctl:OutputRole a owl:Class ;
    rdfs:label "Output role"@en ;
    rdfs:comment "How a function's output acts on the actuator: as the demand itself, or as a limit on a demand computed elsewhere."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    owl:oneOf ( ctl:PositionDemand ctl:MinimumPosition ctl:MaximumPosition ) .

ctl:DeviceRole a owl:Class ;
    rdfs:label "Device role"@en ;
    rdfs:comment "A role that a function description assigns to a group of devices or spaces without listing them, for example 'radiator valves at the facades' or 'rooms with a CO2 sensor'. Devices and spaces that belong to the group fill the role (ctl:fillsRole). Roles can specialise broader roles (ctl:specialises)."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> .

ctl:Curve a owl:Class ;
    rdfs:label "Curve"@en ;
    rdfs:comment "A characteristic curve stated in design documentation: a piecewise function from an input quantity (x) to an output quantity (y), given by its breakpoints and an interpolation method. A curve is a description only; the control function that applies it is a ctl:CompensationCurve."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    skos:example "The 'Kuldedrop' curve: valve position 10 % at 0 °C outdoor temperature, falling linearly to 0 % at 6 °C."@en .

ctl:CompensationCurve a owl:Class ;
    rdfs:label "Compensation curve function"@en ;
    rdfs:comment "A control function that computes its output from its input through a curve (ctl:usesCurve). The name follows the Scandinavian term for such functions ('kompenseringskurve'). Its input and output are given with s223:hasInput and s223:hasOutput. A function described once for many devices is a template; the copies made per device or room point to it with ctl:instanceOf."@en ;
    rdfs:isDefinedBy <https://hamborg.github.io/ctl-ontology> ;
    rdfs:subClassOf s223:Function .

<https://hamborg.github.io/ctl-ontology> a owl:Ontology ;
    dcterms:creator "Lasse Hamborg" ;
    dcterms:description """CTL is a lightweight ontology for the control logic that design documentation states about building services: the characteristic curves of a function description (for example "the damper opens from 0 % at 800 ppm CO2 to 100 % at 1200 ppm") and which devices each curve governs. It complements ASHRAE 223P, which models a control function's inputs and outputs (s223:Function, s223:hasInput, s223:hasOutput) but not the curve that maps one to the other, and Brick, which models the points. CTL captures design intent at the level a function description gives it, far less detailed than executable control sequences such as CDL or ASHRAE 231P, so that operation can be checked against it.

A function is bound to devices in one of two ways. By instance: one copy of the function per device or room, each pointing to the template it copies (ctl:instanceOf), used when every room has its own input (a CO2 sensor per room). By role: one function whose output acts on a device role (ctl:actuates), which devices fill (ctl:fillsRole), used when one shared input drives many devices (outdoor temperature driving all facade radiator valves). An installed sensor fills the input slot of a function with ctl:fillsSlot."""@en ;
    dcterms:issued "2026-11-30"^^xsd:date ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:modified "2026-11-30"^^xsd:date ;
    dcterms:title "CTL: Control Logic Ontology"@en ;
    vann:preferredNamespacePrefix "ctl" ;
    vann:preferredNamespaceUri "https://hamborg.github.io/ctl-ontology#" ;
    rdfs:comment "Earlier drafts of this vocabulary, used in the graphs of the study it was developed for, used the namespace urn:kgov:control#. Replace that namespace with https://hamborg.github.io/ctl-ontology# to update such data (scripts/migrate_from_urn.py)."@en ;
    rdfs:seeAlso <http://data.ashrae.org/standard223>,
        <https://brickschema.org/schema/Brick> ;
    owl:versionIRI <https://hamborg.github.io/ctl-ontology/0.1.0> ;
    owl:versionInfo "0.1.0" .

