error solving differential equation
古いコメントを表示
Hello everyone !!
I am trying to solve with simulink a simple differential equation such as : dT/dt = A T + C, where A is a squared matrix with zero elements except for A(i,i), A(i,i+1) and A(i-1,i).
Whatever I put as initial conditions or vector for C, the result is a vector with values of order 10^^300!!!
I am using an integrator, isn'it compatible with matrix?
I am quite new to Simulink and any help from you would be really nice, thank you.
yorelchr
3 件のコメント
Shubham Gupta
2019 年 1 月 11 日
I can't really say why your output becoming too large since I don't know what your model looks like and I have very little information of the differential equation you have shared, but I can suggest what are te possible mistakes that you are making.
Let's start with the basic, say you have [A] matrix of dimension, [m x m], then your (T) and (C) vectors should be [m x 1]. Now, when you will make simulink model with your constants [A] and (C) you should get [m x 1] as output so, you will have to use demux to separate all the output.
Even after doing this, double check you differential equation. I hope this helps.
Note : Input initial condition for the differential equation by double clicking integrator block.
Christine
2019 年 1 月 21 日
Shubham Gupta
2019 年 1 月 24 日
If you can share the model and/or differential equation it would be helpful to understand the actual problem. One possible way for integrator to give large values is if the differential equation is always increasing or worse always increasing exponentially.
For example if you integrate exp(x) from t=0 to t=100. Then, you know that you will get the values in higher order. So, I am reluctant to say this but it might be possible that you made some kind of mistake in the equation or model and the differential equation became always increasing.
Also, Changing the solver shouldn't change your basic trend for the result, imo. I can't comment any further unless I see the model and/or equation.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で General Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!