Why are the results different between Simscape model and Simulink generated model ?

조회 수: 11 (최근 30일)
Hello,
I am generating a Simulink implementation model from a Simscape model through the sschdladvisor tool. Without any modification on the generated Simulink implementation model, the results on the waves are different. The output voltage starts at 300V in the Simscape model, and starts at 0V in the generated Simulink implementation model. Could you please help me to understand why the results are different ?
My only idea is that the capacitor has an initial voltage in "Variable" > "Capacitor voltage". Is this parameter not compatible with sschdladvisor ?
Simscape model
Results
Left : Simscape model
Right : Generated Simulink implementation model by sschdladvisor
Thank you for your help

채택된 답변

Joel Van Sickel
Joel Van Sickel 2020년 8월 5일
Hello Samuel,
the first thing to check is to make sure the step size is the same between the two models. I am assuming it is, but it is good to check just in case. If the step size is the same, it is possible that the number of iterations is not correct, although for your model, it looks like the number of iterations should be 1, in which case their should be no issues.
initial conditions should work with this workflow, although if you change the initial conditions in the original model, you'd need to rerun the workflow advisor to update the model.
Would you be willing to share your model? (we can do that seperately through a secure means instead of you posting it here)
Regards,
Joel
  댓글 수: 2
Samuel Quiniou
Samuel Quiniou 2020년 8월 6일
Hello Joel and thank you for your answer. Where could I find the step size in the two models ?
Joel Van Sickel
Joel Van Sickel 2020년 8월 6일
Hello Samuel,
you can find it in the solver configuration block you have attatched to your simscape model, as well as in your simulink solver settings.
You could also try simulating both with zero initial conditions. If they line up then and not with initial conditions, then you would know for sure if that was the issue.
Regards,
Joel

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simscape Electrical에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by