Git Product home page Git Product logo

acc-ct's Introduction

Analysis and Simulation of Cruise Control Systems in Automotive Applications

Tomas A. Sanchez, July 2024.

Cruise Control (CC) is a system that automatically controls the speed of a motor vehicle. The system takes over the throttle of the car to maintain a steady speed as set by the driver.

Overview

The CC system is a feedback control system that uses a controller to maintain the desired speed. The controller adjusts the throttle of the car based on the difference between the desired speed and the actual speed of the car. The CC system is widely used in modern cars to improve fuel efficiency and reduce driver fatigue.

Block Diagram of Cruise Control System

Read more about the Design and Analysis of Cruise Control Systems in the Notebook.

How to run the simulation

IMPORTANT: The simulation requires Python 3.10 or later. You can install the required dependencies using pip:

pip install -r requirements.txt

You can run the simulation by executing the following command:

python src/acc/main.py

You will be prompted to enter multiple values for the simulation. You can use the default values by pressing Enter.

Or you can run the simulation with the default values by executing the following command:

python src/acc/main.py --default

After the simulation is complete, a output/results.png will be saved containing error, speed, and throttle plots over time. Results are also provided as a CSV file in output/results.csv.

Project Structure

The project is structured as follows:

.
├── notebooks
│   └── acc.ipynb
├── output
│   ├── results.csv
│   └── results.png
└── src
    └── acc
        ├── simulation
        ├── model
        │   ├── control.py
        │   ├── feedback.py
        │   └── process.py
        └── cli.py
  • notebooks/: Contains Jupyter notebooks for the analysis of the CC system.
  • output/: Contains the simulation results in CSV and PNG formats.
  • src/acc/: Source code for the CC system.
    • simulation/: Δt simulation logic.
    • model/: contains each control system component.
      • control.py: PID controller.
      • feedback.py: Feedback element (Speedometer).
      • process.py: Plant.
    • cli.py: Command-line interface for running the simulation.

License

This project is licensed under the terms of the MIT license unless otherwise specified. See LICENSE for more details or visit https://mit-license.org/.

Acknowledgements

This project was designed and developed by Tomás Sánchez <[email protected]>.

If you find this project useful, please consider supporting its development by sponsoring it.

Special thanks to the Python Control Systems Library for providing knowledge and physics models for the simulation.

acc-ct's People

Contributors

tomasanchez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.