MATLAB Answers

How to build an Op Amp?

9 views (last 30 days)
Jean
Jean on 24 Nov 2012
Answered: Joel Van Sickel on 11 Dec 2020
Hey guys. I'm new to Simulink and I'm trying to run some simulations which need an Op-Amp. I tried using Simscape (which obviously already brings op amps) but for some reason, no matter how hard I try, my graphs never come out as sine waves and I get these graphs instead:
Using SimPowerSystems I don't have that same problem. However, I dont have an Op Amp over there. Some people have told me to build the op amp myself. Could anyone help me do this?
And of nobody could help me build the op-amp in simpowersystems, then could somebody help me make a model in Simscape that actually gives me sine functions when I measure voltage in the circuit?
This is the simple simscape model I have built up (and it gives me the graph I put above):
Thank you all very much.

Answers (1)

Joel Van Sickel
Joel Van Sickel on 11 Dec 2020
try adjusting your maximum time step to something smaller. It could be that the simulatoin is accurate, it's just taking such large steps that it doesn't look like an ideal sine wave (it only takes 2 points to capture a sin wave, but if you plot them, it doesn't look like a sine wave)

Community Treasure Hunt

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

Start Hunting!