Project 1- Traffic Jam Assistant Feature
Aim: To develop one specific requirement of the Traffic Jam Assistant algorithm which would predominantly feature in the IPC algorithm.
Objective:
- 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.
Theory:
Traffic Jam Assistant Feature
Introduction to the Feature:
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.
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 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.
MODEL:


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”.
- The output signal from here is “Optimum_Voltage” which will be one of the inputs to the subsystem “DisplayUnit”.
Requirement 2:

- Input Signals are “Optimum_Voltage”, “Input_Switch”, “Enable_Display”. Signal “Enable_Display” must be saturated between the range 0 – 7. The output signal from the subsystem is “Output_Display”.
- Input Signal “Enable_Display” is compared against a pre-defined set of values in a multiport switch. The total data ports in the multiport switch are 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 the 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 the value of the input signal “Input_Switch” is compared in an AND gate against the 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”.
SLDD Creation:

Model Advisory Check:

Model Advisory Report:

Code generated:
/*
* File: project1AUTOSAR.c
*
* Code generated for Simulink model 'project1AUTOSAR'.
*
* Model version : 1.13
* Simulink Coder version : 9.3 (R2020a) 18-Nov-2019
* C/C++ source code generated on : Thu Sep 16 23:58:41 2021
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "project1AUTOSAR.h"
#include "project1AUTOSAR_private.h"
/* External inputs (root inport signals with default storage) */
ExtU_project1AUTOSAR_T project1AUTOSAR_U;
/* External outputs (root outports fed by signals with default storage) */
ExtY_project1AUTOSAR_T project1AUTOSAR_Y;
/* Real-time model */
RT_MODEL_project1AUTOSAR_T project1AUTOSAR_M_;
RT_MODEL_project1AUTOSAR_T *const project1AUTOSAR_M = &project1AUTOSAR_M_;
/* Model step function */
void project1AUTOSAR_step(void)
{
/* Outport: '/Output_Display' incorporates:
* Constant: '/Constant5'
* Switch: '/Switch'
*/
project1AUTOSAR_Y.Output_Display = 0U;
}
/* Model initialize function */
void project1AUTOSAR_initialize(void)
{
/* (no initialization code required) */
}
/* Model terminate function */
void project1AUTOSAR_terminate(void)
{
/* (no terminate code required) */
}
/*
* File trailer for generated code.
*
* [EOF]
*/
Conclusion:
Successfully build the model of Traffic jam assist feature as per the given requirement in Matlab environment and ran for model advisor check and generated code of the model.