Project 2 Adaptive Cruise Control
AIM
Creating a simulink model for Vehicle Direction Detection ADAS feature for vehicle.
INTRODUCTION
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.
OBJECTIVES
- 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.
METHODOLOGY
The Vehicle Direction Detection is modelled MATLAB Simulink with required data. The modelling steps include
- Collection of requirement for the model.
- Building the MATLAB Simulink model.
- Building the SLDD file for the model.
- Validating the model with model advisor tool.
- Code creation.
I. REQUIREMENTS
Requirement 1– Lead Vehicle:
- Lead Vehicle is a vehicle which is driving in the road ahead of our drive vehicle. Two input signals (Signal Name: CameraInput_LeadVehicle & RadarInput_LeadVehicle).
- Ideally sensor fusion techniques will be deployed to process & analyse data from camera & radar. For complexity reasons, let’s not adapt to any such algorithms.
- We can simply add both the radar & camera inputs & the corresponding output is read as Speed profile output (Signal Name: LeadVehicle_Speed).
- Speed data of the lead vehicle is critical in implementing the Adaptive Cruise Control algorithm.
Requirement 2 – Drive Vehicle:
- Drive Vehicle is the vehicle driven by the user & this is the vehicle which has ACC algorithm in it.
- Like the Lead Vehicle, Drive Vehicle algorithm also has 2 input signals (Signal Name: CameraInput_DriveVehicle, RadarInput_DriveVehicle) & one signal coming as an Input to this subsystem (Signal Name: Acceleration_Mode) – three inputs into this requirement in total.
- Like the above requirement, sensor fusion techniques will also be deployed here, for complexity reasons we are ignoring them.
- Two output signals come from this subsystem (Signal Name: DriveVehicle_Speed & LeadVehicle_Detected).
- Signal DriveVehicle_Speed is summation of three input signals mentioned above & LeadVehicle_Detected is renamed from Input Signal RadarInput_DriveVehicle by mere use of Signal Conversion block.
Requirement 3 – Adaptive Cruise Control Algorithm:
- Adaptive Cruise Control feature has 3 major modes of operation: OFF Mode, STANDBY Mode & ON Mode. This particular requirement has to be implemented as state machine logic in Simulink.
- The input signals to this state machine system are (Signal Name: Time_Gap, Set_Speed, Set_Gap, CruiseSwitch, SetSwitch).
- Also, the output signals (Signal Name: DriveVehicle_Speed & LeadVehicle_Detected) from requirement-2 is fed back as an input signal into this state machine block.
- Additionally, output signal (Signal Name: LeadVehicle_Speed) from requirement-1 is given as an input signal to this state machine block as well.
- Output from this subsystem is a signal (Signal Name: Acceleration_Mode) which governs the vehicular speed of the drive vehicle which automatically adjusts its speed & velocity to match the lead vehicle.
Requirement 3a – ACC OFF MODE state logic:
- This is the default state inside state machine logic. Output signal Acceleration_Mode is at value 0 in this state.
- This state is governed by input signal CruiseSwitch.
- If CruiseSwitch is equal to 1, state ACC STANDBY mode will get activated. If CruiseSwitch is equal to 0, state ACC OFF mode will get activated, from either ACC ON mode or ACC STANDBY mode
Requirement 3b – ACC STANDBY MODE state logic:
- This is the second activated state inside state machine logic. Output signal Acceleration_Mode is at value 1 in this state.
- This state is governed by both input signals CruiseSwitch & SetSwitch.
- If CruiseSwitch is equal to 1, state ACC STANDBY mode will get activated. If CruiseSwitch is equal to 0, state ACC OFF mode will get activated, from either ACC ON mode or ACC STANDBY mode
- If SetSwitch is equal to 1, state ACC ON mode will get activated. If SetSwitch is equal to 0, state ACC STANDBY mode will get activated.
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:
- LeadVehicle_Detected_Follow (Default)
- LeadVehicle_Not_Detected
- LeadVehicle_Detected_Resume
- LeadVehicle_Not_Detected_Resume
- LeadVehicle_Speed_lessthan_Set_Speed
- LeadVehicle_Speed_equal_Set_Speed
Requirement 3c (i) – LeadVehicle_Detected_Follow (ACC ON MODE):
- This is the default sub state inside ACC ON MODE state. Output signal Acceleration_Mode is equal to 2.
- Condition to transit from LeadVehicle_Detected_Follow to LeadVehicle_Not_Detected; Input signal condition LeadVehicle_Detected == 0.
- Condition to transit from LeadVehicle_Detected_Follow to LeadVehicle_Speed_lessthan_Set_Speed; Input Signals condition (LeadVehicle_Detected == 1) && (LeadVehicle_Speed < Set_Speed) || (Time_Gap < Set_Gap).
Requirement 3c (ii) – LeadVehicle_Not_Detected (ACC ON MODE):
- Output signal Acceleration_Mode is equal to 1.
- Condition to transit from LeadVehicle_Not_Detected to LeadVehicle_Detected_Follow; Input signals condition [(LeadVehicle_Detected==1) && (DriveVehicle_Speed == Set_Speed) && (LeadVehicle_Speed >= Set_Speed) && (Time_Gap >= Set_Gap)]
- Condition to transit from LeadVehicle_Not_Detected to LeadVehicle_Speed_lessthan_Set_Speed; Input signals condition [(LeadVehicle_Detected == 1) && (LeadVehicle_Speed < Set_Speed) || (Time_Gap < Set_Gap)]
Requirement 3c (iii) – LeadVehicle_Detected_Resume (ACC ON MODE):
- Output signal Acceleration_Mode is equal to 3.
- Condition to transit from LeadVehicle_Detected_Resume to LeadVehicle_Detected_Follow; Input signals condition [(DriveVehicle_Speed == Set_Speed) && (LeadVehicle_Speed >= Set_Speed) && (Time_Gap >= Set_Gap)]
- Condition to transit from LeadVehicle_Detected_Resume to LeadVehicle_Not_Detected_Resume; Input signal condition LeadVehicle_Detected==0.
- Condition to transit from LeadVehicle_Detected_Resume to LeadVehicle_Speed_equal_Set_Speed; Input Signal condition [(DriveVehicle_Speed < Set_Speed) && (LeadVehicle_Speed > DriveVehicle_Speed) && (Time_Gap >= Set_Gap)]
Requirement 3c (iv) - LeadVehicle_Not_Detected_Resume (ACC ON MODE):
- Output signal Acceleration_Mode is equal to 1.
Requirement 3c (v) - LeadVehicle_Speed_lessthan_Set_Speed (ACC ON MODE):
- Output signal Acceleration_Mode is equal to 4.
- Condition to transit from LeadVehicle_Speed_lessthan_Set_Speed to LeadVehicle_Not_Detected; Input signal condition [(LeadVehicle_Detected == 0) && (DriveVehicle_Speed == Set_Speed)]
- Condition to transit from LeadVehicle_Speed_lessthan_Set_Speed to LeadVehicle_Speed_equal_Set_Speed; Input signals condition [((LeadVehicle_Speed*1.25>=DriveVehicle_Speed) && (LeadVehicle_Speed * 0.75<=DriveVehicle_Speed)) && (DriveVehicle_Speed < Set_Speed) && ((Time_Gap<=1.25*Set_Gap) && (Time_Gap >=0.75*Set_Gap))]
Requirement 3c (vi) - LeadVehicle_Speed_equal_Set_Speed (ACC ON MODE):
- Output signal Acceleration_Mode is equal to 5.
- Condition to transit from LeadVehicle_Speed_equal_Set_Speed to LeadVehicle_Not_Detected_Resume; Input signal conditions is [(LeadVehicle_Detected == 0) || (DriveVehicle_Speed <= Set_Speed)]
- Condition to transit from LeadVehicle_Speed_equal_Set_Speed to LeadVehicle_Detected_Resume; Input signal conditions [(DriveVehicle_Speed < Set_Speed) && (LeadVehicle_Speed > DriveVehicle_Speed) || (Time_Gap >= Set_Gap)]
- Condition to transit from LeadVehicle_Speed_equal_Set_Speed to LeadVehicle_Speed_lessthan_Set_Speed; Input signals conditions [(LeadVehicle_Speed
- Condition to transit from LeadVehicle_Speed_equal_Set_Speed to LeadVehicle_Speed_lessthan_Set_Speed; Input signals conditions [(LeadVehicle_Speed<Set_Speed) && (LeadVehicle_Speed<DriveVehicle_Speed) || (Time_Gap == 0.75*Set_Gap)]
II. MODELLING
From the above requirement the MATLAB Simulink model is build, the Modelling part includes
- Creating the required Simulink model
- Linking the document with the subsytem
- Creating SLDD file for signals and constants
- Model Configuration setting
Simulink Model:
1. Main window

2. Inside the main subsytem, consist of two subsytem requirement1 (Lead vehicle) and requirement2 (Drive vehicle) and a Chart (ACC algorithm for acceleration mode control).

2.a. Requirement1 (Lead vehicle)
This subsytem consist of two inputs Camera and Radar input consist of data of lead vehicle, the model process and determines the lead vehicle speed and given as output.

2.b. Requirement2 (Drive vehicle)
The drive vehicle subsytem consist of user input and output as drive vehicle speed and lead vehicle speed.

2.c. Requirement3. Chart, the chart consist of Algorithm for Automatic Cruise Control.
The chart has prepared by the given data in Requirement 3.

Zoomed portions of aboce chart


Tagging the requirement documents to the respective subsystem
Follow the steps to tag the required document to the subsystem
- Create the requirement document in word or pdf format in same folder that of model file.
- Select the heading of the requirement document.
- Now open the MATALAB Simulink model.
- Right click on the required subsytem. select 'Requirements' and the select 'link to Selection in Word' (for doc file)
- Now again right click on the susbsystem and check whether the required document is linked or not, and the select the "Requirement-1' now the document will open in side window,
- repeat the same for Linking document with other subsytem block.
Creating SLDD file
The SLDD file is neccessary to know about the signal parameter and constant parameter. For creating the SLDD file for the above model follow the steps
- Open the Model Explorer (Ctrl+M)
- Create an External Data file for above model as "acc_dd.sldd" and save it in same folder as that of model file.
- Add signals and constants based on the data
- Right click on the acc_dd after entering all the datas and select 'Save changes' and click on Ok.
- Close the model explorer and refresh the model file.
- Now the all signals and constants will be updated.
Model Configuration
In model settings under 'Solver' change the following parameters
- Type: Fixed-step
- Solver: discrete (no continous states)
- Fixed-step size: 0.01s

After changing click on 'Apply' .
Next in Code generation change
1. System target file: ert.tlc : Embedded coder

2. Tick ON the floating-point numbers under Support, Interface, Code generation

After changing click on 'Apply' and then click on 'Ok'.
II. MODEL ADVISOR
Model Advisor tool is used to check whether the following model works properly and build properly according to many standars selected.
For checking the model with Model Advisor tool follow the steps
- Open Model Advisor tool
- A window will pop up, select whole system with name of the file
- Now Model Advisor window will be open, in that select "By Task", in under that select the required standars for testing.
- Now click on the "Run Selected checks"
- After running in the window as shown above there will be warning message will be shown.
- To coorect the warning message
- Select the standard in which warning message is shown
- Select the warning message, it will automatically divert to the area where warning is shown
- Change the name (in this case) and save the model and go back to the Model Advisor window
- Click on "Run this check", if the problem is solved that part will be shown with a greean tick
- Select the standard in which warning message is shown
- Continue above steps for all warnings, and try to resolve as many as warnings.
- In this at last 11 warnings remains, earlier it was 173 which is reduced to 11, which is acceptable.
- Now the model has followed most of the standard and is now ready for code generation.
- If required "Report" can be generated for Model advisor tool.
III. CODE GENERATION
The code generation is required to convert the model into a c file for machine level programming, with the help of MATLAB the c file can be generated.
For Code generation follow the steps
- Open the model settings in that under Code generation change the following parameters
- System target file: ert.tlc
- Language: C

- Click on Apply after changing the datas.
- Now go back to the model, right click on the main subsytem, select C/C++ code and then select generate s-function
- A new window will appear select "Create SIL block"

- Now click on Build
- A new MATALAB Simulink window will open with SIL block of the model for SIL testing
- Also in the folder containing MATLAB file a new folder "VCC_ert_rtw" will be reated along with SIL.
- The folder consist of generated C file and h file.
- The Code generator window will open as shown
- The generated C code of main subsytem is
-
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * File: VCC.c * * Code generated for Simulink model 'VCC'. * * Model version : 1.33 * Simulink Coder version : 9.6 (R2021b) 14-May-2021 * C/C++ source code generated on : Mon May 23 13:43:12 2022 * * Target selection: ert.tlc * Embedded hardware selection: Intel->x86-64 (Windows64) * Code generation objectives: Unspecified * Validation result: Not run */ #include "VCC.h" #include "VCC_private.h" /* Named constants for Chart: '<S1>/ACC_Algorithm' */ #define IN_LeadVehicle_Detected_Follow ((uint8_T)1U) #define IN_LeadVehicle_Detected_Resume ((uint8_T)2U) #define IN_LeadVehicle_Not_Detected_Res ((uint8_T)4U) #define IN_LeadVehicle_Speed_equal_Set_ ((uint8_T)5U) #define IN_LeadVehicle_Speed_lessthan_S ((uint8_T)6U) #define VCC_IN_ACC_OFF_MODE ((uint8_T)1U) #define VCC_IN_ACC_ON_MODE ((uint8_T)2U) #define VCC_IN_ACC_STANDBY_MODE ((uint8_T)3U) #define VCC_IN_LeadVehicle_Not_Detected ((uint8_T)3U) #define VCC_IN_NO_ACTIVE_CHILD ((uint8_T)0U) /* Exported data definition */ /* Definition for custom storage class: ExportToFile */ uint8_T Acceleration_Mode; /* '<S1>/Unit Delay' */ /* Block states (default storage) */ DW_VCC_T VCC_DW; /* External outputs (root outports fed by signals with default storage) */ ExtY_VCC_T VCC_Y; /* Model step function */ void VCC_step(void) { /* local block i/o variables */ uint8_T LeadVehicle_Speed; uint8_T DriveVehicle_Speed; uint8_T LeadVehicle_Detected; /* Sum: '<S4>/Sum' incorporates: * Inport: '<Root>/CameraInput_LeadVehicle' * Inport: '<Root>/RadarInput_LeadVehicle' */ LeadVehicle_Speed = (uint8_T)(((uint32_T)CameraInput_LeadVehicle) + ((uint32_T) RadarInput_LeadVehicle)); /* UnitDelay: '<S1>/Unit Delay' */ Acceleration_Mode = VCC_Y.Acceleration_Mode_dfxo; /* Sum: '<S3>/Sum1' incorporates: * Inport: '<Root>/CameraInput_DriveVehicle' * Inport: '<Root>/RadarInput_DriveVehicle' * Sum: '<S3>/Sum' */ DriveVehicle_Speed = (uint8_T)(((uint32_T)((uint8_T)(((uint32_T) Acceleration_Mode) + ((uint32_T)CameraInput_DriveVehicle)))) + ((uint32_T) RadarInput_DriveVehicle)); /* SignalConversion: '<S3>/SignalConversion1' incorporates: * Inport: '<Root>/RadarInput_DriveVehicle' */ LeadVehicle_Detected = RadarInput_DriveVehicle; /* Chart: '<S1>/ACC_Algorithm' incorporates: * Inport: '<Root>/CruiseSwitch' * Inport: '<Root>/SetSwitch' * Inport: '<Root>/Set_Gap' * Inport: '<Root>/Set_Speed' * Inport: '<Root>/Time_Gap' * UnitDelay: '<S1>/Unit Delay' * * Block requirements for '<S1>/ACC_Algorithm': * 1. Requirement 3 – Adaptive Cruise Control Algorithm: */ if (((uint32_T)VCC_DW.is_active_c3_VCC) == 0U) { VCC_DW.is_active_c3_VCC = 1U; VCC_DW.is_c3_VCC = VCC_IN_ACC_OFF_MODE; VCC_Y.Acceleration_Mode_dfxo = 0U; } else { switch (VCC_DW.is_c3_VCC) { case VCC_IN_ACC_OFF_MODE: if (CruiseSwitch) { VCC_DW.is_c3_VCC = VCC_IN_ACC_STANDBY_MODE; VCC_Y.Acceleration_Mode_dfxo = 1U; } else { VCC_DW.is_c3_VCC = VCC_IN_ACC_OFF_MODE; VCC_Y.Acceleration_Mode_dfxo = 0U; } break; case VCC_IN_ACC_ON_MODE: switch (VCC_DW.is_ACC_ON_MODE) { case IN_LeadVehicle_Detected_Follow: VCC_Y.Acceleration_Mode_dfxo = 2U; if (((int32_T)LeadVehicle_Detected) == 0) { VCC_DW.is_ACC_ON_MODE = VCC_IN_LeadVehicle_Not_Detected; VCC_Y.Acceleration_Mode_dfxo = 1U; } else if (((((int32_T)LeadVehicle_Detected) == 1) && (LeadVehicle_Speed < Set_Speed)) || (Time_Gap < Set_Gap)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Speed_lessthan_S; VCC_Y.Acceleration_Mode_dfxo = 4U; } else { /* no actions */ } break; case IN_LeadVehicle_Detected_Resume: VCC_Y.Acceleration_Mode_dfxo = 3U; if (((DriveVehicle_Speed == Set_Speed) && (LeadVehicle_Speed >= Set_Speed)) && (Time_Gap >= Set_Gap)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Detected_Follow; VCC_Y.Acceleration_Mode_dfxo = 2U; } else if (((int32_T)LeadVehicle_Detected) == 0) { VCC_DW.is_ACC_ON_MODE = VCC_IN_LeadVehicle_Not_Detected; VCC_Y.Acceleration_Mode_dfxo = 1U; } else if (((DriveVehicle_Speed < Set_Speed) && (LeadVehicle_Speed > DriveVehicle_Speed)) && (Time_Gap >= Set_Gap)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Speed_equal_Set_; VCC_Y.Acceleration_Mode_dfxo = 5U; } else { /* no actions */ } break; case VCC_IN_LeadVehicle_Not_Detected: VCC_Y.Acceleration_Mode_dfxo = 1U; if ((((((int32_T)LeadVehicle_Detected) == 1) && (DriveVehicle_Speed == Set_Speed)) && (LeadVehicle_Speed >= Set_Speed)) && (Time_Gap >= Set_Gap)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Detected_Follow; VCC_Y.Acceleration_Mode_dfxo = 2U; } else if (((((int32_T)LeadVehicle_Detected) == 1) && (LeadVehicle_Speed < Set_Speed)) || (Time_Gap < Set_Gap)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Speed_lessthan_S; VCC_Y.Acceleration_Mode_dfxo = 4U; } else { /* no actions */ } break; case IN_LeadVehicle_Not_Detected_Res: VCC_Y.Acceleration_Mode_dfxo = 1U; break; case IN_LeadVehicle_Speed_equal_Set_: VCC_Y.Acceleration_Mode_dfxo = 5U; if (((DriveVehicle_Speed < Set_Speed) && (LeadVehicle_Speed > DriveVehicle_Speed)) || (Time_Gap >= Set_Gap)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Detected_Resume; VCC_Y.Acceleration_Mode_dfxo = 3U; } else if (((LeadVehicle_Speed < Set_Speed) && (LeadVehicle_Speed < DriveVehicle_Speed)) || (((real_T)Time_Gap) == (0.75 * ((real_T)Set_Gap)))) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Speed_lessthan_S; VCC_Y.Acceleration_Mode_dfxo = 4U; } else if ((((int32_T)LeadVehicle_Detected) == 0) || (DriveVehicle_Speed <= Set_Speed)) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Not_Detected_Res; VCC_Y.Acceleration_Mode_dfxo = 1U; } else { /* no actions */ } break; default: /* case IN_LeadVehicle_Speed_lessthan_Set_Speed: */ VCC_Y.Acceleration_Mode_dfxo = 4U; if ((((int32_T)LeadVehicle_Detected) == 0) && (DriveVehicle_Speed == Set_Speed)) { VCC_DW.is_ACC_ON_MODE = VCC_IN_LeadVehicle_Not_Detected; VCC_Y.Acceleration_Mode_dfxo = 1U; } else if (((((((real_T)LeadVehicle_Speed) * 1.25) >= ((real_T) DriveVehicle_Speed)) && ((((real_T)LeadVehicle_Speed) * 0.75) <= ((real_T)DriveVehicle_Speed))) && (DriveVehicle_Speed < Set_Speed)) && ((((real_T)Time_Gap) <= (1.25 * ((real_T) Set_Gap))) && (((real_T)Time_Gap) >= (0.75 * ((real_T)Set_Gap))))) { VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Speed_equal_Set_; VCC_Y.Acceleration_Mode_dfxo = 5U; } else { /* no actions */ } break; } break; default: /* case IN_ACC_STANDBY_MODE: */ if (!CruiseSwitch) { VCC_DW.is_c3_VCC = VCC_IN_ACC_OFF_MODE; VCC_Y.Acceleration_Mode_dfxo = 0U; } else if (!SetSwitch) { VCC_DW.is_c3_VCC = VCC_IN_ACC_STANDBY_MODE; VCC_Y.Acceleration_Mode_dfxo = 1U; } else { VCC_DW.is_c3_VCC = VCC_IN_ACC_ON_MODE; VCC_DW.is_ACC_ON_MODE = IN_LeadVehicle_Detected_Follow; VCC_Y.Acceleration_Mode_dfxo = 2U; } break; } } /* End of Chart: '<S1>/ACC_Algorithm' */ } /* Model initialize function */ void VCC_initialize(void) { /* Registration code */ /* block I/O */ /* custom signals */ Acceleration_Mode = 0U; /* states (dwork) */ (void) memset((void *)&VCC_DW, 0, sizeof(DW_VCC_T)); /* external outputs */ VCC_Y.Acceleration_Mode_dfxo = 0U; /* SystemInitialize for Chart: '<S1>/ACC_Algorithm' * * Block requirements for '<S1>/ACC_Algorithm': * 1. Requirement 3 – Adaptive Cruise Control Algorithm: */ VCC_DW.is_ACC_ON_MODE = VCC_IN_NO_ACTIVE_CHILD; VCC_DW.is_active_c3_VCC = 0U; VCC_DW.is_c3_VCC = VCC_IN_NO_ACTIVE_CHILD; } /* * File trailer for generated code. * * [EOF] */
-
CONCLUSION
The Automatic Cruise Control model has created using the MATLAB Simulink. The neccessary SLDD file is created for all the signals and variables used in the model. The model is then tested with MATLAB ADVISOR tool and lastlty the C code is generated along with the SIL block of the model.
All the files are archieved and attached as "ACC.zip", which includes
MATALAB model file: acc_mdl.slx
SLDD file: acc_dd.sldd
Linked Documents: Requirement_1.docx, Requirement_2.docx, Requirement_3.docx and Requirement_3c.docx
SIL block model: acc_sil.slx
- Sandeepvytla97Hello, I would like to know more about this project. Can we get in touch to discuss ?












