summaryrefslogtreecommitdiff
path: root/digital/avr/modules/motor/pos_control/pos_control.txt
diff options
context:
space:
mode:
Diffstat (limited to 'digital/avr/modules/motor/pos_control/pos_control.txt')
-rw-r--r--digital/avr/modules/motor/pos_control/pos_control.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/digital/avr/modules/motor/pos_control/pos_control.txt b/digital/avr/modules/motor/pos_control/pos_control.txt
new file mode 100644
index 00000000..d1c1d03f
--- /dev/null
+++ b/digital/avr/modules/motor/pos_control/pos_control.txt
@@ -0,0 +1,32 @@
+==========================
+ motor/pos_control module
+==========================
+:Author: Nicolas Schodet
+
+Introduction
+============
+
+This module provides position control, usually for a DC motor. Given a
+position consign, it will adjust output power so that the measured position
+matches the consign. There is no speed control, this is handled by another
+module.
+
+Usage
+=====
+
+The `pos_control_t` structure contains both current control state and control
+parameters. The `kp`, `kd` and `ki` parameters are the PID coefficients,
+using a fixed point representation. The `e_sat`, `i_sat` and `d_sat` are the
+maximum values for error, integral and differential values. They must be
+adapted so that PID computation does not overflow. See the
+`pos_control_compute_pid` function comments for guidelines to choose those
+values.
+
+The `cur` field is updated by this module with the current position. The
+`cons` field must be written by user to set the position consign. This module
+will try to make the current position matches the consign position.
+
+API
+===
+
+.. include:: pos_control.exd