diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/Adder.mo b/Modelica/Electrical/Analog/Examples/OpAmps/Adder.mo index 4ca9262c83..b95cf5b06a 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/Adder.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/Adder.mo @@ -20,7 +20,7 @@ model Adder "Inverting adder" extent={{10,10},{-10,-10}}, rotation=270, origin={40,0}))); - OpAmpCircuits.Add add(p1_2(i(start=0))) + OpAmpCircuits.Add add annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); equation connect(add.n1, ground.p) diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/ControlCircuit.mo b/Modelica/Electrical/Analog/Examples/OpAmps/ControlCircuit.mo index 2193b8d5f1..1e28ba8047 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/ControlCircuit.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/ControlCircuit.mo @@ -12,30 +12,23 @@ model ControlCircuit "Control circuit" extent={{-10,-10},{10,10}}, rotation=270, origin={-90,-62}))); - OpAmpCircuits.Feedback feedbackA(p1(i(start=0))) + OpAmpCircuits.Feedback feedbackA annotation (Placement(transformation(extent={{-70,-40},{-50,-20}}))); OpAmpCircuits.PI PIA( - v2(fixed=true), k=kp, T=Ti, - opAmp(v_in(start=0))) + v(fixed=true)) annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); - OpAmpCircuits.FirstOrder firstOrder1A( - v2(fixed=true), - T=T1, - opAmp(v_in(start=0))) + OpAmpCircuits.FirstOrder firstOrder1A(T=T1, v(fixed=true)) annotation (Placement(transformation(extent={{-10,-40},{10,-20}}))); - OpAmpCircuits.Add addA(i1_2(start=0), r(i(start=0))) + OpAmpCircuits.Add addA annotation (Placement(transformation(extent={{30,-40},{50,-20}}))); Sources.StepVoltage step1A(V=1, startTime=0.5) annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={20,-60}))); - OpAmpCircuits.FirstOrder firstOrder2A( - v2(fixed=true), - T=T2, - opAmp(v_in(start=0))) + OpAmpCircuits.FirstOrder firstOrder2A(T=T2, v(fixed=true)) annotation (Placement(transformation(extent={{60,-40},{80,-20}}))); Blocks.Sources.Step stepB(height=10, startTime=0.1) annotation (Placement(transformation(extent={{-100,60},{-80,80}}))); diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/DifferentialAmplifier.mo b/Modelica/Electrical/Analog/Examples/OpAmps/DifferentialAmplifier.mo index 695827c4c8..3e24c6cfe8 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/DifferentialAmplifier.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/DifferentialAmplifier.mo @@ -39,11 +39,9 @@ model DifferentialAmplifier "Differential amplifier" Vps=+data.VSupply, Vns=-data.VSupply) annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); - Modelica.Electrical.Analog.Basic.Resistor resistor1(R=data.R1, - i(start=0, fixed=false)) + Modelica.Electrical.Analog.Basic.Resistor resistor1(R=data.R1) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica.Electrical.Analog.Basic.Resistor resistor2(R=data.R2, - i(start=0, fixed=false)) + Modelica.Electrical.Analog.Basic.Resistor resistor2(R=data.R2) annotation (Placement(transformation(extent={{-60,-40},{-40,-20}}))); Modelica.Electrical.Analog.Basic.Resistor resistor3(R=data.R3) annotation (Placement(transformation(extent={{-20,20},{0,40}}))); diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/HighPass.mo b/Modelica/Electrical/Analog/Examples/OpAmps/HighPass.mo index 4ac11ef920..7c0837f45e 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/HighPass.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/HighPass.mo @@ -12,8 +12,8 @@ model HighPass "High-pass filter" extent={{-10,10},{10,-10}}, rotation=270, origin={40,0}))); - OpAmpCircuits.Derivative derivative(T=1/(2*pi*fG), - v(fixed=true)) + OpAmpCircuits.Derivative derivative( + T=1/(2*pi*fG), v(fixed=true)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); Sources.TrapezoidVoltage vIn( V=Vin, diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/InvertingSchmittTrigger.mo b/Modelica/Electrical/Analog/Examples/OpAmps/InvertingSchmittTrigger.mo index c0a6a7d99e..38d8fd1628 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/InvertingSchmittTrigger.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/InvertingSchmittTrigger.mo @@ -12,7 +12,9 @@ model InvertingSchmittTrigger "Inverting Schmitt trigger with hysteresis" Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimited opAmp( Vps=Vps, Vns=Vns, - out(i(start=0))) + strict=false, + smoothed=false, + regularized=true) annotation (Placement(transformation(extent={{0,-10},{20,10}}))); Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation(extent={{-20,-100},{0,-80}}))); diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/LCOscillator.mo b/Modelica/Electrical/Analog/Examples/OpAmps/LCOscillator.mo index a6ff2407cd..92c0de64fa 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/LCOscillator.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/LCOscillator.mo @@ -19,7 +19,7 @@ model LCOscillator "LC oscillator" annotation (Placement(transformation(extent={{-50,10},{-30,-10}}))); Modelica.Electrical.Analog.Basic.Resistor r(R=R) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - Modelica.Electrical.Analog.Basic.Resistor r2(R=R2, i(start=0)) annotation ( + Modelica.Electrical.Analog.Basic.Resistor r2(R=R2) annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/Multivibrator.mo b/Modelica/Electrical/Analog/Examples/OpAmps/Multivibrator.mo index 6d4ec8857b..5292feeb6a 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/Multivibrator.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/Multivibrator.mo @@ -11,8 +11,9 @@ model Multivibrator "Multivibrator with Schmitt trigger" Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimited opAmp( Vps=Vps, Vns=Vns, - homotopyType = Modelica.Blocks.Types.LimiterHomotopy.LowerLimit, - strict = true) annotation (Placement(transformation(extent={{0,-10},{20,10}}))); + strict=false, + regularized=true) + annotation (Placement(transformation(extent={{0,-10},{20,10}}))); Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation(extent={{-20,-80},{0,-60}}))); Modelica.Electrical.Analog.Sensors.VoltageSensor vOut annotation (Placement( @@ -20,7 +21,7 @@ model Multivibrator "Multivibrator with Schmitt trigger" extent={{-10,10},{10,-10}}, rotation=270, origin={50,-20}))); - Modelica.Electrical.Analog.Basic.Resistor r1(R=R1, i(start=0)) annotation ( + Modelica.Electrical.Analog.Basic.Resistor r1(R=R1, p(i(start=0))) annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, @@ -31,7 +32,7 @@ model Multivibrator "Multivibrator with Schmitt trigger" origin={10,-20}))); Modelica.Electrical.Analog.Basic.Resistor r(R=R) annotation (Placement(transformation(extent={{20,20},{0,40}}))); - Modelica.Electrical.Analog.Basic.Capacitor c(C=C, v(start=1, fixed=true)) + Modelica.Electrical.Analog.Basic.Capacitor c(C=C, v(start=0.1, fixed=true)) annotation (Placement(transformation( extent={{10,-10},{-10,10}}, rotation=90, diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/FirstOrder.mo b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/FirstOrder.mo index 4a6b17fb98..6be87b23a1 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/FirstOrder.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/FirstOrder.mo @@ -1,6 +1,6 @@ within Modelica.Electrical.Analog.Examples.OpAmps.OpAmpCircuits; model FirstOrder "Lowpass filter operational amplifier circuit" - extends PartialOpAmp(v2(start=0)); + extends PartialOpAmp; import Modelica.Constants.pi; parameter Real k(final min=0)=1 "Desired amplification"; parameter SI.Resistance R1=1000 "Resistance at negative input of OpAmp"; diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/Integrator.mo b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/Integrator.mo index ec70dd2148..cb04b70b28 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/Integrator.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/Integrator.mo @@ -1,6 +1,6 @@ within Modelica.Electrical.Analog.Examples.OpAmps.OpAmpCircuits; model Integrator "Integrating operational amplifier circuit" - extends PartialOpAmp(v2(start=0)); + extends PartialOpAmp; import Modelica.Constants.pi; parameter Real k(final min=0)=1 "Desired amplification at frequency f"; parameter SI.Frequency f "Frequency"; diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PI.mo b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PI.mo index 22b7778ea4..9357d017d5 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PI.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PI.mo @@ -1,6 +1,6 @@ within Modelica.Electrical.Analog.Examples.OpAmps.OpAmpCircuits; model PI "PI controller operational amplifier circuit" - extends PartialOpAmp(v2(start=0)); + extends PartialOpAmp; import Modelica.Constants.pi; parameter Real k(final min=0)=1 "Desired amplification"; parameter SI.Resistance R1=1000 "Resistance at negative input of OpAmp"; @@ -13,6 +13,7 @@ model PI "PI controller operational amplifier circuit" annotation (Placement(transformation(extent={{30,20},{10,40}}))); Basic.Capacitor c(C=C) annotation (Placement(transformation(extent={{60,20},{40,40}}))); + SI.Voltage v(start=0)=c.v "Capacitor voltage = state"; equation connect(n1, n2) annotation (Line(points={{-100,-100},{100,-100}}, color={0,0,255})); diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PartialOpAmp.mo b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PartialOpAmp.mo index 6ffb3ad7cc..3d10243efa 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PartialOpAmp.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/OpAmpCircuits/PartialOpAmp.mo @@ -9,8 +9,7 @@ partial model PartialOpAmp V0=V0, final useSupply=false, final Vps=Vps, - final Vns=Vns, - out(i(start=0, fixed=false))) + final Vns=Vns) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ Text( diff --git a/Modelica/Electrical/Analog/Examples/OpAmps/SchmittTrigger.mo b/Modelica/Electrical/Analog/Examples/OpAmps/SchmittTrigger.mo index f56e8fa332..f6b9878f47 100644 --- a/Modelica/Electrical/Analog/Examples/OpAmps/SchmittTrigger.mo +++ b/Modelica/Electrical/Analog/Examples/OpAmps/SchmittTrigger.mo @@ -12,7 +12,9 @@ model SchmittTrigger "Schmitt trigger with hysteresis" Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimited opAmp( Vps=Vps, Vns=Vns, - out(i(start=0))) + strict=false, + smoothed=false, + regularized=true) annotation (Placement(transformation(extent={{0,10},{20,-10}}))); Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation(extent={{-20,-100},{0,-80}}))); @@ -64,8 +66,7 @@ equation
The example is taken from: U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 6.5.2