The sine wave comes out as flat as flat line .
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
VBBV
el 22 de Jun. de 2025
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.
Respuestas (1)
Paul
el 21 de Jun. de 2025
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 comentarios
Paul
el 22 de Jun. de 2025
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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

