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
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.
回答(1 个)
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 个评论
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!