Digital Control, Sampling, and the z-Transform
Digital controllers place a computer in the loop. Nise's final chapter shows how continuous signals, sampled data, zero-order holds, and pulse transfer functions let classical control ideas move from the -plane to the -plane. The practical motivation is strong: software can implement compensators, schedule multiple loops, change parameters, and integrate diagnostics more flexibly than fixed analog hardware.
Sampling also adds new design constraints. The controller sees signals only at sampling instants, the hold reconstructs an actuator command between samples, and computational delay can reduce phase margin. Digital control is not just analog control typed into a processor; it is a sampled-data system with its own transform and stability geometry.
Definitions
The one-sided z-transform of a sequence is
If a continuous signal is sampled with period , then
A sampler converts a continuous signal into a sequence. A zero-order hold holds each digital output value constant over one sampling interval. Its continuous transfer function is
when represented as a hold operation preceding a continuous plant in sampled-data derivations.
The mapping between continuous and discrete poles under exact sampling is
Thus maps to , the left half-plane maps inside the unit circle, and the imaginary axis maps onto the unit circle.
A discrete transfer function has the form
The discrete system is stable when all poles lie inside the unit circle:
Key results
The -plane and -plane correspond as follows:
| Continuous-time feature | Discrete-time counterpart |
|---|---|
| Laplace transform | z-transform |
| -plane imaginary-axis stability boundary | unit circle |
| stable LHP pole | pole inside unit circle |
| integrator pole at | pole at |
| mapping | sampled pole location |
| Routh-Hurwitz style test | Jury test or direct root check |
The z-transform turns difference equations into algebraic equations. For example, if
then
so
Digital steady-state error parallels analog steady-state error. Poles at play the role of integrators. A discrete Type 1 loop has one pole at in the forward pulse transfer function and can track a step with zero error under the usual stability assumptions.
Sampling period matters. Very slow sampling can distort transient response, reduce stability margin, and create aliasing. Very fast sampling improves approximation to continuous control but increases computation, noise sensitivity, and hardware demands. A common engineering starting point is to sample many times faster than the desired closed-loop bandwidth, then verify with the actual implementation.
The zero-order hold is not a minor implementation detail. It makes the actuator command piecewise constant, which introduces effective delay and changes the plant seen by the digital controller. A continuous plant discretized with zero-order hold generally has a different pulse transfer function from one obtained by merely replacing with a finite-difference expression. For accurate sampled-data design, the hold and sampling assumptions should match the real hardware.
Aliasing is another sampling constraint. If unfiltered measurement noise or plant vibration exists above half the sampling frequency, it can appear as a lower-frequency signal in the sampled data. The controller may then react to a false signal. Anti-alias filtering and a sampling rate chosen with sensor bandwidth in mind are part of control design, not just data-acquisition housekeeping.
Quantization affects both measurement and actuation. An ADC maps a continuous voltage into finite counts, and a PWM or DAC maps the computed command into finite output resolution. Quantization can create limit cycles, especially when the plant has friction or the controller has integral action. Linear analysis usually ignores quantization, so embedded implementations need simulation or testing with realistic numeric limits.
Computational delay is often modeled as one or more factors of . Even if the sampling period is fixed, the controller may read sensors, compute the law, and update actuators later in the cycle. That delay adds phase lag and can reduce stability margin. Real-time scheduling and interrupt jitter therefore have direct control consequences.
Digital control preserves many classical ideas but changes their geometry. Stable continuous poles lie in the left half-plane; stable discrete poles lie inside the unit circle. Continuous integrators sit at ; digital integrators sit at . Continuous oscillation frequency maps to angle around the unit circle. Keeping these translations visible prevents most early mistakes in sampled-data analysis.
The inverse z-transform also differs in flavor from inverse Laplace work. Long division of by powers of immediately produces the output samples . Partial fractions can produce a closed-form expression for . In control design, the sample sequence is often more useful than a continuous-looking formula because the controller only updates at those instants.
Discrete transfer functions depend on where sampling occurs. Cascading two continuous subsystems and then sampling the final output is not generally equivalent to multiplying two separately sampled pulse transfer functions unless a sampler and hold separate the subsystems in the required way. This is a major sampled-data modeling issue. Block-diagram reduction in the -domain is valid only when the signals between blocks are discrete sequences at the same sampling instants.
Sampling also affects what "overshoot" means. The true continuous output between samples may peak higher than the sampled values show, especially with a slow sampling period or lightly damped plant. A digital simulation that plots only sample points can therefore underreport intersample overshoot. For physical plants, check the continuous response reconstructed through the zero-order hold and plant dynamics, not only the discrete sequence.
Finally, the sampling period is part of the controller design. Changing moves every mapped pole and changes the discrete equivalent of the plant. A controller tuned for s is not the same controller at s, even if the difference equation looks similar. Timing must be treated as a specified design parameter.
The discrete model should also state whether signals are indexed before or after the control update. Some texts use as the command computed from and held immediately; real processors may apply that value one sample later. A single indexing convention prevents hidden delays.
That convention should match the firmware timing diagram and test logs.
Otherwise analysis and implementation silently diverge.
Record it explicitly.
Then test it.
Visual
z-plane stability
Im
^
.---|---.
.' | '.
/ | \
| +-------> Re
\ /
'. .'
'-----'
stable poles are inside the unit circle
| Digital block | Role | Main modeling issue |
|---|---|---|
| A/D converter | samples measured output | quantization and sampling rate |
| digital computer | computes control law | delay and finite word length |
| D/A converter | outputs command value | quantization |
| zero-order hold | holds command between samples | hold-induced phase lag |
| continuous plant | physical process | must be discretized or modeled with hold |
Worked example 1: mapping continuous poles to the z-plane
Problem: Continuous closed-loop poles are
With sampling period s, find the corresponding -plane poles.
Method:
- Use
- Substitute:
- Magnitude:
- Rectangular form:
- Evaluate:
Therefore
Checked answer: the poles are approximately , inside the unit circle.
Worked example 2: z-transform of a difference equation
Problem: Find the transfer function for
Method:
- Move all output terms to the left:
- Apply the z-transform with zero initial conditions:
- Factor:
- Divide:
- Multiply numerator and denominator by :
Checked answer: with a stable pole at .
Code
import numpy as np
from scipy import signal
T = 0.1
s_poles = np.array([-2 + 3j, -2 - 3j])
z_poles = np.exp(s_poles * T)
print("mapped z poles:", z_poles)
print("magnitudes:", np.abs(z_poles))
# Discrete transfer function G(z) = (2z - 1)/(z - 0.6)
num = [2.0, -1.0]
den = [1.0, -0.6]
system = signal.dlti(num, den, dt=T)
t, y = signal.dstep(system, n=20)
print("first step samples:", np.squeeze(y)[:8])
Common pitfalls
- Checking digital stability with left-half-plane rules instead of the unit circle.
- Forgetting that maps to , not .
- Ignoring computational delay. One sample of delay can meaningfully reduce phase margin.
- Choosing sampling period without reference to bandwidth and transient requirements.
- Confusing notation with polynomial notation.
- Assuming a discrete simulation exactly represents intersample continuous behavior.
Connections
- Digital compensator implementation continues into gain design and software realization.
- Laplace transfer functions are the continuous-domain counterpart.
- Frequency-response design motivates sampling-rate and delay checks.
- Embedded systems covers the hardware context for real digital controllers.
- Signals and systems includes sampling and transform theory.