Challenge

Project 1- Traffic Jam Assistant Feature

1.

Aim: - Development of a single feature of Traffic Jam Model using MATLAB & Simulink.

Objective: -

To develop one specific requirement of Traffic Jam Assistant algorithm which would predominantly feature in the IPC algorithm (It is worth noting that the whole Traffic Jam Assistant is a very huge algorithm and only one small part of the logic is implemented here. The basic idea is to get familiarized with concepts of Model Based Development in MATLAB Environment. )

  • This model is being developed in MATLAB Simulink as per MBD guidelines.
  • Code Generation Profile is in Embedded Coder.
  • Simulink Data Dictionary is created for the model and linked to the same.
  • Model Advisor Report is mandatory and this is followed by Code Generation.

Traffic Jam Assistant Feature

Introduction to the Feature:

Traffic Jam Assistant is one of the most common features in Advanced Driver Assistance System. Traffic Jam Assistant helps the driver to reach in more relaxed condition at the destination, even in case of dense traffic or in traffic jams. As a partially automated comfort function, the system takes over the longitudinal & lateral guidance of the vehicle. This means that the car can drive off, accelerate as well as brake automatically while steer the vehicle within certain constraints. The driver has to permanently supervise the system & be ready to take over the complete control of the vehicle at any time.

Traffic Jam Assistant system helps to avoid rear end collisions in dense traffic conditions & traffic jams. In traffic jams, the vehicle takes over control of the vehicle enabling driving of the same, accelerating, braking and steering within the same lane.

Basic Working Principle:

Traffic Jam Assistant is based on the sensors and the functionality of the Adaptive Cruise Control (ACC) with stop & go and Lane Keeping Support (LKS). When ACC ‘Stop & Go’ is turned ON, the Traffic Jam Assistant continuously analyses the speed of the surrounding vehicles and compares it with the own driving speed. If the system detects dense traffic or a traffic jam at speeds less than 60 kmph, the driver can activate the functionality by pressing of a button. The vehicle will now automatically follow the vehicle in front, takes over control including driving off, acceleration, braking and steering within the same lane.

Information regarding the Traffic Jam Assistant will be available to be displayed to the driver in the Instrument Panel Cluster (IPC). The Algorithm which will be implemented here in this project is predominantly based on IPC units.

Given Data: -

Input Signals: -

Name of the Signal

Data Type

Range

Input_Voltage

uint8

0 - 255

Input_Switch

boolean

0 – 1

Enable_Display

uint8

0 - 255

Output Signal:

Name of the Signal

Data Type

Range

Output_Display

uint8

0 - 255

Calibration Signals:

Name of the Signal

Data Type

Range

Initial Value

VOLTAGE_MINIMUM_RANGE

uint8

0 – 255

30

VOLTAGE_MAXIMUM_RANGE

uint8

0 – 255

50

OFF_MODE

uint8

0 – 255

2

ON_MODE

uint8

0 – 255

1

STANDBY_MODE

uint8

0 – 255

3

INTERRUPT_1

boolean

0 – 1

1

INTERRUPT_2

boolean

0 - 1

1

NO_DISPLAY

uint8

0 – 255

0

Local Signal:

Name of the Signal

Data Type

Range

Optimum_Voltage

boolean

0 - 1

