An Example in Smart-AHS: Circular Highway
A circular highway of four sections, and 4 x 3 = 12 segments is created
as described in Figure 1 is given in file cemdemo2.hs.
There are three lanes in each segment/section.
The letters 'LL', 'RL', 'RU', and 'LU' describe respectively the lower left, lower right,
upper right, and upper left sections of the highway. Values 'lw' and 'sl' are the width of
the lanes, and length of the section. See file 'cemdemo2.hs'
for details.

Figure 1. The circular highway.
A massless vehicle/object is used to check the definitions in the highway description file
defined above. The object controller uses the value 'lyp' (lane position) as input to
evaluate the position error, and detemines the necessary steering (or rotation) to track
the center of the lane. A PI controller is used, and therefore, there will a steady state
error while tracking the curves. (Also, the P and I gains can be adjusted to obtain a
better response.) The details can be found in file 'ufo.hs'.
NOTE: This simulation also requires the Smart-AHS files 'highway'hs', and
'vrep.hs'.
Figure 2 below shows the result of a simulation run
for the first vehicle in the middle lane (See file cemdemo2.hs
for details). The numbers indicate the transitions taken during the simulation run; Table 1 shows the corresponding section/segment/lane changes.
Note that the phase plot given in Figure 2 has positive y-axis
pointing upwards, therfore resulting in a trajectory in clockwise direction. However, the
actual trajectory is in the counter clockwise direction due to the definition of the global axis.

Figure 2.The result of the simulation run: the trajectory of the first vehicle in
the middle lane.
Table 1. Transitions in Figure 2.
| # | Transition | Section | Segment | Lane | |
| 0 | 2 | 1 | |||
| 1 | [112 3]: cruise -> cruise {updateSection} | ||||
| 1 | 3 | 4 | |||
| 2 | [312 6]: cruise -> cruise {updateSegment} | ||||
| 1 | 4 | 4 | |||
| 3 | [617 9]: cruise -> cruise {updateSegment} | ||||
| 1 | 5 | 4 | |||
| 4 | [817 12]: cruise -> cruise {updateSection} | ||||
| 2 | 6 | 7 | |||
| 5 | [1017 15]: cruise -> cruise {updateSegment} | ||||
| 2 | 7 | 7 | |||
| 6 | [1322 18]: cruise -> cruise {updateSegment} | ||||
| 2 | 8 | 7 | |||
| 7 | [1522 21]: cruise -> cruise {updateSection} | ||||
| 3 | 9 | 10 | |||
| 8 | [1722 24]: cruise -> cruise {updateSegment} | ||||
| 3 | 10 | 7 | |||
| 9 | [2027 27]: cruise -> cruise {updateSegment} | ||||
| 3 | 11 | 7 | |||
| 10 | [2227 30]: cruise -> cruise {updateSection} | ||||
| 0 | 0 | 1 | |||
| 11 | [2427 33]: cruise -> cruise {updateSegment} | ||||
| 0 | 1 | 1 | |||

Figure 3.TkShift animation window (zoomed in) for the simulation.
Back to California PATH Smart-AHS page
Back to Sensors and HDM page
Cem Ünsal