— Back to Blogs & Publications Closing the Dosing Loop on Analyzer Results with OPC UA

Closing the Dosing Loop on Analyzer Results with OPC UA

What an analyzer result has to carry over OPC UA — value, units, range, quality and timestamps — before a PLC may act on it; how dead time and sampling interval shape a PID loop fed by an analyzer; and where safety interlocks belong. Based on the OPC UA, NAMUR and IEC documents and the control literature.

Why close the loop on an analyzer result

In the chemical, pharmaceutical, dairy and feed industries a composition known only from the laboratory is corrected late and by hand. The FDA's PAT guidance instead describes controlling manufacturing through timely measurements during processing, with process control tools that monitor the state of a process and actively manipulate it [1]. Kourti argues that a real-time analyzer earns its value when its output enters process control [2]; Simon et al. review industrial examples [3]. This guide covers what has to be right in the interface and in the controller when a dosing valve is driven from an inline NIR prediction.

What OPC UA brings to the interface

OPC Unified Architecture is published by the OPC Foundation and standardised as the IEC 62541 series, whose Part 1 presents the concepts and a reading order for the other parts [4]. Part 1 names platform independence, an integrated security model and extensible information models among its design goals [5]. For an analyzer the information model is the useful part: Part 8 (Data Access) defines the AnalogItemType family, which carries an EURange (the range expected in normal operation) and EngineeringUnits, and the base DataItemType adds a Definition string describing how the value is calculated and a ValuePrecision property [6]. A predicted fat or moisture value exposed this way carries its unit, range and meaning with it.

Every value travels as a DataValue: the value, a StatusCode, a sourceTimestamp applied by the data source and never changed afterwards, and a serverTimestamp set by each relaying server [7]. The source timestamp is the one that matters for control — it is the time of the spectrum behind the prediction — whereas the server timestamp only says when the server last confirmed the value [7].

Data quality and device health

A PLC must not treat an OPC UA value as a plain number. The StatusCode is a 32-bit field whose severity bits classify the value as Good, Uncertain or Bad; Part 4 requires every client to check it before using a result and states that results with a bad status shall never be used [7]. Part 8 adds analyzer-relevant sub-codes such as Bad_SensorFailure, Uncertain_LastUsableValue when the source has stopped updating, Uncertain_EngineeringUnitsExceeded when the value lies outside its defined range and Good_LocalOverride when a manual value has been forced, and notes that staleness is to be judged from the timestamps, not from the code [6].

Instrument condition is modelled separately. Part 100 (Devices) defines a DeviceHealth interface whose enumeration — NORMAL, FAILURE, CHECK_FUNCTION, OFF_SPEC and MAINTENANCE_REQUIRED — is stated to indicate the status as defined by NAMUR Recommendation NE 107 [8], the process industry's common vocabulary for self-monitoring field devices, revised in 2017 with a prioritisation of status signals [9]. A reference scan (CHECK_FUNCTION) or a spectrum outside the calibration population (OFF_SPEC) thus becomes a vendor-independent reason to hold the loop [8][9]. Access is governed by the Part 2 security model — authentication, authorization limited to what the function requires, confidentiality, integrity and auditability — so write access to a setpoint or scan trigger is restricted accordingly [10].

The PID loop with analyzer feedback

An analyzer-fed loop is a dead-time problem. Normey-Rico et al. count the processing time of sensors among the causes of dead time and explain that, because the controller corrects an error that originated earlier, a simple loop either oscillates when tuned for a short settling time or responds sluggishly when tuned to avoid oscillation [11]. For a dosing valve the dead time is the transport from injection point to measurement point plus the analyzer's measurement and prediction interval. Where it is large relative to the process time constant, the usual remedy is a dead-time compensator: the Smith predictor, proposed in 1957, uses a delay-free model so that the primary controller sees an equivalent system with no, or a smaller, dead time — a property that holds in the nominal case and degrades with plant-model mismatch [11]. The primary controller is in general a PI or PID block in a PLC programmed under IEC 61131-3 [11][12].

The sampling interval follows from the same logic. In OPC UA the subscription's sampling interval is the fastest rate at which the server samples its source, and Part 4 notes that a decoupled underlying system may update much more slowly than that rate [7]. Subscribing faster than the analyzer measures yields repeated values, not new information; the loop should execute on the arrival of a new source timestamp rather than on the subscription clock [7].

Safety, interlocks and ownership

Analyzer-driven dosing is basic process control. Protective functions — overdosing limits, pump dry-run, reagent high level — belong to a safety instrumented system under IEC 61511-1, designed so that it can be relied on to achieve or maintain a safe state independently of the control layer [13]. Three practice points follow:

  • Define the hold strategy before tuning. On Bad quality, a stale source timestamp, FAILURE or OFF_SPEC device health, or an outlier flag from the chemometric model, the PID output is held or returned to a safe default, with bumpless resumption [6][7][8].
  • Keep the valve's hard limits outside the loop. Actuator rate and position limits and any trip on dosed quantity live in the PLC logic or the safety system, not in the analyzer software [12][13].
  • Document the node semantics. EngineeringUnits, EURange, Definition and each status sub-code are agreed between supplier and integrator and frozen in the information model, so that a later calibration change is visible as a semantics change [6].

How USTECH approaches this

USTECH's inline analyzers, the ProLine2550 process FT-NIR for liquids, slurries and simple solid flows and the ProLine17EC for direct pipe and vessel mounting, run calibrations built in caliX; ProChem delivers predictions and status to the plant PLC and lets the PLC select product and method. Hold conditions, dead-time compensation and interlocks are settled with the plant's automation and safety engineers. The starting point is a feasibility study with your own samples under your own process conditions.

References

USTECH Innovations Logo

Discuss this application for your process

Our application team can walk through the method, share the supporting literature and discuss how it applies to your process.

Contact Us

Read Next

Real-Time Hydroxyl Value Monitoring in Polyol Production
ARTICLE

Real-Time Hydroxyl Value Monitoring in Polyol Production

Why the hydroxyl number is the end-point variable in polyol production, what the titration reference methods and the NIR standards require, and why temperature is the main obstacle for an in-reactor calibration.

Read Article
Standardizing Moisture in Milk Powder Spray Drying
ARTICLE

Standardizing Moisture in Milk Powder Spray Drying

Why the outlet moisture of a milk-powder spray dryer decides stickiness, caking, shelf life and yield, which variables the operator can move, and how an inline NIR moisture value feeds the control loop.

Read Article