Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Sanket Nehete/
  3. Project 1- Traffic Jam Assistant Feature

Project 1- Traffic Jam Assistant Feature

Aim: To create a Simulink Data Dictionary, develop an algorithm for one of the features of the Traffic jam Assistance and generate a C code for it using Simulink. Objective: Model Development as per the MBD guidelines Creation of Simulink Data Dictionary Code generation using Embedded Coder Generating Model Advisor Report…

  • MBD
  • Sanket Nehete

    updated on 13 Oct 2021

Aim:

To create a Simulink Data Dictionary, develop an algorithm for one of the features of the Traffic jam Assistance and generate a C code for it using Simulink.

Objective:

  • Model Development as per the MBD guidelines
  • Creation of Simulink Data Dictionary
  • Code generation using Embedded Coder
  • Generating Model Advisor Report

Overview:

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

Traffic jam assistance system helps to avoid rear-end collisions in dense traffic conditions and traffic jams. In traffic jams, the vehicle takes over driving off, acceleration, 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 and go and Lane Keeping Support (LKS). When ACC ‘Stop and 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 at less than 60 kmph, the driver can activate the functionality by the press of a button. The vehicle will now automatically follow the vehicle in front, takes over 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 the students need to implement here in this project is predominantly based on IPC units.

 

Signals given to us are,

 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

 

Procedure:

The figure below shows the Simulink data dictionary (sldd) file according to the given inputs.

