Proportional-Integral-Derivative controller simulation to balance a ball on cart

Overview

PID Controller Simualation

A Proportional-Integral-Derivative controller to self balance a ball on a rolling cart. Use arrow keys to control the cart, and disturb the ball.

Try on Web

https://sparshg.github.io/pid-balancer/

Downloads for Desktop

Windows, Mac: https://github.com/sparshg/pid-balancer/releases

(Should work on Linux too, didn't compile)

Implementation Details

Physics for the simulation is implemented according to this paper (excluding the counter-balances and connecting rod)

I used Runge-Kutta method (4th order) to solve the system.

Camera dynamics are implemented with the help of this video

Screenshot 2023-04-29 at 7 16 31 PM 2

You might also like...
Rust Kubernetes client and controller runtime

kube-rs Rust client for Kubernetes in the style of a more generic client-go, a runtime abstraction inspired by controller-runtime, and a derive macro

IDP2P is a peer-to-peer identity protocol which enables a controller to create, manage and share its own proofs as well as did documents
IDP2P is a peer-to-peer identity protocol which enables a controller to create, manage and share its own proofs as well as did documents

IDP2P Experimental, inspired by ipfs, did:peer and keri Background See also (related topics): Decentralized Identifiers (DIDs) Verifiable Credentials

Kubernetes controller written in Rust for automatically generating and updating secrets

Kubernetes controller written in Rust for automatically generating and updating secrets

Software adapter for various Chunithm slider controllers with a built-in Brokenithm web controller
Software adapter for various Chunithm slider controllers with a built-in Brokenithm web controller

slidershim Software adapter for various Chunithm slider controllers with a built-in Brokenithm web controller. Has support for keyboard/gamepad output

xrd a next-gen server controller for TrackMania Forever and Nations ESWC
xrd a next-gen server controller for TrackMania Forever and Nations ESWC

xrd is a next-gen server controller for TrackMania Forever and Nations ESWC that is designed to be hassle-free and easily updatable (with a bus factor of 0).

Raspberry PI library for Rust. GPIO controller, L298N motors, sockets and
Raspberry PI library for Rust. GPIO controller, L298N motors, sockets and "i2clib" integrated

raslib Raspberry PI library for Rust. GPIO controller, L298N motors, sockets and "i2clib" integrated All tests are made on Raspberry PI 4B+ on Raspbia

Cost saving K8s controller to scale down and up of resources during non-business hours

Kube-Saver Motivation Scale down cluster nodes by scaling down Deployments, StatefulSet, CronJob, Hpa during non-business hours and save $$, but if yo

OpenEMC: open embedded management controller

OpenEMC OpenEMC is an open-source firmware implementing an embedded management controller (EMC) on an STM32F1 microcontroller. It consists of a bootlo

An embedded-hal driver for the TT21100 multi-touch touchscreen controller

tt21100 An embedded-hal driver for the TT21100 multi-touch touchscreen controller. If there is a feature which has not yet been implemented and which

A Rust driver for the Arm Generic Interrupt Controller version 3 or 4 (GICv3 and GICv4).

Arm Generic Interrupt Controller driver This crate provides a Rust driver for the Arm Generic Interrupt Controller version 3 or 4 (GICv3 and GICv4). C

Linux daemon to bind keys and macros to your controller's buttons

makima Makima is a daemon for Linux to bind your controller's buttons to key sequences and macros. Features: Configure your keybindings through a simp

This is a cosmwasm implementation of an interchain accounts controller.

CosmWasm ICA Controller Contract This is a CosmWasm smart contract that communicates with the golang ica/host module on the host chain to create and m

The first web framework in Rust to adopt the Model-View-Controller (MVC) architecture

Integra Web Framework Integra is a sleek, performant web framework for Rust, harnessing the power of the hyper library. Will become the first highly p

Expose standard or fully custom USB peripherals (gadgets) through a USB device controller (UDC) on Linux using Rust.

usb-gadget This library allows implementation of USB peripherals, so called USB gadgets, on Linux devices that have a USB device controller (UDC). Bot

A controller for the display and fan of the Raspberry Pi Waveshare PoE HAT written in Rust πŸ¦€

πŸ¦€πŸ‡ RustBerry-PoE-Monitor RustBerry-PoE-Monitor is a Rust-based monitoring and control tool for the Raspberry Pi, specifically designed for use with

A work-in-progress, open-source, multi-player city simulation game.
A work-in-progress, open-source, multi-player city simulation game.

Citybound is a city building game with a focus on realism, collaborative planning and simulation of microscopic details. It is independently developed

Network simulation in Rust

netsim - A Rust library for network simulation and testing (currently linux-only). netsim is a crate for simulating networks for the sake of testing n

A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.
A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.

A/B Street Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a game expl

Simulation tools for animating interacting soft objects

Softy Simulation tools and libraries for animating rigid and soft objects (including cloth) subject to frictional contacts against smooth implicit sur

Owner
Sparsh Goenka
> echo Hello, World!
Sparsh Goenka
Simple Rust derive-macro that simplifies integral enum creation

Integral enum A simple way to define integer-like enums. This macro implements bunch of traits that are usually implemented via looooong derive(..) at

null 3 Jan 6, 2023
Nearest neighbor search algorithms including a ball tree and a vantage point tree.

petal-neighbors Nearest neighbor search algorithms including a ball tree and a vantage point tree. Examples The following example shows how to find tw

Petabi 6 Oct 19, 2022
Minimum enclosing ball.

miniball Minimum enclosing ball. NOTE: This crate requires nightly Rust. Finds circumscribed n-ball of set of bounds. Finds minimum n-ball enclosing s

Qu1x 1 May 5, 2022
A git hook to manage derivative files automatically.

git-derivative A git hook to manage derivative files automatically. For example if you checked out to a branch with different yarn.lock, git-derivativ

Sung Jeon 3 Oct 30, 2022
Gomez - A pure Rust framework and implementation of (derivative-free) methods for solving nonlinear (bound-constrained) systems of equations

Gomez A pure Rust framework and implementation of (derivative-free) methods for solving nonlinear (bound-constrained) systems of equations. Warning: T

Datamole 19 Dec 24, 2022
Terra liquid staking derivative

Terra liquid staking derivative. Of the community, by the community, for the community.

null 36 Dec 6, 2022
Utilities for interacting with the Behringer X-Touch Mini MIDI controller

xtouchmini Collection of utilities for interacting with the Behringer X-Touch Mini MIDI controller, including reading button/knob/fader inputs and sen

null 5 Nov 11, 2021
IR Remote Controller for WS2812(or analog) LED Strip

ir-smart-led-controller IR Remote Controller for WS2812(or analog) LED Strip. Resources Schematics Gerber files BOM License Licensed under either of A

Vitaly Domnikov 9 Dec 22, 2022
A controller for mpv, requires ipc to be enabled in mpv.

Configuration Requires either the flag --input-ipc-server=/tmp/mpvsocket to be passed at mpv runtime, or for this line input-ipc-server=/tmp/mpvsocket

ValleyKnight 3 Jul 25, 2022
A wrapper around SDL2's game controller API.

fishsticks System for handling gamepad input, using SDL2's game controller API as the backend. License Fishsticks is dual-licensed under either Apache

null 7 Dec 8, 2022