Op-Amp in Simulink?

Thread Starter

jean28

Joined Sep 5, 2012
76
I'm trying to simulate a simple circuit that uses Op-Amp. However, I can't seem to find an Op-Amp block in the SimpowerSystems section of MATLAB Simulink. The one block I did find was a Simscape block, but it doesn't work with all the other components (they are SimPowerSystems blocks so they don't seem to be able to connect to the SimScape blocks). Thanks!
 

Thread Starter

jean28

Joined Sep 5, 2012
76

panic mode

Joined Oct 10, 2011
2,759
SUM is in Simulink under "Math Operations" or just type sum in search box of the simulink library. under list of signals type "+-" without quotes of course as opamp has both inverting and noninverting input. result is difference of the inputs. now add amplifier and set gain to something large such as 100000 for example (this is gain A). connect output of sum to input of amp. you get simple
Vout=A*(V1 - V2)

where
A=gain (such as 100000 or 1000000)
V1, V2 are inputs to SUM block
 

Thread Starter

jean28

Joined Sep 5, 2012
76
SUM is in Simulink under "Math Operations" or just type sum in search box of the simulink library. under list of signals type "+-" without quotes of course as opamp has both inverting and noninverting input. result is difference of the inputs. now add amplifier and set gain to something large such as 100000 for example (this is gain A). connect output of sum to input of amp. you get simple
Vout=A*(V1 - V2)

where
A=gain (such as 100000 or 1000000)
V1, V2 are inputs to SUM block
Ok, this is what I have. It doesnt let me measure the output voltage. What am I doing wrong?

http://i1226.photobucket.com/albums/ee410/jean28x/modelo22-1.jpg
 

panic mode

Joined Oct 10, 2011
2,759
in response to PM, there is a Op-Amp (actually several of them) in the simulink library... did you find it? just use search function or drill down Simscape>Foundation Library>Electrical>Electrical Elements
 

Attachments

renguo

Joined Aug 14, 2013
2
Hi, I hope you guys don't mind me resurrecting this old thread.

I tried constructing an op amp as per your suggestion but I cannot connect the s-ps block to the simpower blocks. Any ideas how to implement an op amp properly in simpowersystems of simulink? Thanks. I've attached the screenshot below.

 
Top