Wolfram Computation Meets Knowledge

Electrical Engineering

Use System Modeler to construct and study electrical circuits, power electronics, and electrical machinery. Combine electrical and mechanical components to build complete system models. Perform analysis tasks and measure performance.


Potentiometers, also known as pots, are useful electrical components that allow a person or a machine to directly tune the voltage or resistance in one part of a circuit.

To run this example, you'll need

The latest versions of System Modeler and Mathematica.

Please make a selection:

Get a
free trial
with download

The Model

In its normal configuration, a potentiometer acts as a variable voltage divider. If a voltage source is connected between the two pins, called terminals, the voltage over the third pin, known as the wiper, will vary with the position of the potentiometer shaft. This shaft can, for example, be controlled by a slider or a thumbwheel.

A thumbwheel-controlled potentiometer has been connected in its normal configuration. The angular position of the thumbwheel will be increased following a ramp signal, from 0 to 180 degrees. The voltage on the wiper pin is measured with a voltage sensor.

When the thumbwheel is turned, the voltage over the voltage sensor will vary. Most often, the potentiometer contains a resistive element whose resistance increases linearly with its length. The wiper pin slides across this resistive element, causing the resistance between one terminal and the wiper to decrease while the resistance between the other terminal and the wiper increases. The voltage from the wiper pin will be equal to the input voltage times the resistance from the wiper pin to the ground divided by the potentiometer’s total resistance.

Voltage over different parts of the thumbwheel. The positive pin is connected to the input voltage, the negative pin is grounded, and the wiper pin is measured with a voltage sensor.
The voltage signal is responding to the turning of the thumbwheel. The thumbwheel is turned according to a ramp signal, from its minimum angle to its maximum angle.

Explore Simulation Results

Plots can be stored in Simulation Center and easily brought up the next time the model is simulated. All models in this example contain stored plots.

Using the Potentiometer

Reuse Components

A custom component created in SystemModeler can often be reused in different configurations.

A thumbwheel potentiometer can be connected in a rheostat configuration, working as a variable resistor. The terminal pin connected to the ground is then short-circuited with the wiper pin. This means that the voltage over the terminal to the wiper will be the same as over the two terminals. The rheostat has been connected in a series with a motor. The motor in turn drives a body with inertia. The torque produced by the motor will be proportional to the current running through the motor. Since the motor is connected in a series with the potentiometer, the current through the motor will be the same as the current through the potentiometer. By turning the potentiometer, the motor torque can be controlled.

Potentiometer in a rheostat configuration used to control a DC motor.

Create Custom Components

The Modelica Standard Library provides an excellent start for creating custom components.