Figure B-13 Proportional Integrator Differentiator Algorithm - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

B.1.15
Proportional Integrator Differentiator (PID) Algorithm
The proportional integrator differentiator (PID) algorithm is the most commonly used algorithm in control
applications. Figure B-13 gives a graphical overview and memory map of this implementation of a
proportional integrator differentiator.
x(n)
T
x(n-1)
T
x(n-2)
Figure B-13. Proportional Integrator Differentiator Algorithm
;
y(n) = y(n-1) + k0 x(n) + k1 x(n-1) + k2 x(n-2)
opt
cc
move
#s+2,r0
move
#2,m0
move
#k,r3
move
move
mac
x0,y0,b
mac
y0,x0,b
movep
macr
y0,x0,b
move
movep
;
;
k0
k1
k2
y(n)=y(n-1) + k0 x(n) + k1 x(n-1) + k2 x(n-2)
x:(r0)+,b
x:(r0)+,y0
x:(r3)+,y0
x:(r0)+,y0
x:(r3)+,y0
x:(r3)+,x0
x:input,b
b,x:(r0)
b,x:output
Total:
DSP Benchmarks
y(n)
T
;
; r0 mod 3
;
; 1
1 get y(n-1)
; 1
1 get x(n-2),k2
; 1
1 get x(n-1),k1
; 1
1 get k0
; 1
1 get x(n)
; 1
1
; 1
1 save y(n)
; 1
1 y(n) in b
_________
8
8
X memory
r3
k0
k1
k2
x(n-1)
x(n-2)
r0
x(n)
AA0091
B-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents