The sine wave comes out as flat as flat line .

4 次查看(过去 30 天)
When I do the sine wave to scope normally its ok but when i put it into a system it come out as a flat line and the system output is also not the right one .
  3 个评论
VBBV
VBBV 2025-6-22
However, it should not affect sine output in scope block which is some what kinda strange. As Paul said, it should be sinusoidal but appears as straight line due to large output values from other signals.
You can test it by plotting the output only between 18s and 19s.
Nijo
Nijo 2025-6-22
the constant blocks are connected. i have replied to paul with the same system i just remodeled it and with the scope directly from the sine wave.

请先登录,再进行评论。

回答(1 个)

Paul
Paul 2025-6-21
The yellow line likely isn't flat, it just looks that way becuase the y-axis is scaled by 10^15. Try sending the that signal to its own scope.
As for the instability itself, maybe it's being caused by the -1 gain block on the feedback line at the top of the diagram, that ultimately is input to the negative port of the sum block, thereby causing a positive feedback loop. Just a guess.
  3 个评论
Nijo
Nijo 2025-6-22
This is how the sine wave is coming when I give a direct scope to it why is this happening.
i have also attached the new system tht I did.
Paul
Paul 2025-6-22
I suspect that the sine wave looks like that in the scope because the solver steps are too large relative to the period of the sine wave.
If it's important that the output of the Sine Wave look sinusoidal in that Scope, then go to Modeling -> Model Settings -> Solver->Solver Details.
If using a fixed-step solver, set the Fixed Step Size to be about 10x smaller than the period of the Sine Wave.
If using a variable-step solver, set the Max Step Size to be about 10x smaller than the period of the Sine Wave.

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by