Main Content

Variable Resistor

Discrete variable resistor

  • Variable Resistor block

Libraries:
Simscape / Electrical / Specialized Power Systems / Passives

Description

The Variable Resistor block represents a linear time-varying resistor. It implements a discrete variable resistor as a current source. The resistance is specified by the Simulink® input signal. The resistance value can be negative.

Equations

The block uses the following equations for the relationship between the voltage, v, across the device and the current through the inductor, i, when the resistance at port R is R:

v=Ri.

When you use a Variable Resistor block in your model, set the powergui block Simulation type to Discrete and select the Automatically handle Discrete solver and Advanced tab solver settings of blocks parameter in the Preferences tab. The robust discrete solver is used to discretize the electrical model. Simulink signals an error if the robust discrete solver is not used.

Ports

Input

expand all

Input port associated with the resistor. The resistance can be negative.

Conserving

expand all

Specialized electrical conserving port associated with the resistor positive voltage.

Specialized electrical conserving port associated with the resistor negative voltage.

Parameters

expand all

Lower limit on the absolute value of the signal at port R. This limit prevents the signal from reaching a value that has no physical meaning. The value of this parameter must be greater than 0.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2019b