PID-Controller

PID-Controller implemented in Lua

$ luarocks install pid-controller

PID-Controller implemented in Lua, supporting such features as:
- On fly modification of the controller terms' gains (Kp, Ki, Kd);
- Weighted calculation of the Proportional term (Proportional on Error (PonE) and Proportional on Measurement (PonM) approaches mixed);
- "Derivative Kick" prevention mechanism (Derivative on Measurement (DonM) calculation approach);
- Regulation of multidimensional values;
- etc.

For usage examples, please, see the "example" directory, containing "Trajectory", "Path" modules and "StepResponse.lua", "MultidimRegulation.lua" scripts, which implement movement of an inertial body along precalculated trajectory, using several differently tuned PID-Controllers.

To run example scripts, run following commands from the root of the project tree:

lua -l deps example/script/StepResonse.lua

or

lua -l deps example/script/MultidimRegulation.lua

You will need "plotly" module installed and available as a dependency and an internet connection to render the plots:

Run

luarocks install --only-deps example/examples-*.rockspec

from the root of the project tree or run

luarocks install --server=https://luarocks.org/dev plotly

to install "plotly" module manually (See: https://luarocks.org/modules/kenloen/plotly).

Versions

1.0.2-114 days ago0 downloads
1.0.1-114 days ago0 downloads
1.0.0-116 days ago0 downloads

Dependencies

lua >= 5.2

Manifests