Chapter 14
Control, Automation and Embedded Electrical Systems
Bachelors Program in Electrical Engineering
Fundamentals of Electrical Engineering
•
Bachelor
Control, Automation and Embedded Electrical Systems
Introduction
Control and automation enable electrical systems to regulate speed, temperature, voltage, position, flow, pressure and many other variables without continuous human intervention. A control system combines a process or plant, sensors, decision-making hardware, control algorithms and actuators. Embedded controllers, programmable logic controllers (PLCs) and industrial communication networks implement these functions in products and factories.
This chapter develops basic continuous-time system models, feedback principles, stability and performance measures, PID control, embedded hardware, PLC programming and industrial monitoring. The emphasis is on connecting mathematical analysis with safe implementation.
Learning Objectives
After completing this chapter, students should be able to:
construct block diagrams and derive elementary transfer functions;
determine closed-loop transfer functions for negative-feedback systems;
assess stability from system poles;
calculate common transient and steady-state performance measures;
explain and apply proportional, integral and derivative control;
distinguish PLCs from microcontrollers;
select basic communication interfaces;
implement elementary monitoring and sequential-control logic; and
recognize safety, cybersecurity and professional responsibilities in automation.
1. Elements of a Control System
A control system normally contains the following elements:
Reference: desired value of the controlled variable.
Controller: calculates the required control action.
Actuator: converts a low-power control signal into physical action.
Plant: process or device being controlled.
Sensor: measures the plant output.
Feedback path: returns measured information to the controller.
Disturbance: an unwanted input affecting the plant.
An open-loop system applies control without measuring the result. A timed toaster is a simple example. A closed-loop system measures its output and uses the measurement to correct error. Motor-speed control using an encoder is closed loop.
Negative-feedback control system with correctly labelled error and control signals
Figure: Negative-feedback control system with correctly labelled error and control signals
Figure: Standard negative-feedback loop. E(s) is the controller input error, while U(s) is the controller output applied to the plant.
Here R(s) is the reference, E(s) the error, U(s) the control signal, Y(s) the output and B(s) the feedback signal. Substitution gives the closed-loop transfer function:
T(s) = Y(s)/R(s) = C(s)G(s) / [1 + C(s)G(s)H(s)]
The plus sign in the denominator results from negative feedback. For positive feedback, the corresponding denominator is 1 − C(s)G(s)H(s).
2. Mathematical Models
2.1 Differential equations and transfer functions
A physical system is commonly modelled using conservation laws, circuit laws and constitutive relations. Consider a series RC circuit whose output is the capacitor voltage. Kirchhoff’s voltage law gives
RC·dvC(t)/dt + vC(t) = vin(t)
Here R is resistance in ohms, C is capacitance in farads, and RC has units of seconds. Taking the Laplace transform with zero initial capacitor voltage gives
G(s) = VC(s)/Vin(s) = 1/(RCs + 1)
A transfer function is therefore the ratio of output to input transforms under zero initial conditions. It is primarily applicable to linear time-invariant systems. A general differential equation
provided all initial conditions are zero. Transfer functions describe input–output behaviour but may conceal internal states or unstable pole–zero cancellations.
2.2 Poles, zeros and gain
The roots of the transfer-function numerator are zeros, while the roots of its denominator are poles. Poles determine natural modes and strongly influence stability and transient response. Zeros modify response shape and can limit achievable control performance.
2.3 State-space models
A state-space model represents internal system dynamics:
ẋ(t) = Ax(t) + Bu(t), y(t) = Cx(t) + Du(t)
The vector x(t) contains state variables; u(t) and y(t) are input and output vectors. For a linear time-invariant model, the corresponding transfer-function matrix is
G(s) = C(sI − A)−1B + D
State-space models naturally support multiple inputs, multiple outputs and digital implementation.
Worked Example 1: RC sensor filter
A sensor signal is filtered by R = 10 kΩ and C = 10 μF. The time constant is
τ = RC = (10,000)(10 × 10−6) = 0.10 s
Thus,
G(s) = 1/(0.10s + 1)
For a unit-step input, the output is
y(t) = 1 − e−t/0.10, t ≥ 0
At one time constant the output is approximately 63.2% of its final value. At t = 0.30 s, it is 1 − e−3 ≈ 0.950, or 95.0%.
3. Stability and Performance
3.1 Stability
A continuous-time linear time-invariant system is bounded-input bounded-output stable if every pole of its minimal transfer function lies strictly in the open left half of the complex s-plane. Poles on the imaginary axis require more careful internal-stability analysis and do not satisfy asymptotic stability. Any pole in the right half-plane produces an unstable mode.
For the second-order characteristic polynomial
s2 + a1s + a0
both roots lie in the open left half-plane if and only if a1 > 0 and a0 > 0. Higher-order systems can be tested using the Routh–Hurwitz criterion or numerical pole calculation.
3.2 First- and second-order responses
A standard first-order system is
G(s) = K/(τs + 1)
where K is the steady-state gain and τ > 0 is the time constant in seconds. Its approximate 2% settling time is 4τ.
The standard second-order form is
G(s) = ωn2/(s2 + 2ζωns + ωn2)
where ωn is the undamped natural frequency in rad/s and ζ is the dimensionless damping ratio. For 0 < ζ < 1, the system is underdamped, with damped natural frequency
ωd = ωn√(1 − ζ2)
The percentage overshoot, peak time and approximate 2% settling time are
Mp = 100e−πζ/√(1−ζ2) %, tp = π/ωd, ts ≈ 4/(ζωn)
These formulas apply to the standard underdamped second-order step response without significant additional poles or zeros. The settling-time expression is an approximation.
3.3 Steady-state error
For unity negative feedback with loop transfer function L(s) = C(s)G(s),
E(s) = R(s)/[1 + L(s)]
The final-value theorem gives
ess = limt→∞e(t) = lims→0sE(s)
This result is valid only if all poles of sE(s) lie strictly in the open left half-plane after valid cancellation. For stable unity-feedback systems, the position and velocity constants are
Kp = lims→0L(s), Kv = lims→0sL(s)
The unit-step error is 1/(1 + Kp), while the unit-ramp error is 1/Kv, provided the relevant limits produce a finite, stable response.
Worked Example 2: Closed-loop motor model
Let the plant and proportional controller be
G(s) = 2/[s(s + 3)], C(s) = K
with unity negative feedback. The closed-loop transfer function is
T(s) = 2K/[s2 + 3s + 2K]
For K = 2, the characteristic polynomial is s2 + 3s + 4. Comparing it with the standard form gives
ωn = 2 rad/s, 2ζωn = 3, ζ = 0.75
The system is stable and underdamped. Its predicted overshoot is
Mp = 100e−π(0.75)/√(1−0.752) ≈ 2.84%
Also,
ωd = 2√(1−0.752) ≈ 1.323 rad/s
so tp ≈ π/1.323 = 2.37 s and ts ≈ 4/(0.75 × 2) = 2.67 s. Because the loop contains one integrator, the stable system has zero unit-step steady-state error. For a unit ramp, Kv = 2K/3 = 4/3 s−1, so ess = 0.75 s.
4. Feedback and PID Control
Negative feedback can reduce sensitivity to parameter changes, reject disturbances and improve tracking. It does not automatically guarantee stability: excessive gain, time delay or unmodelled dynamics can destabilize the loop.
An ideal parallel PID controller is
u(t) = Kpe(t) + Ki∫0t e(τ)dτ + Kd de(t)/dt
Its transfer function is
C(s) = Kp + Ki/s + Kds
The gain units depend on the units of error and actuator command. If both have the same units, Kp is dimensionless, Ki has units s⁻¹, and Kd has units s.
Action
Principal benefit
Common limitation
Proportional
Faster corrective action
Usually leaves offset in type-0 systems
Integral
Removes constant steady-state offset when the closed loop is stable
Can cause overshoot and windup
Derivative
Adds damping and anticipatory action
Amplifies measurement noise
A practical derivative is filtered rather than ideal:
CD(s) = Kd Ns/(s + N)
where N is a positive filter corner parameter in rad/s. Implementations often differentiate the measured output rather than the reference to reduce derivative kick.
Integral windup occurs when actuator saturation prevents the requested control action while the integrator continues accumulating error. Conditional integration or back-calculation anti-windup should be used. Controller tuning may use model-based design, frequency-response methods, relay tests or cautiously applied empirical rules. Final tuning must be validated under realistic loads, disturbances and limits.
For a sampled controller with sampling interval Ts, a simple positional PID approximation is
This elementary equation assumes uniform sampling. Production implementations require derivative filtering, output limits, anti-windup, initialization and numerical safeguards.
5. Embedded Controllers and Signal Acquisition
5.1 Microcontrollers and PLCs
A microcontroller integrates a processor, memory, timers, digital input/output and often analog peripherals on one chip. It suits embedded products, motor drives, instruments and high-volume custom equipment.
A PLC is an industrial controller designed for deterministic cyclic execution, robust field wiring, modular I/O, diagnostics and maintainability. Its scan normally reads inputs, executes the program, performs communications and updates outputs.
Characteristic
Microcontroller
PLC
Development
Firmware and custom electronics
Industrial programming environment
Environment
Depends on product design
Typically hardened for industrial use
I/O
Logic-level, often requires conditioning
Industrial modules and isolation
Best suited to
Embedded products and dedicated control
Machines and process automation
Maintenance
Often specialist or vendor based
Designed for plant technicians
5.2 Sensors, ADCs and actuators
Sensors may produce analog voltage, current, resistance, frequency or digital data. Signal conditioning can provide amplification, filtering, isolation and protection. A common industrial current loop uses 4–20 mA, allowing a broken wire to be distinguished from a valid zero measurement.
For an ideal unsigned N-bit analog-to-digital converter spanning 0 to Vref, an output code is approximately
D = round[(2N − 1)Vin/Vref]
and the reconstructed voltage is
Vin ≈ DVref/(2N − 1)
These equations assume ideal conversion and input voltage within range. Real converters have offset, gain, quantization and noise errors.
Example: A 12-bit ADC with Vref = 3.3 V reports D = 2482. Then
Vin ≈ 2482(3.3)/4095 ≈ 2.000 V
If a conditioned pressure sensor maps 0.5–2.5 V linearly to 0–10 bar, then
P = 10(Vin − 0.5)/(2.5 − 0.5) ≈ 7.50 bar
Actuators include relays, contactors, solenoids, valves and power-electronic motor drives. A controller output must not directly energize a load beyond its voltage or current rating; an appropriate driver, protection and isolation stage is required.
5.3 Sampling
A band-limited signal with highest frequency fmax must ideally be sampled at fs > 2fmax to avoid aliasing. Practical systems sample faster and use an analog anti-alias filter because real filters do not have ideal cutoffs. Control sampling must also be fast relative to closed-loop dynamics; a common engineering starting point is a sampling frequency 10–20 times the desired control bandwidth, followed by analysis and testing.
6. PLC Logic and Industrial Automation
IEC 61131-3 programming languages include ladder diagram, function block diagram, structured text and sequential function chart. Ladder logic resembles relay circuitry and is widely used for discrete machine control.
6.1 Tank-filling control
Consider two level switches and a pump. The intended strategy is:
Start filling when the low-level switch is asserted.
Continue filling after the level rises above the low switch.
Stop when the high-level switch is asserted.
Stop for an emergency, overload or loss of automatic mode.
The symbol [/ I0.2 HIGH ] is a negated, normally closed logical instruction: it is true only while the high-level input is 0. Therefore, assertion of the high-level input opens the logical path and stops the pump. The parallel Q0.0 contact seals in the pump after I0.1 clears, allowing filling to continue until the high threshold is reached.
Equivalent scan-based pseudocode is:
if NOT I0.0 or NOT I0.3 or NOT I0.4 then
pump := FALSE
else if I0.2 then
pump := FALSE
else if I0.1 then
pump := TRUE
else
pump := pump
end if
Q0.0 := pump
Thus both the low-level start input and the high-level stop input are explicitly implemented. If low and high inputs are simultaneously asserted, the high-level condition has priority and the pump remains off; the controller should also raise a sensor-disagreement alarm.
A safety-rated emergency stop should normally remove hazardous energy through an appropriately designed safety circuit or safety PLC. Ordinary application logic is not a substitute for the required safety function.
6.2 Automation hierarchy
At field level, sensors and actuators interact with the process. PLCs and embedded controllers perform real-time control. Supervisory control and data acquisition (SCADA) systems provide visualization, alarms and historical data. Manufacturing execution and enterprise systems coordinate production, maintenance and planning. Information exchange between levels should not compromise deterministic control or safety.
7. Communication Interfaces
Interface or protocol
Typical properties
Common application
UART
Asynchronous point-to-point serial data
Debugging, modules
SPI
Clocked, full duplex, short distance
Fast on-board peripherals
I²C
Two-wire addressed bus
Sensors and configuration devices
CAN
Differential, prioritized multi-node bus
Vehicles and machines
Modbus RTU
Register-oriented protocol, often over RS-485
Industrial instruments
Industrial Ethernet
High data rate; protocol-specific timing
PLC, drive and SCADA networks
Physical layers and application protocols must not be confused. For example, RS-485 specifies electrical signalling, whereas Modbus RTU defines message structure and meaning. Interface selection considers distance, data rate, node count, electromagnetic compatibility, isolation, determinism, diagnostics and cybersecurity.
Robust communication software should use timeouts, checksums or cyclic redundancy checks where provided, sequence validation, range checking and a defined safe response to stale or missing data.
8. Applied Case: Automated Water Storage System
Background
This is an illustrative case involving a small facility with a storage tank, transfer pump, low- and high-level switches, a PLC and a SCADA display.
Problem
The pump must automatically restore the tank level without overflowing it. Operators also require level indication, alarm history and fault diagnostics. A previous manual arrangement risked overflow and dry running.
Analysis
The vertical tank has constant cross-sectional area A = 0.50 m2. During filling, pump inflow is qp = 0.0040 m3/s, while average demand is qd = 0.0015 m3/s. Between the low and high switches, the level change is Δh = 0.50 m. The level balance is
A dh/dt = qp − qd
This model assumes constant tank area and approximately constant flows. The expected fill time is
The corrected seal-in logic starts the pump at the low threshold and stops it at the high threshold. A 150 s fill timeout is selected to exceed the expected 100 s duration while detecting reduced flow, leakage or sensor failure. The design also includes:
high-level stop priority;
a separate independent high-high alarm;
motor overload and safety-chain monitoring;
an analog level transmitter for display and trend recording;
alarms for contradictory switches and stale analog data;
manual operation restricted by safety interlocks; and
event logs containing synchronized timestamps.
The PLC executes essential control locally, so loss of SCADA communication does not prevent safe stopping. The SCADA system supervises rather than replaces the local interlocks.
Outcome
Under the stated flow conditions, each automatic filling cycle should last approximately 100 s. A significantly longer cycle generates a maintenance alarm. The hysteresis between low and high switches prevents rapid pump cycling.
Learning points
Simple automation still requires a physical process model, unambiguous input definitions, correct negated logic, fault handling and independent safety measures. Simulation should be followed by I/O testing and controlled commissioning.
9. Limitations, Safety and Professional Practice
Models omit some real effects. Friction, saturation, backlash, sensor noise, dead time, nonlinear flow and parameter variation can make actual behaviour differ from predictions. Controllers should therefore be tested across credible operating conditions.
Important engineering practices include:
define fail-safe states before programming;
use electrical isolation, grounding and electromagnetic-compatibility practices;
separate basic control from safety functions;
document I/O polarity and normal/fault states;
validate sensor range, scaling and units;
manage software versions and authorized changes;
test communication loss, power restoration and actuator saturation;
use access control, network segmentation and secure maintenance procedures; and
preserve audit logs without collecting unnecessary personal information.
Relevant frameworks may include IEC 61131-3 for PLC programming, IEC 61508 for functional-safety lifecycles and the IEC 62443 series for industrial automation cybersecurity. Applicability depends on jurisdiction, industry and risk classification.
AI-supported anomaly detection and predictive maintenance can identify unusual vibration, current or temperature patterns. Such systems depend on representative data and may produce false alarms or miss unfamiliar faults. They should not replace validated safety functions. Engineers remain responsible for traceability, human oversight and safe fallback behaviour.
Chapter Summary
Control systems combine plants, sensors, controllers and actuators. Transfer functions model zero-initial-condition input–output relationships for linear time-invariant systems, while state-space models expose internal dynamics. In a negative-feedback loop, the error E(s) enters the controller and its output U(s) drives the plant.
Closed-loop poles determine stability and transient behaviour. First- and second-order models provide useful measures such as time constant, overshoot, peak time and settling time. The final-value theorem supports steady-state error analysis only when its pole conditions are satisfied.
PID control combines proportional response, integral offset removal and derivative damping, but practical systems require filtering, saturation handling and anti-windup. Microcontrollers support customized embedded products, whereas PLCs provide robust industrial control and maintainable I/O. Reliable automation also depends on correct signal scaling, sampling, communication, interlocking, fault diagnosis, cybersecurity and functional-safety engineering.
Key Terms
Actuator: Device that converts a control command into physical action.
Aliasing: Distortion caused when a signal is sampled too slowly.
Closed-loop system: System that uses output feedback to influence control action.
Controller: Element that calculates the control signal from reference and measurement information.
Damping ratio: Dimensionless parameter describing second-order decay and oscillation.
Embedded system: Computer-based controller integrated into a larger product or machine.
Feedback: Return of measured output information to a controller.
Integral windup: Excessive integrator accumulation during actuator saturation.
Microcontroller: Integrated processor containing memory and peripheral hardware.
PID controller: Controller combining proportional, integral and derivative actions.
Plant: Physical process or device being controlled.
PLC: Industrial computer designed for machine and process control.
Pole: Root of a transfer-function denominator.
SCADA: Supervisory system for monitoring, alarms, visualization and data collection.
Settling time: Time required for a response to enter and remain within a specified tolerance band.
Stability: Property describing whether system responses remain bounded or decay appropriately.
Steady-state error: Difference between reference and output after transients have decayed.
Transfer function: Ratio of output to input Laplace transforms under zero initial conditions.
Review Questions
Short Answer Questions
Distinguish an open-loop system from a closed-loop system.
Define the poles and zeros of a transfer function.
State the continuous-time pole condition for asymptotic stability.
Why is derivative action normally filtered?
What is the purpose of a PLC seal-in contact?
Long Answer Questions
Derive the closed-loop transfer function of a negative-feedback system and define every signal.
Explain the relationships among damping ratio, overshoot, peak time and settling time.
Compare proportional, integral and derivative actions, including implementation limitations.
Compare PLCs and microcontrollers for industrial control applications.
Discuss the acquisition path from an analog sensor to a digital controller and actuator.
Analytical / Application Questions
A unity-feedback plant is G(s)=5/[s(s+4)], controlled by gain K. Derive the closed-loop transfer function and determine the range of positive K for stability.
Design PLC logic for a sump pump that starts at a high level and stops at a low level. Define all input polarities and ensure that the stop condition has priority.
A tank has area 0.8 m2, inflow 0.006 m3/s and outflow 0.002 m3/s. Calculate the time to raise its level by 0.40 m and propose a reasonable timeout with justification.
Multiple Choice Questions with Answers
Question 1
In the standard negative-feedback diagram, which signal is located between the controller and the plant?
A. The error E(s)
B. The control signal U(s)
C. The reference R(s)
D. The feedback signal B(s)
Correct Answer: B. The control signal U(s)
Question 2
For negative feedback with forward path C(s)G(s) and feedback H(s), the closed-loop transfer function is:
A. C(s)G(s)/[1 + C(s)G(s)H(s)]
B. C(s)G(s)/[1 − C(s)G(s)H(s)]
C. H(s)/[1 + C(s)G(s)]
D. 1/[C(s)G(s)H(s)]
Correct Answer: A. C(s)G(s)/[1 + C(s)G(s)H(s)]
Question 3
A continuous-time minimal transfer function has poles at −2 ± j3. How should its stability be classified?
A. Unstable because the poles are complex
B. Marginally stable because the poles oscillate
C. Stable because both poles have negative real parts
D. Unstable because the imaginary parts are nonzero
Correct Answer: C. Stable because both poles have negative real parts
Question 4
For the standard second-order denominator s2 + 3s + 4, what is the damping ratio?
A. 0.50
B. 0.75
C. 1.00
D. 1.50
Correct Answer: B. 0.75
Question 5
A tank input I0.2 equals 1 when the high level is reached. Which ladder contact should normally be placed in series with the pump command to stop filling at high level?
A. A normally open I0.2 instruction
B. A seal-in contact for I0.2
C. A negated or normally closed I0.2 instruction
D. No I0.2 instruction
Correct Answer: C. A negated or normally closed I0.2 instruction
Question 6
An ideal 12-bit ADC spans 0–3.3 V. Approximately what voltage corresponds to code 2482 using V = 3.3D/4095?
A. 0.50 V
B. 1.00 V
C. 2.00 V
D. 3.00 V
Correct Answer: C. 2.00 V
Question 7
Which interface is a two-wire addressed bus commonly used for on-board sensors?
A. I²C
B. SPI
C. UART
D. RS-232
Correct Answer: A. I²C
Question 8
What is the main steady-state benefit of integral control in a stable loop?
A. It eliminates constant offset
B. It removes all measurement noise
C. It guarantees stability at every gain
D. It prevents actuator saturation
Correct Answer: A. It eliminates constant offset
Question 9
For an ideally band-limited signal with highest frequency fmax, which sampling condition avoids aliasing in principle?
A. fs < fmax
B. fs = fmax
C. fs > 2fmax
D. fs = fmax/2
Correct Answer: C. fs > 2fmax
Question 10
A constant-area tank has A=0.50 m2, level change Δh=0.50 m, pump inflow 0.0040 m3/s and demand 0.0015 m3/s. What is the expected filling time?
A. 62.5 s
B. 100 s
C. 160 s
D. 250 s
Correct Answer: B. 100 s
Fundamentals of Electrical Engineering
Chapter 14
of 15