I’m searching for a Simulink replacement. The main purpose is to have a simplified system simulation for quick prototyping. The domain is mechanical/electrical
Usually, I have 4 kinds of models/subsystems
- Sensor models that measure some ideal physical values and perturb them according to the model to generate realistic measurements
- Environmental models to create ideal input data for 1., such as trajectory generators, temperature settings, orientation, simulation time etc.
- Compensation models that try to invert 1., i.e. are algorithms that try to figure out the ideal input data from noisy measurement data
- Logging & plotting modules
- Are discrete models based on difference equations, LSTM models, simple lookup tables, digital filters (state space or transfer function formulation), usually a non-deterministic portion is included to simulate noise and drift (integrated noise)
- Basically handles external parameter sets, loads data or generates data based on mechanically inspired equations. It’s discretized currently, but in theory it’s in continuous time
- Is the rapid prototyping part. I want to exchange these algorithms quickly, ideally tune and optimize its parameters according to some output error metric. Examples are State Space Observer, (Extended) Kalman Filters, discrete filters, switching elements based on the value of input data, complementary filters, LSTM, … That part might get implemented in a µC when the optimal approach has been found
- Not much to say, save results, errors, plots, push it to a database, things like that
Is there anything in the awesome Julia ecosystem that could handle that? So far there’s no need to mix continuous and discrete modeling, I guess, discrete systems are sufficient for now. Of course 2. mimics the environment and therefore is continuous, but since this might make things much more complicated, I would be happy with staying in the discrete time domain.
Any input is very welcome
Thank you very much!
edit: I forgot that of course I’ve had a look at ModelingToolkit.jl and Modia.jl. MTK seems not to have discrete states implemented yet, see Discrete-Time (Sub-)Systems · Issue #894 · SciML/ModelingToolkit.jl (github.com) and Allowing discrete Difference equations in ODESystem · Issue #1122 · SciML/ModelingToolkit.jl (github.com).
Modia seems also not to support discrete time modeling?
DifferentialEquations.jl seem to support discrete ODEs. Is this the way to go? Discrete Solvers · DifferentialEquations.jl (sciml.ai)
Probably I’m getting something very wrong and discrete time modeling is a subset of all the great tools already implemented