| Front page | | Contents | | Previous |
Autonomous Weeder for Christmas Trees – Basic Development and Tests
Appendix C: Supervisory logics for safety
The purpose of the supervisory logic is to react to some of the unacceptable faults or conditions in a structure that ensures a proper sequencing of the different functions. The top level of this logic is shown in
Fig. C1.
1.1 Navigation Suitable
The NavigationSuitable block collects the relevant inputs and evaluates whether Navigation mode (or Implement Task mode) is acceptable. The output is an error mask (Navigation Error Mask). If it is zero
then the situation is acceptable for Navigation, otherwise a “bit” is set in the mask to signal, which condition failed. Since the early xPC Target scopes could not print in binary, octal or hexadecimal format,
but only numbers in decimal base, it was chosen to adapt the error mask such that it would look like an error mask printed in octal format (even though it was decimal format).
Click here to see Figure C1
Example:
Looking at the second digit in the mask (the tens) it is seen when looking at the Stateflow chart that 3 conditions influence this (Tab. C1).
Table C1 “Bit” values for the second digit of the NEM (Navigation Error Mask). If the engine is not running there is no point in staying in Navigation mode. If the vehicle is not within the field, then it should
stop immediately. If the actuator for the steering wheels is not operative due to overheating then “steering” is not available to the controller and the vehicle should stop.
Stateflow value |
Digit value (2nd digit left of decimal point) |
Condition |
10 |
1 |
EngineRunning |
20 |
2 |
ValidField |
40 |
4 |
SteerThermal |
Table C2 Break-down into individual “bits” and interpretation, for all valid values of the second digit in the NEM.
Digit seen in number in xPC Target Scope |
Break-down into individual “bits” |
Interpretation (problem or reason not to stay in Navigation mode). |
0 |
0 |
Everything OK |
1 |
1 |
Engine not running |
2 |
2 |
Vehicle outside field. |
3 |
2 + 1 |
Vehicle outside field and engine not running. |
4 |
4 |
Steering unavailable due to overheating. |
5 |
4 + 1 |
Steering unavailable and engine not running |
6 |
4 + 2 |
Steering unavailable and vehicle outside field. |
7 |
4 + 2 + 1 |
Steering unavailable and vehicle outside field and engine not running. |
1.2 The Mode Sequencer
The ModeSequencer block contains the states and it controls which low level controllers are enabled and what their references (objectives) are. Fig. C2 shows a part of the (rather large) “Finite State
Automation” (or state machine) which makes up the ModeSequencer.
Click here to see Figure C2.
When invoked the first time the ModeSequencer initializes the actuator positions.
When prompted by the user it will enter Joystick mode (i.e. gearbox in neutral and brake disengaged), where the steering angle can be controlled from the panel, and the vehicle can be pushed (the rear
wheels will turn with minimal resistance). Then the safety circuit should be energized and the engine started (and throttle set accordingly). After that the cutter unit clutch can be engaged and the vehicle can be
started (i.e. enter Navigation mode).
Depending on configuration the vehicle could also enter JoyStickCutting mode – where the cutter may be engaged (again, configurable), the vehicle moves forward powered by engine, and the steering
wheels are controlled by buttons on the rear panel. This combination were used for test of the cutter unit (i.e. drive the cutter unit into weeds and evaluate the result).
1.3 Geo Fence
One of the safety blocks on the ACW are the ValidField block which prevent the vehicle from driving if it is outside the field or plantation borders defined. The input to this block is the latest GPS position
received. The output is a flag (boolean), stating whether the GPS position is within the field boundary. To ensure that this system works properly the route plan should always be defined within the limits of
the geo fence (unless the fence is used to terminate the operation when the treatment is completed).
The block is configured using a "perimeter" script (which provides the block with 4 positions, which are taken to be vertices of a polygon, which is assumed to be convex). Due to implementation limitations
the vertices must be supplied in counter clockwise order (Fig. C3).

Figure C3 Interpretation of positions supplied to the ValidField-function. The red grid shows the “invalid” positions.
Construction (adaptation) of perimeter script for new plantation:
- Select 4 points which describes a convex area (the plantation or field). List the points in CounterClockWise order.
- Make copy of existing perimeter script. Insert the points from above (step 1) in the matrix in the new "perimeter" script.
- Make the model reference this new script. Close and re-open model.
The route plan should stay within the limits of the geo fence.
| Front page | | Contents | | Previous | | Top |
Version 1.0 November 2005, © Danish Environmental Protection Agency
|