system of differential equations

Hello All,
I am wondering how to solve system of differential equations using simulink?
plz do help me how to make a simulink model.
regards,

回答 (7 件)

Titus Edelhofer
Titus Edelhofer 2011 年 6 月 6 日

0 投票

Hi,
you could open the vdp model as a typical second order differential equation. The way to go stays the same when you have a system: put as many integrators per row of your system as you have orders of differentiation, and feed them with the variables that make up the differential equation.
Titus
Arnaud Miege
Arnaud Miege 2011 年 6 月 6 日

0 投票

Write down the equations on paper and then implement them using the various blocks available in Simulink. A tip: it's generally better to start with the highest order derivative and integrate rather than the other way round and differentiates. Have a look at Modeling Best Practises in the Simulink documentation and also at the interactive tutorials on the MathWorks web site.
HTH,
Arnaud
Seba
Seba 2011 年 7 月 14 日

0 投票

is it possible to find solution of this system with simulink:
x''(t)+ x'(t)+ z''(t) = 0
x(t)+ x'(t)+ z'(t) + 1 = 0

2 件のコメント

Arnaud Miege
Arnaud Miege 2011 年 7 月 14 日
That system does not have a solution. If you differentiate the second equation once more, you have:
x'' = -x' - z''
z'' = -1 - x'' - x'
If you then substitute the expression for z'' in the second equation into the first, you get:
x'' = -x' + 1 + x'' + x'
in other words, 1 = 0.
I suggest you check these equations, they're probably wrong.
ikhlas
ikhlas 2023 年 11 月 3 日
how can I solve this system using Euler's method in matlab
u'=p
v'=q
p'=0
q'=0
such that u(0)=0 , v(0)=0, p(0)=0, q(0)=1?

サインインしてコメントする。

Seba
Seba 2011 年 7 月 15 日

0 投票

here is a system of equations. Is it possible to find solution of this system with Simulink ?
Id, Iq,Ia,Ib,w,Me are unknown functions, Ud an Uq are known functions, other are constants

1 件のコメント

Arnaud Miege
Arnaud Miege 2011 年 7 月 15 日
Yes, as long there is a solution, you can represent any system of ODEs in Simulink. Start working out the higher order derivatives and use integrator blocks to work your way up. Read the documentation, e.g.:
http://www.mathworks.com/help/releases/R2011a/toolbox/simulink/ug/bra6ae8.html

サインインしてコメントする。

Seba
Seba 2011 年 7 月 19 日

0 投票

do you have any examples on how to solve equations with complex numbers in Simulink?

3 件のコメント

Arnaud Miege
Arnaud Miege 2011 年 7 月 19 日
It's the same as with real-valued signals, see the documentation:
http://www.mathworks.com/help/releases/R2011a/toolbox/simulink/ug/f15-99132.html#f15-82250
There are blocks to combine the real and imaginary parts into a complex number and conversely, to split a complex number into its real and imaginary parts.
Seba
Seba 2011 年 7 月 21 日
how can I solve equations with real-valued signals with simulink, do you have any documentation on that?
Arnaud Miege
Arnaud Miege 2011 年 7 月 21 日
Like I said before (read my previous answers/comments), you can represent any system of ODEs in Simulink. Start working out the higher order derivatives and use integrator blocks to work your way up. Read the documentation, e.g.:
http://www.mathworks.com/help/releases/R2011a/toolbox/simulink/ug/bra6ae8.html.
Also work through the tutorials I suggested and look at Modelling Best Practises in the documentation.

サインインしてコメントする。

Seba
Seba 2011 年 7 月 21 日

0 投票

I don't understand why the first example doesn't work and second example works

3 件のコメント

Arnaud Miege
Arnaud Miege 2011 年 7 月 21 日
There are two problems with the first example. The first one is a fairly simple syntax error: the correct MATLAB syntax is 10+10*i, not 10+10i (notice the *).
The second one is more subtle: even with the correct syntax, you'll get an error because you have an algebraic loop with a complex signals, which is not allowed. You will need to break the algebraic loop in some way. For example, adding a unit delay block with a sample time of say 1e-3s (or whatever is appropriate for your application), allows the model to run.
Walter Roberson
Walter Roberson 2011 年 7 月 21 日
Hmmm?
>> 10+10i
ans =
10 + 10i
Arnaud Miege
Arnaud Miege 2011 年 7 月 22 日
OK, fair enough.

サインインしてコメントする。

Seba
Seba 2011 年 7 月 25 日

0 投票

I have tried with delay block but i can't get the solution of the equation(which is -2.5-2.5*i)??

7 件のコメント

Arnaud Miege
Arnaud Miege 2011 年 7 月 25 日
This is an algebraic equation. Typically when you have a system of differential & algebraic equations, you would eliminate the algebraic variables and reduce the number of equations to the differential equations only before implementing in Simulink.
Seba
Seba 2011 年 7 月 25 日
so, how can i solve this equation with Simulink (10 + 10*i + 5*k = k)?
Should i put another delay loop or should i put this one on some other place?
Seba
Seba 2011 年 7 月 25 日
Could this equation be solved with simulink?
Arnaud Miege
Arnaud Miege 2011 年 7 月 25 日
I have just told you this is an algebraic equation and k is an algebraic variable. If you have k in another (differential) equation, substitute for k the solution of this equation and then solve the differential equation in Simulink rather than what you're trying to do.
Walter Roberson
Walter Roberson 2011 年 7 月 25 日
10 + 10*i + 5*k = k
implies that
10 + 10*i + 5*k - k = 0
which implies that
10 + 10*i + 4*k = 0
which implies that
4*k = -10 - 10*i
which implies that
k = (-10 - 10*i)/4
which is
k = -2.5 - 2.5*i
Any simple variation on this problem can be solved with a math block.
Seba
Seba 2011 年 7 月 26 日
what is a math block? Is that a block in Simulink?
Walter Roberson
Walter Roberson 2011 年 7 月 26 日
http://www.mathworks.com/help/toolbox/simulink/slref/mathfunction.html

サインインしてコメントする。

カテゴリ

製品

タグ

質問済み:

2011 年 6 月 6 日

コメント済み:

2023 年 11 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by