Skip to content

Releases: glerpstudios/pidlab

v7

06 Sep 21:05
887fe52

Choose a tag to compare

PIDlab 7 is an interactive simulation tool for experimenting with PID motor control in both speed and position modes.

Users can select from preset motors (NEO, Kraken, tiny brush) or define a custom motor by entering inertia, resistance, torque constant, back-EMF constant, voltage limit, damping, and current limit. Parameters can be displayed and converted between SI and Imperial units. A gearbox ratio can also be applied to scale motor behavior.

The simulator allows users to configure PID values (kp, ki, kd), optional feedforward gain (kF), and load properties (mass and radius). Two operating modes are supported:

  • Free PID Mode: simulates generic PID control.
  • Vertical Load-Bearing PIDF Mode: includes gravitational torque, inertia of a load at a radius, and feedforward for vertical lifting systems.

Targets (desired speed or position at given times) can be entered, and the simulation computes how the motor responds over time using numerical integration of motor dynamics. The model accounts for:

  • Electrical effects (back-EMF, resistance, current limits).
  • Mechanical effects (inertia, damping, gearbox, gravity).
  • Control effects (PID terms, feedforward, clamping, anti-windup, inversion).

Results are plotted across three graphs:

  • Motor output (speed or position) with target lines, shaded acceptable-error bands, and annotations marking when the system settles within error bounds.
  • Control voltage applied to the motor.
  • Motor current drawn over time.

The GUI provides dropdowns for mode selection, entry fields for parameters, checkboxes (e.g., motor inversion), and dynamically shown fields (e.g., Imperial unit inputs or custom motor fields).