Why does two sine waves of different phase give different output after double integration?

2 ビュー (過去 30 日間)
I have a sine wave here which I double integrate, in first image I set phase to zero, whereas the phase in the second image is set to pi/2. The blue line is the input sine wave and yellow is output. The initial conditions in both integrators are set to zero.
the gain is a constant in this case so I don't think that is causing the difference in output.
Why does it look like there's integral wind-up of sorts in one case and is not present in the other?
I have attached the simulink and matlab file to debug/reproduce this result.

採用された回答

Jon
Jon 2023 年 5 月 12 日
編集済み: Jon 2023 年 5 月 12 日
There is not an any error. This is just the physics/calculus of the situation.
In the first case (zero phase) the input acceleration is sin(wt). So starting from an initial velocity of zero and initial position of zero (the initial states of the integrators), the body would accelerate up to some maximum positive velocity, then decelerated down to zero velocity. So the velocity is always positive and in one period the mass has net displacement, x. Then you do it for another cycle and it is displaced another net positive x.
With the acceleration phase shifted by pi/2, the acceleration is first positive then negative then positive and then negative. So the velocity increases to some positive value then decreases to a negative value back to a positive values and then back to zero. The resulting change in position is zero, it first increases, gets to some maximum and then returns to the starting point.
  2 件のコメント
Daniel Joseph
Daniel Joseph 2023 年 5 月 12 日
So if I want to recreate the same output I want which is the displacement doesn't grow over time but oscillates, I'm guessing the initial condition for the first integrator in the first case should be changed?
Jon
Jon 2023 年 5 月 12 日
編集済み: Jon 2023 年 5 月 12 日
Yes, you could also change the initial condition on the first integrator to approximately -0.0016, and you will now have no net change in position per cycle, so the position does not grow. I just estimated the value needed to make the velocity have zero mean, but you could probably derive this analytically.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by