User's Manual

PMAC User Manual
Closing the Servo Loop 109
Automatic Notch Specification
With the PMAC Executive Program, set up a notch filter (this can be done without the need to understand
how a notch filter works). The easiest way is to enter the frequency of the mechanical resonance that to
control. The Executive Program will compute automatically the desired characteristics of the band-reject
and band-pass filters, calculate their coefficients, and download them to PMAC. Alternatively, the
desired characteristics of the band-reject and band-pass filters can be specified individually, and PMAC
will compute the coefficients to achieve those characteristics and download them to PMAC. Refer to the
Pewin Software User Manual for more details.
Manual Notch Specification
To compute the notch filter coefficients manually, consider the continuous transfer function for a notch
filter:
()
2
npnpp
2
2
s
2
nznzz
2
2
s
sG
ωωζ
ωωζ
++
++
=
Start with five parameters for the filter:
ω
nz
: the natural frequency of the zeroes in radians/second (not in Hertz)
ζ
z
: the damping ratio of the zeroes
ω
np
: the natural frequency of the poles in radians/second (not in Hertz)
ζ
p
: the damping ratio of the poles
T
s
: the servo-loop sampling period in seconds (not in msec)
To compute radians/second from Hertz, multiply by 2π (6.283). To compute the sampling period in
seconds from the sampling rate in kHz, first multiply the rate by 1000 to get Hz, and then take the
reciprocal. Remember that the sampling period is equal to (Ix60+1) times the servo-interrupt period.
First, compute the following intermediate values:
2
s
T
2
nps
T
npp
21
p
2
s
T
2
nzs
T
nzz
21
z
ωωζα
ωωζα
++=
++=
Then compute the filter coefficients:
(
)
z
2
s
T
nzz
2
36Ix
α
ωζ
+
=
z
1
37Ix
α
=
(
)
p
2
s
T
npp
2
38Ix
α
ωζ
+
=
p
1
39Ix
α
=
Finally, modify the proportional-gain term to compensate for the DC-gain change that the filter creates:
p
z
2
nz
2
np
old
30Ix
new
30Ix
α
α
ω
ω
=