Industrial Automation & PLC

Chapter 7
Analog Processing and Process Control

Bachelors Program in Electrical Engineering
Industrial Automation & PLC   •   Bachelor

Analog Processing and Process Control

Introduction and context

Industrial processes are often measured and manipulated as continuous quantities: temperature, pressure, level, flow, speed, concentration, and composition. Although a PLC executes digital instructions, analog input and output modules allow it to interact with these physical variables. Effective automation therefore requires more than reading a number from an input register. The engineer must understand signal scaling, electrical noise, filtering, process dynamics, controller algorithms, actuator limits, and safe operating practice.

A typical control loop compares a measured process variable (PV) with a desired set point (SP). The difference is the error, and a controller uses that error to calculate a manipulated variable (MV), such as valve position, heater power, or pump speed. The objective is not merely to eliminate error, but to do so rapidly, smoothly, robustly, and safely.

Learning objectives

By the end of this chapter, a student should be able to:

  1. Scale voltage and current signals into engineering units and detect common wiring faults.
  2. Select and apply analog filtering without unnecessarily degrading control performance.
  3. Explain first-order process dynamics, dead time, stability, and performance measures.
  4. Implement on–off, proportional, PI, and PID control in a PLC.
  5. Tune control loops using practical methods and explain derivative filtering and anti-windup.
  6. Distinguish feedback, cascade, ratio, and feedforward control and select an appropriate structure.
  7. Commission and troubleshoot an analog control system safely.

1. Analog signals and signal conditioning

1.1 Industrial signal standards

Common analog standards include 0–10 V, ±10 V, 0–5 V, 0–20 mA, and 4–20 mA. Current transmission is widely used because the signal is less sensitive to voltage drop and electromagnetic interference over long cables. The 4 mA lower bound, called live zero, allows a receiver to distinguish a valid zero measurement from a broken wire. A reading near 0 mA can indicate an open circuit or loss of transmitter power.

A transmitter may be powered from a separate supply or from the same two wires that carry the current signal. The input module, transmitter, power supply, cable shielding, and grounding arrangement must be compatible. Shielding should normally be grounded at one designated point according to the installation standard; grounding both ends can create unwanted ground-loop currents.

1.2 Linear scaling

Suppose an input signal x ranges from x_min to x_max and represents an engineering variable y ranging from y_min to y_max. Linear scaling is:

y = ymin + (x - xmin) × (ymax - ymin)/(xmax - xmin)

Here x and y must be expressed in consistent units, although their units need not be the same. The formula assumes a linear transmitter characteristic and a valid input within, or acceptably close to, the calibrated range. A normalized form is:

r = (x - xmin)/(xmax - xmin)

where r is the fraction of span. Then y = y_min + r(y_max − y_min). In practice, the PLC should usually clamp or alarm values outside the permitted range rather than silently extrapolate them.

For a 4–20 mA pressure transmitter calibrated for 0–16 bar, the pressure is:

p = 0 + (I - 4) × 16/(20 - 4)

At I = 12 mA, p = 12 − 4 = 8 bar. At I = 3.6 mA, the calculated extrapolated value is −0.4 bar, but the more important conclusion is that the signal is below the normal live-zero range and should generate a fault diagnostic.

The inverse conversion, needed when generating an analog output, is:

x = xmin + (y - ymin) × (xmax - xmin)/(ymax - ymin)

For example, if 0–10 V commands 0–100% valve position, a 65% command corresponds to 6.5 V, assuming the output module is correctly calibrated.

1.3 Resolution, accuracy, and diagnostics

An n-bit converter has 2ⁿ nominal code levels. If an ideal unipolar converter spans 0 to F, its code width is approximately:

q = F/(2n - 1)

where q is the voltage or current increment per code. This is not the same as total measurement accuracy: offset error, gain error, nonlinearity, temperature drift, noise, and sensor uncertainty may dominate quantization.

A robust analog input routine should:

  • verify module health and channel configuration;
  • detect under-range and over-range values;
  • distinguish sensor failure from a genuine extreme process value;
  • apply engineering-unit scaling only after validation;
  • record quality status with the value;
  • use a defined substitute or safe state during failure.

