nosnoc

nosnoc is a software framework for numerical optimal control and model predictive control (MPC) of hybrid and nonsmooth dynamical systems, including systems with switching, state jumps, impacts, hysteresis, and complementarity structure.
Its main capabilities include:

1. Real-time MPC algorithms for hybrid systems:

  • hybrid real-time iterations (HyRTI)
  • hybrid advanced-step controller (HyASC)
  • hybrid advanced-step real-time iteration (HyAS-RTI)

Fast MPC in nosnoc uses CCOpt, which is currently our fastest and most robust solver, especially suited for MPC applications. 

2. Automatic discretization via FESD (Finite Elements with Switch Detection)

  • high accuracy and correct sensitivities
  • superior treatment of switching events compared to classical time-stepping methods

3.    Automatic reformulations of systems with state jumps

  • for example, contact problems via time-freezing
  • reformulation into Filippov / piecewise smooth / complementarity-based models
  • accurate treatment of jumps and mode transitions


4. Homotopy-based and active-set solutions of mathematical programs with complementarity constraints

  • multiple relaxation-based algorithms for MPCCs (mpccsol, CCOpt)
  • active-set-based methods (mpecopt)
  • compatibility with off-the-shelf NLP solvers such as IPOPT, and SNOPT

With nosnoc, users can formulate and solve problems involving:

  • switched systems
  • rigid body models with impacts and friction (also with time-freezing)
  • piecewise affine and piecewise smooth systems
  • Filippov systems
  • projected dynamical systems
  • first-order sweeping processes
  • systems with logical Heaviside step functions
  • relay systems
  • hybrid systems with hysteresis
     

See nosnoc's example library for a range of optimal control and MPC examples.
 

The package is based on CasADi. It has both a MATLAB and python version, the source code can be found at: