Parallax Boe-Bot Student Manual page 293

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

Output adjust
Right servo output
By making some substitutions, the three equations above can be reduced to this one,
which will give you the same result.
Right servo output
By substituting the values from the example, we can see that the equation still works:
The left servo and IR pair have a similar algorithm shown in Figure 8-5. The difference
is that Kp is –35 instead of +35. Assuming the same measured value at the right IR pair,
the output adjust results is a pulse width of 820. Here is the equation and calculations for
this block diagram:
Left servo output
The result of this control loop is a pulse width that makes the left servo turn about ¾ of
full speed counterclockwise. This is also a forward pulse for the left wheel. The idea of
feedback is that the system's output is re-sampled, by the shadow Boe-Bot taking another
distance measurement.
again...roughly 40 times per second.
Chapter 8: Robot Control with Distance Detection · Page 279
=
2 – 4
×
=
error
K
p
×
=
–2
35
=
– 70
=
Output adjust + Center pulse width
=
– 70 + 750
=
680
=
(Right distance set point – Measured right distance)
+ Center pulse width
×
=
((2 – 4)
35) + 750
=
680
=
(Left distance set point – Measured left distance)
+ Center pulse width
×
=
((2 – 4)
–35) + 750
=
820
Then the control loop repeats itself again and again and
×
Kp
×
Kp

Advertisement

Table of Contents
loading

Table of Contents