Modelica.Electrical.Analog.Examples.OpAmps

Examples with operational amplifiers

Information

This package contains application examples of the components provided in the package OpAmpCircuits.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Modelica.Electrical.Analog.Examples.OpAmps.NonInvertingAmplifier NonInvertingAmplifier Non-inverting amplifier
Modelica.Electrical.Analog.Examples.OpAmps.InvertingAmplifier InvertingAmplifier Inverting amplifier
Modelica.Electrical.Analog.Examples.OpAmps.DifferentialAmplifier DifferentialAmplifier Differential amplifier
Modelica.Electrical.Analog.Examples.OpAmps.Adder Adder Inverting adder
Modelica.Electrical.Analog.Examples.OpAmps.Subtracter Subtracter Inverting subtracter
Modelica.Electrical.Analog.Examples.OpAmps.Differentiator Differentiator Differentiating amplifier
Modelica.Electrical.Analog.Examples.OpAmps.Integrator Integrator Integrating amplifier
Modelica.Electrical.Analog.Examples.OpAmps.LowPass LowPass Low-pass filter
Modelica.Electrical.Analog.Examples.OpAmps.HighPass HighPass High-pass filter
Modelica.Electrical.Analog.Examples.OpAmps.ControlCircuit ControlCircuit Control circuit
Modelica.Electrical.Analog.Examples.OpAmps.VoltageFollower VoltageFollower Reproduce input voltage
Modelica.Electrical.Analog.Examples.OpAmps.Comparator Comparator Comparator
Modelica.Electrical.Analog.Examples.OpAmps.InvertingSchmittTrigger InvertingSchmittTrigger Inverting Schmitt trigger with hysteresis
Modelica.Electrical.Analog.Examples.OpAmps.SchmittTrigger SchmittTrigger Schmitt trigger with hysteresis
Modelica.Electrical.Analog.Examples.OpAmps.Multivibrator Multivibrator Multivibrator with Schmitt trigger
Modelica.Electrical.Analog.Examples.OpAmps.SignalGenerator SignalGenerator Rectangle-Triangle generator
Modelica.Electrical.Analog.Examples.OpAmps.LCOscillator LCOscillator LC oscillator
Modelica.Electrical.Analog.Examples.OpAmps.OpAmpCircuits OpAmpCircuits Different circuits with operational amplifiers

Modelica.Electrical.Analog.Examples.OpAmps.NonInvertingAmplifier Modelica.Electrical.Analog.Examples.OpAmps.NonInvertingAmplifier

Non-inverting amplifier

Information

This is a non inverting amplifier.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.InvertingAmplifier Modelica.Electrical.Analog.Examples.OpAmps.InvertingAmplifier

Inverting amplifier

Information

This is an inverting amplifier.

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.DifferentialAmplifier Modelica.Electrical.Analog.Examples.OpAmps.DifferentialAmplifier

Differential amplifier

Information

This model demonstrates a differential amplifier to attenuate the input voltage to a level that can be handled by the measurement instrument.

Two sinusoidal source voltages with a phase shift of 120° (e.g., two phases of a three-phase system) feed a load resistor. The voltage at the load resistor has to be measured but is too high for direct measurement.

Notes

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
dataParameters for source, OpAmp and measurement

Modelica.Electrical.Analog.Examples.OpAmps.Adder Modelica.Electrical.Analog.Examples.OpAmps.Adder

Inverting adder

Information

This is an inverting adder.

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.Subtracter Modelica.Electrical.Analog.Examples.OpAmps.Subtracter

Inverting subtracter

Information

This is an inverting subtracter.

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.Differentiator Modelica.Electrical.Analog.Examples.OpAmps.Differentiator

Differentiating amplifier

Information

This is a (inverting) differentiating amplifier. Resistance R can be chosen, capacitance C is defined by the desired time constant resp. frequency.

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.Integrator Modelica.Electrical.Analog.Examples.OpAmps.Integrator

Integrating amplifier

Information

This is an (inverting) integrating amplifier. Resistance R can be chosen, capacitance C is defined by the desired time constant resp. frequency.

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.LowPass Modelica.Electrical.Analog.Examples.OpAmps.LowPass

Low-pass filter

Information

This is a (inverting) low pass filter. Resistance R1 can be chosen, resistance R2 is defined by the desired amplification k, capacitance C is defined by the desired cut-off frequency.

The example is taken from: U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 13.3

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]
fGLimiting frequency [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.HighPass Modelica.Electrical.Analog.Examples.OpAmps.HighPass

High-pass filter

Information

This is a (inverting) high pass filter. Resistance R1 can be chosen, resistance R2 is defined by the desired amplification k, capacitance C is defined by the desired cut-off frequency.

The example is taken from: U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 13.3

Note: vOut measure the negative output voltage.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]
fGLimiting frequency [Hz]

Modelica.Electrical.Analog.Examples.OpAmps.ControlCircuit Modelica.Electrical.Analog.Examples.OpAmps.ControlCircuit

Control circuit

Information

This is an analog control circuit with operational amplifiers.

Compare the analog solution with the block circuit, e.g. firstOrder2B.y and firstOrder2A.v2.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
T1Small time constant [s]
T2Large time constant [s]
TiIntegral time constant [s]
kpProportional gain