For a 4–20 mA loop, useful diagnostic thresholds depend on the instrument standard. Values below approximately 3.6 mA or above approximately 21 mA are often treated as fault indications, but the exact limits must come from the transmitter and plant standard.

2. Filtering analog measurements

2.1 Why filtering is needed

Noise may arise from variable-frequency drives, contactors, radio-frequency interference, poor shielding, ground loops, quantization, or mechanical vibration. Filtering can prevent nuisance alarms and reduce actuator movement. However, every causal filter delays information. Excessive filtering makes the controller react late, causing sluggish response or instability when aggressive tuning is retained.

Filtering should not compensate for poor wiring. First inspect cable routing, shielding, grounding, sensor installation, and module configuration. A software filter is a secondary measure.

2.2 Moving average and first-order filter

For N equally weighted samples, a moving average is:

y[k] = (1/N) ∑_(i=0)^(N-1) x[k-i]

where x[k] is the current sample and y[k] is the filtered output. It attenuates rapid fluctuations but introduces a delay approximately related to the window length. It is useful for slow monitoring signals, but the delay can be undesirable in a fast feedback loop.

A widely used discrete first-order exponential filter is:

y[k] = y[k-1] + α(x[k] - y[k-1])

where 0 < α ≤ 1 is the filter coefficient. α = 1 gives no filtering; smaller α gives stronger smoothing. If a continuous-time time constant τ is selected and the sampling period is T_s, a common exact zero-order-hold relationship is:

α = 1 - e^(-Ts/τ)

This relationship assumes a first-order low-pass model and a constant input between samples. It should not be confused with the approximate choice α ≈ T_s/(τ + T_s), which results from a different discretization.

Filtering the PV is generally preferable to filtering the controller output when the purpose is to reduce measurement noise. Filtering the output can slow actuator response and conceal a poorly tuned controller. Derivative action is especially sensitive to noise; therefore, practical PID controllers use a filtered derivative rather than an ideal differentiator.

3. Process dynamics and control-loop structure

3.1 Feedback loop terminology

The set point is the desired value. The process variable is the measured value. The manipulated variable is the controller output applied to the process. The error may be defined as:

e(t) = SP(t) - PV(t)

for direct-acting controller conventions. A reverse-acting controller uses the opposite relationship in its output calculation. The correct action depends on the process: for example, opening a cooling-water valve may decrease temperature, whereas opening a steam valve increases it.

Closed-loop process control block diagram ControllerPID / logic Actuatorvalve / drive Processplant dynamics Σ+− SPMVactuator signalPVmeasurement feedback
Closed-loop process control block diagram
Figure: Closed-loop process control block diagram

Figure: Basic negative-feedback process-control loop.

3.2 First-order-plus-dead-time model

Many industrial processes can be approximated for tuning by a first-order-plus-dead-time (FOPDT) model:

Gp(s) = K e^(-θs)/(τs + 1)

K is the process gain, τ is the time constant, θ is dead time, and s is the Laplace variable. K has units of PV per MV; τ and θ have units of time. The model assumes operation near a chosen steady state and approximately linear behavior for the tested range.

For a step change Δu in MV, the eventual PV change is approximately KΔu. The time constant is the time after dead time at which a first-order response has reached 63.2% of its final change. Dead time is the interval before a measurable response begins. Large θ/τ generally makes control more difficult because the controller acts on old information.

Important performance measures include rise time, settling time, overshoot, steady-state error, and integral absolute error. One possible performance index is:

IAE = ∫0T |e(t)| dt

IAE has units of error × time and is useful for comparing responses over the same interval, but no single metric captures safety, energy use, actuator wear, and product quality simultaneously.

4. Controller algorithms

4.1 On–off control

An on–off controller commands one of two states according to error. Hysteresis prevents rapid switching:

  • turn ON when PV ≤ SP − h;
  • turn OFF when PV ≥ SP + h;

