フィルターのクリア

Integration on a circular set in simulink

1 回表示 (過去 30 日間)
Pascal
Pascal 2015 年 6 月 5 日
回答済み: Pascal 2015 年 10 月 7 日
Hello, I would like to know if this is possible to obtain the same output as in the image below without having a diverging signal.
For instance, given a frequency of rotation (in rad/s), how to obtain the angle (in rad) in [-pi; pi[ without having a diverging signal?
Regards,
Pascal COMBES

採用された回答

Pascal
Pascal 2015 年 10 月 7 日
Hi,
I was glad to discover by chance that this problem is solved by integrator wrapping in MATLAB Simulink 2015b (maybe in 2015a, but almost certainly not in 2014b). See for details: http://fr.mathworks.com/help/simulink/slref/integrator.html, paragraph "wrapping cyclic states".
I did not know if this question caused the development of this function but this is exactly the feature I desired (the exemple of trigonometric computations is even proposed). My thanks to MathWorks!
Regards,
Pascal COMBES

その他の回答 (1 件)

Drew Davis
Drew Davis 2015 年 6 月 8 日
If you have a signal that is > 0 for all time entering in the inport of the model, as time approaches infinity the signal downstream of the integrator will approach infinity. The way to work around this for oscillatory signals is to create a sort of "wrap from -pi to pi" set of blocks or subsystem that performs this function as you have in your example.
You can add a saturation to the output signal of the integrator but it does not sound like that is what you are trying to do.
  1 件のコメント
Pascal
Pascal 2015 年 6 月 9 日
Hello,
Your first proposition is exactly what I use. This improves the solution of the system (there is no "solver error" any more, in the range I use). This is due to the fact that sin(k*2*pi) is not 0 and increases as k increases, whereas sin(mod(k*2*pi), 2*pi) seems to be 0 for all the range of values I use.
Your second proposition however is not what I want to do.
I would like to have a block which has the output of the above sub system but without the possibly diverging system.
I tried resetting the integrator to its output +/-2*pi when it reached -pi/+pi, but this creates an algebraic loop which is difficult to solve.
Regards,
Pascal COMBES

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

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by