PID Controller
The PID controller performs PID control based on measured values and set values in transient calculations, and outputs control quantities to the target device through an actuator. Steady state calculations and transient physics initial fields do not execute the controller.
Component Appearance and Location
Expand Controller in the component library on the left and find "PID Controller".
Ports and Connections
| Port Key | Type | Direction | Interface Name | Display Conditions |
|---|---|---|---|---|
pv | CONTROL | input | PV measured value | always show |
sp | CONTROL | input | SP external setpoint | When "Control target setting method" is "External SP setting" |
cv | CONTROL | output | CV absolute control volume | always show |
The PV terminal receives the process measurement value, the SP terminal can receive the external set value, and the CV terminal outputs the absolute control value. When measuring physical quantities and operating target devices, they should be connected through a measurement instrument and an actuator respectively.
Parameter List
Control Mode
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| Setpoint Mode | SetPointSource | choice | Fixed Setpoint / External SP | PID executes only in transients; steady-state retains wiring/configuration. Fixed SP uses panel; external SP reads its port. PV is measured input, CV output to actuation. |
| Control Setpoint | SetPoint | real | 0 | Editable fixed transient SP. Must share PV quantity and scale, with units from measurement adapter. |
| Control Action Direction | ControlAction | choice | Automatic / Direct / Reverse | Direct increases CV when PV<SP; reverse decreases it. Automatic detects response to limited CV probes at transient startup. |
| Proportional Gain Kc | Kc | real | 1 | Nonnegative transient proportional gain; larger is stronger and can oscillate. Direction comes from Control Action. |
| Integral Time Ti [s] | Ti | real | 10 | Transient integral time removes persistent error. Smaller is stronger and can oscillate/saturate. Zero disables integration. |
| Derivative Time Td [s] | Td | real | 0 | Transient derivative on PV changes, stronger for larger time, potentially amplifying noise. Zero disables derivative. |
Sampling Settings
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| Sampling Mode | SamplingMode | choice | Follow Accepted Physical Steps (Compatible) / Fixed Sampling Period | Compatible mode updates at each accepted physical-step end using actual duration. Fixed mode follows an independent absolute calendar. Legacy and non-explicit new settings retain compatible mode. |
| Sampling Period [s] | SamplePeriod | real | 1 | Positive fixed sample interval, exactly representable as integer microseconds. |
| Sampling Phase [s] | SamplePhase | real | 0 | Initial phase with 0≤phase<period. Zero gives the first normal update after one full period. |
Operating Constraints
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| CV Lower Limit | CVLowerLimit | real | 0 | Minimum absolute transient CV, in actuator units/scale; valve percentage often uses 0. |
| CV Upper Limit | CVUpperLimit | real | 100 | Maximum absolute transient CV, strictly above lower limit, in actuator units; valve percentage often uses 100. |
Parameter Guidance
| Parameter | Guidance |
|---|---|
| Setpoint mode and value | Fixed mode uses the panel value; External SP reads the SP port. SP and PV must share quantity, units, and reference. |
| Control action | Direct action increases CV when PV is below SP; reverse action decreases it. Automatic mode probes actuation at transient startup and determines direction from PV response. |
| Gain Kc, integral time Ti, derivative time Td | All are nonnegative. Kc sets proportional response; Ti and Td use seconds. Zero disables integral accumulation or derivative action respectively. |
| Sampling mode, period, phase | Accepted-physical-step mode uses actual step duration. Fixed-period mode follows an independent schedule. Period and phase in seconds must be exactly representable as integer microseconds. Period is positive and . |
| CV lower and upper limits | Lower must be below upper. Match actuator units and range, such as 0–100 for percentage opening. |
Modeling Steps
- Connect a measurement instrument to PV. Select SP source and connect external SP if used.
- Choose direction from the PV response to increasing CV. Automatic detection needs actuation headroom and a distinguishable startup response.
- Set sampling, Kc, Ti, Td, and CV limits.
- Connect CV to the actuator and enable the corresponding device signal control source.
- Run transient simulation and inspect controller and adapter results. Measurements and actuation
View Results
- Control values. Compare SP, PV, and Next Absolute CV to assess approach to setpoint.
- PID terms. Compare P, I, D, and unlimited CVRaw to identify dominant action and saturation.
- Timing and response. Executed CV for This Step applies to the interval just ended; Next Requested CV applies to the following interval. Inspect device or adapter actual values for opening or speed. Adapter Results
Professional Theory
Action Direction and Discrete PID
Let index samples, be seconds since the previous valid sample, and for direct or for reverse action. Directed error and proportional term are
For , candidate integral increment is . Conditional integration provides anti-windup: if it pushes unlimited output farther beyond either limit, retain the previous integral state. With , accumulation stops but the baseline corresponding to initial CV remains included.
Derivative action uses PV changes with first-order filtering. For ,
For , derivative action is zero. An SP-only change affects error and proportional action; derivative action follows PV. Absolute CV is limited by
Initial CV and Sampling
After the initial physical field is established, CV and PID memory initialize. A physical loop first uses the actuator applied value, then its actual value. If neither is available, use the midpoint of CV limits, also used in pure signal loops. The initial instant establishes the baseline; normal sampling starts afterward.
Following physical steps, SP and PV are read at each accepted step end to calculate the next request. With fixed sampling, zero phase gives the first normal sample one period after start; positive phase gives start plus phase. Subsequent updates follow the period, holding CV between samples. Control and result saving schedules are independent. Transient Control Timing
Applicability and Limits
- Transient feedback. Pure signal loops need an observable output destination such as an oscilloscope. Physical loops also require the device to use the adapter signal.
- Direction. Direct action suits PV rising with CV; reverse suits PV falling with CV. Automatic direction is detected at initialization; reassess if process gain reverses.
- Reachability. CV limits and device capacity constrain SP; network delay and actuator speed affect response.
Common Inspections
- Growing error or failed detection. Check PV, SP, actuation chain, and response direction.
- CV stays limited. Compare CVRaw, limited CV, and actual actuation; check capacity, reachable SP, and PID parameters.
- Unexpected sampling. Check mode, period, phase, sample index, and result times.
- Device lags CV. Compare requested, applied, and actual values; check control source, stroke time, speed adjustment, and protections.