Variable resistor
Resistance set by the input signal.
- signal
- electrical
- Modelica Standard Library
- 3 ports
variableResistorLibraryElectricalDescription
A linear resistor whose resistance is set at each instant by an input signal. Use it for loads, sensors, or resistances that change during a run.
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 capacitorVariable inductorPotentiometerDC current
Ports
Inputs 1
-
R
Resistance, in ohms.
Conserving terminals 2
-
+
pPositive pin. Current into p is counted as positive.
-
−
nNegative pin.
Equations
Modelica
v = p.v − n.v, i = p.i, p.i + n.i = 0 v = R · i
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Electrical.Analog.Basic.VariableResistorAssumptions and limitations
- No temperature dependence.
- The input is not checked: a negative value gives a negative resistance, which supplies power.
Tips
- An input of exactly 0 is a short circuit. Keep it above 0 unless the circuit tolerates a short.
See also
Select a block in Gradara and press F1 to open its page offline.