Project 2-Highway Assistant-Lane Changing Assistant
Highway Assistant – Lane Changing Assistant
Introduction to the Feature:
The Highway Assistant supports the driver and takes over the longitudinal and lateral guidance of the vehicle in monotonous driving situations on highways. The partially automated function can automatically start, accelerate, brake as well as steer the vehicle to a certain extent. The driver has to permanently supervise the system and be ready to take over the complete control of the vehicle at any time.
Drivers are taught to assess surrounding traffic before changing lanes by checking their rear view and side mirrors and looking over the shoulder. However, even for those who follow this sequence of checks, the vehicle's blind spot – the area alongside and just behind the vehicle – is a constant source of danger and often the cause of serious accidents. Even vehicles approaching quickly from behind can pose a risk. To make changing lanes safer, this feature has been developed.
Basic Working Principle:
Highway Assistant is a partially automated driving function for a speed range of up to 180 km/h (112 mph) on highways. It combines the radar-based longitudinal guidance of Adaptive Cruise Control (ACC) with the video-based lateral guidance of lane keeping support in one system. Highway Assistant can be supplemented by an automatic lane change initiated and monitored by the driver in a speed range of 60 – 130 km/h (35 – 80 mph).
The lane Change Assistant works by using two mid-range radar sensors that are concealed in the rear bumper – one on the left, one on the right. These two sensors monitor the area alongside and behind the car. Powerful control software collates the sensor information to create a complete picture of all traffic in the area behind the vehicle. Whenever another vehicle approaches at speed from behind or is already present in the blind spot, a signal such as a warning light in the side mirror alerts the driver to the hazard. Should the driver still activate the turn signal with the intention of changing lanes, the system issues an additional acoustic and/or haptic warning.
- The model contains the followings:
Input Signals:
|
Name of the Signal |
Data Type |
Range |
|
Highway_Input_Signal |
uint8 |
0 - 255 |
|
Enable_Display |
uint8 |
0 – 255 |
|
Input_Switch |
uint8 |
0 – 255 |
|
Lane_Input_Signal |
uint8 |
0 - 255 |
Local Signals:
|
Name of the Signal |
Data Type |
Range |
|
Highway_Display_Mode_1 |
uint8 |
0 - 255 |
|
Highway_Display_Mode_2 |
uint8 |
0 – 255 |
|
Highway_Display_Mode_3 |
uint8 |
0 – 255 |
|
Highway_Display_Mode_4 |
uint8 |
0 – 255 |
|
Lane_Display_Mode_1 |
uint8 |
0 – 255 |
|
Lane_Display_Mode_2 |
uint8 |
0 – 255 |
|
Lane_Display_Mode_3 |
uint8 |
0 – 255 |
|
Lane_Display_Mode_4 |
uint8 |
0 – 255 |
Output Signals:
|
Name of the Signal |
Data Type |
Range |
|
Display_Mode_1 |
uint8 |
0 - 255 |
|
Display_Mode_2 |
uint8 |
0 – 255 |
|
Display_Mode_3 |
uint8 |
0 – 255 |
|
Display_Mode_4 |
uint8 |
0 - 255 |
- sldd file was created according to the requirement.

Figure 1: Model Data Dictionary
- Main model was created according to the requirements.

Figure 2: Highway Lane Assistant System
- Requirement No 1 [Highway_DisplayUnit]:
Inputs to this particular subsystem are “Highway_Input_Signal”, “Enable_Display”, “Input_Switch”. These three input signals, when assigned to a particular value will give output signals of specific value. The output signals are “Highway_Display_Mode_1”,“Highway_Display_Mode_2”, “Highway_Display_Mode_3”, “Highway_Display_Mode_4”. The requirement must be implemented in the form of a Stateflow logic.
Condition Action
Highway_Input_Signal = 1 Highway_Display_Mode_1= 232
Enable_Display = OFF Highway_Display_Mode_2= 183
Input_Switch = ON Highway_Display_Mode_3= 41
Highway_Display_Mode_4= 94
Highway_Input_Signal = 1 Highway_Display_Mode_1= 213
Enable_Display = ON Highway_Display_Mode_2= 183
Input_Switch = ON Highway_Display_Mode_3= 9
Highway_Display_Mode_4= 94

Figure 3: Highway Display Unit
Requirement No 2 [Lane_DisplayUnit]:
Inputs to this particular subsystem are “Enable_Display”, “Input_Switch”, “Lane_Input_Signal”. These three input signals, whenassigned to a particular value will give output signals of specific value. The output signals are “Lane_Display_Mode_1”,“Lane_Display_Mode_2”, “Lane_Display_Mode_3”, “Lane_Display_Mode_4”. The requirement must be implemented in the form of Stateflow logic.
Condition Action
Lane_Input_Signal= 6 Lane_Display_Mode_1 = 132
Enable_Display = OFF Lane_Display_Mode_2= 185
Input_Switch = ON Lane_Display_Mode_3= 54
Lane_Display_Mode_2= 67
Lane_Input_Signal= 6 Lane_Display_Mode_1 = 127
Enable_Display = ON Lane_Display_Mode_2= 248
Input_Switch = ON Lane_Display_Mode_3= 186
Lane_Display_Mode_2= 84

Figure 4: Lane Display Unit
Requirement No 3:
- Signals coming from both subsystems “Highway_Display_Mode_1” & “Lane_Display_Mode_1” are given as inputs to a switch block which will have input signal “Highway_Input_Signal” given as 2 input to the switch block. Corresponding output from this particular switch block is output signal “Display_Mode_1”.
- Signals coming from both subsystems “Highway_Display_Mode_2” & “Lane_Display_Mode_2” are given as inputs to a switch blockwhich will have input signal “Highway_Input_Signal” given as 2 input to the switch block. Corresponding output from this particular switch block is output signal “Display_Mode_2”.
- Signals coming from both subsystems “Highway_Display_Mode_3” & “Lane_Display_Mode_3” are given as inputs to a switch blockwhich will have input signal “Highway_Input_Signal” given as 2 input to the switch block. Corresponding output from this particular switch block is output signal “Display_Mode_3”.
- Signals coming from both subsystems “Highway_Display_Mode_4” & “Lane_Display_Mode_4” are given as inputs to a switch block which will have input signal “Highway_Input_Signal” given as 2 input to the switch block. Corresponding output from this particular switch block is output signal “Display_Mode_4”
- The Model advisory report was run according to the maab guidelines, 14 warnings, 0 error were extracted.
Figure 5: Model Advisor
- System target file was set as autosar.tlc

Figure 6: Code Generation Settings
- Serial interfaces were created for all the input signals and output signals.

Figure 7: AUTOSAR Dictionary Serial Interfaces
- Receiver ports were created for all the input signals.

Figure 8: AUTOSAR Dictionary Receiver Ports
- Provider ports were created for all the input signals.

Figure 9: AUTOSAR Dictionary Provider Ports
- Two runnables were created, one for initialization and one for step function.

Function 10: AUTOSAR Dictionary Runnables
- XML options were also filled as follows:
- /SWC_Week11_Question_pkg/DataTypes
- /SWC_Week11_Question_pkg/Interfaces
- /SWC_Week11_Question_pkg/DataTypes/ApplDataTypes
- /SWC_Week11_Question_pkg/DataTypes/SwBaseDataTypes
- /SWC_Week11_Question_pkg/DataTypes/DataTypeMappings
- /SWC_Week11_Question_pkg/DataTypes/constants
- /SWC_Week11_Question_pkg/DataTypes/DataTypeConstrs
- /SWC_Week11_Question_pkg/DataTypes/SystemConstants
- /SWC_Week11_Question_pkg/DataTypes/CompuMethods
- /SWC_Week11_Question_pkg/DataTypes/Units
- /SWC_Week11_Question_pkg/DataTypes/DataConstrs

Figure 11: AUTOSAR Dictionary XML options
- Receiver ports were mapped to the respective inports.

Figure 12: Receiver ports mapping
- Provider ports were mapped to the respective outports.

Figure 13: Provider ports mapping
- Runnables were mapped with the functions.

Figure 14: Runnables mapping