Potentiometer
Resistor with a wiper at the input position (0…1).
- signal
- electrical
- Modelica Standard Library
- 4 ports
- 1 parameter
potentiometerLibraryElectricalDescription
A resistor of total resistance R with a sliding contact (wiper). The position input splits R into two parts: 0 puts the wiper at pin_n, 1 puts it at pin_p.
Example
Variable parts A resistor, an inductor, and a capacitor whose values follow signals, and a potentiometer.
R = 10 + 5 sin 2πtDC 10 VVariable resistori RGround RL = 2 + sin(πt/2)DC 1 VVariable inductori LGround LC₀ = 1 mF+1 mF at 0.5 sCDC 1 mAVariable capacitorv CGround CWiper positionDC 10 V (pot)PotentiometerWiper voltageGround P
Also in this example:DC voltageVoltage sensorCurrent sensorSumConstantStepGroundRampSine waveVariable resistorVariable capacitorVariable inductorDC current
Ports
Inputs 1
-
pos
rWiper position, from 0 to 1. Values outside that range are clamped.
Conserving terminals 3
-
+
pin_pEnd pin at position 1.
-
−
pin_nEnd pin at position 0.
-
w
contactWiper pin.
Parameters
-
Total resistance
R1000 Ω≥ 0
Total resistance between pin_p and pin_n, in ohms. 0 or more.
Equations
Modelica
r′ = min(1, max(0, r)) pin_p.v − contact.v = R · (1 − r′) · pin_p.i pin_n.v − contact.v = R · r′ · pin_n.i pin_p.i + pin_n.i + contact.i = 0
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Electrical.Analog.Basic.PotentiometerAssumptions and limitations
- No temperature dependence, contact resistance, or wiper travel limits beyond the clamp.
Tips
- At either end of travel one section has zero resistance, which shorts the wiper to that end pin.
See also
Select a block in Gradara and press F1 to open its page offline.