Consistency in output between a 10 year simulation and two 5 year simulation runs of the same model
1 回表示 (過去 30 日間)
古いコメントを表示
Dear Matlab community,
I'd like to run an extremely simple simulink model
(a) for 10 years straight
(b) for 5 years (called run A), record data of run A, and then run it the next 5 years using the final state of run A as input to run B; then record state data for run B
I'd like to obtain the same output for (b) as I do in (a), however I have been unsuccessful. (Run A output always matches the output of the first 5 years of (a); but run B data doesn't match years 5-10 of (a)). The block whose state doesn't match is the integrator block. I'm currently using the ode4(Runge-Kutta) solver.
Does anyone know how to get consistent output?
Thank you for your help! RJ
2 件のコメント
Kaustubha Govind
2011 年 10 月 27 日
What version of MATLAB are you using? Are you using the SimState save/restore functionality in (b)? If yes, do you think you could whittle down your model to reproduce this issue with a simple source and the integrator block? It might be worth reporting this to MathWorks Tech Support to see if it's a bug.
回答 (1 件)
Fangjun Jiang
2011 年 10 月 27 日
Do you have anything (inputs, parameters etc.) that is time dependent? When you run (b), you need to set the start time as 5, instead of 0. See the answer for this question.
参考
カテゴリ
Help Center および File Exchange で General Applications についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!