Examples with operational amplifiers
This package contains application examples of the components provided in the package OpAmpCircuits.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Name | Description |
---|---|
NonInvertingAmplifier | Non-inverting amplifier |
InvertingAmplifier | Inverting amplifier |
DifferentialAmplifier | Differential amplifier |
Adder | Inverting adder |
Subtracter | Inverting subtracter |
Differentiator | Differentiating amplifier |
Integrator | Integrating amplifier |
LowPass | Low-pass filter |
HighPass | High-pass filter |
ControlCircuit | Control circuit |
VoltageFollower | Reproduce input voltage |
Comparator | Comparator |
InvertingSchmittTrigger | Inverting Schmitt trigger with hysteresis |
SchmittTrigger | Schmitt trigger with hysteresis |
Multivibrator | Multivibrator with Schmitt trigger |
SignalGenerator | Rectangle-Triangle generator |
LCOscillator | LC oscillator |
OpAmpCircuits | Different circuits with operational amplifiers |
Non-inverting amplifier
This is a non inverting amplifier.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Inverting amplifier
This is an inverting amplifier.
Note: vOut
measure the negative output voltage.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Differential amplifier
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.
resistor1.i
and resistor2.i
).resistorGround.i
).
In case this resistance is high, the amplifier's common is floating with respect to the source's common with a high voltage (resistorGround.v
).Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
data | Parameters for source, OpAmp and measurement |
Inverting adder
This is an inverting adder.
Note: vOut
measure the negative output voltage.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Inverting subtracter
This is an inverting subtracter.
Note: vOut
measure the negative output voltage.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Differentiating amplifier
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).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Integrating amplifier
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).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Low-pass filter
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).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
fG | Limiting frequency [Hz] |
High-pass filter
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).
Name | Description |
---|---|
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
fG | Limiting frequency [Hz] |
Control circuit
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).
Name | Description |
---|---|
T1 | Small time constant [s] |
T2 | Large time constant [s] |
Ti | Integral time constant [s] |
kp | Proportional gain |
Reproduce input voltage
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).
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Ri | Inner resistance of input voltage source [Ohm] |
Rl | Load resistance [Ohm] |
Comparator
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).
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
Vref | Reference voltage [V] |
k | Calculated potentiometer ratio to reach Vref |
R | Resistance of potentiometer [Ohm] |
Inverting Schmitt trigger with hysteresis
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).
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
vHys | (Positive) hysteresis voltage [V] |
k | Auxiliary calculated parameter to be used in R2 calculation |
R1 | Arbitrary resistance [Ohm] |
R2 | Calculated resistance to reach hysteresis voltage [Ohm] |
Schmitt trigger with hysteresis
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).
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
Vin | Amplitude of input voltage [V] |
f | Frequency of input voltage [Hz] |
vHys | (Positive) hysteresis voltage [V] |
k | Auxiliary calculated parameter to be used in R2 calculation |
R1 | Arbitrary resistance [Ohm] |
R2 | Calculated resistance to reach hysteresis voltage [Ohm] |
Multivibrator with Schmitt trigger
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).
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
f | Desired frequency [Hz] |
R1 | Resistance 1 for adjusting the Schmitt trigger voltage level [Ohm] |
R2 | Resistance 2 for adjusting the Schmitt trigger voltage level [Ohm] |
R | Arbitrary resistance [Ohm] |
C | Calculated capacitance to reach the desired frequency f [F] |
Rectangle-Triangle generator
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).
Name | Description |
---|---|
Vps | Positive supply [V] |
Vns | Negative supply [V] |
VAmp | Desired amplitude of output [V] |
R1 | Arbitrary resistance for Schmitt trigger part [Ohm] |
R2 | Calculated resistance for Schmitt trigger to reach VAmp [Ohm] |
f | Desired frequency [Hz] |
R | Arbitrary resistance of integrator part [Ohm] |
C | Calculated capacitance of integrator part to reach f [F] |
LC oscillator
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).
Name | Description |
---|---|
VAmp | Amplitude of output [V] |
f | Desired frequency [Hz] |
A | Amplification constant: A > 1 amplification, A = 1 pure sinusoidal oscillation, A < 0 damping |
L | Arbitrary inductance > 0 [H] |
C | Calculated capacitance to reach frequency f [F] |
R | Damping resistance [Ohm] |
R1 | Arbitrary high resistance [Ohm] |
R2 | Calculated resistance to reach amplification A [Ohm] |
gamma | Calculated characteristical parameter |