Skip to content
LIBRARY

MPCComponents ​

This is the documentation for the MPCComponents library. Here you will find the documentation for the various definitions contained in MPCComponents.

Note that this documentation is automatically generated primarily from the doc strings and metadata associated with those definitions.

Types ​

  • ACADOSCollocation - Collocation scheme of the implicit integrator: Gauss-Legendre (order 2s, the acados default), or Radau IIA (order 2s-1), which is L-stable and therefore damps the stiff modes of a model over a long shooting interval instead of carrying them from one interval to the next

  • ACADOSGlobalization - Globalization of the SQP iterations: full steps, a backtracking line search on a merit function (the objective plus a penalty on the dynamics defect), or the funnel method with an L1 penalty line search, which measures the violation of the nonlinear constraints as well and rejects steps that increase it

  • ACADOSIntegrator - Integrator acados uses for the shooting intervals: explicit Runge-Kutta, implicit Runge-Kutta (with the collocation scheme selected by collocation), or Discrete for a prediction model that is already a one-step map and is applied as it stands

  • ACADOSJacobianBackend - How the dynamics Jacobian (and right-hand side) are obtained: Symbolic (Symbolics.jacobian + build_function); ForwardDiff/FiniteDiff differentiate a numeric evaluation of the model (DifferentiationInterface), which also handles models with linear solves / cached factorizations (e.g. MultibodyComponents models) that have no reconstructable symbolic form; SparseForwardDiff/SparseFiniteDiff detect the Jacobian sparsity pattern once (SparseConnectivityTracer) and differentiate one direction per color instead of one per state and control, which pays off on large models whose Jacobian is sparse. The backend only affects the in-process Julia solver: C export renders its own symbolic Jacobian, and works with any backend as long as the model was given symbolically (an ODE System with an AD backend keeps no equations and cannot be exported)

  • ACADOSQPSolver - QP solver of acados: HPIPM (an interior-point method) after partial or full condensing, or DAQP (a dual active-set method for small dense QPs) after full condensing. DAQP is available only in an acados built with it (install_acados!(daqp = true) and ACADOS_INSTALL_DIR); the DyadAcados_jll binaries do not include it. In acados 0.6.0 the DAQP path enforced the control bounds but not the condensed constraints on the state (state bounds and general linear rows), where the SQP stalled at the unconstrained solution with exitflag 3, so DAQP is suitable for problems with control bounds alone

  • ACADOSQPToleranceStrategy - Strategy for QP accuracy: fixed tolerances, or a joint tolerance reduced with the current NLP residuals

  • ACADOSSolver - NLP solver of acados: full SQP iterations to convergence, or one real-time iteration (SQP_RTI) per tick

  • ACADOSWarmStart - Initial guess of the NLP at every tick: the previous solution shifted by one stage, kept as is, or reset to the current state and previous control

  • Backend - Backend of a component that can run its solver or filter as compiled C instead of in Julia: Julia always runs in-process; C uses the component's compiled library or generated static code, and is what C code export requires; Auto lets the component decide, which each one documents (LinearMPCOptimizer builds its library when a C compiler is available and warns if it cannot, ACADOSMPC takes one only if it is already built, and UKFObserver runs LowLevelParticleFilters)

  • ConvexOuter - Outer function of the convex-over-nonlinear constraints of ACADOSMPC: a Julia function of the vector of inner signals (symbolic variables) returning the vector of constrained expressions, convex in that vector

  • DAQPSources - How DAQP's solver sources are provided in an exported tree: Download copies the sources the installed DyadDAQP_jll was built from (from its artifact, otherwise downloaded once), HeadersOnly copies only the headers and leaves libdaqp to be linked by hand (double precision only)

  • EKFRef - Opaque handle to a set-up extended Kalman filter (LowLevelParticleFilters.jl); on the Julia side a Base.RefValue{Any} holding an EKFBundle (see build_ekf)

  • Examples.HVAC.HVACSignal - Series a HVACForecast component previews: the electricity price or the outdoor temperature of the tutorial week

  • Examples.RaceCarModel - Race car of the dymos race car example (P. de Buck's lap simulation,

  • Experimental.LinearMPCBankPart - What the gain-scheduled LinearMPC.jl components have in common: a bank of controllers (see

  • Experimental.MPCScheduling - How LinearMPCScheduler turns the scheduling variable into member weights: Nearest activates the member whose knot is closest (one QP solve per tick, a discontinuous control at the cell edges); Linear interpolates between the two neighbouring knots (two solves per tick, one exactly at a knot, a continuous control)

  • LinearMPCPart - What the LinearMPC.jl components have in common: the MPC object and the dimensions of its signals,

  • LinearizationPoint - Operating point at which LinearMPCController linearizes its plant dynamics: InitialState is the initial state of the plant with its inputs held at u_op and its known disturbances at d_op; SteadyState is the steady state at those inputs; OutputTarget is the steady state and the inputs at which the outputs take the values y_op, with u_op as the initial guess of the inputs (the targets must be consistent with a steady state, which in general allows at most as many outputs as inputs). The steady state is computed by MTK's initialization of the plant, from the initial state

  • LinearizedModelRef - The prediction model of LinearMPCController linearized from a plant component; on the Julia side a LinearizedModel, or nothing when the model is given as matrices (see linearize_prediction_model)

  • MPCDynamics - Continuous-time prediction model ẋ = f(x, u, p) of ACADOSMPC, given symbolically; on the Julia side a ContinuousDynamics built with continuous_dynamics

  • MPCPrecision - Float type of the C code generated for the QP of LinearMPCOptimizer: Double links DAQP from DyadDAQP_jll, Single compiles DAQP from its sources with DAQP_SINGLE_PRECISION. The Julia fallback solver and the observer equations (Real) always compute in double

  • MPCRef - Opaque handle to a set-up LinearMPC.jl MPC object; on the Julia side a Base.RefValue{Any} (see build_linear_mpc)

  • ObserverIntegrator - Integrator for Kalman-filter prediction: Auto selects RK4 for an ODE and Radau IIA for a DAE; RK4 requires an ODE, and RadauIIA supports both ODEs and DAEs on the Julia backend

  • ObserverType - Observer of LinearMPCController: SteadyState is LinearMPCObserver with the stationary gain stored in the MPC object (exported to C); TimeVarying is SqKalmanObserver, a time-varying square-root Kalman filter that propagates the covariance of the estimate and uses only the available measurements at every tick (Julia only)

  • OffsetFreeMethod - Disturbance model of the offset-free observer (LinearMPC.jl set_offset_free_observer!): None selects a plain steady-state Kalman filter; StateDisturbance and Velocity are fixed-gain realizations (Pannocchia 2015) whose disturbance estimate absorbs the whole innovation each step; OutputDisturbance (a constant bias on every output) and InputDisturbance (a constant load on every input, Bd = B) design a Kalman filter on the augmented model, so the disturbance entries of R1 set how fast the disturbance is estimated (the effective integral gain)

  • SqKFRef - Opaque handle to a set-up square-root Kalman filter (LowLevelParticleFilters.jl); on the Julia side a Base.RefValue{Any} holding a SqKFBundle (see build_sqkf)

  • UKFRef - Opaque handle to a set-up unscented Kalman filter (LowLevelParticleFilters.jl); on the Julia side a Base.RefValue{Any} holding a UKFBundle (see build_ukf)

Components ​

Analyses ​

Examples ​