In: Computer Science
Write an algorithm and draw a flowchart for the following problem: Create an adaptive cruise control for a car. Include functions for enabling/disabling the cruise control; setting up the speed. The system should always maintain the speed unless there is a slower car in front of it. Make sure to define inputs and outputs. Do not forget that computer’s microprocessor works in very small steps (tiny steps!), so be careful not to assign large number of steps to one flowchart block or to one algorithm statement.
WHAT IS IT?
Conventional Cruise Control can maintain a steady speed that you set. Adaptive cruise control (ACC) is an enhancement of conventional cruise control. ACC automatically adjusts the speed of your car to match the speed of the car in front of you. If the car ahead slows down, ACC can automatically match it. Once the car ahead moves out of your lane or accelerates beyond your car’s set speed, your ACC allows your car to return to the speed that you have set. Other than setting your speed, you only need to turn on the system and select your preferred following distance.
HOW TO USE IT?
The specific controls will be different depending on your particular car type, but usually you will have to start by setting a cruising speed and a following distance to the car ahead.
Activation/Deactivation
Most systems are operated by controls on the steering wheel. You can also intervene at any time by use of the brake or accelerator pedal.
Setting the speed
You can set the speed using the +/- speed button. You can also accelerate as normal until the desired speed is reached. Then you press a button to have the ACC “remember” the speed. Most ACC systems will work down to about 25 MPH.
Setting the distance
ACC systems allow you to set a following distance, or time interval, between your car and the car ahead. ACC systems provide various car-to-car distance options, such as: short, medium, or long distance. You can change the setting at any time as traffic conditions change. A longer setting is recommended for most driving.
HOW DOES IT WORK?
Parts related to a typical ACC system
Like standard cruise control systems, ACC keeps your car at the speed you set, as long as there is nothing in front of you. A sensor unit is added to determine the distance between your car and other cars in front you.
Speed and distance sensors. ACC uses information from two sensors: a distance sensor that monitors the gap to the car ahead and a speed sensor that automatically accelerates and decelerates your car. ACC uses information from these sensors to adjust your speed and maintain the set distance from the car in front of you.
Looking under the hood: Radar-based systems. Let’s take a look at one ACC technology: radar-based ACC. Some ACC systems send radar waves that reflect off objects in front of your car. Based on the radar reflection, ACC uses distance, direction and relative speed to detect if the car is within the distance you set. ACC predicts the path of your car and then decides whether any of the vehicles ahead are within your set distance.