MATLAB Answers

1

referencing a hybrid model with a different fixed step size

Asked by Luca Morlok on 20 Feb 2019
Latest activity Edited by Christoph Hahn on 21 Feb 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

  0 Comments

Sign in to comment.

1 Answer

Answer by Christoph Hahn on 21 Feb 2019
Edited by Christoph Hahn on 21 Feb 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

  0 Comments

Sign in to comment.