for a heating application, where h is the hysteresis half-band. On–off control is inexpensive and suitable for thermostatic systems with acceptable cycling. It is unsuitable when tight regulation or frequent actuator switching is harmful.

4.2 Proportional control

The ideal proportional law is:

u(t) = ub + Kc e(t)

where u is controller output, u_b is a bias, and K_c is proportional gain. If error is expressed in percent and output in percent, K_c is dimensionless. Proportional control responds immediately but normally leaves offset under load disturbance unless the process itself integrates or the bias happens to be correct. Proportional band is often specified instead:

PB = 100/Kc

when both error and output use percent units. This inverse relationship applies only under that convention.

4.3 Integral action

Integral action removes persistent offset:

u(t) = ub + Kc[e(t) + (1/τi)∫0t e(λ)dλ]

τ_i is integral time, in seconds or minutes, and λ is a dummy time variable. Smaller τ_i means stronger integral action. Integral action can cause overshoot and windup when the actuator saturates.

4.4 Derivative action and practical PID

The ideal parallel PID law is:

u(t) = ub + Kp e(t) + Ki∫0t e(λ)dλ + Kd de(t)/dt

where K_p, K_i, and K_d have units determined by the selected signal units. In the dependent-parameter form, K_i = K_c/τ_i and K_d = K_cτ_d, with derivative time τ_d.

Ideal derivative action amplifies high-frequency noise and is therefore rarely implemented without filtering. A common derivative term in the Laplace domain is:

D(s) = Kc × (τd s)/(1 + τd s/N)

where N is a dimensionless derivative-filter factor, commonly selected within a bounded engineering range rather than treated as an unlimited tuning parameter. Derivative action is often applied to PV rather than error to avoid a large output kick when SP changes. PI control is frequently preferred for temperature, level, and flow loops because derivative benefits may not justify its noise sensitivity.

5. Digital PLC implementation and anti-windup

A PLC executes control at a sample period T_s. A simple rectangular integration update is:

I[k] = I[k-1] + Ki Ts e[k]

and a practical controller may calculate:

uraw[k] = ub + Kp e[k] + I[k] + D[k]

The output is then limited to a permitted range:

u[k] = min(max(uraw[k], umin), umax)

The sample period should be substantially shorter than the dominant process time scale and must be consistent with the configured controller units. A mismatch between seconds and minutes is a common commissioning error.

5.1 Integral windup

Windup occurs when the controller demands an output beyond actuator limits while the integral term continues to accumulate. When the process eventually returns toward the set point, the stored integral drives prolonged overshoot and slow recovery.

A simple conditional-integration method updates the integrator only when the output is not saturated, or when the error would move the saturated output back toward the allowable range. A back-calculation method adds a correction:

I[k] = I[k-1] + Ts[Ki e[k] + (u[k] - uraw[k])/Tt]

where T_t is the tracking time constant and u[k] is the limited output. The correction drives the internal controller state toward the actual actuator output. The sign shown assumes the stated definition of u_raw and is to be checked against the implementation’s sign convention. Anti-windup must also handle manual-to-automatic transfer, output tracking, cascade mode changes, and actuator failure.

A bumpless transfer initializes the integral or bias so that the automatic output initially equals the present manual output. This avoids a sudden command step when automatic control is enabled.

6. Practical tuning and dynamic analysis

6.1 Safe step testing

A common procedure is to place the loop in manual or open-loop operation, apply a small step in MV, and record PV at a suitable sampling rate. The test should remain within safe operating limits and should not be performed if the process cannot tolerate open-loop operation. Estimate K from the steady-state PV change divided by MV change, θ from the apparent response delay, and τ from the 63.2% response point after dead time.

For a FOPDT process, tuning rules such as Cohen–Coon or IMC-based methods can provide initial settings. They are not universal guarantees: model uncertainty, nonlinear valves, measurement delay, actuator saturation, and interaction with other loops must be considered. Conservative tuning is usually preferred during commissioning.

IMC-style PI tuning is often expressed in a form such as:

Kc = τ/[K(λ + θ)]

