Digital Control System 7 (Controller Realization)
Digital Control System 7 (Controller Realization)
(CONTROLLER REALIZATION)
[Link]. Satit mangkalajan ([Link].)
CONTROLLER REALIZATION
A control algorithm which takes the form of a z-transform polynomial must be realized in the
computer in the form of a program containing unit delays, constant multipliers, and adders. A given
controller transfer function can be realized in many different ways. Mathematically the alternative
realizations are all equivalent, differing only in the way they are implemented. Different realizations
have different computational efficiencies, different sensitivities to parameter errors, and different
programming efforts are needed in each case. Only some of the important realizations, such as the
direct structure, cascaded structure and parallel structure, as well as the second-order structures, are
described in this chapter.
➢ Direct structure
➢ Cascaded structure
➢ Parallel structure
Digital Control System 2/2567
Next Slide
DIRECT STRUCTURE
The transfer function D(z) of a digital controller can be represented in general by a ratio of two
polynomials
n
U ( z)
a z j
−j
D( z ) = = j =0
n
(1)
1 + bj z− j
E( z)
j =1
In direct structure the coefficients aj and bj appear as multipliers. There are several forms of direct
structure, and we shall look at two of the most popular ones: the direct canonical structure and the
direct noncanonical structure.
U ( z)
a z j
−j
U ( z ) R( z )
a z j
−j
where U ( z) n
= a j z− j (4)
R ( z ) j =0
E( z) n
and = bj z− j (5)
R ( z ) j =0
Equations (8) and (9) define the direct form, and the block diagram of the implementation is shown
in Figure 1. The controller is made up of delays, adders and multipliers.
n
uk = a j rk − j
n j =0
rk = ek − b j rk − j
j =1
❖ Key Feature: Uses the fewest number of memory elements (delay registers).
❖ Example: Direct Form II is a canonical structure because it reduces redundant delays.
❖ Advantage: Saves memory, making it efficient for microcontrollers and DSPs.
❖ Disadvantage: More sensitive to numerical precision errors in fixed-point implementations.
Solution
With reference to (8), (9) and Figure 1, we can
draw the required block diagram as in Figure 2.
U ( z)
a z j
−j
b z
E( z) −j
j
j =0
n n
Cross multiplying and rewriting this equation we obtain U ( z ) b j z −j
= E ( z ) a j z − j (10)
j =0 j =0
n n
or, since b 0 = 1, U ( z ) = a j z E ( z ) − b j z − jU ( z )
−j
(11)
j =0 j =1
Writing (11) in the time domain, we obtain the noncanonical form of the direct realization
n n
uk = a j ek − j − b j uk − j
j =0 j =1 (12)
Digital Control System 2/2567
Next Slide
DIRECT NONCANONICAL STRUCTURE (DIRECT FORM I)
n
U ( z)
a z j
−j
b z
E( z) −j
j
j =0
n n
Cross multiplying and rewriting this equation we obtain U ( z ) b j z −j
= E ( z ) a j z − j (10)
j =0 j =0
n n
or, since b 0 = 1, U ( z ) = a j z E ( z ) − b j z − jU ( z )
−j
(11)
j =0 j =1
Writing (11) in the time domain, we obtain the noncanonical form of the direct realization
n n
uk = a j ek − j − b j uk − j (12)
j =0 j =1
n n
uk = a j ek − j − b j uk − j
j =0 j =1
Solution
With reference to (12) and Figure 3, we can
draw the required block diagram as in Figure 4.
➢ Use canonical form (Direct Form II) when memory efficiency is a priority (e.g., Arduino DUE,
DSP, or real-time systems).
➢ Use non-canonical form (Direct Form I) when numerical stability is more important (e.g.,
floating-point processors).
Digital Control System 2/2567
Next Slide
CASCADE REALIZATION
The cascade realization is less sensitive to coefficient sensitivity problems. In this method the
transfer function is implemented as a product of first-order and second-order transfer functions.
Thus, the controller transfer function is written as
m
D ( z ) = P ( z ) Qi ( z ) For n odd (13)
i =1
and m
D ( z ) = Qi ( z ) For n even (14)
i =1
where m is the smallest integer greater than or equal to n/2. P(z) in (13) is the first-order transfer
function
1 + z −1
P( z ) = (15)
1+ z−1
a0 + a1 z −1 + a2 z −2 b1 = −1 b2 = 0
(32)
1 + b1 z −1 + b2 z −2
U ( z ) a + bz −1 + cz −2
or D( z ) = = (35)
E( z) 1 − z −1
Equation (35) can easily be implemented using a direct realization. Notice that if only proportional
plus integral (PI) action is required, the derivative constant Td can be set to zero and we get the PI
equation D( z ) =
U ( z ) a + bz −1
= (36)
E( z) 1 − z −1
K pT
where a = Kp +
Ti
b = Kp
second-order module #1
second-order module #2
1 + sT2
05/03/68
Digital Control System 2/2567
FIR DIRECT FORM – FINITE IMPULSE RESPONSE FILTER
M
y[ n ]
A general FIR filter is represented by the convolution sum: H ( z ) = = b[k ]z − k
where: x[n] k =0
y[z] = Output signal, x[z] = Input signal, b[k] = Filter coefficients, M = Order of the FIR filter
In Direct Form, the output is computed by directly applying the filter coefficients to the delayed input
samples. Basic FIR Direct Form Structure: y[n] = b0 x[n] + b1 x[n − 1] + b2 x[n − 2] + + bM x[n − M ]
Uses Delay Elements (z−1) to store past input values.
Each stored input is multiplied by a corresponding coefficient h[k].
The results are summed to produce the output y[n].
05/03/68
Digital Control System 2/2567
IIR DIRECT FORM – INFINITE IMPULSE RESPONSE FILTER
An IIR (Infinite Impulse Response) filter has both feedforward (FIR-like) and feedback components.
The general equation is:
M N
y[n] = b[k ]x[n − k ] − a[ j ] y[n − j ]
k =0 j =1
where:
•y[n] = Output signal
•x[n] = Input signal
•b[k] = Feedforward coefficients (numerator)
•a[j] = Feedback coefficients (denominator)
•M = Order of the feedforward section
•N = Order of the feedback section
05/03/68
Digital Control System 2/2567
Question & Answer
Digital Control System 2/2567
Thank You
Digital Control System 2/2567