Op-Amp in Simulink?

Discussion in 'The Projects Forum' started by jean28, Oct 20, 2012.

  1. jean28

    Thread Starter Member

    Sep 5, 2012
    76
    0
    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!
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
    if it is not there, just make one, you just need two components:
    adder (to make differential stage) and gain...
     
  3. jean28

    Thread Starter Member

    Sep 5, 2012
    76
    0
  4. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
    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
     
  5. jean28

    Thread Starter Member

    Sep 5, 2012
    76
    0
    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
     
  6. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
  7. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
    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
     
  8. renguo

    New Member

    Aug 14, 2013
    2
    0
    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.

    [​IMG]
     
  9. renguo

    New Member

    Aug 14, 2013
    2
    0
    i hope it's ok to bump this thread again, but I still haven't found any solution :(
     
Loading...