All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Traffic Jam Assistant Feature
Aim: Model Development of a single feature of Traffic Jam Assist using MATLAB & Simulink as well as Code Generation using Embedded Coder.
Objective:
Traffic Jam Assistant Feature:
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 km/h, 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.
Traffic Jam Assistant is one of the most common features in the Advanced Driver Assistance System. Traffic Jam Assistant helps the driver arrive more relaxed at their destination, even in 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 & brake automatically, as well as 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 driving off, acceleration, braking, and steering within the same lane.
Fig: Traffic Jam Assist
Traffic Jam Assist is pretty much an extension of Adaptive Cruise Control. Traffic Jam Assist works when you approach to traffic and slow to a crawl. With the system on, you can take your foot off the pedals. Traffic Jam Assist brakes and accelerates the car for you while maintaining a safe distance from the vehicle in front. This is essentially a low-speed version of Adaptive Cruise Control.
Adaptive Cruise Control tries to maintain your set speed but takes other vehicles into account. Let’s say you set your cruising speed to 90km/h, but the vehicle in front of your car is only doing 80km/h due to traffic. Adaptive Cruise Control will maintain a safe distance from the vehicle in front. Your car will not travel at 90km/h. Traffic Jam Assist works when the driver has his or her hands on the wheel. Most systems are designed to disengage if the driver’s hands leave the wheel for too long. This is done to help ensure that the driver can take over in case of an emergency.
Like Adaptive Cruise Control, Traffic Jam Assist systems err on the side of caution and leave big gaps to the vehicle in front. In places like Singapore, expect cars to filter into your lane. Impatient drivers behind you may even honk and/or flash their headlights. Traffic Jam Assist isn’t very reactive either. An attentive driver who is situationally aware will be able to start accelerating the car faster, too. Also, when we are stationary for too long, the system won’t move the car when traffic starts to move. We need to tap the accelerator pedal to “re-activate” Traffic Jam Assist.
Traffic Jam Assist of AUDI Q7:
Signals & Calibration Data List:
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 |
Requirements:
Requirement No 1:
Requirement No 2 (DisplayUnit Subsystem):
Procedure:
The very first thing that we will do is create a Simulink Data Dictionary using the given Signal and Calibration Data List.
The following is the SLDD file:
Fig: SLDD File
As per Requirement 1, Input_Voltage is compared with VOLTAGE_MINIMUM_RANGE.
Input_Voltage is compared with VOLTAGE_MAXIMUM_RANGE.
Then their output are given as an input in the AND block, the output of which is Optimum_Voltage.
Using Requirement 2, The input such as Optimum_Voltage, Input_Switch, Enable_Switch, INTERRUPT_1, INTERRUPT_2.
The Enable_Switch is taken as input in Multiport Switch depending on the output from the Saturation block.
We provide the ON_MODE, OFF_MODE, STANDBY_MODE to this switch.
The output of this is one input to the Switch block. The conditional input to Switch blocks the result of Optimum_Voltage, Input_Switch, INTERRUPT_1, and INTERRUPT_2 operation. Another input to the Switch block is the NO_DISPLAY. The Output from Switch block is the Output_Display.
The following is the model of the feature of Traffic Jam Assist:
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.
Fig: Feature of Traffic Jam Assist
The following is a part of Generated Code:
Fig: Generated Code
The following is the complete Code:
/*
* File: Traffic_Jam_Assistant_Feature.h
*
* Code generated for Simulink model 'Traffic_Jam_Assistant_Feature'.
*
* Model version : 5
* Simulink Coder version : 9.3 (R2020a) 18-Nov-2019
* C/C++ source code generated on : Wed Mar 10 04:23:01 2021
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_Traffic_Jam_Assistant_Feature_h_
#define RTW_HEADER_Traffic_Jam_Assistant_Feature_h_
#ifndef Traffic_Jam_Assistant_Feature_COMMON_INCLUDES_
# define Traffic_Jam_Assistant_Feature_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif /* Traffic_Jam_Assistant_Feature_COMMON_INCLUDES_ */
#include "Traffic_Jam_Assistant_Feature_types.h"
/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
#endif
#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
#endif
/* External inputs (root inport signals with default storage) */
typedef struct {
real_T Input_Voltage; /* '/Input_Voltage' */
real_T VOLTAGE_MINIMUM_RANGE; /* '/VOLTAGE_MINIMUM_RANGE' */
real_T VOLTAGE_MAXIMUM_RANGE; /* '/VOLTAGE_MAXIMUM_RANGE' */
boolean_T Input_Switch; /* '/Input_Switch' */
real_T Enable_Switch; /* '/Enable_Switch' */
boolean_T INTERRUPT_1; /* '/INTERRUPT_1' */
boolean_T INTERRUPT_2; /* '/INTERRUPT_2' */
} ExtU_Traffic_Jam_Assistant_Fe_T;
/* External outputs (root outports fed by signals with default storage) */
typedef struct {
real_T Output_Display; /* '/Output_Display' */
} ExtY_Traffic_Jam_Assistant_Fe_T;
/* Real-time Model Data Structure */
struct tag_RTM_Traffic_Jam_Assistant_T {
const char_T * volatile errorStatus;
};
/* External inputs (root inport signals with default storage) */
extern ExtU_Traffic_Jam_Assistant_Fe_T Traffic_Jam_Assistant_Feature_U;
/* External outputs (root outports fed by signals with default storage) */
extern ExtY_Traffic_Jam_Assistant_Fe_T Traffic_Jam_Assistant_Feature_Y;
/* Model entry point functions */
extern void Traffic_Jam_Assistant_Feature_initialize(void);
extern void Traffic_Jam_Assistant_Feature_step(void);
extern void Traffic_Jam_Assistant_Feature_terminate(void);
/* Real-time Model object */
extern RT_MODEL_Traffic_Jam_Assistan_T *const Traffic_Jam_Assistant_Featur_M;
/*-
* The generated code includes comments that allow you to trace directly
* back to the appropriate location in the model. The basic format
* is /block_name, where system is the system number (uniquely
* assigned by Simulink) and block_name is the name of the block.
*
* Use the MATLAB hilite_system command to trace the generated code back
* to the model. For example,
*
* hilite_system('') - opens system 3
* hilite_system('/Kp') - opens and selects block Kp which resides in S3
*
* Here is the system hierarchy for this model
*
* '' : 'Traffic_Jam_Assistant_Feature'
* '' : 'Traffic_Jam_Assistant_Feature/Subsystem1'
* '' : 'Traffic_Jam_Assistant_Feature/Subsystem1/Subsystem'
*/
#endif /* RTW_HEADER_Traffic_Jam_Assistant_Feature_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/
Report:
The following is the Model Advisor Report:
Fig: Model Advisor Check
There are warnings that are acceptable but the notable part is that there is not a single Failed result.
Conclusion:
Developed a Model of a single feature of Traffic Jam Assist as per MAAB guidelines as well as created Simulink Data Dictionary using MATLAB & Simulink. Generated a code using Embedded Coder and generated a Model Advisor Report.
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.
Other comments...
Simulation of Whitworth Quick Return Mechanism using MATLAB
…
19 Mar 2021 08:00 PM IST
Related Courses
8 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.