Skip to main content

Algorithms for state estimation, control, and system identification in JAX

Project description

controlAlgorithms

Algorithms at the boundary of control and machine learning in JAX.

This package contains routines for (feedback) control of dynamic systems and considers

  • the identification of dynamic systems from input/output data (learning parameters of ordinary differential equations),
  • state estimation from input/output data with optional parameter learning, and
  • model-based trajectory optimization and planning of nonlinear systems under inequality constraints.

The advantage of using JAX as an underlying basis is the automatic differentiation feature. Thus, gradients no not need to be (but can) provided by the code the implements the system models. Further, the optimization library jaxopt is used for solving non-linear optimization problems. The routines can be jit-compiled for improved runtime performance.

image

A typical control system that involves state estimation (optionally sensor fusion) and feedback control.

Installation

pip install jax-control-algorithms

Local development install - clone repository and run

pip install -e .

Contents

System identification

A (basic) least squares-based implementation for the identification of non-linear systems implemented is provided. Herein, an ODE solver and the system model are embedded in a non-linear optimization process.

An example notebook describing the identification for a pendulum is provided https://nbviewer.org/github/christianausb/controlAlgorithms/blob/main/examples/sysident.ipynb

State trajectory estimation and system identification

A routine for estimating the state trajectory and system parameters from input/output data and a prototype model is provided.

The following example demonstrates the estimation of a pendulum system using video-only data:

https://nbviewer.org/github/christianausb/controlAlgorithms/blob/main/examples/state_est_pendulum.ipynb

Pendulum motion estimation from video recordings

This experiment demonstrates how to combine state and parameter estimation with a deep neural autoencoder to estimate motion trajectories from video-recordings.

https://github.com/christianausb/controlAlgorithms/tree/main/examples/pendulum_finder

https://user-images.githubusercontent.com/4620523/223825323-2aa7c9f7-8d85-4b3c-aae0-8115737d95b7.mp4

Trajectory optimization

A routine that implements a variant of the collocation method is provided. To ensure inequality constraints, the penality method is implemented.

https://github.com/christianausb/controlAlgorithms/tree/main/examples/trajectory_optim_cart_pendulum.ipynb

A solution for the pendulum-cart benchmark is shown below. Herein, the control task is to swing-up the pendulum by controlling the cart motion.

https://github.com/christianausb/controlAlgorithms/assets/4620523/27e42c6d-ac39-4cbe-b7f3-5f5f7bb1b127

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jax_control_algorithms-0.5.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

jax_control_algorithms-0.5.1-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file jax_control_algorithms-0.5.1.tar.gz.

File metadata

File hashes

Hashes for jax_control_algorithms-0.5.1.tar.gz
Algorithm Hash digest
SHA256 c4db987537c68f43f5c70020b1af85601c7cac88a3b5cfbf4533f850c42c7d23
MD5 d16e0c3a02de30e90c18cd7c9d457b9d
BLAKE2b-256 32c0932db474eb89efc5f95e3302cc9b278e2fed844e90d729e40ff123a9499c

See more details on using hashes here.

File details

Details for the file jax_control_algorithms-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jax_control_algorithms-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 129802beab3040cb2cfa7a04406729129905c32b31faac4d75b520958d742a08
MD5 2f0cc81adced61f7ba0ed2bb8f6ddae0
BLAKE2b-256 d6f757a1e60bb3772d0d32751af18d44b5a419f69281d2c8e6705e9890d32f2c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page