Challenge

Project 1- Traffic Jam Assistant Feature

AIM: To develop one specific requirement of Traffic Jam Assistant algorithm which is feature in the IPC algorithm.

Objectives:

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

Traffic Jam Assistance

Traffic Jam Assist can assist you to in driving in highway traffic jams up to 60 km/h while the host vehicle automatically follows the vehicle ahead. Fused data from both sensors is used to help adapt the vehicle speed to the speed of the vehicle ahead, with Stop-and-Go functionality. Traffic Jam Assist works when you approach 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.

Figure: Traffic jam sensors

Traffic Jam Assistant is one of the most common feature in 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 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 press of a button. The vehicle will now automatically follow the vehicle in front, takes over driving off, acceleration, braking and steering within same lane.

Figure: Traffic Jam Assistant Function

Advantages

  1. Optional front corner radars help to improve detection of vehicles cutting in.
  2. The driver is required to monitor both surrounding traffic and system status and can override the system at anytime.
  3. Traffic Jam Assist’s longitudinal, Stop-and-Go control function can manage vehicle speed and help maintain safe distance to the leading vehicle; actuation is performed by ZF’s high-performance electronically controlled braking systems or integrated brake control in the case of vacuum-less braking systems.
  4. The lateral control function can help maintain vehicle position in the lane; actuation is performed by ZF’s well-established, high-bandwidth belt drive or column drive electric powered steering products.

  5. Helps enhance vehicle and occupant safety & Helps dramatically reduce the efforts and stress of highway driving in congested traffic.

  6. Supports collision mitigation or even collision avoidance to help improve road safety.

Simulink Model of Traffic Jam Assistant

Inside the Traffic Jam Subsystem

Requirement 1

Requirement 2

Open Configuration Parameter, go to code generation select system target files and go to Report select the create code generation report and open report automatically and update the parameters as per the MAAB guidelines.

Open the model explorer and determine the input, calibration and output values & create a Simulink Data Dictionary.

Then Model Advisor and select the our model and a popup window will open

I have checked for the limited tasks and after checks completed generator a report as shown in figure.

Code Generation Report

Code Generated:

/*
* File: Traffic_jam.c
*
* Code generated for Simulink model 'Traffic_jam'.
*
* Model version : 1.19
* Simulink Coder version : 9.3 (R2020a) 18-Nov-2019
* C/C++ source code generated on : Tue Oct 5 08:11:37 2021
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "Traffic_jam.h"
#include "Traffic_jam_private.h"
/* External outputs (root outports fed by signals with default storage) */
ExtY_Traffic_jam_T Traffic_jam_Y;
/* Real-time model */
RT_MODEL_Traffic_jam_T Traffic_jam_M_;
RT_MODEL_Traffic_jam_T *const Traffic_jam_M = &Traffic_jam_M_;
/* Model step function */
void Traffic_jam_step(void)
{
uint8_T tmp;
/* Switch: '<S2>/Switch' incorporates:
* Constant: '<S2>/Constant4'
* Constant: '<S2>/Constant5'
* Constant: '<S3>/Constant'
* Constant: '<S3>/Constant1'
* RelationalOperator: '<S2>/RelationalOperator'
* RelationalOperator: '<S3>/RelationalOperator'
* RelationalOperator: '<S3>/RelationalOperator1'
*/
if (((uint32_T)(Input_Voltage >= VOLTAGE_MINIMUM_RANGE) <=
VOLTAGE_MAXIMUM_RANGE) && (!Input_Switch) && (INTERRUPT_1 == INTERRUPT_2))
{
/* Saturate: '<S2>/Saturation' incorporates:
*/
if (Enable_Display < 7) {
tmp = Enable_Display;
} else {
tmp=7U;
}
/* End of Saturate: '<S2>/Saturation' */
/* MultiPortSwitch: '<S2>/MultiportSwitch' */
switch (tmp) {
case 0:
/* Outport: '<Root>/Output_Display' incorporates:
* Constant: '<S2>/Constant'
*/
Traffic_jam_Y.Output_Display = ON_MODE;
break;
case 1:
/* Outport: '<Root>/Output_Display' incorporates:
* Constant: '<S2>/Constant'
*/
Traffic_jam_Y.Output_Display = ON_MODE;
break;
case 2:
/* Outport: '<Root>/Output_Display' incorporates:
* Constant: '<S2>/Constant1'
*/
Traffic_jam_Y.Output_Display = OFF_MODE;
break;
case 3:
/* Outport: '<Root>/Output_Display' incorporates:
* Constant: '<S2>/Constant1'
*/
Traffic_jam_Y.Output_Display = OFF_MODE;
break;
default:
/* Outport: '<Root>/Output_Display' incorporates:
* Constant: '<S2>/Constant2'
*/
Traffic_jam_Y.Output_Display = STANDBY_MODE;
break;
}
/* End of MultiPortSwitch: '<S2>/MultiportSwitch' */
} else {
/* Outport: '<Root>/Output_Display' incorporates:
* Constant: '<S2>/Constant3'
*/
Traffic_jam_Y.Output_Display = NO_DISPLAY;
}
/* End of Switch: '<S2>/Switch' */
}
/* Model initialize function */
void Traffic_jam_initialize(void)
{
/* (no initialization code required) */
}
/* Model terminate function */
void Traffic_jam_terminate(void)
{
/* (no terminate code required) */
}
/*
* File trailer for generated code.
*
* [EOF]
*/
Conclusion:
Thus the simulink model of traffic jam assistant is successfully runs and updated as per the MAAB guideliness and code is generated.
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.