Adityakale
5 min readJun 16, 2024

Aim:To develope an Adaptive Cruise Control(ACC) Feature as per the Requirment Document using MATLAb & Simulink and create the SLDD with the Code Genration.

Theory:

Adaptive Cruise control:

Adaptive cruise control (ACC) is an active safety system that automatically controls the acceleration and braking of a vehicle. It is activated through a button on the steering wheel and cancelled by driver’s braking and/or another button.It does so by helping the driver keep a steady vehicle speed at a given moment.

How adaptive cruise control works-

By monitoring other vehicles and objects on the road, adaptive cruise control enables a safe and comfortable driving experience. It does so by helping the driver keep a steady vehicle speed at a given moment. The driver can set their preference regarding certain factors, such as the distance to the car in front, driving mode — for example, economical, sporty or comfortable — and others. Together with information about speed limits, road curvature, accidents data and more, these choices influence the automatically selected speed.

an emerging technology-

Cruise control has come a long way from its early days in its quest to assist drivers on the road. When first introduced, it was only found in luxury car models due to its high production cost. As less expensive sensors reached the market, adaptive cruise control is steadily becoming a standard feature in new vehicles today.

The next step for modern adaptive cruise control systems is the ability to perceive and automatically handle changing traffic lights and other vehicles at junctions. Intelligent driving strategies that support this use case include priority negotiation and sensing a rapidly changing situation with high confidence. Of course, the driver can still observe the vehicle’s choices and intervene at any given moment.

Simulink model:

Explanation of each SubSytem:

Lead Vehicle Subshytem:

Two input signals are given to the lead vehicle subsstem as shown in the above image.

To murge this signals we have used a add block,as the to reduce the complicated algoritham as mentioned in the requirement.

Leadvheicle_Speed is the output signal.

Drive Vehicle Subsystem:

  • 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.

Adaptive Curise Control (ACC) Subsytem:

Accordong to the given Requirement we have managed to create the subsystem as per the discribtion.

  • 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.

A unit delay block is added in the outpur of the subsytem to solve the algebric looping problem.

The state Logic is as per the discribed requirments.

Creating SLDD:

Result:

Conecting all the System together we are now ready with our final model.Check the model simulation if there is no error we can proced with the model advisor check.

All connections are as per the requirments,and our model is simulating Succesfully.

Model Advisor check:

This check is very important before we go for the code generation.

Code generation:

Conclusion:

Thus we have Succesfully created a Adapative curise control model in simulink and created the SLDD with Code genreration.

Adityakale
Adityakale

Written by Adityakale

Software Engineer with expertise in CI/CD, containerization, and infrastructure monitoring.

No responses yet