Package Modelica.​Electrical.​Analog.​Examples.​OpAmps
Examples with operational amplifiers

Information

This icon indicates a package that contains executable examples.

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

Package Contents

NameDescription
ComparatorComparator
DifferentiatorDifferentiating amplifier
HighPassHigh-pass filter
IntegratorIntegrating amplifier
InvertingAmpInverting amplifier
InvertingSchmittTriggerInverting Schmitt trigger with hysteresis
LCOscillatorLC oscillator
LowPassLow-pass filter
MultivibratorMultivibrator with Schmitt trigger
NonInvertingAmpNon-inverting amplifier
SchmittTriggerSchmitt trigger with hysteresis
SignalGeneratorRectangle-Triangle generator
VoltageFollowerReproduce input voltage

Model Modelica.​Electrical.​Analog.​Examples.​OpAmps.​InvertingAmp
Inverting amplifier

Information

This is an inverting amplifier. Resistance R1 can be chosen, R2 is defined by the desired amplification k.

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
Realk2Desired amplification
ResistanceR11000Arbitrary resistance
ResistanceR2k * R1Calculated resistance to reach desired amplification k

Model Modelica.​Electrical.​Analog.​Examples.​OpAmps.​NonInvertingAmp
Non-inverting amplifier

Information

This is a non inverting amplifier. Resistance R1 can be chosen, R2 is defined by the desired amplification k.

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
Realk2Desired amplification
ResistanceR11000Arbitrary resistance
ResistanceR2(k - 1) * R1Calculated resistance to reach desired amplification k

Model 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

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
ResistanceRi1Inner resistance of input voltage source
ResistanceRl1Load resistance

Model 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.

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
Realk2Desired amplification
ResistanceR1000Arbitrary resistance
CapacitanceCk / (2 * pi * f * R)Calculated capacitance to reach desired amplification k

Model 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.

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
Realk2Desired amplification
ResistanceR1000Arbitrary resistance
CapacitanceCk ^ (-1) / (2 * pi * f * R)Calculated capacitance to reach desired amplification k

Model 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

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
Realk1Desired amplification
ResistanceR11000Arbitrary resistance
ResistanceR2k * R1Calculated resistance to reach k
FrequencyfG0.1 * fLimiting frequency, as an example coupled to f
CapacitanceC(2 * pi * fG * R2) ^ (-1)Calculated capacitance to reach fG

Model 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

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
Realk1Desired amplification
ResistanceR11000Arbitrary resistance
ResistanceR2k * R1Calculated resistance to reach k
FrequencyfG0.1 * fLimiting frequency, as an example coupled to f
CapacitanceC(2 * pi * fG * R1) ^ (-1)Calculated capacitance to reach fG

Model 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

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
VoltageVref0Reference voltage
Realk(Vref - Vns) / (Vps - Vns)Calculated potentiometer ratio to reach Vref
ResistanceR1000Resistance of potentiometer

Model 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

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
VoltagevHys1(positive) hysteresis voltage
RealkvHys / VpsAuxiliary calculated parameter to be used in R2 calculation
ResistanceR11000Arbitrary resistance
ResistanceR2(1 - k) / k * R1Calculated resistance to reach hysteresis voltage

Model 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

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
VoltageVin5Amplitude of input voltage
Frequencyf10Frequency of input voltage
VoltagevHys1(positive) hysteresis voltage
RealkvHys / VpsAuxiliary calculated parameter to be used in R2 calculation
ResistanceR11000Arbitrary resistance
ResistanceR2R1 / kCalculated resistance to reach hysteresis voltage

Model 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

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

Parameters

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-15Negative supply
Frequencyf10Desired frequency
ResistanceR11000Resistance 1 for adjusting the Schmitt trigger voltage level
ResistanceR21000Resistance 2 for adjusting the Schmitt trigger voltage level
ResistanceR1000Arbitrary resistance
CapacitanceCf ^ (-1) / (2 * R * log(1 + 2 * R1 / R2))Calculated capacitance to reach the desired frequency f

Model 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

TypeNameDefaultDescription
VoltageVps15Positive supply
VoltageVns-VpsNegative supply
VoltageVAmp10Desired amplitude of output
ResistanceR11000Arbitrary resistance for Schmitt trigger part
ResistanceR2R1 * Vps / VAmpCalculated resistance for Schmitt trigger to reach VAmp
Frequencyf10Desired frequency
ResistanceR1000Arbitrary resistance of integrator part
CapacitanceCVps / VAmp / (4 * f * R)Calculated capacitance of integrator part to reach f

Model 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

TypeNameDefaultDescription
VoltageVAmp10Amplitude of output
Frequencyf1000Desired frequency
RealA1.001Amplification constant: A > 1 amplification, A = 1 pure sinusoidal oscillation, A < 0 damping
InductanceL0.001Arbitrary inductance > 0
CapacitanceC((2 * pi * f) ^ 2 * L) ^ (-1)Calculated capacitance to reach frequency f
ResistanceR10000Damping resistance
ResistanceR110000Arbitrary high resistance
ResistanceR2(A - 1) * R1Calculated resistance to reach amplification A
Realgamma(1 - A) / (2 * R * C)Calculated characteristical parameter

Generated 2018-12-12 12:10:00 EST by MapleSim.