Advanced Modeling and Control
Use of digital computers or microcontrollers to manage the behavior of dynamic systems.
Typically includes
Benefits: programmability, flexibility, computational power, improved precision over analog control systems.
Key components
Continuous control systems: signals are processed continuously over time,
Discrete control systems:
Sampling: Converting a continuous signal into a sequence of discrete values at regular intervals.
Quantization: Representing the sampled values in a digital form.
Control Logic: Using algorithms like PID or state-space models to make decisions based on the discrete samples.
Actuation: Producing a control signal that affects the system’s behavior.
Discrete-time counterpart of the Laplace transform
Converts a discrete-time signal (sequence of numbers) into a complex frequency domain representation.
The z-transform of a discrete-time signal x[n] is defined as:
X(z)=n=−∞∑∞x[n]z−n
where:
Function sampled at discrete time step Ts
f(nTs)={f(t)0for n=0,1,2,…otherwise=f(t)
Laplace transform of f(t): F(s)=∫0∞e−stf(t)dt
We can also apply Laplace transform to f(t): F(s)=∫0∞e−stf(t)dt
Since f(t) only exists at sampling instant
F(s)=n=0∑∞f(nT)e−nsT
Defining z=esT
F(s)=n=0∑∞f(nT)e−nsT=n=0∑∞f(nT)z−n=F(z)
Exists only if the summation of infinite terms takes finite values. Depends on sampling period T
z-transform is merely a Laplace transform for a sampled data sequence, as such inherits many of the properties of Laplace transform.
z-transform allows:
z-transform of unit step
Z[Unit Step]=z−1z
z-transform of the discrete cosine signal
Z[cosωt]=z2−2zcosωt+1z2−zcosωt
If ωt=2nπ=nT,
Z[cos(nT)]=z2−2z+1z2−z=z−1z
The values of a unit step function and cosine wave sampled at uniform intervals of period T are the same.
Impossible to distinguish two functions, which have the same samples values at the sampling instants.
Different continuous-time signals can produce the same set of samples if the sampling rate is not appropriately chosen
If two signals sampled at uniform intervals have the same values, they are indistinguishable when only looking at their samples.
Nyquist-Shannon sampling theorem
To avoid aliasing, the sampling rate must be at least twice the highest frequency component of the signal being sampled. Failing to do so can cause the overlap of spectral components, resulting in different signals becoming indistinguishable.
The pulse transfer function relates the discrete-time output y(nT) to the discrete-time control command c(nT) using z-transforms.
The system components consist of the hold element H(s) and the process Gp(s), combined as:
H(s)Gp(s)
The z-transform is applied to obtain the equivalent transfer function in the z-domain: C(z)Y(z)=HGp(z)=Z{H(s)Gp(s)}

Y(z)=Z{F(s)}⋅Z{G(s)}⋅U(z)
Y(z)=F(z)G(z)U(z)

Y(z)=Z{F(s)G(s)}⋅U(z)
Y(z)=FG(z)U(z)
The order of discretization and multiplication matters.
Applying the z-transform separately to each transfer function is generally not equivalent to applying the z-transform to the combined transfer function in the s-domain.
cdc
SYSD = c2d(SYSC,TS,METHOD) computes a discrete-time model SYSD withTS that approximates the continuous-time model SYSC.METHOD selects the discretization method among the following:
zoh - Zero-order hold on the inputsfoh - Linear interpolation of inputsimpulse - Impulse-invariant discretizationtustin - Bilinear (Tustin) approximation.matched - Matched pole-zero method (for SISO systems only).least-squares - Least-squares minimization of the error between frequency responses of the continuous and discrete systems (for SISO systems only).Discrete implementation of the PID control law where the controller output is updated at each sampling time.
At each sampling time the actual value (position) of the output signal is calculated based on the current error and its historical behavior.
The PI controller saves:
PI Control Law
cn=Kc[en+τIT(Sn−1+en)]+cs
PID Controller
cn=Kc[en+τIT(Sn−1+en)+TτD(en−en−1)]+cs
Focuses on calculating the change in the controller output at each sampling time rather than the absolute position (total output).
Instead of directly calculating the full controller output, the velocity form computes the change in output (Δcn) between successive sampling times n and n−1.
At the n-th sampling period cn=Kc[en+τITk=0∑nek+TτD(en−en−1)]+cs
At the (n−1)-th sampling period cn−1=Kc[en−1+τITk=0∑n−1ek+TτD(en−1−en−2)]+cs
The velocity form of the PID controller calculates the difference between cn and cn−1 Δcn=cn−cn−1=Kc([1+τIT+TτD]en−[1+T2τD]en−1+TτDen−2)
| Aspect | Position form | Velocity form |
|---|---|---|
| Simplicity & Intuitiveness | Direct calculation of output; simpler | Calculates change in output; may be |
| to understand and implement | less intuitive initially | |
| Integral Action Handling | Full integral action for precise error | Limited integral effect to prevent |
| elimination | windup | |
| Response to Slow Dynamics | Works well in systems with slow dynamics | More responsive in fast systems |
| Memory & Computational | Suitable if memory isn’t a constraint | More efficient, lower memory |
| Load | requirement | |
| Risk of Windup & Stability | Potential for windup; needs careful | Reduces windup and increases |
| tuning | stability in saturated systems | |
| Control Signal Saturation | Not optimized for saturation | Suitable for limited-range actuators; |
| prevents large jumps |
Digital control enhances flexibility, precision, and easy implementation of algorithms.
Understanding the s-plane to z-plane relationship is key for stable discrete system design.
The sampling period impacts performance; shorter periods improve control but increase computation.
Proper sampling rates prevent aliasing, ensuring accurate discrete-time signal representation.
DDC bridges digital algorithms and continuous processes effectively using hold elements.
Position and velocity PID forms suit different needs based on system dynamics and computational trade-offs.
Advanced Modeling and Control