with integral time τ_i = τ, where λ is a user-selected closed-loop response parameter. This expression assumes the FOPDT model, a PI structure, compatible controller conventions, and a positive process gain under the selected sign convention. Increasing λ generally produces a slower, more robust response; λ must be selected with regard to dead time, uncertainty, and performance requirements.

6.2 Commissioning sequence

A disciplined sequence is:

  1. verify sensor range, polarity, wiring, grounding, and scaling;
  2. test the actuator manually over a safe restricted range;
  3. confirm the process reaction direction;
  4. begin with proportional-only or conservative PI control;
  5. introduce integral action gradually and check saturation recovery;
  6. add derivative only when measurement quality and process speed justify it;
  7. test set-point changes, load disturbances, manual transfer, sensor faults, and output limits;
  8. document final settings, alarm limits, operating mode, and revision history.

7. Advanced control structures

7.1 Cascade control

Cascade control uses a primary controller whose output becomes the set point of a faster secondary controller. For example, a temperature controller can set the flow set point of a steam loop. The secondary loop should respond significantly faster than the primary loop; otherwise the cascade structure provides little benefit. The inner loop should be tuned and placed in automatic before tuning the outer loop.

Cascade control rejects disturbances entering the inner loop before they significantly affect the primary PV. It requires an additional reliable measurement and actuator relationship, so it is not justified solely because it is technically possible.

7.2 Ratio control

Ratio control maintains a desired relationship between two flow rates. If stream B should track stream A, the target is:

FB,SP = R FA

where R is the desired ratio, with any required bias or compensation included by the process design. Flow measurements must be compatible, correctly calibrated, and often corrected for density, temperature, or pressure when mass rather than volumetric ratio is required. Ratio control is common in blending and combustion.

7.3 Feedforward control

Feedback waits for a deviation in PV. Feedforward measures a disturbance and changes MV before the PV changes. For a simplified steady-state process, a disturbance d can be compensated by:

uff = -Gd/Gp × d

where G_d is disturbance gain and G_p is process gain, using a consistent sign convention. Dynamic feedforward may also include lead–lag compensation to account for different disturbance and manipulated-variable paths. Because models are imperfect, feedforward is normally combined with feedback, which corrects residual error. Poor disturbance measurement, saturation, nonlinearities, and unmodeled dynamics limit performance.

8. Applied case: temperature control of a jacketed mixing vessel

Background

The following is an illustrative case. A jacketed vessel mixes a liquid product. Steam flow controls temperature, and a 4–20 mA resistance-temperature transmitter measures vessel temperature over 0–200 °C. The steam valve accepts a 4–20 mA command corresponding to 0–100% opening.

Problem

Operators report that temperature overshoots during start-up and takes a long time to recover after a large batch charge. The trend also contains small fluctuations caused by electrical interference.

Analysis

The PLC converts the temperature signal using:

T = 0 + (IT - 4) × 200/16

At I_T = 13.6 mA, T = 120 °C. A small first-order input filter is selected with T_s = 1 s and τ_f = 3 s:

α = 1 - e^(-1/3) ≈ 0.283

The filter reduces rapid noise but adds a modest measurement lag. A safe step test indicates K = 0.8 °C/% valve command, θ = 20 s, and τ = 120 s. Using an IMC-style PI choice with λ = 100 s:

Kc = 120/[0.8(100 + 20)] = 1.25 %/%

and τ_i = 120 s. These are initial settings, not final validated settings.

Approach and solution

The controller is configured as reverse acting if increasing steam command increases temperature and the PLC error convention requires a decreasing output for positive PV error. Output is limited to 0–100%. Conditional integration or back-calculation is enabled, and manual-to-automatic transfer tracks the current valve command. The PV filter is retained only after confirming that the process remains stable.

During commissioning, the team first tests transmitter scaling at known reference points, then verifies that a small valve opening increases temperature. They apply a conservative set-point ramp rather than a step. The controller is tested under a large batch-charge disturbance, a valve limit, and a sensor-failure simulation.

Outcome

