Project 1- Traffic Jam Assistant Feature
What is 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 include 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 that partly take over driving, like Traffic Jam Assistance.
How Trafic Jam Assistance Works:
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, 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 of the visibility, the weather conditions, and the amount of traffic on the road.
Problem Statement:
To develop one specific requirement of the Traffic Jam Assistant algorithm which would predominantly feature in the IPC algorithm. Please note that the whole Traffic Jam Assistant is a very huge algorithm & only one small part of the logic is implemented here. Idea is to familiarize me with concepts of Model-Based Development in a MATLAB Environment. The Project must be done keeping in mind the following processes & steps.
- 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.
Data Dictionary:

Referred signals and calibration values have been updated in the data dictionary.
The model:

Three input signals are coming as input and the output signal of the Traffic Jam Assistance subsystem is Output Display. The information regarding the algorithm will be displayed in the Instrument Panel Cluster (IPC).
Inside the TRAFFIC JAM ASSISTANCE Subsystem:

Requirement_1:

AND block performs when two values are in true condition. Here if the input voltage is equal to the minimum voltage range or more than this then it becomes the true value so the output will come out as the Optimum voltage. Similarly, if the input voltage is equal to the maximum voltage range or less than this, it becomes the true condition and the AND operator performs the signal as the Optimum Voltage. This output signal next goes to the second subsystem as input.
Requirement_2:

The Multiport Switch block determines which of several inputs to the block passes to the output. The block bases this decision on the value of the first input. The first input is the control input and the remaining inputs are the data inputs. The value of the control input determines which data input passes to the output. So the multiport switch depends upon the enable display signal which has led to the saturation block limit of 0 to 7. Depending upon the range or the value the corresponding data will be conducted to the switch if the control logic is matched in the second switching condition.
Here the condition of the second switch is, when the three conditions of AND block become true then the output signal of the multiport switch will be conducted and the output will be the 'Output_Display' signal otherwise 'No_Display' will come out as output.
Model Advisor Check:

Model advisor checking has been conducted with MAAB guidelines. The model advisor report has been attached below.
Pass signal: 124
Warning: 18
Fail: 0
Total check: 142

Code Generation:
To generate code we need to perform some specific model settings as follows:


Generated Code Report:

Generated code file has been attached below.
Conclusion:
Attached files are:
- Simulink model of Traffic Jam Assistance(.slx file)
- Data Dictionary (.sldd file)
- Model Advisor report of MAAB guideline
- Generated Code zip file.