Giter Site home page Giter Site logo

lineardynamicsmodels.jl's Introduction

LinearDynamicsModels.jl

Build Status Build status codecov.io

This package serves two purposes:

  1. To extend the interfaces defined in DifferentialDynamicsModels.jl to linear time-invariant systems of the form linear dynamics and implement fast solutions to two-point boundary value problems with these dynamics (provided they are controllable), minimizing the mixed time/control effort criterion time plus quadratic control (where R is symmetric positive definite).

    • LinearDynamics{Dx,Du} <: DifferentialDynamics is the main type exported by this package. The type parameters Dx and Du denote the state and control dimension respectively. Statically sized arrays are used in this package for their performance benefits; the type constructor requires arguments of the form LinearDynamics(A::StaticMatrix{Dx,Dx}, B::StaticMatrix{Dx,Du}, c::StaticVector{Du}). Though LinearDynamics supports arbitrary values for A, B, and c, this package also exports the convenience constructors DoubleIntegatorDynamics(D::Int), TripleIntegatorDynamics(D::Int), and NIntegratorDynamics(N::Int, D::Int) where D is the spatial dimension (e.g., DoubleIntegatorDynamics(3) will model a point mass in three dimensions under controlled acceleration).
    • LinearQuadraticSteering is a type alias for a particular parameterization of SteeringBVP:
      const LinearQuadraticSteering{Dx,Du,Cache} = SteeringBVP{<:LinearDynamics{Dx,Du},<:TimePlusQuadraticControl{Du},EmptySteeringConstraints,Cache}
      Depending on whether SteeringBVP(f::LinearDynamics, j::TimePlusQuadraticControl) is called with the keyword argument compile=Val(true) or compile=Val(false) (the default), the resulting SteeringBVP instance may contain a cache of optimal control functions/quantities symbolically computed using SymPy.jl. Compilation greatly reduces BVP computation time (useful if you need to solve millions or even billions of steering problems, as in sampling-based robot motion planning) but introduces a large initial overhead (i.e., stick to compile=Val(false) if you only need to solve a few instances of a particular steering setup). Note that for BVP compilation the user must first using SymPy or import SymPy.
  2. To implement functions for dynamics linearization, leveraging automatic differentiation provided by ForwardDiff.jl. In particular this package provides linearization of continuous-time systems as well as linearization of the corresponding discrete-time systems arising from zero-order hold or first-order hold input.

    • linearize(f::DifferentialDynamics, x, u) — linearization of a differential dynamics model f about the state x and control u; returns a LinearDynamics.
    • linearize(f::DifferentialDynamics, x, u::StepControl) — linearization of the discrete time model produced by integrating f starting from the state x and applying the zero-order hold control interval u (constant control u.u over duration u.t); returns a ZeroOrderHoldLinearization. This linearization is exact (up to numerical error) if f isa LinearDynamics.
    • linearize(f::DifferentialDynamics, x, u::RampControl) — linearization of the discrete time model produced by integrating f starting from the state x and applying the first-order hold control interval u (control linearly interpolated from u.u0 to u.uf over duration u.t); returns a FirstOrderHoldLinearization. This linearization is exact (up to numerical error) if f isa LinearDynamics.

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.