All Courses
All Courses
Objective of Main Project: Developing Adaptive Cruise Control feature as per the Requirement Document using MATLAB Simulink. Follow all the MBD related processes: Requirement Tagging & Traceability, SLDD creation, Configuration Parameter changes, Model Advisor check & Code Generation. In Configuration Parameters:…
Abhishek kumar singh
updated on 16 May 2022
Objective of Main Project:
General Overview:
Adaptive Cruise Control Feature for passenger cars allows the host vehicle to adapt to the speed in line with the flow of traffic. Driving in heavy traffic or keeping a safe distance to the preceding vehicle calls for a high level of concentration. The Adaptive Cruise Control feature can reduce the stress on the driver by automatically controlling the vehicle speed & maintaining a predefined minimum distance to the preceding vehicle. As a consequence, the driver enjoys more comfort & can concentrate on the road little better.
A radar sensor is usually at the core of the Adaptive Cruise Control. Installed at the front of the vehicle, the system permanently monitors the road ahead. As long as the road ahead is clear, cruise control feature maintains the speed set by the driver. If the system spots a slower vehicle within its detection range, it gently reduces speed by releasing the accelerator or actively engaging the brake control system. If the vehicle ahead speeds up or changes lanes, the cruise control automatically accelerates to the driver’s desired speed.
Standard Adaptive Cruise Control can be activated from speeds of around 30 km/h (20 mph) upwards and supports the driver, primarily on cross-country journeys or on freeways. The cruise control stop & go variant is also active at speeds below 30 km/h (20 mph). It can maintain the set distance to the preceding vehicle even at very low speeds and can decelerate to a complete standstill. When the vehicle remains stopped longer, the driver needs only to reactivate the system, for example by briefly stepping on the gas pedal to return to cruise control mode. In this way, cruise control stop & go supports the driver even in heavy traffic and traffic jams.
Since Adaptive Cruise Control is a comfort and convenience system, brake interventions and vehicle acceleration only take place within defined limits. Even with Adaptive Cruise Control switched on, it remains the driver’s responsibility to monitor the speed and distance from the vehicle in front.
Matlab Model:-
Requirement 1– Lead Vehicle:
As per the first requirement we have developed the subsystem where we have taken two inputs CameraInput_LeadVehicle & RadarInput_LeadVehicle and by summation of these two inputs we get the output which is as LeadVehicle_Speed.
Requirement 2 – Drive Vehicle:
As per the second requirement we have used CameraInput_DriveVehicle, RadarInput_DriveVehicle & one signal coming as an Input to this subsystem, Signal Name: Acceleration_Mode – three inputs into this requirement in total.
Summation of these three inputs will get the output which is as DriveVehicle_Speed.
LeadVehicle_Detected is renamed from Input Signal RadarInput_DriveVehicle by mere use of Signal Conversion block.
Requirement 3 – Adaptive Cruise Control Algorithm:
Requirement 3a – ACC OFF MODE state logic:
Requirement 3b – ACC STANDBY MODE state logic:
Requirement 3c – ACC ON MODE state logic:
This state will be activated when input signal SetSwitch is equal to 1. There are 6 sub states to this state logic: They are:
Requirement 3c (i) – LeadVehicle_Detected_Follow (ACC ON MODE):
Requirement 3c (ii) – LeadVehicle_Not_Detected (ACC ON MODE):
Requirement 3c (iii) – LeadVehicle_Detected_Resume (ACC ON MODE):
Requirement 3c (iv) - LeadVehicle_Not_Detected_Resume (ACC ON MODE):
Requirement 3c (v) - LeadVehicle_Speed_lessthan_Set_Speed (ACC ON MODE):
Requirement 3c (vi) - LeadVehicle_Speed_equal_Set_Speed (ACC ON MODE):
As per the Requirement 3, Requirement 3a, Requirement 3b, Requirement 3c, Requirement 3c(i), Requirement 3c(ii), Requirement 3c(iii), Requirement 3c(iv), Requirement 3c(v) & Requirement 3c(vi) we have developed the subsystem.
We have prepared the chart which is state flow diagram where we have implemented these all remaining requirements.
We will understand one by one.
Requirement 3:-
Requirement 3a :-
Combined Requirement 3b, Requirement 3c, Requirement 3c(i), Requirement 3c(ii), Requirement 3c(iii), Requirement 3c(iv), Requirement 3c(v) & Requirement 3c(vi):-
Signals & Calibration Data List:
Signal / Calibration Name |
Signal Type |
Data Type |
Dimension |
Min |
Max |
Initial Value |
Units |
CameraInput_LeadVehicle |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
RadarInput_LeadVehicle |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
CameraInput_DriveVehicle |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
RadarInput_DriveVehicle |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
Time_Gap |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
Set_Speed |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
Set_Gap |
Input |
Uint8 |
1 |
0 |
255 |
- |
- |
CruiseSwitch |
Input |
Boolean |
1 |
0 |
1 |
- |
- |
SetSwitch |
Input |
Boolean |
1 |
0 |
1 |
- |
- |
Acceleration_Mode |
Output |
Uint8 |
1 |
0 |
255 |
- |
- |
LeadVehicle_Speed |
Output |
Uint8 |
1 |
0 |
255 |
- |
- |
DriveVehicle_Speed |
Output |
Uint8 |
1 |
0 |
255 |
- |
- |
LeadVehicle_Detected |
Output |
Uint8 |
1 |
0 |
255 |
- |
- |
Created SLDD file:-
After succesfull running of the model next step is to generate the test report. For this step firstly we need to go to setting or configuration part of the model.
In the configuraion part in solver block we have changed solver type fixed step and solver will be discrete(no continuous states).
In the code generation block we have selected embedded coder at system target file.
For report generation just need to go to Apps which is at the top of the header then go to the Model Advisor.
After selecting Model advisor we have image like pop up window will open. As per this window we have a option to choose that at which part we want to test of the model or we can test the complete model by just click ok.
Now this is the upfront of the report generation. Here in the left cornor we have by product and by task option. So in the by product option we need to compile the whole project or we can say it will generate the whole report for the complete model. In by task block we can select that of which part testing we needed. More no of blocks select more time to generate the test.
For generating the test report we have to click over the Run selected checks.
Now by this report we can see that how many pass, fail and warning we have recieved in our model. Now we can minimise the warnings and fails one by one by selecting the left hand side blocks and see the behavviour of these occurance.
As we can see we have some warnings. Now tried to eleimante it by going into. It is saying treat as atomic unit. then i just went to matlab model and convert my model into atomic unit.
Now we can run this check to check that this warning removed or not. And as per the image now warning has been removed.
Now tracebility part:-
For this part we are doing the link to requirement part. We do it because when someone want to see any subsystem want to see the requirement of that subsystem so he can reach directly over it.
For that purpose we firstly copy the whole requirement over the word. Then select the requirement same as the image.
Now go to the model and right click over the requirement 2 subsystem. click on requirement then select the link to selection in word. After that when we tried to open the model. when we right clicked ove rthe requirement 2 subsystem we can see requirement 2 at the requirement selection.
Code creation:-
For this purpose go to Apps- Embedded coder- C_Code at the top header- Build option.
Now we have generated C code as well.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 2 Adaptive Cruise Control
Objective of Main Project: Developing Adaptive Cruise Control feature as per the Requirement Document using MATLAB Simulink. Follow all the MBD related processes: Requirement Tagging & Traceability, SLDD creation, Configuration Parameter changes, Model Advisor check & Code Generation. In Configuration Parameters:…
16 May 2022 03:12 PM IST
Project 1 (Mini Project on Vehicle Direction Detection
Objective of Mini Project:- Development of MATLAB Simulink model as per requirement. Tag the requirements to the simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems is fine. MBD compliant changes, Data Dictionary creation & code generation is added advantage, and that is not…
16 May 2022 12:48 PM IST
Project-1: Modelling an electric Car with Li-ion battery
Objective:- Create a MATLAB model of electric car which uses lithium ion battery and suitable motor. Choose suitable blocks from Simscape or Powertrain block set. Implement the vehicle speed control using PI controller and generate brake and accelerator commands. Avoid using readymade driver block for speed control. Prepare…
27 Apr 2022 08:08 AM IST
Final Project: Electric Rickshaw modelling
Objective:- Create a detailed MATLAB model of an electric rickshaw (three wheel passenger vehicle) as per details below: Rear wheels driven by PM brushed type motor Assume efficiency points of motor controller and motor Make an excel sheet of all input and assumed data Results: For any three standard driving…
21 Apr 2022 07:13 AM IST
Related Courses