Modelica.Electrical.Analog.Examples.OpAmps.VoltageFollower Modelica.Electrical.Analog.Examples.OpAmps.VoltageFollower

Reproduce input voltage

Information

This is a voltage follower. It reproduces the input voltage at the output without loading the input voltage source with a stiff output.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VpsPositive supply [V]
VnsNegative supply [V]
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]
RiInner resistance of input voltage source [Ohm]
RlLoad resistance [Ohm]

Modelica.Electrical.Analog.Examples.OpAmps.Comparator Modelica.Electrical.Analog.Examples.OpAmps.Comparator

Comparator

Information

This is a comparator. Resistance R1 can be chosen, resistance R2 is defined by the desired reference voltage Vref (between Vn and Vp). The output switches between Vn for input voltage < Vref and Vp for input voltage > Vref.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VpsPositive supply [V]
VnsNegative supply [V]
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]
VrefReference voltage [V]
kCalculated potentiometer ratio to reach Vref
RResistance of potentiometer [Ohm]

Modelica.Electrical.Analog.Examples.OpAmps.InvertingSchmittTrigger Modelica.Electrical.Analog.Examples.OpAmps.InvertingSchmittTrigger

Inverting Schmitt trigger with hysteresis

Information

This is a (inverting) Schmitt trigger. Resistance R1 can be chosen, resistance R2 is defined by the desired hysteresis. The output gets Vn for input voltage > 0 + vHys and Vp for input voltage < vHys*Vns/Vps.

The example is taken from: U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 6.5.2

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VpsPositive supply [V]
VnsNegative supply [V]
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]
vHys(Positive) hysteresis voltage [V]
kAuxiliary calculated parameter to be used in R2 calculation
R1Arbitrary resistance [Ohm]
R2Calculated resistance to reach hysteresis voltage [Ohm]

Modelica.Electrical.Analog.Examples.OpAmps.SchmittTrigger Modelica.Electrical.Analog.Examples.OpAmps.SchmittTrigger

Schmitt trigger with hysteresis

Information

This is a (non-inverting) Schmitt trigger. Resistance R1 can be chosen, resistance R2 is defined by the desired hysteresis. The output gets Vp for input voltage > vHys and Vn for input voltage < vHys*Vns/Vps.

The example is taken from: U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 6.5.2

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VpsPositive supply [V]
VnsNegative supply [V]
VinAmplitude of input voltage [V]
fFrequency of input voltage [Hz]
vHys(Positive) hysteresis voltage [V]
kAuxiliary calculated parameter to be used in R2 calculation
R1Arbitrary resistance [Ohm]
R2Calculated resistance to reach hysteresis voltage [Ohm]

Modelica.Electrical.Analog.Examples.OpAmps.Multivibrator Modelica.Electrical.Analog.Examples.OpAmps.Multivibrator

Multivibrator with Schmitt trigger

Information

This is a Multivibrator with Schmitt trigger according to:

U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 6.5.3

As the initialization system has two solutions, one with the op amp output at the lower saturation limit, and the other one with the two voltage inputs very close to each other, the homotopyType parameter is set to get the solver to converge to the former one, which is the required solution.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VpsPositive supply [V]
VnsNegative supply [V]
fDesired frequency [Hz]
R1Resistance 1 for adjusting the Schmitt trigger voltage level [Ohm]
R2Resistance 2 for adjusting the Schmitt trigger voltage level [Ohm]
RArbitrary resistance [Ohm]
CCalculated capacitance to reach the desired frequency f [F]

Modelica.Electrical.Analog.Examples.OpAmps.SignalGenerator Modelica.Electrical.Analog.Examples.OpAmps.SignalGenerator

Rectangle-Triangle generator

Information

This signal generator consists of a Schmitt trigger and an integrator. The output of the Schmitt trigger part opamp (opAmp1) is a rectangular signal with the amplitude VAmp and the frequency f. The output of the integrator part opamp (opAmp2) is a triangular signal of also the amplitude Vamp and the frequency f.

Source:

U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 14.5.2

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VpsPositive supply [V]
VnsNegative supply [V]
VAmpDesired amplitude of output [V]
R1Arbitrary resistance for Schmitt trigger part [Ohm]
R2Calculated resistance for Schmitt trigger to reach VAmp [Ohm]
fDesired frequency [Hz]
RArbitrary resistance of integrator part [Ohm]
CCalculated capacitance of integrator part to reach f [F]

Modelica.Electrical.Analog.Examples.OpAmps.LCOscillator Modelica.Electrical.Analog.Examples.OpAmps.LCOscillator

LC oscillator

Information

This is an LC oscillator according to:

U. Tietze and C. Schenk, Halbleiter-Schaltungstechnik (German), 11th edition, Springer 1999, Chapter 14.1

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VAmpAmplitude of output [V]
fDesired frequency [Hz]
AAmplification constant: A > 1 amplification, A = 1 pure sinusoidal oscillation, A < 0 damping
LArbitrary inductance > 0 [H]
CCalculated capacitance to reach frequency f [F]
RDamping resistance [Ohm]
R1Arbitrary high resistance [Ohm]
R2Calculated resistance to reach amplification A [Ohm]
gammaCalculated characteristical parameter
Automatically generated Thu Oct 1 16:07:38 2020.