Skip to content

Commit 68f1beb

Browse files
committed
Update examples utilizing IdealizedOpAmpLimted
1 parent 9d7df7b commit 68f1beb

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Modelica/Electrical/Analog/Examples/OpAmps.mo

+12-6
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ package OpAmps "Examples with operational amplifiers"
566566
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp(
567567
Vps=Vps,
568568
Vns=Vns,
569-
out(i(start=0)))
569+
out(i(start=0)),
570+
homotopyType=Modelica.Blocks.Types.LimiterHomotopy.LowerLimit)
570571
annotation (Placement(transformation(extent={{0,-10},{20,10}})));
571572
Modelica.Electrical.Analog.Basic.Ground ground
572573
annotation (Placement(transformation(extent={{-20,-100},{0,-80}})));
@@ -639,7 +640,8 @@ package OpAmps "Examples with operational amplifiers"
639640
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp(
640641
Vps=Vps,
641642
Vns=Vns,
642-
out(i(start=0)))
643+
out(i(start=0)),
644+
homotopyType=Modelica.Blocks.Types.LimiterHomotopy.UpperLimit)
643645
annotation (Placement(transformation(extent={{0,10},{20,-10}})));
644646
Modelica.Electrical.Analog.Basic.Ground ground
645647
annotation (Placement(transformation(extent={{-20,-100},{0,-80}})));
@@ -707,8 +709,10 @@ package OpAmps "Examples with operational amplifiers"
707709
parameter SI.Resistance R2=1000 "Resistance 2 for adjusting the Schmitt trigger voltage level";
708710
parameter SI.Resistance R=1000 "Arbitrary resistance";
709711
parameter SI.Capacitance C=1/f/(2*R*log(1 + 2*R1/R2)) "Calculated capacitance to reach the desired frequency f";
710-
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp(Vps=Vps, Vns=
711-
Vns) annotation (Placement(transformation(extent={{0,-10},{20,10}})));
712+
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp(
713+
Vps=Vps,
714+
Vns=Vns,
715+
strict=true) annotation (Placement(transformation(extent={{0,-10},{20,10}})));
712716
Modelica.Electrical.Analog.Basic.Ground ground
713717
annotation (Placement(transformation(extent={{-20,-80},{0,-60}})));
714718
Modelica.Electrical.Analog.Sensors.VoltageSensor vOut annotation (Placement(
@@ -776,8 +780,10 @@ package OpAmps "Examples with operational amplifiers"
776780
parameter SI.Frequency f=10 "Desired frequency";
777781
parameter SI.Resistance R=1000 "Arbitrary resistance of integrator part";
778782
parameter SI.Capacitance C=Vps/VAmp/(4*f*R) "Calculated capacitance of integrator part to reach f";
779-
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp1(Vps=Vps, Vns=
780-
Vns)
783+
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp1(
784+
Vps=Vps,
785+
Vns=Vns,
786+
homotopyType=Modelica.Blocks.Types.LimiterHomotopy.UpperLimit)
781787
annotation (Placement(transformation(extent={{-60,10},{-40,-10}})));
782788
Modelica.Electrical.Analog.Basic.Resistor r2(R=R2, i(start=Vps/R2))
783789
annotation (Placement(transformation(

0 commit comments

Comments
 (0)