Project 1- Traffic Jam Assistant Feature
Mini Project
Traffic Jam Assistant Feature
Aim:
To develop the given requirement for the Traffic jam assistant algorithm. And to follow all the Model Based Development (MBD) guidelines in the MATLAB/Simulink while developing the algorithm. To generate the code in the embedded coder. To create the Simulink data dictionary and to link it to the model.
Software required:
- MATLAB/Simulink
Explanation:
Traffic Jam Assistant is one of the most common features 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.
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.
Information regarding the Traffic Jam Assistant will be available to be displayed to the driver in the Instrument Panel Cluster (IPC).
Model:



- As per the requirement from the customer, the input voltage is compared for the Maximum and minimum voltage.
- If the input voltage is greater than equal to minimum voltage range and less than equal to maximum voltage range then the output is given as optimum voltage is sensed as 1 or 0.
- The input to the display unit subsystem are Optimum voltage, input switch and enable display.
- If the input switch is on then the output display is No display. The value of No display is 0
- If the both the interrupts are equal and the voltage is in optimum range and the input switch is off then the output display is from the multiport switch.
- The output of multiport depends upon the value of enable display.
- If the value of enable display is saturated between 0 and 7.
- If the value of enable display is 0 or 1, then ON mode is connected to the output. The value of ON mode is 1.
- If the value of enable display is 2 or 3, then OFF mode is connected to the output. The value of OFF mode is 2.
- Otherwise the default value of STANDBY mode is connected to the output. The value of STANDBY mode is 3.
- If the interrupts are not equal or there is no optimum voltage then the output display is NO display which is 0.
Procedure:
- The model is constructed using the basic blocks.
- The constant value should not be directly given and is given as variables.
- The signal lines must not intersect.
- The inport and outport must be in the extreme sides.
- The signal lines must be at the start of the signal.
- Space should not be used for signal names. Only alphanumeric is used.
- The blocks must have the descriptive name.
- The datatype must not be directly given in the blocks instead datatype conversion is used.
- The Simulink data dictionary is created by selecting the modelling in the top pane and select link to data dictionary.

- Then the window pops up select create new and name the data dictionary and apply.

- Then open the data dictionary in the model explorer in the modelling of the top pane.
- Add the signals and name and configure the input and output signals.
- The storage class of the input signal must be imported extern for the code generation.
- The storage class of the output signal must be Export to file for code generation and in the code generation enter the model name_private.h for header and modelname_decl.c for declaration file.
- The storage class of the local signal must be Localizable for code generation.
- The calibration signals are added as parameters in the data dictionary.
- The storage class of the calibration signal must be Const for code generation.

- Then the signal name in the model must be link to data dictionary by right clicking the signal and open properties. In that select Resolve to Simulink data objects and apply.

- The following signal lines into the subsystem must be propagated. This done by in the signal properties select show propagated signals.

- The datatype of the switch must be Inherit via back propagation.

- The multiport swich must be zero based contagious as per MAB rule.

- Then select the modelling in the top pane and select the Model Advisor.
- Then in the pop-up window select the MAB test and run selected check.


- Then in the top pane by selecting apps and select the embedded coder.
- Then select the Quick start in the Embedded coder.


- Then follow the code generation steps and finish the process.

- The code was generated and model was built.



- The code generation report was generated.
Summary:
Thus the required model was built by following all the MBD guidelines, model advisor report was generated by running the MAB test and the auto code was generated by using embedded coder.
Drive Link:
https://drive.google.com/drive/folders/11zwL4ssN1yhCdn9KTMKZPFtyhdcK8SMt?usp=sharing