ComparatorComparator |
|
This information is part of the Modelica Standard Library maintained by the Modelica Association.
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.
| Vps |
Value: +15 Type: Voltage (V) Description: Positive supply |
|---|---|
| Vns |
Value: -15 Type: Voltage (V) Description: Negative supply |
| Vin |
Value: 5 Type: Voltage (V) Description: Amplitude of input voltage |
| f |
Value: 10 Type: Frequency (Hz) Description: Frequency of input voltage |
| Vref |
Value: 0 Type: Voltage (V) Description: Reference voltage |
| k |
Value: (Vref - Vns) / (Vps - Vns) Type: Real Description: Calculated potentiometer ratio to reach Vref |
| R |
Value: 1000 Type: Resistance (Ω) Description: Resistance of potentiometer |
| opAmp |
Type: IdealizedOpAmpLimited |
|
|---|---|---|
| ground |
Type: Ground |
|
| vIn |
Type: TrapezoidVoltage |
|
| vOut |
Type: VoltageSensor |
|
| potentiometer |
Type: Potentiometer |
|
| supplyVoltage |
Type: SupplyVoltage |