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: - Development of a single feature of Traffic Jam Assist Model using MATLAB &…
Racha Pavan Kumar
updated on 14 Jun 2022
Traffic Jam Assistant Feature
Aim: - Development of a single feature of Traffic Jam Assist Model using MATLAB & Simulink.
Objective: -
Traffic Jam Assistance Feature:
Driving can be a lot of fun, but also tiring at times. Especially in traffic jams, after a long workday, when your concentration is no longer optimal, and it takes effort to continuously monitor all traffic around you. At moments like these, it’s very helpful if you can rely on intelligent technology for extra peace of mind and safety, such as Traffic Jam Assistance.
Traffic Jam Assistance is an active safety system as part of the comprehensive range of intelligent assistance systems. These are grouped together under the name MG Pilot. These so-called Advanced Driver Assistance Systems (ADAS) are standard for all MG models and includes 12 to 15 different features, depending on the model.
These MG Pilot safety systems warn the driver of potential hazards and even intervene if necessary. Think of Lane Keep Assistance, Rear Traffic Alert, Blind Spot Monitoring, Drowsiness Warning System and Front Collision Warning with Automatic Emergency Braking. The purpose of this is to make driving easier, more enjoyable and above all, safer. But MG Pilot also includes driver assistance systems which partly take over driving, like Traffic Jam Assistance.
Basic Working Principle: -
How does it work?
Traffic Jam Assistance (TJA) is an advanced driver assistance system that continuously measures the speed of the surrounding vehicles when Adaptive Cruise Control is switched on. That speed is compared with your own driving speed. If Traffic Jam Assistance detects many surrounding vehicles at speeds below 60 km/h – and you are therefore very likely to be in a traffic jam – the driver can activate Traffic Jam Assistance. With this, your MG partly takes over the driving.
With Traffic Jam Assistance switched on, the car automatically follows the vehicle in front. It accelerates and brakes all by itself, at all speeds below 60 km/h to a standstill and further. In addition, the intelligent technology continuously keeps the distance you set to the vehicle in front of you. But there is more: with Traffic Jam Assistance, your MG also steers automatically to stay neatly in the middle of the lane. Even in gentle corners! Very comfortable, carefree and safe driving, regardless the visibility, the weather conditions and the amount of traffic on the road.
Signal & Calibration Data List: -
Input Signals: -
Name of the Signal |
Data Type |
Range |
Input_Voltage |
Uint8 |
0-255 |
Enable_Display |
Uint8 |
0-255 |
Input_Switch |
boolean |
0-1 |
Output Signals: -
Name of the Signal |
Data Type |
Range |
Output_Display |
Uint8 |
0-255 |
Local Signals: -
Name of the Signal |
Data Type |
Range |
Optimum_Voltage |
boolean |
0-1 |
Calibration Signals: -
Name of the Signal |
Data Type |
Range |
Initial Values |
Voltage_MINIMUM_RANGE |
Uint8 |
0-255 |
30 |
Voltage_MAXIMUM_RANGE |
Uint8 |
0-255 |
50 |
NO_DISPLAY |
Uint8 |
0-255 |
0 |
ON_MODE |
Uint8 |
0-255 |
1 |
OFF_MODE |
Uint8 |
0-255 |
2 |
STANDBY_MODE |
Uint8 |
0-255 |
3 |
INTERRUPT_1 |
boolean |
0-1 |
1 |
INTERRUPT_2 |
boolean |
0-1 |
1 |
Requirements: -
Procedure: -
Creation of Simulink model
MAIN SUB SUBSYSTEM of Traffic Control:
When we open main subsystem there is requirement_1 & requirement_2
Requirement 1:
As per Requirement input voltage is compared against VOLTAGE MINUMUM RANGE & VOLTAGE MAXIMUM RANGE with the help of relational operator blocks
The outputs of 2 relational operator blocks are given to AND block and output of AND block is optimum voltage and it is given as one of the input to Requirement 2 i.e. display unit subsystem
Requirement 2:
Here we have to create a separate subsystem and name it as Display unit the subsystem should have 3 Simulink input signals and 2 calibration input signals
3 Simulink signals are optimum voltage, input switch and enable voltage
And calibration signals are INTERRUPT 1 & INTERRUPT 2
Input Signal Enable Display is connected to multiport switch with 5 inputs the input 1 & 2 are connected to calibration Signal ON mode & inputs 3 & 4 connected to OFF Mode & input 5 is connected to SATURATION Mode output from multiport switch is connected to first input of the switch block
Third input of switch block is connected to calibration parameter NO DISPLAY
Here input signal input switch with Not gate is compared against Optimum voltage by using AND gate and output from the AND is given to again AND gate.
Calibration signals INTERRUPT_1 & INTERRUPT_2 are equal and compared against output signal from the above AND gate by using AND gate and output of these AND gate is given as second input to switch block
Output of switch block is Output_Display
Above fig: is showing MODEL IS DEVELOPED as per the Requirement_1 & Requirement_2
Creation of Simulink Data Dictionary (Sldd File:):
First we have link the Simulink data dictionary with our model to link the sldd we have to select Modelling in that select down Arrow select Link to data dictionary next select New option name the required sldd file then click on ok it will automatically have linked to our required Simulink model
Next 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
Here in input signals select storage Import External
Output signal Select Storage Class 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
To add Calibration data, we have to select Simulink parameters in in same Add option
Generation of C Code for the model: -
/*
* File: ert_main.c
*
* Code generated for Simulink model 'Traffic_Control'.
*
* Model version : 1.33
* Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
* C/C++ source code generated on : Tue Jun 7 16:13:51 2022
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include
#include /* This ert_main.c example uses printf/fflush */
#include "Traffic_Control.h" /* Model's header file */
#include "rtwtypes.h"
/*
* Associating rt_OneStep with a real-time clock or interrupt service routine
* is what makes the generated code "real-time". The function rt_OneStep is
* always associated with the base rate of the model. Subrates are managed
* by the base rate from inside the generated code. Enabling/disabling
* interrupts and floating point context switches are target specific. This
* example code indicates where these should take place relative to executing
* the generated code step function. Overrun behavior should be tailored to
* your application needs. This example simply sets an error status in the
* real-time model and returns from rt_OneStep.
*/
void rt_OneStep(void);
void rt_OneStep(void)
{
static boolean_T OverrunFlag = false;
/* Disable interrupts here */
/* Check for overrun */
if (OverrunFlag) {
rtmSetErrorStatus(Traffic_Control_M, "Overrun");
return;
}
OverrunFlag = true;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
Traffic_Control_step();
/* Get model outputs here */
/* Indicate task complete */
OverrunFlag = false;
/* Disable interrupts here */
/* Restore FPU context here (if necessary) */
/* Enable interrupts here */
}
/*
* The example "main" function illustrates what is required by your
* application code to initialize, execute, and terminate the generated code.
* Attaching rt_OneStep to a real-time clock is target specific. This example
* illustrates how you do this relative to initializing the model.
*/
int_T main(int_T argc, const char *argv[])
{
/* Unused arguments */
(void)(argc);
(void)(argv);
/* Initialize model */
Traffic_Control_initialize();
/* Attach rt_OneStep to a timer or interrupt service routine with
* period 0.2 seconds (the model's base sample time) here. The
* call syntax for rt_OneStep is
*
* rt_OneStep();
*/
printf("Warning: The simulation will run forever. "
"Generated ERT main won't simulate model step behavior. "
"To change this behavior select the 'MAT-file logging' option.\n");
fflush((NULL));
while (rtmGetErrorStatus(Traffic_Control_M) == (NULL)) {
/* Perform other application tasks here */
}
/* Disable rt_OneStep() here */
/* Terminate model */
Traffic_Control_terminate();
return 0;
}
/*
* File trailer for generated code.
*
* [EOF]
*/
Report: -
Generation of Model Advisory Report:
Conclusions: -
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...
Week 1 Understanding Different Battery Chemistry
Week 1 Understanding Different Battery Chemistry 1.Prepare a table which includes materials & chemical reactions occurring at the anode and cathode of LCO, LMO, NCA,…
01 Aug 2022 04:43 PM IST
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…
29 Jul 2022 05:52 PM IST
Project 1- Traffic Jam Assistant Feature
Traffic Jam Assistant Feature Aim: - Development of a single feature of Traffic Jam Assist Model using MATLAB &…
14 Jun 2022 05:12 PM IST
Project 2 Adaptive Cruise Control
AIM: Adaptive cruise control (ACC) is an available cruise control advanced driver-assistance system for road vehicles that automatically adjusts the vehicle speed to maintain a safe distance from vehicles ahead. As of 2019, it is also called by 20 unique names that describe that basic functionality. This is also known…
26 Apr 2022 03:59 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.