# \#controlsystems

**URL:** https://discourse.julialang.org/tag/controlsystems/1082.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] ModelPredictiveControl.jl](https://discourse.julialang.org/t/ann-modelpredictivecontrol-jl/100147)

<div class="topic-metadata">

**Author:** [@franckgaga](https://discourse.julialang.org/u/franckgaga)\
**Replies:** 82\
**Last updated:** [September 25, 2026, 7:56pm UTC](https://discourse.julialang.org/t/ann-modelpredictivecontrol-jl/100147 "2026-09-25T19:56:38Z")

</div>

ModelPredictiveControl.jl I’m currently writing a model predictive control package for Julia. Here’s a quick list of the main features: Both linear and nonlinear plant models are supported. The implementation exploi…

---

## [I got bored and built a 2x2 MIMO FxNLMS ANC simulator in Julia + C23](https://discourse.julialang.org/t/i-got-bored-and-built-a-2x2-mimo-fxnlms-anc-simulator-in-julia-c23/138826)

<div class="topic-metadata">

**Author:** [@blah\_blah.jl](https://discourse.julialang.org/u/blah_blah.jl)\
**Replies:** 0\
**Last updated:** [August 15, 2026, 1:42pm UTC](https://discourse.julialang.org/t/i-got-bored-and-built-a-2x2-mimo-fxnlms-anc-simulator-in-julia-c23/138826 "2026-08-15T13:42:43Z")

</div>

Hey folks, Today morning was aggressively boring, so naturally I ended up building a 2x2 MIMO active noise control simulator. I have recently started poking around the border between DSP and control systems, and for so…

---

## [High dimensional (stochastic) optimal control](https://discourse.julialang.org/t/high-dimensional-stochastic-optimal-control/137345)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 5\
**Last updated:** [May 31, 2026, 11:10pm UTC](https://discourse.julialang.org/t/high-dimensional-stochastic-optimal-control/137345 "2026-05-31T23:10:17Z")

</div>

Dear all, in the context of stochastic control, I am wondering if some of you have implemented either of the two papers in julia. Onken, D., Nurbekyan, L., Li, X., Fung, S. W., Osher, S., & Ruthotto, L. (2023). A Neur…

---

## [\[ANN\] LinearMPC.jl: Embedded Model Predictive Control of linear systems](https://discourse.julialang.org/t/ann-linearmpc-jl-embedded-model-predictive-control-of-linear-systems/128484)

<div class="topic-metadata">

**Author:** [@darnstrom](https://discourse.julialang.org/u/darnstrom)\
**Replies:** 10\
**Last updated:** [April 8, 2026, 10:48pm UTC](https://discourse.julialang.org/t/ann-linearmpc-jl-embedded-model-predictive-control-of-linear-systems/128484 "2026-04-08T22:48:45Z")

</div>

I am developing the package LinearMPC.jl, which is a package for Model Predictive Control (MPC) of linear dynamical systems. The focus of the package to produce high-performant and lightweight C-code that can easily be …

---

## [Cannot use AD as shown in ControlSystems.jl example](https://discourse.julialang.org/t/cannot-use-ad-as-shown-in-controlsystems-jl-example/136292)

<div class="topic-metadata">

**Author:** [@vtfanta](https://discourse.julialang.org/u/vtfanta)\
**Replies:** 2\
**Last updated:** [March 19, 2026, 7:18pm UTC](https://discourse.julialang.org/t/cannot-use-ad-as-shown-in-controlsystems-jl-example/136292 "2026-03-19T19:18:51Z")

</div>

I’m trying to replicate the example of using AD with ControlSystems.jl from the JuliaCon 2022 presentation (this moment), but the ForwardDiff gradient calculation errors, since there is the matrix exponential LinearAlgeb…

---

## [Flexible linear constraints for MPC and codegen](https://discourse.julialang.org/t/flexible-linear-constraints-for-mpc-and-codegen/135285)

<div class="topic-metadata">

**Author:** [@franckgaga](https://discourse.julialang.org/u/franckgaga)\
**Replies:** 10\
**Last updated:** [January 29, 2026, 4:19pm UTC](https://discourse.julialang.org/t/flexible-linear-constraints-for-mpc-and-codegen/135285 "2026-01-29T16:19:39Z")

</div>

Following the subject \[ANN\] ModelPredictiveControl.jl with @langestefan and @darnstrom: The expressiveness of the linear MPC framework is already very limited and the current syntax limits it further. As long as my exp…

---

## [Robust resampling/interpolation method](https://discourse.julialang.org/t/robust-resampling-interpolation-method/132665)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 25\
**Last updated:** [October 27, 2025, 1:15pm UTC](https://discourse.julialang.org/t/robust-resampling-interpolation-method/132665 "2025-10-27T13:15:54Z")

</div>

I am working on a system identification problem with poor quality input data. The data describes a heating system, with thermostat temperatures, thermal power inputs, supply/return water temperatures etc. Some issues w…

---

## [Identification using LowLevelParticleFilters.jl](https://discourse.julialang.org/t/identification-using-lowlevelparticlefilters-jl/132393)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 19\
**Last updated:** [October 17, 2025, 1:04pm UTC](https://discourse.julialang.org/t/identification-using-lowlevelparticlefilters-jl/132393 "2025-10-17T13:04:10Z")

</div>

I am looking for an example (or some guidance) on how to fit a Kalman smoother to data using log-likelihood maximization using LowLevelParticleFilters.jl. I already have a model structure and have collected a dataset. I…

---

## [PI Controller oscillating between limit values](https://discourse.julialang.org/t/pi-controller-oscillating-between-limit-values/131510)

<div class="topic-metadata">

**Author:** [@madtorresga](https://discourse.julialang.org/u/madtorresga)\
**Replies:** 4\
**Last updated:** [August 12, 2025, 5:01am UTC](https://discourse.julialang.org/t/pi-controller-oscillating-between-limit-values/131510 "2025-08-12T05:01:23Z")

</div>

Hello, I’m trying to implement a PI controller that turns on once the cell goes out of the voltage limits. My model looks something like this: @mtkmodel Cell begin ... @components begin ... deadzone = DeadZ…

---

## [Set ylims in marginplot](https://discourse.julialang.org/t/set-ylims-in-marginplot/131469)

<div class="topic-metadata">

**Author:** [@maltee1](https://discourse.julialang.org/u/maltee1)\
**Replies:** 3\
**Last updated:** [August 8, 2025, 9:31am UTC](https://discourse.julialang.org/t/set-ylims-in-marginplot/131469 "2025-08-08T09:31:39Z")

</div>

How do I set y limits for marginplot (or bodeplot)? ylims just sets the limits for both the margin and the phase the same, which is rarely helpful. There is ylimsphase, which only works for bodeplot, not marginplot, and …

---

## [Optimization-based PI controller tuning for a delay system](https://discourse.julialang.org/t/optimization-based-pi-controller-tuning-for-a-delay-system/131405)

<div class="topic-metadata">

**Author:** [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Replies:** 3\
**Last updated:** [August 6, 2025, 2:06pm UTC](https://discourse.julialang.org/t/optimization-based-pi-controller-tuning-for-a-delay-system/131405 "2025-08-06T14:06:28Z")

</div>

Hi, I am trying to find a good tuning for a PI controler on a first-order-plus-delay system using Optimization. A naive first try combining ControlSystems.jl and Optimization.jl did not work and gave some errors. I wond…

---

## [Finding a region of attraction using sum of squares optimization](https://discourse.julialang.org/t/finding-a-region-of-attraction-using-sum-of-squares-optimization/131067)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 10\
**Last updated:** [July 28, 2025, 5:46pm UTC](https://discourse.julialang.org/t/finding-a-region-of-attraction-using-sum-of-squares-optimization/131067 "2025-07-28T17:46:18Z")

</div>

Out of interest I decided to explore sum of squares optimization in the context of Lyapunov functions. Right now I’d like to use it to find the region of attraction for the value function (viewed as a Lyapunov function) …

---

## [Control systems, pid, and high-order transfer functions](https://discourse.julialang.org/t/control-systems-pid-and-high-order-transfer-functions/130837)

<div class="topic-metadata">

**Author:** [@romain-chiap](https://discourse.julialang.org/u/romain-chiap)\
**Replies:** 7\
**Last updated:** [July 21, 2025, 10:26am UTC](https://discourse.julialang.org/t/control-systems-pid-and-high-order-transfer-functions/130837 "2025-07-21T10:26:06Z")

</div>

Hello, It’s specific to control systems and this is my first post, so I still decided to post under “new to Julia” as I might be asking beginner questions. I’m making a 1-dimension model of the PX4 cascaded control loo…

---

## [Why is the margin() function returning NaN?](https://discourse.julialang.org/t/why-is-the-margin-function-returning-nan/129561)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [June 2, 2025, 3:13pm UTC](https://discourse.julialang.org/t/why-is-the-margin-function-returning-nan/129561 "2025-06-02T15:13:51Z")

</div>

I have the following linear state space system for 8 m/s wind: julia\> @time include("mwes/mwe\_06.jl") StateSpace{Continuous, Float64} A = 0.0 0.0 0.217328 0.0 -142.50000000000003 -0.162450000…

---

## [MTK Control System with Current Not Working](https://discourse.julialang.org/t/mtk-control-system-with-current-not-working/129558)

<div class="topic-metadata">

**Author:** [@madtorresga](https://discourse.julialang.org/u/madtorresga)\
**Replies:** 1\
**Last updated:** [June 2, 2025, 1:17pm UTC](https://discourse.julialang.org/t/mtk-control-system-with-current-not-working/129558 "2025-06-02T13:17:26Z")

</div>

Hello! I’m trying to implement this exact same example, but controlling with the current that passes through the resistance instead of the speed in speed\_sensor.w. @equations begin #... #connect(curre…

---

## [ControlSystems.jl: Custom labels in a plot of step response of a MIMO system](https://discourse.julialang.org/t/controlsystems-jl-custom-labels-in-a-plot-of-step-response-of-a-mimo-system/128821)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 2\
**Last updated:** [May 8, 2025, 4:56am UTC](https://discourse.julialang.org/t/controlsystems-jl-custom-labels-in-a-plot-of-step-response-of-a-mimo-system/128821 "2025-05-08T04:56:28Z")

</div>

I am struggling with setting my own labels correctly in a plot of a step response of a MIMO system. Consider a generic MIMO LTI system with 2 inputs and 2 outputs, say: using ControlSystems using Plots A = \[-10 2; 3 -4…

---

## [Robust control with CRONE controllers](https://discourse.julialang.org/t/robust-control-with-crone-controllers/128733)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [May 6, 2025, 3:36pm UTC](https://discourse.julialang.org/t/robust-control-with-crone-controllers/128733 "2025-05-06T15:36:59Z")

</div>

Today I heard the first time about CRONE controllers. “The CRONE controller uses fractional-order calculus (non-integer order derivatives and integrals), offering more tuning flexibility and robustness, whereas tradition…

---

## [Acausal Modelling and Control Sytem](https://discourse.julialang.org/t/acausal-modelling-and-control-sytem/127003)

<div class="topic-metadata">

**Author:** [@AndhikaTama](https://discourse.julialang.org/u/AndhikaTama)\
**Replies:** 22\
**Last updated:** [May 4, 2025, 3:39pm UTC](https://discourse.julialang.org/t/acausal-modelling-and-control-sytem/127003 "2025-05-04T15:39:55Z")

</div>

Hello everyone, I am a new user of Julia ModelingToolkit and ControlSystem. I am currently working on a project with the topic Nonlinear Dynamic Simulation of a MicroGas Turbine Integrated with Concentrated Solar Therma…

---

## [Alternative to systune in Julia](https://discourse.julialang.org/t/alternative-to-systune-in-julia/126583)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [March 25, 2025, 8:20am UTC](https://discourse.julialang.org/t/alternative-to-systune-in-julia/126583 "2025-03-25T08:20:31Z")

</div>

Is there an alternative to the Matlab command systune in Julia? systune tunes fixed-structure control systems subject to both soft and hard design goals. systune can tune multiple fixed-order, fixed-structure control e…

---

## [\[ANN\] PeriodicSystems.jl - Analysis and design of linear periodic time-varying systems](https://discourse.julialang.org/t/ann-periodicsystems-jl-analysis-and-design-of-linear-periodic-time-varying-systems/124919)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 0\
**Last updated:** [January 19, 2025, 12:32pm UTC](https://discourse.julialang.org/t/ann-periodicsystems-jl-analysis-and-design-of-linear-periodic-time-varying-systems/124919 "2025-01-19T12:32:55Z")

</div>

Many control system applications are formulated as genuine periodic control problems, as for example, satellite attitude control, helicopter forward flight control, orbital stabilization of underactuated systems, etc. Be…

---

## [dSpace and Julia](https://discourse.julialang.org/t/dspace-and-julia/103209)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 8\
**Last updated:** [December 11, 2024, 10:58am UTC](https://discourse.julialang.org/t/dspace-and-julia/103209 "2024-12-11T10:58:46Z")

</div>

Today I talked on a social event with a number of professors for control engineering about Matlab and Julia. They all told me, they would love to replace Matlab with Julia, but they have dSpace control hardware that only…

---

## [Adding PID controller to a MIMO state space system](https://discourse.julialang.org/t/adding-pid-controller-to-a-mimo-state-space-system/122681)

<div class="topic-metadata">

**Author:** [@victor](https://discourse.julialang.org/u/victor)\
**Replies:** 7\
**Last updated:** [November 17, 2024, 6:55pm UTC](https://discourse.julialang.org/t/adding-pid-controller-to-a-mimo-state-space-system/122681 "2024-11-17T18:55:12Z")

</div>

I have a state space process with two inputs and one output. The inputs are highly coupled. I would like to add a PID controller to one of the inputs with the output as measurement value. But I’m having a hard time with …

---

## [\[NEW\] SimpleSim.jl: A minimalist Julia package for modular dynamical systems simulation](https://discourse.julialang.org/t/new-simplesim-jl-a-minimalist-julia-package-for-modular-dynamical-systems-simulation/121308)

<div class="topic-metadata">

**Author:** [@janneshb](https://discourse.julialang.org/u/janneshb)\
**Replies:** 11\
**Last updated:** [October 17, 2024, 11:52am UTC](https://discourse.julialang.org/t/new-simplesim-jl-a-minimalist-julia-package-for-modular-dynamical-systems-simulation/121308 "2024-10-17T11:52:20Z")

</div>

Hello everyone, I’m very happy to announce my first larger Julia package SimpleSim.jl which is now available on the Julia package registry! SimpleSim.jl aims at being a lightweight simulation engine 100% written in Jul…

---

## [State Space Model with PID controller unstable in Julia compared to Matlab](https://discourse.julialang.org/t/state-space-model-with-pid-controller-unstable-in-julia-compared-to-matlab/117688)

<div class="topic-metadata">

**Author:** [@lstagner](https://discourse.julialang.org/u/lstagner)\
**Replies:** 22\
**Last updated:** [August 2, 2024, 11:23am UTC](https://discourse.julialang.org/t/state-space-model-with-pid-controller-unstable-in-julia-compared-to-matlab/117688 "2024-08-02T11:23:21Z")

</div>

I have the following code in Matlab that creates a stable system using a simple PID controller. %% Define system sys = ss(A,B,C,D); %% New state space sys\_new = sys(\[1379\],13); %% Define s domain Kp = 0; Ki = 0; % N…

---

## [Use ControlSystemIdentification.jl for a ModelingToolkit.jl model](https://discourse.julialang.org/t/use-controlsystemidentification-jl-for-a-modelingtoolkit-jl-model/116588)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 7\
**Last updated:** [July 10, 2024, 4:21am UTC](https://discourse.julialang.org/t/use-controlsystemidentification-jl-for-a-modelingtoolkit-jl-model/116588 "2024-07-10T04:21:05Z")

</div>

Hi, I have an LTI model defined in ModelingToolkit.jl: @named T\_a\_out = TimeVaryingFunction(input\_funcs\[:T\_a\]) @named Φ\_hp\_out = TimeVaryingFunction(input\_funcs\[:Φ\_hp\]) @named Φ\_cv\_out = TimeVaryingFunction(input\_funcs…

---

## [Linear Quadratic Integrator](https://discourse.julialang.org/t/linear-quadratic-integrator/113245)

<div class="topic-metadata">

**Author:** [@iabraham](https://discourse.julialang.org/u/iabraham)\
**Replies:** 3\
**Last updated:** [April 20, 2024, 8:52am UTC](https://discourse.julialang.org/t/linear-quadratic-integrator/113245 "2024-04-20T08:52:14Z")

</div>

The ControlSystems package seems to provide a lqr function for the LQR problem. I was wondering whether there was any plans to provide the lqi function for the Linear Quadratic Integrator problem. - e.g. Scilab or MATLAB …

---

## [Naming of states, inputs and outputs in \`ControlSystemsMTK\`](https://discourse.julialang.org/t/naming-of-states-inputs-and-outputs-in-controlsystemsmtk/111783)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 12\
**Last updated:** [March 21, 2024, 10:27am UTC](https://discourse.julialang.org/t/naming-of-states-inputs-and-outputs-in-controlsystemsmtk/111783 "2024-03-21T10:27:57Z")

</div>

Hi, I just tested naming states, inputs and outputs while passing a state-space model to ODESystem. It seems the optional names are ignored, am I doing something wrong here ? using ControlSystemsBase, ControlSystemsMTK…

---

## [Calculation of gain margin fails](https://discourse.julialang.org/t/calculation-of-gain-margin-fails/109819)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [February 6, 2024, 4:42pm UTC](https://discourse.julialang.org/t/calculation-of-gain-margin-fails/109819 "2024-02-06T16:42:46Z")

</div>

I have the following code: using ControlSystemsBase Ts = 0.01 Ku = 100/5e6 K2 = 5e6 num = \[Ku \* Ts\] den = \[1, -1\] P = tf(num, den, Ts) # plant C = K2 sys = feedback(P, C) ol\_sys = P\*C margin(ol\_sys) If I create a bod…

---

## [Using symbolic variables in control systems](https://discourse.julialang.org/t/using-symbolic-variables-in-control-systems/109810)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 6, 2024, 3:11pm UTC](https://discourse.julialang.org/t/using-symbolic-variables-in-control-systems/109810 "2024-02-06T15:11:41Z")

</div>

Is it possible to use symbolic variables when defining a discrete time control system? The following code fails: using ControlSystemsBase, ModelingToolkit @parameters Ts # Ts = 0.01 Ku = 200/5e6 K2 = 5e6 num = \[Ku \* …

---

## [How to prove stability of discrete time system](https://discourse.julialang.org/t/how-to-prove-stability-of-discrete-time-system/109789)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [February 6, 2024, 11:37am UTC](https://discourse.julialang.org/t/how-to-prove-stability-of-discrete-time-system/109789 "2024-02-06T11:37:46Z")

</div>

I am simulating the following discrete time feedback system: How can I prove that it is stable for K\_\\mathrm{u} \< 2 \\frac{1}{T\_\\mathrm{s} K\_2} ? Code: using ControlSystemsBase Ts = 0.01 Ku = 100/5e6 K2 = 5e6 nu…

[Next page](https://discourse.julialang.org/tag/controlsystems/1082.md?match_all_tags=true&page=1&tags%5B%5D=controlsystems)
