Ideal operational amplifier
Simscape / Foundation Library / Electrical / Electrical Elements
The Op-Amp block models an ideal operational amplifier (op-amp). The figure shows the implementation schematic.
The block implementation is based on the following assumptions:
The ideal op-amp gain A is assumed to be infinite
Then, for finite output, must have V1 = 0
Ideal op-amp also implies current from p to n is zero (i1 = 0)
These assumptions result in the following equations for the block:
equations v1 == p.v - n.v; v1 == 0; i1 == 0; end
For more information, click the Source code link in the Description tab of the block dialog box.
The block has no parameters. However, you can initialize the Current into output node variable prior to simulation. For more information, see Block-Level Variable Initialization.
To set the priority and initial target values for the block variables prior to simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.
Nominal values provide a way to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. Nominal values can come from different sources, one of which is the Nominal Values section in the block dialog box or Property Inspector. For more information, see Modify Nominal Values for a Block Variable.
+ — Positive terminal
Electrical conserving port associated with the op-amp positive terminal.
- — Negative terminal
Electrical conserving port associated with the op-amp negative terminal.
out — Output terminal
Electrical conserving port associated with the output node of the op-amp.
The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2007a