MATLAB Answers

Shared simulation shows different results

2 views (last 30 days)
Alexandra Braig
Alexandra Braig on 28 Oct 2020
Commented: Alexandra Braig on 5 Nov 2020
Hello everyone,
I need to work on an efficiency simulation in MATLAB Simulink which is shared between me and my colleagues via git.
My problem: The simulation shows different results (deviation factor x10) if run on my computer than on my colleagues’ and the simulation time varies, too.
Additional Information:
  • I run the exact same version of MATLAB, Simulink and all the Toolboxes my colleagues have.
  • We have narrowed the problem down to one variable that does not change at all (even though it should), and the subsystems related to that variable. But the model and the input parameters are (as far as we could see) the exact same as my colleagues’.
  • We also shared the simulation via folder share (copy paste) to see if there was a problem with git, but the results still differed in the same way and only on my computer.
  • We checked if the decimal separator is set differently on our computers, but it is the same. (Tested in Excel)


Sign in to comment.

Answers (1)

Joel Van Sickel
Joel Van Sickel on 2 Nov 2020
Hello Alexandra,
the easiest explanation for this would be if you are using library blocks and somehow one of you have different libraries, however, I don't think that is your issue in this case. Given your debugging, it sounds like there is a variable that should be changing. When you say variable, do you mean Simulink signal value, or are you writing to the matlab workspace from your simulink model? Is this variable a mask parameter for those subsystems or something in the model workspace? Also, are you using model references? It is possible that something isn't getting updated. You can delete the slprj folder and try rebuilding the model as something easy to check. You could also try deleting all the .slxc files just in case. Can your provide examples of the particalar variable that isn't changing?

  1 Comment

Alexandra Braig
Alexandra Braig on 5 Nov 2020
Hello Joel, thanks for your answer!
I mean a Simulink signal value that doesn't show the same results as in my colleagues' simulation. I deleted the slprj folder before putting my question here, because that's what was suggested for a similar problem posted on this site. But it didnt't help in my case. I also deleted the .slxc file just now, but with no effect to the simulation. I'm simulating vehicle dynamics via the Simulink blocksets Longitudinal Wheel - Disk Brake and Vehicle Body 1DOF Longitudinal, each in a separate subsystem and connected through two-way-connections. My input is the axle torque as a time-dependent parameter and the output is velocity, but the output velocity stays 0 over the entire simulation. What I noticed is, that the forces on front and rear wheel are exactly opposite (same magnitude, different direction/sign). But I dont know if that's due to the 'missing' velocity or the other way around. The input parameters for the block models are the same for me as for my colleagues.
Kind regards

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!