Project 2 Adaptive Cruise Control
AIM :-
To develop Adaptive Cruise Control Algorithm
- Develope logic
- Create SLDD file
- Generate Model Advisory report
- MCDC Report
- Create Test case
- MIL Test
- Output of MIL
- SIL Test
- Output of SIL
- Conclusion
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 as Dynamic cruise control.
Control is based on sensor information from on-board sensors. Such systems may use a radar or laser sensor or a camera setup allowing the vehicle to brake when it detects the car is approaching another vehicle ahead, then accelerate when traffic allows it to.
Adaptive cruise control uses radar, lasers, cameras, or a combination of any of those items to calculate your surroundings. Its sensors and processors judge what the car in front of you is doing and regulate your car in relation to the one in front of you to maintain a safe distance, braking when they slow down and accelerating when they do, up to the set limit.
Develope logic :-






Explanation:-
Camera and radar input of lead vehicle sum these two will get lead vehicle speed,
camera and radar input of drive vehicle and another input is acceleration mode which is the output of the entire model tap that signal and dealy that signal using dealy block and add them into drive vehicle. and tap the signal radar input drive vehicle and place signal conversion to get lead vehicle detected and drive vehicle detected
and develope the main algorithm is state logic as OFF mode Standby mode and ON mode,when the cruise switch will on the standby mode will get active with accleration mode is 1 if the cruise switch and set switch equal to 1 both standby mode and on mode will get active
in ACC ON mode there is six sub state,first one is default state lead vehicle detected follow it pass the signal to lead vehicle not detected condition as lead vehicle equals to zero this like need to implement one by one with the help of requirement file to develop the logic
if the cruise switch will turn on it allow to set a speed by setswitch ,which speed we want to drive, both are get active ACC will turn on it detect the surrounding vehicle distance by using radar and camera if lead vehicle distance is more the acclearation mode will be increase if the lead vehicle is close to drive vehicle the accleration mode will get decrease.
Create SLDD file:-
create SLDD for all the signals and specify the datatypes,storge class and sample time, the input signal is stored as imported extern and output signal is stored as expoer to file
set .c and .h files for the output, and save the file

Generate Model Advisory report :-
Generate the model advisory report before testing because it checks the model is under the MAAB guideline, ISO standards and safety standards and configuration parameters
maintain zero fail and reduce warnings

MCDC Report:-
Modified condition/decision coverage (MCDC) is the extent to which the conditions within decisions are independently exercised during code execution. All conditions within decisions have been evaluated to all possible outcomes at least once. Every condition within a decision independently affects the outcome of the decision


Create Test case :-
write the test cases for the input signals

MIL Test :-
Right click the subsystem and click test harness and create harness and inport is change to signal bulider and out port will keep as same. it gives MIL template

import that test case to the signal builder

Output of MIL:-
if needed check the ouput with sum block for zero error

SIL Test:-
Generate S-function for the subsystem and select SIL box and click build it generates the code and SIL block
code generation files are saved in ert_rtw folder


After right click the SIL block click test harness to get the SIL template

import the test cases in signal builder block

Output of SIL:-

Conclusion:-
ACC logic and all report generation files, testings are created successfully