op-amp inverter on simulink

8 ビュー (過去 30 日間)
Con
Con 2015 年 3 月 6 日
回答済み: Jonathan LeSage 2015 年 3 月 6 日
Hello,
I'm trying to make a simple op-amp inverter on simulink but I dont know why my input is not square. I think I don't know what my "Solver Configuration" parameters should be. When I check the "Use local solver" in the Solver Configuration Parameters I can see a square pulse but doesn't start from zero time.
Please point my mistake or explain why it's supposed to be like this..

回答 (1 件)

Jonathan LeSage
Jonathan LeSage 2015 年 3 月 6 日
I took a look at the example model that you attached to your question. I saw what you mean by the square pulse does not start at zero.
Fortunately, this is a simple fix. The Scope block, by default, limits the number of points on the scope to 5000. If we disable this, we can see the entire square wave as expected.
To disable this:
  • Double click the Scope block to open it up
  • Click the "Gear" icon in the Scope to open the Scope parameters
  • Select the "History" tab
  • Uncheck "Limit data points to last:" and apply the changes
Additionally, the reason you originally saw trapezoidal-like waveforms instead of square waves was due to the large step sizes used by the Simulink solver. Under the "Solver Configuration" parameters, you can specify a "Max step size" to make sure the solver always takes smaller steps.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by