Presentation is loading. Please wait.

Presentation is loading. Please wait.

Systems Design Nursebot

Similar presentations


Presentation on theme: "Systems Design Nursebot"— Presentation transcript:

1 Systems Design Nursebot

2 Introduction In this paper I will take the specifications for Nursebot and develop a system design. You will complete the detailed design, implementation, and testing. The specifications for the design require us to design a system which will navigate a branched-corridor network. The nursebot receives a message to go to one of six destinations. It must negotiate the paths beginning at a fixed point indicated by start and end up at the final destination. Tribot was specified as our basic vehicle architecture.

3 There are two major subsystems to consider: (1) the vehicle subsystem and (2) the control system. As we will see shortly, the control system will be subdivided into modules, which will aim at achieving several tasks required to execute the desired motion from start to final destination.

4 Mechanical System The mechanical system is driven by two control signals applied at Out_A and Out_B. These signals are converted to torque in the motors, which move the position of the vehicle. Where the vehicle moves depends upon the vehicle dynamics. There are external forces acting on the vehicle (we will call them external disturbances) which are not controllable. These include friction forces, backlash in the driving gears and other exogenous variables.

5 Control System There are many ways to develop a design for the control system. I am going to specify it as having three primary subsystems. Each of these subsystems has its own goal. The three subsystems must communicate with each other. Feedback The first subsystem we will consider is embodied in the feedback loop. Two light sensors are mounted on the front of the nursebot. When the robot is centered over the line, the sensors will indicate a higher light level (from the reflecting white surface). If the robot moves to the right, sensor RIGHT_EYE will increase in value (until it reaches a saturation level) while sensor LEFT_EYE will decrease.

6 The two sensors are used to create a control signal
The two sensors are used to create a control signal. The output of the feedback module is a global control variable we might call dir. We need to create a scheme for this variable. One possibility is that dir has four states: The values for dir are completely arbitrary. They are used to communicate to the subsystems that will drive the vehicle.

7 Controlling the Motion
The system, which drives the motors, must have two different strategies. The first controls the motion to follow a path while the second takes over when the vehicle enters an intersection.

8 One very important issue to recognize is that the navigation module and the line_following module cannot both be issuing commands to the motors at the same time. Let’s begin with line_following. This strategy is in effect as long as dir != 2 (for the coding we developed above); that is, if the vehicle is properly straddling the line (dir=0), or if it moves to a position in which the dir variable indicates a corrective turn is required ( dir=-1 or dir=1). The line_following module applies the proper steering signal to the motors during this phase of operation. When dir=2, an intersection is reached. Now, the line following strategy must be stopped, and a new strategy to turn left or right at the intersection must be initiated. The navigate module must access the final destination and, based upon the intersection the vehicle has reached, it should execute either a right or left turn. These turns are different from those used for the line following strategy. Each turn initiated by navigate must turn the vehicle roughly 90 degrees until the line is reacquired, and line following can be restarted.

9 Task Design and Intertask Communications
There are many ways to complete the design of the software control system. It is always convenient in a design to create a system that can be debugged in a stage-wise process. Here is the one you must use. Item D escription glo bal vars dir Updated by task feedback() to indicate control action dest The value of the final destination loc The current intersection tasks main() This task sets the sensors and receives the message indicating the final destination and starts feedback() and line_follow(). feedback() A high - bandwidth continuous monitoring of the optical sensors. Generates the control signal dir. If dir indicates an intersection is reached feedback stops the task line_follow() and starts the task navigate(). l ine_follow() bankwidth continuous monitoring of the control signal dir. From the global variable dir, this task applies signals to control the lateral motion of the vehicle as it moves along the line. navigate() Updates the intersection reached. B ased on the intersection and the desired destination calls functions Turn_L() or Turn_R() to cause the vehicle to turn right or left at the intersection. It restarts line_follow(). Inline functions Turn_L() Exectes a 90 degree left turn at an intersection Iurn_R() Exectes a 90 degree right turn at an intersection

10 Implementation As you complete the design, you will want to implement it in a stage-wise process. In this way you can make sure that each software module you add is working properly. Here is one strategy: Write task main(). First time thru don’t worry about messaging the destination. Before task main() make sure that you initialize all global variables. Write the task feedback. While this will eventually start and stop other tasks, for the time being simply get the sensors working and make sure that the variable dir is being set properly. Do not hook up any motors yet; Use PlaySound() or PlayTone() to indicate the value of dir. Move the vehicle around and see if dir is being set to turn left, right, go straight, stop. Debug this module. Now that you are certain that the sensors and feedback task are working right, develop task line_follow(). Update task feedback() so that it will stop line_follow() and turn off the motors when it reaches the first intersection.

11 Now you are ready to see if you can develop the higher control strategy embedded in task navigate(). Use a one intersection model to make sure that you can turn your robot left or right at that intersection. This will require you to write the functions Turn_R() and Turn_L(). Implement and debug these. Now you are ready to add to task navigate() so that you can pass through several intersections. Your final destination should still be simply defined as you initialize your global variable dest. If you can change the value of that global variable in your program and successfully navigate to the destination, you are ready to add the final component to your system. Set dest=0 when you define the global variable. Go back to task main(). Have task main() enter a loop in which it is waiting for a message for the destination. It should stay in that loop until the current value in the message buffer is not zero. The performance specification requires that your robot confirm its destination using tone signaling. Now feedback() and line_follow() are started.


Download ppt "Systems Design Nursebot"

Similar presentations


Ads by Google