The filter removes nuisance fluctuations without masking the thermal response. Anti-windup shortens recovery after the valve reaches 100%. The initial PI settings provide stable control; subsequent small adjustments reduce overshoot while preserving acceptable batch time. The final system includes high-temperature shutdown independent of the PLC control algorithm, because a regulatory or safety function should not rely solely on ordinary feedback software.

Learning points

  1. Correct scaling and action direction are prerequisites for tuning.
  2. A filter cannot repair bad wiring or an unsuitable sensor location.
  3. Process-model parameters support tuning but do not replace closed-loop tests.
  4. Saturation handling and transfer logic are part of the controller design.
  5. Control objectives must be balanced against safety, quality, energy, and actuator life.

9. Limitations, governance, and contemporary practice

Analog control is limited by sensor accuracy, actuator nonlinearities, dead time, process changes, and model uncertainty. A valve may exhibit stiction, hysteresis, or a nonlinear flow characteristic. A level process may be integrating rather than self-regulating. A single fixed tuning may therefore be inadequate over the full operating range; gain scheduling or adaptive methods may be considered, but they add validation and maintenance complexity.

Control software is safety-relevant even when it is not a certified safety instrumented system. Alarm limits, interlocks, permissives, override logic, audit trails, and change management should be defined clearly. Cybersecurity practices include least privilege, controlled engineering access, network segmentation, backups, authenticated changes, and tested recovery. AI-based anomaly detection can assist maintenance by identifying unusual trends, but it should not silently alter safety-critical control decisions without validated bounds, human oversight, and deterministic fallback behavior.

Best practice is to retain a cause-and-effect description, loop diagrams, calibration records, tuning rationale, test evidence, and version-controlled PLC code. Every change to scaling, filtering, limits, or controller parameters should be reviewed for effects on product quality and process safety.

Chapter Summary

Analog processing converts physical measurements into trustworthy engineering values and produces correctly bounded actuator commands. Linear scaling requires attention to ranges, units, live-zero diagnostics, resolution, and out-of-range behavior. Filtering reduces noise but introduces lag; wiring and grounding problems should be corrected before software smoothing is added.

A feedback loop consists of set point, error, controller, actuator, process, and measurement. First-order-plus-dead-time models provide a useful approximation for dynamic analysis and initial tuning. On–off, proportional, PI, and PID algorithms offer increasing control capability but also introduce issues such as offset, noise sensitivity, saturation, and windup. Practical PLC implementations require consistent sample times, output limiting, anti-windup, bumpless transfer, and fault handling.

Cascade, ratio, and feedforward structures improve performance when their measurements, dynamics, and assumptions are appropriate. Safe commissioning combines scaling checks, direction tests, conservative tuning, disturbance tests, documentation, and independent protection. The best control solution is not necessarily the most complex one; it is the simplest validated structure that meets process, safety, quality, and operational requirements.

Key Terms

Analog signal: A continuously varying electrical representation of a physical quantity.

Live zero: A nonzero lower signal value, commonly 4 mA, that permits fault detection.

Engineering-unit scaling: Conversion of a raw analog value into a physical unit such as °C or bar.

Quantization: Representation of a continuous signal by discrete converter codes.

Moving average: Filter that averages a defined number of recent samples.

First-order filter: Low-pass filter characterized by a time constant.

Set point (SP): Desired value of a controlled variable.

Process variable (PV): Measured value of the controlled variable.

Manipulated variable (MV): Actuated input used to influence the process.

Dead time: Delay before a process responds measurably to an input change.

Time constant: Time required for a first-order response to reach 63.2% of its final change after dead time.

Process gain: Steady-state change in PV per unit change in MV.

Proportional gain: Multiplier relating controller output response to error.

Integral action: Controller action that accumulates error to remove offset.

Derivative action: Action responding to the rate of change of error or PV.

Windup: Excessive integral accumulation during actuator saturation.

Cascade control: Nested control arrangement with a primary and faster secondary loop.

Ratio control: Control that maintains a specified relationship between two variables.

Feedforward control: Compensation based on a measured disturbance before PV deviation occurs.

Bumpless transfer: Change between manual and automatic modes without an output step.

Review Questions

