Differential equation by simulink
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I modeled a differential equation by simulink. My question is that what is the simulink assumption for initial conditions (necessary to compute the constants, c1 and c2):
For example a typical equation with solution is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483973/image.jpeg)
the simulink model is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483978/image.jpeg)
The simulink result is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483983/image.jpeg)
I cannot make a comparison between the analytical result and simulink result! I'm not sure if simulink works well... what is the initial condition assumed by simulink and what are the solution constants (c1 and c2)?
0 个评论
回答(1 个)
Mischa Kim
2021-1-10
Double-klick on the integrator blocks and you'll see that the default initial condition is zero (0). It is also inside the integrator block where you change the intial condition, or, select that it is defined through an external input.
Also, I noticed in your model that the feedback loop starts after the second integrator, while your differential equation contains a Xdot. To make the Simulink model consistent with the equation the loop would have to start between the first and second integrator.
另请参阅
类别
在 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!