modelOpAmpLimited

Improved operational amplifier with limitation

Information

Operational amplifier with saturation:

  • Input currents are zero.
  • No-load amplification is high (but not infinite).
  • Output voltage is limited between positive and negative supply.

Supply voltage is either defined by parameter Vps and Vns or by (optional) pins s_p and s_n.
In the first case the necessary power is drawn from an implicit internal supply, in the second case from the external supply.

For most applications it is sufficient to use default settings useFirstOrder=false (default on the Advanced-tab). In this case the intermediate voltage v_int is simply V0*v_in.
In some applications it might be necessary to set useFirstOrder=true to let the intermediate voltage v_int rise according to a firstOrder with time constant Tau. In that case the time constant Tau should fit to the dynamics of the input signal.

If this intermediate voltage v_int gets higher than positive supply, Boolean satPos indicates positive saturation.
If this intermediate voltage v_int gets lower than negative supply, Boolean satNeg indicates negative saturation.
Intermediate voltage v_int is limited between positive supply and negative supply to achieve output voltage v_out without further events.

Initialization

v_in.start and i_out.start are just helpful starting values during initialization, it is unlikely that it is necessary to change the start values and / or to declare them as fixed.

If it is necessary to use useFirstOrder=true, it is essential to initialize intermediate voltage v_int correctly.
As a default, default initialization (Linear) is sufficient: v_int = V0*v_in.
However, in some cases the initialization has more than one solution and it is desired to set v_int at the positive supply (UpperLimit) or v_int at the negative supply (LowerLimit).

Parameters

TypeNameDefaultDescription
RealV015000.0No-load amplification
BooleanuseSupplyfalseUse supply pins (otherwise constant supply)
SI.VoltageVps+15Positive supply voltage
SI.VoltageVns-15Negative supply voltage
Advanced
BooleanuseFirstOrderfalseUse firstOrder rise of output voltage
SI.TimeTau1e-5Time constant of firstOrder rise of output voltage
Modelica.Electrical.Analog.Types.InitOpAmpinitOpAmpModelica.Electrical.Analog.Types.InitOpAmp.LinearInitialization of firstOrder rise of output voltage

Connectors

TypeNameDefaultDescription
Modelica.Electrical.Analog.Interfaces.PositivePinin_pPositive pin of the input port
Modelica.Electrical.Analog.Interfaces.NegativePinin_nNegative pin of the input port
Modelica.Electrical.Analog.Interfaces.PositivePinoutPin of the output port
Modelica.Electrical.Analog.Interfaces.PositivePins_pOptional positive supply pin
Modelica.Electrical.Analog.Interfaces.NegativePins_nOptional negative supply pin

Components

TypeNameDefaultDescription
BooleansatPosv_int >= vpsPositive Saturation
BooleansatNegv_int <= vnsNegative Saturation
SI.VoltagevpsPositive supply voltage
SI.VoltagevnsNegative supply voltage
SI.Voltagev_inin_p.v - in_n.vInput voltage difference
SI.Voltagev_intIntermediate voltage
SI.Voltagev_outout.vOutput voltage to ground
SI.Currenti_outout.iOutput current into OpAmp
SI.Powerp_inin_p.v*in_p.i + in_n.v*in_n.iInput power
SI.Powerp_outout.v*out.iOutput power
SI.Powerp_s-(p_in + p_out)Supply power
SI.Currenti_sp_s/(vps - vns)Supply current