Simulink solvers (ODE45 variable step and ODE1 fixed step) produce different results in different machines
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone, could anybody help me where to look at or explain what is happening?
I have a Simulink model which involves some reverse kinematics. I been using ODE45, variable step to solve the model but realized that it was producing different results in different machines. The setup of the model is identical, actually even the two PC have almost identical processors and motherboards (but I would have to check this again). Under the same local core or PC unit, the result is consistent. However using a different machine produced different results. The differences are order of around 10^-5 to 10^-8, which maybe a small value but is critical for my application. I've also tried ODE1 with the fixed step of 0.001, and the inconsistency between different machines still existed. Could anyone please explain this? Is this fully my problem in the model itself? Or is this how the ODE solvers do in simulink?
For example, I get ------- Simulink.SimulationOutput: Ccost: 0.348127891814900 ------- for Machine#1,
but I get ------- Simulink.SimulationOutput: Ccost: 0.348105484919332 ------- for Machine#2. Can't I fix it so that the result is not dependent on the PC and always consistent?
Sincerely, John
0 个评论
回答(1 个)
Balbheem
2013-7-21
Hello John, Matlab program must work everywhere just as it is cross-platform by default, unless version varies..
But, in your case its not the version issue.
So, I think you need to configure your simulink execution. Look out for consistency in solver, solver type, if fixed step then look for step size,..
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!