referencing a hybrid model with a different fixed step size

11 visualizaciones (últimos 30 días)
Luca Morlok
Luca Morlok el 20 de Feb. de 2019
Editada: Christoph Hahn el 21 de Feb. de 2019
Hello everybody,
We work on a vehicle model in Simulink, which is adapted from racing lounge. The model consists of several referenced subsystems. One of the subsystems is an electric powertrain, which has to be simulated with a small fixed step size (100us) due to high current dynamics.
However, until now, we have to run the whole simulation with the same fixed step size. As we decided to convert the subsystems to referenced models, we set their step sizes to an integer multiple of the step size of the overall-model(1ms). Of course – instead of the powertrain model, which still has the same small step size as the overall model. Rate transitions have been implemented and the model works as long as all sub-models’ fixed step sizes are set to 100us.
Setting the fixed step size of the sub-models to 1ms, the following error occurs for two of our sub-models:
"Model 'Vehicle', which has a fixed step size of 0.0001, references (via the Model block 'Vehicle/Vehicle 14 DOF/Body 6 DOF') the model 'mech_Body_6_DOF', which has a fixed step size of 0.001. Referencing a hybrid (having both discrete and continuous components) model with a different fixed step size is not supported."
We found no documentation describing “hybrid models”, so we tried to simplify our situation: In a very small model with two sub-models, we tried to implement one discrete and one continuous integrator. After that, we set the step sizes as described above. But the error does not occur. So now we don’t really know, how to go further, it sounds like we’re having complex interactions of solver parameters.
We also tried to set the concerned models to variable step mode. Although this does not cause an error, the simulation is canceled after a very short time without a detailed error description. The error just says, that we shall reduce the minimum step size, but after doing this, the error occurs again.
Can anyone help us to shorten our simulation time?
Thanks for your time, we’re looking forward to your reply

Respuestas (1)

Christoph Hahn
Christoph Hahn el 21 de Feb. de 2019
Editada: Christoph Hahn el 21 de Feb. de 2019
Hi Luca,
in order for others to be able to help, you will need to share an example model. If you don't want ot share crucial IP, please try to reproduce the error with a minimalistic and generic model.
Thanks and Best,
Christoph

Categorías

Más información sobre Powertrain Reference Applications en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by