All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
ADAPTIVE CRUISE CONTROL AIM OF THE PROJECT: To determine the Adaptive Cruise Control based on the given Information. OBJECTIVE OF MINI PROJECT: Adaptive Cruise Control is a comfort and convenience system, brake interventions and vehicle acceleration…
Praveen Kumar E S
updated on 12 Dec 2021
ADAPTIVE CRUISE CONTROL
AIM OF THE PROJECT:
To determine the Adaptive Cruise Control based on the given Information.
OBJECTIVE OF MINI PROJECT:
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.Adaptive cruise control (ACC) is an intelligent form of cruise control that slows down and speeds up automatically to keep pace with the car in front of you. The driver sets the maximum speed — just as with cruise control — then a radar sensor watches for traffic ahead, locks on to the car in a lane, and instructs the car to stay 2, 3, or 4 seconds behind the person car ahead of it (the driver sets the follow distance, within reason). ACC is now almost always paired with a pre-crash system that alerts you and often begins braking.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.
INTRODUCTION:
Adaptive Cruise Control (ACC) extends existing cruise control systems to include a headway sensor that monitors the distance between your vehicle and the vehicle ahead. The system is also sometimes called Active Cruise Control (ACC) or Intelligent Cruise Control (ICC). ACC systems are similar to the conventional cruise control systems in the way they maintain the vehicle preset speed. However, unlike conventional systems, ACC automatically adjusts the speed of the vehicle in order to maintain a safe distance from vehicles ahead in the same lane. The system automatically monitors road traffic patterns, employing a headway sensor capable of detecting vehicles at distances up to 500 ft, and using the throttle and brakes to maintain a pre-set distance behind the vehicle ahead. When the road is clear again, the system re-accelerates to the pre-set velocity.
There are two key types of headway sensors. Radar sensors employ microwave signals (typically at 35 or 76 GHz). Lidar sensors employ a laser diode to produce infrared light signals. Both types of sensors send a signal and monitor the time required for the signal to reflect off the object ahead. Optical or infrared image sensors are also being introduced for the purpose of detecting vehicles on the road ahead. These sensors can replace or supplement the information from radar or lidar sensors.
When ACC systems determine there is a need to slow the vehicle, they may use the engine, transmission and/or brakes to decrease the vehicle's speed and maintain a safe following distance. Many systems limit the maximum deceleration to no more than 3 m/s2 (10 ft/s2), although systems are beginning to appear that allow more aggressive braking The ACC user interface typically has both visual and audible indications that are provided to the driver depending on the severity of the situation. ACC systems can always be disengaged through the use of the brake pedal or the primary ACC user interface. In addition, certain stability systems such as traction control may also turn the ACC system off. ACC systems are evolving rapidly and are currently available on many mid- to high-end passenger cars as well as many heavy duty commercial truck
DEVELOPMENT OF MODEL:
STEP1:
By using the following Requirement , we develop a model
Requirement 1– Lead Vehicle:
Requirement 2 – Drive Vehicle:
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):
All Requirement Combine to form a Subsystem
At last Create into single Subsystem
Step 2:
Tagging the Requirement and Tagging
for Requirement 1 only Tagged like wise for all other requirement we need to tag
STEP3:
Linking and creating the Model with SLDD file
Step4:
In Configuration Parameters: enable “Support Floating Numbers” under Code Generation settings.
Choose sample time for all signals as 0.01s
Change the system target file into ert.tlc and also change the configuration parameter as per requirements
Step5:
Resolving and propagating the signal
MODEL ADVISOR REPORT:
The model Advisor Report is Shown below
CODE GENERATION:
1 | /* |
2 | * File: Adaptive_Cruise_Control.c |
3 | * |
4 | * Code generated for Simulink model 'Adaptive_Cruise_Control'. |
5 | * |
6 | * Model version : 1.6 |
7 | * Simulink Coder version : 9.5 (R2021a) 14-Nov-2020 |
8 | * C/C++ source code generated on : Sun Dec 12 13:17:42 2021 |
9 | * |
10 | * Target selection: ert.tlc |
11 | * Embedded hardware selection: Intel->x86-64 (Windows64) |
12 | * Code generation objectives: Unspecified |
13 | * Validation result: Not run |
14 | */ |
15 | |
16 | #include "Adaptive_Cruise_Control.h" |
17 | #include "Adaptive_Cruise_Control_private.h" |
18 | |
19 | /* Named constants for Chart: ' |
20 | #define Ada_IN_LeadVehicle_Not_Detected ((uint8_T)3U) |
21 | #define Adaptive_Cr_IN_ACC_STANDBY_MODE ((uint8_T)2U) |
22 | #define Adaptive_Cru_IN_NO_ACTIVE_CHILD ((uint8_T)0U) |
23 | #define Adaptive_Cruise_IN_ACC_OFF_MODE ((uint8_T)1U) |
24 | #define IN_Adaptive_cruise_control_Algo ((uint8_T)3U) |
25 | #define IN_LeadVehicle_Detected_Follow ((uint8_T)1U) |
26 | #define IN_LeadVehicle_Detected_Resume ((uint8_T)2U) |
27 | #define IN_LeadVehicle_Not_Detected_Res ((uint8_T)4U) |
28 | #define IN_LeadVehicle_Speed_equal_Set_ ((uint8_T)5U) |
29 | #define IN_LeadVehicle_Speed_lessthan_S ((uint8_T)6U) |
30 | |
31 | /* Block states (default storage) */ |
32 | DW_Adaptive_Cruise_Control_T Adaptive_Cruise_Control_DW; |
33 | |
34 | /* External outputs (root outports fed by signals with default storage) */ |
35 | ExtY_Adaptive_Cruise_Control_T Adaptive_Cruise_Control_Y; |
36 | |
37 | /* Real-time model */ |
38 | static RT_MODEL_Adaptive_Cruise_Cont_T Adaptive_Cruise_Control_M_; |
39 | RT_MODEL_Adaptive_Cruise_Cont_T *const Adaptive_Cruise_Control_M = |
40 | &Adaptive_Cruise_Control_M_; |
41 | |
42 | /* Model step function */ |
43 | void Adaptive_Cruise_Control_step(void) |
44 | { |
45 | uint8_T rtb_Add; |
46 | uint8_T rtb_Sum; |
47 | |
48 | /* Sum: ' |
49 | * Inport: ' |
50 | * Inport: ' |
51 | * UnitDelay: ' |
52 | */ |
53 | rtb_Sum = (uint8_T)((uint32_T)(uint8_T)((uint32_T)CameraInput_DriveVehicle + |
54 | RadarInput_DriveVehicle) + Adaptive_Cruise_Control_Y.Acceleration_Mode); |
55 | |
56 | /* Sum: ' |
57 | * Inport: ' |
58 | * Inport: ' |
59 | */ |
60 | rtb_Add = (uint8_T)((uint32_T)CameraInput_LeadVehicle + RadarInput_LeadVehicle); |
61 | |
62 | /* Chart: ' |
63 | * Inport: ' |
64 | * Inport: ' |
65 | * Inport: ' |
66 | * Inport: ' |
67 | * Inport: ' |
68 | * Inport: ' |
69 | * UnitDelay: ' |
70 | */ |
71 | if (Adaptive_Cruise_Control_DW.is_active_c3_Adaptive_Cruise_Co == 0U) { |
72 | Adaptive_Cruise_Control_DW.is_active_c3_Adaptive_Cruise_Co = 1U; |
73 | Adaptive_Cruise_Control_DW.is_c3_Adaptive_Cruise_Control = |
74 | Adaptive_Cruise_IN_ACC_OFF_MODE; |
75 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 0U; |
76 | } else { |
77 | switch (Adaptive_Cruise_Control_DW.is_c3_Adaptive_Cruise_Control) { |
78 | case Adaptive_Cruise_IN_ACC_OFF_MODE: |
79 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 0U; |
80 | if (CruiseSwitch) { |
81 | Adaptive_Cruise_Control_DW.is_c3_Adaptive_Cruise_Control = |
82 | Adaptive_Cr_IN_ACC_STANDBY_MODE; |
83 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
84 | } |
85 | break; |
86 | |
87 | case Adaptive_Cr_IN_ACC_STANDBY_MODE: |
88 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
89 | if (!CruiseSwitch) { |
90 | Adaptive_Cruise_Control_DW.is_c3_Adaptive_Cruise_Control = |
91 | Adaptive_Cruise_IN_ACC_OFF_MODE; |
92 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 0U; |
93 | } else if (SetSwitch) { |
94 | Adaptive_Cruise_Control_DW.is_c3_Adaptive_Cruise_Control = |
95 | IN_Adaptive_cruise_control_Algo; |
96 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
97 | IN_LeadVehicle_Detected_Follow; |
98 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 2U; |
99 | } |
100 | break; |
101 | |
102 | default: |
103 | /* case IN_Adaptive_cruise_control_Algorithm: */ |
104 | if (!SetSwitch) { |
105 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
106 | Adaptive_Cru_IN_NO_ACTIVE_CHILD; |
107 | Adaptive_Cruise_Control_DW.is_c3_Adaptive_Cruise_Control = |
108 | Adaptive_Cr_IN_ACC_STANDBY_MODE; |
109 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
110 | } else { |
111 | switch (Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo) { |
112 | case IN_LeadVehicle_Detected_Follow: |
113 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 2U; |
114 | if (RadarInput_DriveVehicle == 0) { |
115 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
116 | Ada_IN_LeadVehicle_Not_Detected; |
117 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
118 | } else if (((RadarInput_DriveVehicle == 1) && (rtb_Add < Set_Speed)) || |
119 | (Time_Gap < Set_Gap)) { |
120 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
121 | IN_LeadVehicle_Speed_lessthan_S; |
122 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 4U; |
123 | } |
124 | break; |
125 | |
126 | case IN_LeadVehicle_Detected_Resume: |
127 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 3U; |
128 | if ((rtb_Sum == Set_Speed) && (rtb_Add >= Set_Speed) && (Time_Gap >= |
129 | Set_Gap)) { |
130 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
131 | IN_LeadVehicle_Detected_Follow; |
132 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 2U; |
133 | } else if (RadarInput_DriveVehicle == 0) { |
134 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
135 | IN_LeadVehicle_Not_Detected_Res; |
136 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
137 | } else if ((rtb_Sum < Set_Speed) && (rtb_Add > rtb_Sum) && (Time_Gap >= |
138 | Set_Gap)) { |
139 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
140 | IN_LeadVehicle_Speed_equal_Set_; |
141 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 5U; |
142 | } |
143 | break; |
144 | |
145 | case Ada_IN_LeadVehicle_Not_Detected: |
146 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
147 | if ((RadarInput_DriveVehicle == 1) && (rtb_Sum == Set_Speed) && |
148 | (rtb_Add >= Set_Speed) && (Time_Gap >= Set_Gap)) { |
149 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
150 | IN_LeadVehicle_Detected_Follow; |
151 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 2U; |
152 | } else if (((RadarInput_DriveVehicle == 1) && (rtb_Add < Set_Speed)) || |
153 | (Time_Gap < Set_Gap)) { |
154 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
155 | IN_LeadVehicle_Speed_lessthan_S; |
156 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 4U; |
157 | } |
158 | break; |
159 | |
160 | case IN_LeadVehicle_Not_Detected_Res: |
161 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
162 | break; |
163 | |
164 | case IN_LeadVehicle_Speed_equal_Set_: |
165 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 5U; |
166 | if ((RadarInput_DriveVehicle == 0) || (rtb_Sum <= Set_Speed)) { |
167 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
168 | IN_LeadVehicle_Not_Detected_Res; |
169 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
170 | } else if (((rtb_Sum < Set_Speed) && (rtb_Add > rtb_Sum)) || (Time_Gap |
171 | >= Set_Gap)) { |
172 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
173 | IN_LeadVehicle_Detected_Resume; |
174 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 3U; |
175 | } else if (((rtb_Add < Set_Speed) && (rtb_Add < rtb_Sum)) || (0.75 * |
176 | (real_T)Set_Gap == Time_Gap)) { |
177 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
178 | IN_LeadVehicle_Speed_lessthan_S; |
179 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 4U; |
180 | } |
181 | break; |
182 | |
183 | default: |
184 | /* case IN_LeadVehicle_Speed_lessthan_Set_Speed: */ |
185 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 4U; |
186 | if ((RadarInput_DriveVehicle == 0) && (rtb_Sum == Set_Speed)) { |
187 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
188 | Ada_IN_LeadVehicle_Not_Detected; |
189 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 1U; |
190 | } else if (((real_T)rtb_Add * 1.25 >= rtb_Sum) && ((real_T)rtb_Add * |
191 | 0.75 <= rtb_Sum) && (rtb_Sum < Set_Speed) && ((Time_Gap <= |
192 | 1.25 * (real_T)Set_Gap) && (Time_Gap >= 0.75 * (real_T)Set_Gap))) { |
193 | Adaptive_Cruise_Control_DW.is_Adaptive_cruise_control_Algo = |
194 | IN_LeadVehicle_Speed_equal_Set_; |
195 | Adaptive_Cruise_Control_Y.Acceleration_Mode = 5U; |
196 | } |
197 | break; |
198 | } |
199 | } |
200 | break; |
201 | } |
202 | } |
203 | |
204 | /* End of Chart: ' |
205 | } |
206 | |
207 | /* Model initialize function */ |
208 | void Adaptive_Cruise_Control_initialize(void) |
209 | { |
210 | /* (no initialization code required) */ |
211 | } |
212 | |
213 | /* Model terminate function */ |
214 | void Adaptive_Cruise_Control_terminate(void) |
215 | { |
216 | /* (no terminate code required) */ |
217 | } |
218 | |
219 | /* |
220 | * File trailer for generated code. |
221 | * |
222 | * [EOF] |
223 | */ |
224 |
CONCLUSION:
The Adaptive Cruise Control System is Sucessfully Implemented and also C code is also Generated.
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...
Control Logic of Washing Machine and Gear Shift .
Aim: To Implement control logic of a 'Washing Machine' Using Stateflow as per given Sequence. Make a Simulink chart for the 'Gear Shift' logic as per given conditions. Objective: In Simulink, Implement the Control logic of a Washing Machine using StateFlow as per given input conditions.…
10 Feb 2022 11:26 AM IST
Week 2 Challenge
Question 1:Compare four different types of fuel cells and state their applications. An electrical current is produced via redox reactions occurring on the electrodes of the fuel cell. The most common fuel cell is the hydrogen fuel cell. On the anode, hydrogen molecules, which are fed to the anode from an external supply,…
06 Feb 2022 04:59 PM IST
Project-1: Modelling an electric Car with Li-ion battery
Aim: To Create a MATLAB model of an electric car in which we uses which uses lithium ion battery and suitable motor choosing a suitable blocks from the Powertrain block set and Implement the Vehicle Speed by using PI Controller and generate the accelerator and brake commands. Objectives: …
27 Jan 2022 06:44 AM IST
Final Project: Electric Rickshaw modelling
1.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 cycles show…
27 Jan 2022 05:01 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.