Agreed, though there have already been some nice wins. If you havenât seen the Instron talk at JuliaCon, check it out.
It shows some MTK wins, but also some things weâre working on and next directions.
Causal is just a subset of acausal modeling. Causal modeling is acausal modeling where all of the components only have input and output ports, no free ports. If you made ModelingToolkit throw an error on any open component that wasnât labelled input, output, or internal, then it would be a causal modeling system. Indeed having inputs and outputs labelled makes it easier to throw nice error messages (âInput not connectedâ, âTwo inputs connectedâ, etc.), but all of those nice debugging messages can (and are) thrown from acausal modeling systems as well (indeed, the purpose for input/output designations in acausal modeling systems is simply for GUIs and error messages, they serve no other purpose).
Itâs hard to find systems which are truly âeasierâ to think causally. Take for example your electronic systems example. What direction is the flow? In general, the flow goes in the direction of the lower voltage. That can be dependent on parameters and even can change in time. The direction of flow is not clear cut, which is why circuit systems usually want a way to just âconnectâ components. This is acausal, and then SPICE system use something called modal node analysis (MNA) to find a causal arrow. But a generalized form of MNA is Pantelides algorithm for index reduction because connecting electrical circuits generates Index-2 DAEs, and then finding a causal flow is a subset of what structural_simplify does with index reduction and tearing.
Note that Julia Computing is using this as a way to build a differentiable SPICE called Cedar.
It is of course built on ModelingToolkit and uses its algorithms to transform circuit components into ODEs to simulate.
All control systems are inherently causal, the same goes for signal-processing systems. For many engineers, such systems are what you are mostly modeling, and then the causal approach may very well feel more intuitive.
Nice! I hadnât spotted that one, thanks for pointing it out.
Iâve been keeping my eye out for this as there are some projects Iâm involved with that it could be useful for around the design/optimisation of power converters. Iâm guessing that it is commercial only - are there any aspects that might be made open to researchers?
I tend to disagree. From a modelling perspective, acausal modelling may be the way to go since it is a strict generalization of causal systems, in addition to solving it faster due to the transformations that reduce the index of the DAE.
However, engineering systems (continuous and discrete control systems, communication systems, signal processing, etcâŚ) are inherently causal as we often build more complex systems by joining isolated-but-simple blocks, which can nicely be represented as block diagrams that relates inputs and output, as it is done in Simulink. Since âcausal modelling is also known as explicit modelling, block-oriented modellingâ, it is the natural way of modelling more complex systems in engineering. A challenging engineering problem is far cry from an RC model and looks like something like this
I could implement such a system in Simulink. But in Julia, I do not even know if it is possible.
To sum things up, causal vs. acausal modeling is a pointless discussion for the end user. It does not matter how the algorithm solves it under the hood as long as (s)he can understand how is the input-output relationship of each block diagram. Furthermore, a GUI such as pysimCoder would be even better.
This is just connecting basic blocks and other blocks with only inputs and outputs? I agree that it can have an extra level of complexity to know that acausal exists in the system, but using the causal subset with causal blocks gives a causal model.
What would be a (mature enough) platform for desktop GUI development in Julia? In particular, do you think that the QML.jl package for Qt5 development (that you discuss elsewhere here at Discourse) is usable for making something like Julia version of pysimCoder? I am myself not in GUI development, just asking if the time is ripe for encouraging students for such adventures.
Well, QML.jl could definitly be used, and I like it, mainly because I have years of QT development experiance. But on the other hand there are not enough maintainers for this package, and it usually takes some time before it works with new Julia versions. In the moment it only works with Julia 1.7, but not with 1.8rc4.
Well, this year I will still be busy with improving the quality of my own packages, in particular KiteControllers.jl If you look at this package you can see that I did a lot of control design with Simulink and later ported it to JuliaâŚ
There has been some improvements lately to MTK and MTKstdlib that makes life easier for control engineers, see, e.g., this tutorial building and analyzing the closed-loop properties of a speed-controlled DC motor using MTK stdlib. This should hopefully show that, given a block diagram, building the corresponding control system in MTK using standard-library components like PID controllers etc. is rather straightforward.