Challenge

Project 2 Adaptive Cruise Control

Model is made using the requirements.

Initially a subsystem with inputs (CameraInput_LeadVehicle, RadarInput_LeadVehicle, CameraInput_DriveVehicle, RadarInput_DriveVehicle, Time_Gap, Set_Speed, Set_Gap, CruiseSwitch, SetSwitch) is created. SLDD is also created with class of ImportedExtern
The output of this subsystem is Acceleration_mode with SLDD class as ExportToFile.

Inside the subsystem 3 more subsystems each for Req 1, Req2, Req3 are there.
1. Inputs for 1st subsystem (Req1) are CameraInput_LeadVehicle, RadarInput_LeadVehicle 
   and output is LeadVehicle_Speed. SLDD is also created with class of ImportedExtern
   The output of this subsystem is Acceleration_mode with class as ExportToFile.
   Logic inside this is as per Req1.
2. Inputs for 2nd subsystem (Req2) are CameraInput_DriveVehicle, RadarInput_DriveVehicle 
   and Acceleration_Mode passed after delay block. Output is DriveVehicle_Speed and 
   LeadVehicle_Detected. SLDD is also created with class of inputs as ImportedExtern and 
   output class as ExportToFile.
   Logic inside this is as per Req2.
3. Inputs for 2nd subsystem (Req2) are DriveVehicle_Speed, LeadVehicle_Detected, 
   LeadVehicle_Speed, Time_Gap, Set_Speed, Set_Gap, CruiseSwitch, SetSwitch. Output is 
   Acceleration_Mode. SLDD is also created with class of inputs as ImportedExtern and 
   output class as ExportToFile.
   Logic inside this is as per Req3.

Inside subsyetm 3, Stateflow logics are there
For Req 3(a) : state of ACC_OFF is created with Acceleration_Mode = 0 as output
For Req 3(b) : state of ACC_STANDBY is created with Acceleration_Mode = 1 as output
For Req 3(C) : state of ACC_ON is created with Acceleration_Mode = 2 as output
Transition between these 3 states are done based on input values CruiseSwitch and SetSwitch

For State ACC_ON, further 6 substates are there
For Req 3c(i):
   LeadVehicle_Detected_Follow is implemented with Acceleration_Mode = 2 as output
For Req 3c(ii):
   LeadVehicle_Not_Detected is implemented with Acceleration_Mode = 1 as output
For Req 3c(iii):
   LeadVehicle_Detected_Resume is implemented with Acceleration_Mode = 3 as output
For Req 3c(iv):
   LeadVehicle_Not_Detected_Resume is implemented with Acceleration_Mode = 1 as output
For Req 3c(v):
   LeadVehicle_Speed_lessthan_Set_Speed is implemented, Acceleration_Mode = 4 as output
For Req 3c(vi):
   LeadVehicle_Speed_equal_Set_Speed is implemented with Acceleration_Mode = 5 as output

Finally after tagging requirements and setting code generation setting, code is generated.

Model advisor check is peformed and report is attached.
Ans:

Aim Of 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: enable “Support Floating Numbers” under Code Generation settings.
Use Embedded Coder to generate the code.
If choosing code generation, Storage class for Input signals: ImportedExtern; Storage class for Output signal: Export to File; Storage class for local signals: localizable; Storage class for calibration signals: Const.
Choose sample time for all signals as 0.01s.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.