# Nonlinear state-space models in ControlSystems.jl?

**URL:** https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892
**Category:** General Usage
**Tags:** control, controlsystems
**Created:** [August 17, 2022, 8:12pm UTC](https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892 "2022-08-17T20:12:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![knttnk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/knttnk/32/38861_2.png) [@knttnk](https://discourse.julialang.org/u/knttnk)
#### Post date: [August 17, 2022, 8:12pm UTC](https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892/1 "2022-08-17T20:12:56Z")

</div>

Will nonlinear state-space models be implemented in ControlSystems.jl? Nonlinear state-space model here is a system with equations like

\begin{cases} \begin{aligned} \dot{\boldsymbol{x}} &= f(t, \boldsymbol{x}, \boldsymbol{u}), \\ \boldsymbol{y} &= g(t, \boldsymbol{x}, \boldsymbol{u}), \end{aligned} \end{cases}

and the user can specify f and g.

Such systems will be useful for simulations such as controlling an inverted pendulum with a PID controller.

I know `nonlinearity()` exists, but it does not seem to be able to take multiple inputs.  
(Sorry if such a feature is already available.)

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [August 17, 2022, 8:24pm UTC](https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892/2 "2022-08-17T20:24:39Z")

</div>

There are no concrete plans to bring more nonlinear features into ControlSystems.jl, instead, the plan is to integrate better with other nonlinear simulation tools, such as ModelingToolkit.jl.

Here is a video where the two are used together for nonlinear modeling and simulation with linear control design

[![](https://global.discourse-cdn.com/julialang/original/3X/5/7/5712127dcb53aed10a0357fc457274a32d983188.jpeg "Control-systems analysis and design with JuliaControl | Fredrik Bagge Carlson | JuliaCon 2022") ](https://www.youtube.com/watch?v=favQKOyyx4o)

I also have a, so far experimental, interface between Controlsystems.jl and ModelingToolkit.jl here

> **[GitHub - JuliaControl/ControlSystemsMTK.jl: Interface between ControlSystems...](https://github.com/JuliaControl/ControlSystemsMTK.jl)**
>
> Interface between ControlSystems and ModelingToolkit - GitHub - JuliaControl/ControlSystemsMTK.jl: Interface between ControlSystems and ModelingToolkit

---

<div class="post-metadata">

### Author: ![knttnk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/knttnk/32/38861_2.png) [@knttnk](https://discourse.julialang.org/u/knttnk)
#### Post date: [August 18, 2022, 8:18pm UTC](https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892/3 "2022-08-18T20:18:14Z")

</div>

That’s great! Thank you.
