Challenge

Project 2-Highway Assistant-Lane Changing Assistant

Highway Assistant – Lane Changing Assistant

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.


Objectives:

  • Development of model in MATLAB-Simulink per MBD guidelines.
  • Code Generation Profile in Autosar Coder.
  • To create Simulink Data Dictionary for the model & link it to the model.
  • To map all the input & output signals into the Autosar Editor.
  • To generate Model Advisor Report & followed by Code Generation.

Steps:

  • Simulink Model: Consist of four inputs and four outputs as shown below:

  • Highway_Assistant subsytem consist of three subsytems as per requirement document.

  • 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

    Enable_Display = off

    Input_Switch = on

    Highway_Display_Mode_1 = 232

    Highway_Display_Mode_2 = 183

    Highway_Display_Mode_3 = 41

    Highway_Display_Mode_4 = 94

    Highway_Input_Signal = 1

    Enable_Display = on

    Input_Switch = on

    Highway_Display_Mode_1 = 213

    Highway_Display_Mode_2 = 183

    Highway_Display_Mode_3 = 9

    Highway_Display_Mode_4 = 94

  • Requirement_1 consist of chart(Highway_Display_Unit):

  • Logic of Requirement-01:

  • Requirement No 2 [Lane_DisplayUnit]:

    Inputs to this particular subsystem are “Enable_Display”, “Input_Switch”, “Lane_Input_Signal”. These three input signals, when assigned 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

    Enable_Display = off

    Input_Switch = on

    Lane_Display_Mode_1 = 132

    Lane_Display_Mode_2 = 185

    Lane_Display_Mode_3 = 54

    Lane_Display_Mode_4 = 67

    Lane_Input_Signal= 6

    Enable_Display = on

    Input_Switch = on

    Lane_Display_Mode_1 = 127

    Lane_Display_Mode_2 = 248

    Lane_Display_Mode_3 = 186

    Lane_Display_Mode_4 = 84

  • Requirement_2 consist of chart(Lane_Display_Unit):

  • Logic of Requirement-02:

  • 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 2nd 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 block which will have input signal “Highway_Input_Signal” given as 2nd 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 block which will have input signal “Highway_Input_Signal” given as 2nd 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 2nd input to the switch block. Corresponding output from this particular switch block is output signal “Display_Mode_4”.

Simulink Data Dictionary (SLDD):

  • As per requirement, all signals are defined in Simulink Data Dictionary (SLDD).
  • Storage class is Auto for all signals.

Requirement Tagging:

  • Select the Requirement name from the word file as shown below:

  • Right click on the 'Requirement_01' subsytem and goto 'Requirements>> Link to Selection in Word'.

  • To check tagged requirement:

Model Settings:

  • Solver: Fixed-step discrete solver.

  • Code generation: Selected the system file as autosar.tlc which is AUTOSAR.

For Code Generation:

  • At bottom, Enter into perspective:

  • Goto AUTOSAR Dictionary, by clicking on this icon:

  • Goto XML options and provide the path of packages as shown below:

  • Goto SR interfaceface, gave the name as shown below:

  • Expand SR interface and goto Data Elements- gave names as shown below for each input and output:

  • Goto Runnables and add event (InitEvent) for the first time model run.

  • Goto SenderPorts and name them as shown below

  • Goto ReceiverPorts and name them as shown below:

  • At bottom, goto to inports to trace them as shown below:

  • To trace outports:

  • click on green tick to validate code mappings:

  • Validation succeeded displayed on screen:

  • To generate code, goto autosar section and click on generate code:

  • Model files, Utility files, Interface files and RTE files will generate as shown below:

  • Highway_Assistant.c

  • To Trace model from generated code, click on variables as shown below:

Model Advisor Report:

  • To generate Model Advisor Report; goto modelling, click on Model Advisor and select MAB guidlines:

  • Model Advisor Report according to MAAB guidlines:

Conclusion:

  • Simulink modelling, Requirement Tagging, Autosar Code Generation, SLDD and Model advisor Report all the processes of MBD are performed.
  • In Model advisor Report, 124 tests are passed with 20 warnings according to MAAB guidelines
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.