Algebraic state in algebraic loop

22 次查看(过去 30 天)
Hi there, i hope you're doing fine!
i simplified my problem in order to get a fast answer.
My complicated simulink model dosen't work fo the same problem as this simplified example ( because of the derivative bloc).
is there ani tricks to make it work and to make the derivative block ignore the fact that it don't have the first point of the first itteration.
Thanks a lot for your help
  2 个评论
John D'Errico
John D'Errico 2020-7-16
编辑:John D'Errico 2020-7-16
Even though you are desperate to get a fast answer, posting the same question after a half day won't help either. I closed the duplicate question.
That you are desperate is clear. However, you also need to accept that a significant fraction of people using MATLAB have absolutely no knowledge of Simulink. For example, I don't use it & don't have it.
That means you need for someone to read your question who has the knowledge to answer it and the willingness and time to do so. This seems to be a moderately simple question, and you have done a decent job of encapsulating the problem in a simple model. Even someone like me who has no knowledge of Simulink, can at least understand the issue you seem to have.
Finally, I would point out that you posted your duplicate question (then then bumped up this question at the same time) at roughly 4am Eastern time in the US. Many people who might choose to answer your question will be asleep in the US now.
Someone will wander in and eventually answer your question. I'm sorry that I cannot help you. But that is the way a public forum must work, as we are all just volunteers who answer when we can,, when we are able to do so.
Walter Roberson
Walter Roberson 2020-7-16
I do not understand the question.
"is there ani tricks to make it work and to make the derivative block ignore the fact that it don't have the first point of the first itteration."
No, that model has an algebraic loop. It expresses
sin(t) / diff(f(t),t) == diff(f(t),t)
which is
sin(t) == diff(f(t),t)^2
which has solutions
C1 - 2*ellipticE(t/2 - pi/4, 2)
C2 + 2*ellipticE(t/2 - pi/4, 2)
At t = 0 that gives you
C1 + 2*ellipticE(pi/4, 2)
C2 - 2*ellipticE(pi/4, 2)
however, no initial conditions were specified for your model.
If you say that the initial conditions are 0 then f(t) is
- 2*ellipticE(pi/4, 2) - 2*ellipticE(t/2 - pi/4, 2)
2*ellipticE(pi/4, 2) + 2*ellipticE(t/2 - pi/4, 2)
... at least it has a solution in theory. But the solution goes imaginary after t = pi.

请先登录,再进行评论。

回答(1 个)

maiaL
maiaL 2020-7-16
You could try adding a Delay block before the input to the derivative block.
I don't know if the signal in your actual model is also sinewave-like, but the derivative will be zero on every half-period, so that's another problem on top of the algebraic loop.

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by