Verify that EST_SPEED <
OBS_SPEED and value of KMC is 255. If this is not the case, please restart the
tuning process.
Let START = 1 and END = 255.
Set KMC to START and obtain the
value of OBS_SPEED in rad/s from step 1 of the KMC_SCALE tuning
procedure.
If EST_SPEED is within OBS_SPEED ± W_SCALE value
from Table 7-16, stop the tuning process and record the value of KMC. For
example, if W_SCALE = 10b (corresponds to 64 rad/s),
OBS_SPEED = 6000 rad/s, and EST_SPEED = 5952 rad/s or 6016
rad/s, stop the tuning process.
Let MID = (START+END)/2, rounded
off to the nearest integer.
If EST_SPEED is higher than
OBS_SPEED in this step, set KMC to MID. If EST_SPEED is lower than OBS_SPEED in
this step, decrement KMC_SCALE by one bit and repeat the binary search procedure
to tune KMC.
If EST_SPEED is higher than
OBS_SPEED, update START = MID. If EST_SPEED is lower than OBS_SPEED, update END
= MID.
Repeat steps 4-7 until EST_SPEED
is within OBS_SPEED ± W_SCALE value from Table 7-16. Record the value of KMC.
Figure 9-4 Binary Search
Algorithm to Find KMC
Note:
Tuning is not possible in
the following cases:
EST_SPEED is
higher than OBS_SPEED after step 4 in the KMC_SCALE tuning
process (KMC_SCALE = 00b; KMC = 255), or
EST_SPEED is
lower than OBS_SPEED after step 3 in the Binary Search Method
for KMC (KMC_SCALE = 11b, KMC = 0).
Multiple sets of KMC and
KMC_SCALE exist. If found, then choose the set with highest bit
resolution.