Short Answer Questions

  1. Why is 4–20 mA generally preferred to 0–20 mA for many industrial transmitters?
  2. State the linear scaling equation for converting an input x into an engineering variable y.
  3. Why can excessive filtering destabilize or slow a feedback loop?
  4. What is integral windup, and under what condition does it occur?
  5. Why should the secondary loop in a cascade arrangement be faster than the primary loop?

Long Answer Questions

  1. Explain the complete signal path from a pressure transmitter to a PLC control output, including scaling, diagnostics, filtering, and output limiting.
  2. Compare on–off, proportional, PI, and PID control in terms of offset, noise sensitivity, complexity, and typical applications.
  3. Derive the significance of K, τ, and θ in a first-order-plus-dead-time process model and explain how they affect tuning difficulty.
  4. Describe two anti-windup methods and explain how bumpless transfer should be implemented.
  5. Compare feedback, cascade, ratio, and feedforward control, identifying the measurements and process conditions required for each.

Analytical / Application Questions

  1. A 4–20 mA transmitter represents 0–250 °C. Determine the temperature at 15.2 mA and explain how you would treat a reading of 3.2 mA.
  2. A process has K = 1.5 °C/% , τ = 90 s, and θ = 15 s. Using the stated IMC-style PI formula with λ = 75 s, calculate K_c and state the assumed integral time.
  3. A heating valve reaches 100% during start-up, but the temperature later overshoots badly after the set point is reached. Diagnose the likely controller problem and propose PLC logic to correct it.

Multiple Choice Questions with Answers

Question 1

A 4–20 mA transmitter is calibrated for 0–16 bar. What pressure corresponds to 12 mA?

A. 4 bar

B. 8 bar

C. 12 bar

D. 16 bar

Correct Answer: B. 8 bar

Question 2

For a first-order filter with sampling period T_s and time constant τ, which coefficient relationship is stated for exact zero-order-hold discretization?

A. α = e^(-T_s/τ)

B. α = T_s/τ

C. α = 1 − e^(-T_s/τ)

D. α = τ/T_s

Correct Answer: C. α = 1 − e^(-T_s/τ)

Question 3

Which controller action normally removes steady-state offset caused by a sustained load disturbance?

A. Derivative action

B. Integral action

C. Measurement scaling

D. Output filtering only

Correct Answer: B. Integral action

Question 4

A first-order process reaches what fraction of its final change one time constant after the dead time?

A. 36.8%

B. 50.0%

C. 63.2%

D. 100%

Correct Answer: C. 63.2%

Question 5

What is the principal cause of integral windup?

A. A perfectly linear actuator

B. Controller output saturation while integration continues

C. A high-resolution analog converter

D. A correctly grounded shield

Correct Answer: B. Controller output saturation while integration continues

Question 6

For a 0–10 V output commanding 0–100% valve position, what voltage represents 65% command?

A. 0.65 V

B. 3.5 V

C. 6.5 V

D. 9.35 V

Correct Answer: C. 6.5 V

Question 7

In cascade control, which loop is normally tuned first?

A. The slower primary loop

B. The faster secondary loop

C. Both loops simultaneously with identical settings

D. Neither loop; cascade requires no tuning

Correct Answer: B. The faster secondary loop

Question 8

What is the main purpose of feedforward control?

A. To measure a disturbance and compensate before the PV deviates significantly

B. To eliminate the need for any process measurement

C. To guarantee zero actuator saturation

D. To replace all feedback protection

Correct Answer: A. To measure a disturbance and compensate before the PV deviates significantly

Question 9

If a controller output is limited to 0–100%, which feature helps prevent prolonged recovery after saturation?

A. Increasing sensor noise

B. Anti-windup

C. Removing output limits

D. Using a larger dead time

Correct Answer: B. Anti-windup

Question 10

For an IMC-style PI formula K_c = τ/[K(λ + θ)], with K = 1, τ = 100 s, θ = 20 s, and λ = 80 s, what is K_c?

A. 0.50

B. 0.80

C. 1.00

D. 1.25

Correct Answer: C. 1.00

Industrial Automation & PLC
Chapter 7 of 15