Requirement_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 (DisplayUnit 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”.

The figure below shows the whole model created for the Traffic Jam Assistance feature with all the input and output ports using Simulink

Now, lets carry out the Model Advisor Check,

We can see that there are zero errors thus we can proceed to our next step that is code generation

Code generation,

Traffic_Jam_Assistance.c
/*

 * Trial License - for use to evaluate programs for possible purchase as

 * an end-user only.

 *

 * File: Traffic_Jam_Assistance.c

 *

 * Code generated for Simulink model 'Traffic_Jam_Assistance'.

 *

 * Model version                  : 1.1

 * Simulink Coder version         : 9.5 (R2021a) 14-Nov-2020

 * C/C++ source code generated on : Wed Oct 13 16:32:00 2021

 *

 * Target selection: ert.tlc

 * Embedded hardware selection: Intel->x86-64 (Windows64)

 * Code generation objectives: Unspecified

 * Validation result: Not run

 */



#include "Traffic_Jam_Assistance.h"

#include "Traffic_Jam_Assistance_private.h"



/* Exported block signals */

uint8_T Output_Display;                /* '/Switch' */



/* Exported data definition */



/* ConstVolatile memory section */

/* Definition for custom storage class: ConstVolatile */

const volatile boolean_T Interrupt_1 = 1;/* Referenced by: '/Constant' */

const volatile boolean_T Interrupt_2 = 1;/* Referenced by: '/Constant1' */

const volatile uint8_T No_Display = 0U;/* Referenced by: '/Constant2' */

const volatile uint8_T Off_Mode = 2U;  /* Referenced by: '/Off_Mode' */

const volatile uint8_T On_Mode = 1U;   /* Referenced by: '/On_Mode' */

const volatile uint8_T Standby_Mode = 3U;/* Referenced by: '/Standby_Mode' */

const volatile uint8_T Voltage_Maximum_Range = 50U;/* Referenced by: '/Constant' */

const volatile uint8_T Voltage_Minimum_Range = 30U;/* Referenced by: '/Constant' */



/* Real-time model */

static RT_MODEL_Traffic_Jam_Assistan_T Traffic_Jam_Assistance_M_;

RT_MODEL_Traffic_Jam_Assistan_T *const Traffic_Jam_Assistance_M =

  &Traffic_Jam_Assistance_M_;



/* Model step function */

void Traffic_Jam_Assistance_step(void)

{

  /* local block i/o variables */

  boolean_T Optimum_Voltage;

  uint8_T tmp;



  /* Logic: '/Logical Operator' incorporates:

   *  Constant: '/Constant'

   *  Constant: '/Constant'

   *  Inport: '/Input_Voltage'

   *  RelationalOperator: '/Compare'

   *  RelationalOperator: '/Compare'

   */

  Optimum_Voltage = ((Input_Voltage >= Voltage_Minimum_Range) || (Input_Voltage <=

    Voltage_Maximum_Range));



  /* Switch: '/Switch' incorporates:

   *  Constant: '/Constant'

   *  Constant: '/Constant1'

   *  Inport: '/Input_Switch'

   *  Logic: '/Logical Operator'

   *  Logic: '/Logical Operator1'

   *  RelationalOperator: '/Relational Operator'

   */

  if (Optimum_Voltage && (!Input_Switch) && (Interrupt_1 == Interrupt_2)) {

    /* Saturate: '/Saturation' incorporates:

     *  Inport: '/Enable_Display'

     */

    if (Enable_Display < 7) {

      tmp = Enable_Display;

    } else {

      tmp = 7U;

    }



    /* End of Saturate: '/Saturation' */



    /* MultiPortSwitch: '/Multiport Switch' */

    switch (tmp) {

     case 1:

      /* Switch: '/Switch' incorporates:

       *  Constant: '/On_Mode'

       */

      Output_Display = On_Mode;

      break;



     case 2:

      /* Switch: '/Switch' incorporates:

       *  Constant: '/On_Mode'

       */

      Output_Display = On_Mode;

      break;



     case 3:

      /* Switch: '/Switch' incorporates:

       *  Constant: '/Off_Mode'

       */

      Output_Display = Off_Mode;

      break;



     case 4:

      /* Switch: '/Switch' incorporates:

       *  Constant: '/Off_Mode'

       */

      Output_Display = Off_Mode;

      break;



     default:

      /* Switch: '/Switch' incorporates:

       *  Constant: '/Standby_Mode'

       */

      Output_Display = Standby_Mode;

      break;

    }



    /* End of MultiPortSwitch: '/Multiport Switch' */

  } else {

    /* Switch: '/Switch' incorporates:

     *  Constant: '/Constant2'

     */

    Output_Display = No_Display;

  }



  /* End of Switch: '/Switch' */

}



/* Model initialize function */

void Traffic_Jam_Assistance_initialize(void)

{

  /* (no initialization code required) */

}



/* Model terminate function */

void Traffic_Jam_Assistance_terminate(void)

{

  /* (no terminate code required) */

}



/*

 * File trailer for generated code.

 *

 * [EOF]

 */

Software in Loop verification for the generated code using Simulation Data inspector,

From the above graph we can see that the output is 3 and the tolerance is 0, thus the generated code has successfully passed the Software-in-Loop test. 

Leave a comment

Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.

Please  login to add a comment

Other comments...

No comments yet!
Be the first to add a comment

Read more Projects by Sanket Nehete (38)

Week 7 State of charge estimation

Objective:

Aim1: Simulate the 3 test cases from harness dashboard and write a detailed report on the results Solution: Battery Management System (BMS) – A battery management system is the electronic system that manages the rechargeable battery, such as by protecting the battery from operating outside its safe operating area, monitoring…

calendar

23 Nov 2021 07:00 AM IST

  • MATLAB
Read more

Project 2-Highway Assistant-Lane Changing Assistant

Objective:

AIM: To develop an algorithm for one of the features of the Highway Lane Changing Assistance, create a Simulink Data Dictionary for the given signals data lists, develop a model advisor report and generate a C code for it using AUTOSAR coder in SIMULINK Objective: Model development in MATLAB Simulink as per MBD guidelines…

calendar

16 Oct 2021 06:49 PM IST

  • MATLAB
  • MBD
Read more

Project 1- Traffic Jam Assistant Feature

Objective:

Aim: To create a Simulink Data Dictionary, develop an algorithm for one of the features of the Traffic jam Assistance and generate a C code for it using Simulink. Objective: Model Development as per the MBD guidelines Creation of Simulink Data Dictionary Code generation using Embedded Coder Generating Model Advisor Report…

calendar

13 Oct 2021 11:22 AM IST

  • MBD
Read more

Project 1 (Mini Project on Vehicle Direction Detection

Objective:

Aim: To make a model for vehicle direction determination and making the sldd file   Introduction: Identifying the direction of the vehicle is one of the important & diverse features in Autonomous driving & Advanced Driver Assistance Features. This particular sub-feature of identifying the direction of vehicle…

calendar

05 Oct 2021 07:56 AM IST

  • MATLAB
  • MBD
Read more

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

Related Courses

coursecard

Multibody Dynamics for Automotive Applications using Motionview and Motionsolve

4.6

8 Hours of Content

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

logo

Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

Our Company

News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
map
EpowerX Learning Technologies Pvt Ltd.
4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
mail
info@skill-lync.com
mail
ITgrievance@skill-lync.com

Top Individual Courses

Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

Top PG Programs

Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

Skill-Lync Plus

Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

Trending Blogs

Heat Transfer Principles in Energy-Efficient Refrigerators and Air Conditioners Advanced Modeling and Result Visualization in Simscape Exploring Simulink and Library Browser in Simscape Advanced Simulink Tools and Libraries in SimscapeExploring Simulink Basics in Simscape

© 2025 Skill-Lync Inc. All Rights Reserved.

              Do You Want To Showcase Your Technical Skills?
              Sign-Up for our projects.