zekeriya.sari:
However, in hybrid systems, the discrete events (modeled by discrete-time systems) need a separate time reference, which implies a single clock can not be used and the discrete-time and continuous time components need their separate clocks. Simulation of hybrid systems is definitely a feature that must be included in Causal.jl and I’m working on it.
That can be handled via the callback systems, syncing the clock by having the discrete systems add tstops to the others.
asprionj:
Already a way of doing this,
Something planned, or
An Idea how this could / should be realized, as a starting point?
I did a full write up here:
opened 01:51PM - 15 Mar 21 UTC
control
discrete-time
There is a discussion about how to implement hybrid system, i.e. a combination o… f a continuous system (in my domain of control-systems engineering often called the "plant" or the "physical system") with a discrete-time system ("controller"), [on Discourse](https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791). The question came up whether MTK does already, will in the future, or should at all support discrete-time systems.
Please don't cosider this a "request to implement it", but a discussion on whether it makes sense, how it could be done, what effort it would take, etc. I know too little about the inner workings of MTK (and DiffEqs.jl) to judge any of this.
Basically, there are ways to work around it right now. We will be fully automating it, but it will take a little bit. And I put a suggestion in there for how to hand code it in a way that’s the most performant
2 Likes