Requirement No 1:

  • Input Signal “Input_Voltage” is compared against voltage values “VOLTAGE_MINIMUM_RANGE” & “VOLTAGE_MAXIMUM_RANGE”.
  • Incoming input signal “Input_Voltage” must be greater than – equal to “VOLTAGE_MINIMUM_RANGE” and less than – equal to “VOLTAGE_MAXIMUM_RANGE”.
  • Output signal from here is “Optimum_Voltage” which will be one of the inputs to the subsystem “DisplayUnit''.
  • Requirement No 2 (Display Unit Subsystem):
    • Input Signals are “Optimum_Voltage”, “Input_Switch”,“Enable_Display”. Signal “Enable_Display” must be saturated between the range 0 – 7. Output signal from the subsystem is “Output_Display”.
    • Input Signal “Enable_Display” is compared against pre – defined set of values in a multiport switch. Total data ports in the multiport switch is 5.
    • Multiport switch inputs 1 & 2 is connected to calibration signal “ON_MODE”, Multiport switch inputs 3 & 4 is connected to calibration signal “OFF_MODE” while Multiport switch input 5 is connected to calibration signal “STANDBY_MODE”.
    • The output from Multiport switch is connected to the first input port of the Switch block. The third input port of the Switch block is connected to the calibration signal “NO_DISPLAY”.
    • Meanwhile NOT value of input signal “Input_Switch” is compared in an AND gate against input signal “Optimum_Voltage” and the output from comparing if calibration signals “INTERRUPT_1” & “INTERRUPT_2” are equal. The output of the AND gate is the second input of the switch block.
    • The output from the switch block is “Output_Display”.
    • Discription: -

      Traffic Jam model was created in MATLAB Simulink as per MBD guidelines with Main Subsystem called as ' Traffic_jam_assistance_feature' is shown below.

    • The main Subsystem consist of two sub systems they are

      a) Requirement_1

      b) Requirement_2

    • a) Requirement_1 :-

      The simulink Blocks of simulink model in Requirement_1 were created as per the given data Requirement 1. Here, the Input Signal “Input_Voltage” is compared against voltage values “VOLTAGE_MINIMUM_RANGE” & “VOLTAGE_MAXIMUM_RANGE” and Output signal from here is “Optimum_Voltage” which will be one of the inputs to the subsystem “Requirement_2 (DisplayUnit) ”.

    • b) Requirement_2

      The Requirement_2 is also called as Display Unit. The simulink blocks inside the simulink model are created as per the given data in Requirement 2. I have used a Saturation Block for Signal “Enable_Display” for the signal saturation between the range 0 – 7. Output signal from the subsystem is “Output_Display”.

    • Creating a Simulink Data Dictionary (sldd file): -

      After creating the simulink model we need to go to Modeling & then click on the down arrow of DESIGN and select Link to data dictionary.Now a new page will open then click on new, after that click on Apply & OK. So that, it will automatically have linked to our required Simulink model

      In Order to add signals in sldd file we have to add signals and calibration data in these Simulink signals for input signals


      To add signals, we have to select Simulink signals in Add option also for input signals select storage class as 'Import External'.

    • For Output signal Select Storage Class as 'Export to file' in same output signal we have to give header file name and definition file name


      For local signals select Storage class as 'localizable'. In order to add Calibration data, we have to select Simulink parameters in in same Add option.

    • Basic modeling settings:-

      selecting Solver Type as 'Fixed step'.

    • In Code generation we have to select System Target file as 'ert.tlc'.

    • Generated C code for the Simulink Model : -

    • To Generate a Code We will put these blocks in a single Subsystem and Generate a C Code. But first, we will set the Code Generator to Embedded Coder that is ert.tlc in Model Settings.

      • Solver type: Fixed
      • Solver: discrete (no continuous states)
      • Sample time: 0.01
    • Code generation Parameters:

      • System target file: ert.tlc ( Embedded Coder)
      • Prior to going for code generation conversion to Atomic Unit was done by selecting 'Treat As Atomic Unit' option.Over and above that signal resolving and propogation was also carried out as per the standard practice.

      Finally code generation was completed using the C Code tab and clicking the 'Generate Code' icon.

      Generating Model Advisor Report: -

      For this we need to go to Modeling and select Model Advisor. Now a page will open.Here we go to Task and select Modeling Standards for MAB & JMAAB.Then filnally select 'Run Selected Checks'.

      Initially after MAB check the following result was found.

    • Pass:122,Fail:0,Warnings:18
    • After taking system recommended actions and successfully performing the selected tests finally the following result was obtained.

    • Pass:126,Fail:0,Warnings:14

      Conclusion: -

      ⦁ Fully developed a Simulink model of single feature of traffic Jam Assistance as per the MAAB guidelines.

      ⦁ Created Simulink Data Dictionary file with detailed description.

      ⦁ Generated a C Code using the Embedded Coder as well as MA Report.

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.