# Simulink alternative in Julia for control engineering

**URL:** <https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961>\
**Category:** Modelling & Simulations\
**Tags:** question\
**Created:** [August 30, 2025, 7:52am UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961 "2025-08-30T07:52:16Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Post date:** [September 6, 2025, 4:35pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/21 "2025-09-06T16:35:23Z")

</div>

Then we’ve effectively recreated the two-language problem. It also directly contradicts the title “C codegen considered unnecessary: go directly to binary, do not pass C”

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [September 6, 2025, 4:39pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/22 "2025-09-06T16:39:46Z")

</div>

C codegen isn’t necessary but it is an option (and may be the best option for some users)

---

<div class="post-metadata">

**Author:** ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Post date:** [September 6, 2025, 5:34pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/23 "2025-09-06T17:34:40Z")

</div>

> [@Oscar\_Smith](#):
>
> and may be the best option for some users

Absolutely. If I look at the projects at my place of work that run on embedded hardware, they have 100K+ LOC written in C already. And that’s on top of an already existing RTOS like zephyr or threadx. My current work flow consists of generating C code and passing that off to the dev team. That way everything is checked into version control, and easily maintainable and compilable because it just more C code.

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [September 6, 2025, 5:49pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/24 "2025-09-06T17:49:28Z")

</div>

I think calling that c code from Julia is an acceptable way to have a digital twining environment as there may be other reliability and safety concerns that Julia is not able to tackle right now.

I like the initiatives some people are taking to realize PID and other controllers written in Julia directly to hardware, especially for academic and prototyping settings.

Some of the systems I’d be interested in modeling are complicated systems of systems with not only a control loop, but also kalman filtering and state estimators, perhaps machine learning elements, and other arbitrary state machines, sensor fusion, yada yada yada. A concise way to tackle this in a Julia Environment would be golden.

---

<div class="post-metadata">

**Author:** ![togo59](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/togo59/32/4138_2.png) [@togo59](https://discourse.julialang.org/u/togo59)\
**Post date:** [September 7, 2025, 12:53pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/25 "2025-09-07T12:53:17Z")

</div>

Hi @Allan_Baker

> [@Allan\_Baker](#):
>
> complicated systems of systems with not only a control loop, but also kalman filtering and state estimators

and …

> [@Allan\_Baker](#):
>
> sensor fusion, yada yada

Only two `yada, yada`s but what you just said was what I did in Julia. This was just over three years ago now and I was only a one-man-band but the door was always open for the deep learning (DL) stuff. Actually, my biggest problem was getting to grips with multi-threading races.

I really like the way @ChrisRackauckas suggests the uncertainty can be handled by embedding DL into classical code using [MTK.jl](https://docs.sciml.ai/ModelingToolkit/stable/) but I didn’t have the time.

State estimators can be made to reject bad data by using re-weighting techniques as well as smooth out Gaussian stuff. I am still somewhat biased against the use of machine learning for on-line, real-time use.

BTW: I ran the Julia-only code on a (I think it was) 48 virtual-core Concurrent Machines computer running a deterministic real-time OS, [RedHawk Linux](https://concurrent-rt.com/products/software/redhawk-linux/). Julia was perfect for this as the OS allowed one to choose which cores were 100% available and Julia made it a snap to run code specifically on those dedicated cores. Julia and an RTOS is a match made in heaven.

The dimension (i.e. order) of the MIMO system TF was way to big/unstable/interacting for PID although I did investigate using a diagonalising precompensator, which potentially would have exposed the TF matrix diagonal elements as suitable for individual PIDs. But, too complicated and long-winded to explain why I didn’t! 🙄

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [September 7, 2025, 3:56pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/26 "2025-09-07T15:56:57Z")

</div>

That sounds pretty cool. For the applications I’m talking about they could be on severely limited SWAP hardware like DSPs or FPGA based socs. Many times without an OS and running bare metal in a deterministic fashion.

---

<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:** [December 10, 2025, 6:53pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/27 "2025-12-10T18:53:16Z")

</div>

For completeness, there’s also [GitHub - janneshb/SimpleSim.jl: A minimalist Julia package for modular dynamical systems simulation. Work in Progress :-)](https://github.com/janneshb/SimpleSim.jl) that potentially satisfies your requirements, unfortunately also in the group of packages that appear to be unmaintained

---

<div class="post-metadata">

**Author:** ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Post date:** [December 11, 2025, 6:22pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/28 "2025-12-11T18:22:59Z")

</div>

This might be relevant.

> **[GitHub - bradcarman/ModelingToolkitDesigner.jl: A helper tool for visualizing and editing a...](https://github.com/bradcarman/ModelingToolkitDesigner.jl)**
>
> A helper tool for visualizing and editing a ModelingToolkit.jl system connections

---

<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:** [September 8, 2026, 10:54am UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/29 "2026-09-08T10:54:26Z")

</div>

Dyad now has both a GUI and support for discrete-time (synchronous) modelling. I just gave a webinar demoing some of these capabilities

[![](https://global.discourse-cdn.com/julialang/original/3X/f/9/f9b27c825f33effa90a9281c217cf374459ddc5a.jpeg "Modeling, Control and C Code Generation for a Rotary Pendulum") ](https://www.youtube.com/watch?v=ZM4oWlti_YY)

and a shorter form video with essentially the same material [https://www.youtube.com/watch?v=ePi8pYe\_pVU](https://www.youtube.com/watch?v=ePi8pYe_pVU)

There was also a talk by Tim and Kiran at this year’s juliacon that details some of the compiler stack that compiles the synchronous programs in a ModelingToolkit model

[![](https://global.discourse-cdn.com/julialang/original/3X/4/a/4af461789ebd9eb33ee826da82b80fd071528291.jpeg "Main Stage - Tent | JuliaCon Global 2026 | Day 3") ](https://www.youtube.com/watch?v=X6LZ7GeNzlw&t=9669)

(starts at 2:41:09)

The last resource I’d point at is our synchronous programming docs [Discrete-Time Modeling | Dyad](https://help.juliahub.com/dyad/dev/tutorials/discrete-time-modeling.html) and the standard library of discrete-time components [DiscreteComponents | Dyad](https://help.juliahub.com/dyad/dev/stdlib/DiscreteComponents/)

---

<div class="post-metadata">

**Author:** ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Post date:** [September 8, 2026, 12:12pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/30 "2026-09-08T12:12:00Z")

</div>

Amazing stuff! Seems like a lot of progress has been made on the graphical interface as well, looks great.

Just a question, how is the support for uncertainty quantification now? I recently tried your package MonteCarloMeasurements.jl, which surprisingly ‘just works’ with most of the MTK stuff I tried (amazing!). But maybe you have other plans for that?

---

<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:** [September 8, 2026, 12:57pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/31 "2026-09-08T12:57:46Z")

</div>

> Seems like a lot of progress has been made on the graphical interface as well, looks great.

Thanks 🙂

> Just a question, how is the support for uncertainty quantification now? I recently tried your package [MonteCarloMeasurements.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/MonteCarloMeasurements), which surprisingly ‘just works’ with most of the MTK stuff I tried (amazing!). But maybe you have other plans for that?

I do have some tests in place to make sure MonteCarloMeasurements.jl works with MTK, like here

> **[Uncertainty modeling for nonlinear systems - Robust control · DyadControlSystems](https://juliacomputing.github.io/DyadControlSystems.jl/dev/robust_control/#Uncertainty-modeling-for-nonlinear-systems)**
>
> Robust control refers to a set of design and analysis methods that attempt to guarantee stability and performance of a closed-loop control system in the presence of uncertainties, such as plant model mismatch and unknown disturbances. | Documentation...

and with the ControlSystems packages, like here

> **[Uncertainty modeling · RobustAndOptimalControl Documentation](https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/uncertainty/)**
>
> Documentation for RobustAndOptimalControl Documentation.

Apart from that, we have first-class support for ensembles and parameter sweeps in Dyad. Dyad models and simulations end up as ModelingToolkit models so anything applicable to MTK models are usable also with Dyad models, such as the ongoing work in

> **[GitHub - SciML/OptimalUncertaintyQuantification.jl](https://github.com/SciML/OptimalUncertaintyQuantification.jl)**
>
> Contribute to SciML/OptimalUncertaintyQuantification.jl development by creating an account on GitHub.

The package for MPC components in Dyad that I’m working on further has some WIP support for different kinds of uncertainty representations, there are quite many to choose from out there 😅

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 8, 2026, 7:01pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/32 "2026-09-08T19:01:57Z")

</div>

> [@baggepinnen](#):
>
> The last resource I’d point at is our synchronous programming docs [Discrete-Time Modeling | Dyad](https://help.juliahub.com/dyad/dev/tutorials/discrete-time-modeling.html) and the standard library of discrete-time components [DiscreteComponents | Dyad](https://help.juliahub.com/dyad/dev/stdlib/DiscreteComponents/)

Which version of Dyad is required to use these components? Does it work locally?

---

<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:** [September 8, 2026, 7:05pm UTC](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961/33 "2026-09-08T19:05:27Z")

</div>

You need the latest version 3.3 and you additionally need to opt out of the Dyad system image to use the latest and greatest right now. Upcoming Dyad 3.4 will have it included in the dyad system image as well.

Yes, this is all running locally in your vscode

[Previous page](https://discourse.julialang.org/t/simulink-alternative-in-julia-for-control-engineering/131961.md?page=1)
