Page 197 - Anatomy of a Robot
P. 197

07_200256_CH07/Bergren  4/10/03  3:30 PM  Page 182
                             182 CHAPTER SEVEN
                                 the system is under attack, it should move to a safe configuration and shift its con-
                                 trol strategies. The robot should report the intrusion once it’s detected, and then
                                 secure the robot’s energy supply against unwarranted use. Energy can be con-
                                 served while proper communications are restored.
                                 Power thrashing  Given that the energy supply is of critical importance in many
                                 mobile robots, it makes sense to observe the power drain carefully. If the energy
                                 is being drained away too quickly, it makes sense to shut down activities until the
                                 cause can be determined. The robot may be thrashing about, malfunctioning, or
                                 just executing a badly designed algorithm. It’s a smart robot that will give itself a
                                 timeout.



                             POWER FAILURES
                             One technique that is all but lost in today’s complex world of computer software is the
                             use of power failure detection. It is possible to build a power supply with an output sig-
                             nal called Power Failure Detect (PFD) that will warn of the impending cessation of
                             input power. During a power failure, the PFD signal can go low a few milliseconds in
                             advance of the time when the regulated power will fail to meet specifications. The
                             processor will be interrupted and can do all the housekeeping necessary to survive the
                             event. If the robot is designed from the start to take advantage of this, then it is possi-
                             ble for the robot to pick up right where it left off. To plan on using this capability, we
                             must solve all the following problems:
                                 The power supply must generate the PFD signal reliably. Most power supplies do
                                 not have this feature.
                                 The OS software must facilitate the implementation and use of the PFD signal.
                                 The truth is, most OS software will simply get in the way of successfully imple-
                                 menting PFD software. Most large OS software products have so many holes and
                                 gaps that success is problematic.
                                 The robot’s computer must have sufficient nonvolatile memory to put away all the
                                 volatile data that will be lost during the power failure. Flash memory, battery-
                                 backed Random Access Memory (RAM), and disks are all good places to put the
                                 data. Once a PFD is signaled, however, we must be very careful to finish all oper-
                                 ations before the power fails completely.
                                 All the robot’s states must be put away to accomplish a complete PFD recovery.
                                 These states include both the digital states that we have been talking about and
                                 mechanical states. The robot, after all, may be moving when the power fails. It is
                                 likely that the movement will be disturbed by a power failure unless the power fail-
                                 ure is very short. Consider the case where the robot is moving its arm to the right.
   192   193   194   195   196   197   198   199   200   201   202