This article makes use of our AN1000 software which may be downloaded at…
AN1000 Zip File
The software communicates with the MOTM3 via a serial data interface (RS232 or TTL levles depending on how you connect to it). It implements the binary communication protocol. The easiest way to interface to a PC is via a COMM port, or a USB-serial adapter. You should also consider using our MOTMCON connector/prototyping board.

Tuning the PID algorithm of a closed loop system can be tricky in very complex systems. Complex systems may have mechanical load changes during movement, and may consist of combinations of very long and very short movements. For these systems basic tuning procedures might approximate good control, but lengthy testing should be implemented to ensure all movement profiles meet desired performance levels. In complex systems you may have to go as far as adjusting the PID settings prior to executing specific moves, as one set of values may not work for all movements.
However, in simple closed loop systems PID tuning is much easier. The Motion Mind 3 is designed to be a simple and cost effective motor controller. Tuning the Motion Mind 3 for a simple closed loop system is a straightforward process.
The “PID” represents proportional (P), integral (I), and derivative (D) terms. These three terms each act on the control systems error signal differently. The error signal is simply the difference between the desired position and the actual position (error = desired position – actual position).
You have a negative error if your actual position is greater than the desired position. The negative error tells the controller to drive in the negative direction to force the actual position to a lower value. Typically the higher the position error the higher the motor drive signal.
You can learn more about the PID algorithm and how it is implemented in the Motion Mind 3 in the product datasheet.
Download the datasheet here…
In most cases a simple closed loop control system can get by using the PI portions of the PID. The proportional (P) term creates the majority of the “umph” in the motor drive signal. The P term of the algorithm is multiplied with the error signal. So the larger the error the larger the voltage is driving the motor. The sign of the error signal (positive or negative) determines the direction the motor is pushed by the P term.
Tuning the PID:
Setting the P Term: To start tuning the closed loop system set the I and D terms to “0”, write those values to the Motion Mind 3 (in the software adjust the sliders and then press the "Write PID Settings" button). Then make a “short” movement so the software can adequately position errors. With I and D set to “0” the actual position will typically overshoot the desired position. You can also increase the P term to cause the controller to correct the overshoot. If the motor begins to oscillate, or jitter, the P term is too large.

Setting the I Term: While a large P term can sometimes cause oscillations, a large I term will almost always do so. If you see oscillation reduce the I term. The I term is multiplied by the position error every PID update (every 5ms). The I term and postion error product are summed continuously. If the P term x position error result is too small to correct position errors, the I term will eventually grow to the point that it corrects small errors. If you use a lot of long moves you can have "wind up" of the I term x position error summation. This occurs when summation of the small errors build and build and eventually swamp out the P term. To prevent "wind up" you should set the function bit that enables "saturation protection".

Setting the D Term: The derivative term acts as a brake on the system. It tends to dampen step changes and can counteract large P terms. Set it to a value similar to the P term.

Other options:
Once you've tuned the PID to a short move, try medium and long moves to see if the control system still performs well. Some operating modes, like enabling velocity limit reduce the need for the I and D terms. Putting a cap on velocity immediately reduces the postion errors calcualted internal to the Motion Mind 3 product. Try a variety of settings to see what works best for your system. They "sine test" function in the AN1000 software is also helpful in testing a moving system. It will command the controller to run through a sine wave movement, and you can follow it's performance graphically.
AN1000 Zip File
The software communicates with the MOTM3 via a serial data interface (RS232 or TTL levles depending on how you connect to it). It implements the binary communication protocol. The easiest way to interface to a PC is via a COMM port, or a USB-serial adapter. You should also consider using our MOTMCON connector/prototyping board.

Tuning the PID algorithm of a closed loop system can be tricky in very complex systems. Complex systems may have mechanical load changes during movement, and may consist of combinations of very long and very short movements. For these systems basic tuning procedures might approximate good control, but lengthy testing should be implemented to ensure all movement profiles meet desired performance levels. In complex systems you may have to go as far as adjusting the PID settings prior to executing specific moves, as one set of values may not work for all movements.
However, in simple closed loop systems PID tuning is much easier. The Motion Mind 3 is designed to be a simple and cost effective motor controller. Tuning the Motion Mind 3 for a simple closed loop system is a straightforward process.
The “PID” represents proportional (P), integral (I), and derivative (D) terms. These three terms each act on the control systems error signal differently. The error signal is simply the difference between the desired position and the actual position (error = desired position – actual position).
You have a negative error if your actual position is greater than the desired position. The negative error tells the controller to drive in the negative direction to force the actual position to a lower value. Typically the higher the position error the higher the motor drive signal.
You can learn more about the PID algorithm and how it is implemented in the Motion Mind 3 in the product datasheet.
Download the datasheet here…
In most cases a simple closed loop control system can get by using the PI portions of the PID. The proportional (P) term creates the majority of the “umph” in the motor drive signal. The P term of the algorithm is multiplied with the error signal. So the larger the error the larger the voltage is driving the motor. The sign of the error signal (positive or negative) determines the direction the motor is pushed by the P term.
Tuning the PID:
Setting the P Term: To start tuning the closed loop system set the I and D terms to “0”, write those values to the Motion Mind 3 (in the software adjust the sliders and then press the "Write PID Settings" button). Then make a “short” movement so the software can adequately position errors. With I and D set to “0” the actual position will typically overshoot the desired position. You can also increase the P term to cause the controller to correct the overshoot. If the motor begins to oscillate, or jitter, the P term is too large.

Setting the I Term: While a large P term can sometimes cause oscillations, a large I term will almost always do so. If you see oscillation reduce the I term. The I term is multiplied by the position error every PID update (every 5ms). The I term and postion error product are summed continuously. If the P term x position error result is too small to correct position errors, the I term will eventually grow to the point that it corrects small errors. If you use a lot of long moves you can have "wind up" of the I term x position error summation. This occurs when summation of the small errors build and build and eventually swamp out the P term. To prevent "wind up" you should set the function bit that enables "saturation protection".

Setting the D Term: The derivative term acts as a brake on the system. It tends to dampen step changes and can counteract large P terms. Set it to a value similar to the P term.

Other options:
Once you've tuned the PID to a short move, try medium and long moves to see if the control system still performs well. Some operating modes, like enabling velocity limit reduce the need for the I and D terms. Putting a cap on velocity immediately reduces the postion errors calcualted internal to the Motion Mind 3 product. Try a variety of settings to see what works best for your system. They "sine test" function in the AN1000 software is also helpful in testing a moving system. It will command the controller to run through a sine wave movement, and you can follow it's performance graphically.
0 Comments On This Entry
← September 2010 →
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Recent Entries
-
PID tuning of the motion Mind 3 our AN1000 softwareon Jul 26 2010 03:08 PM
-
-
PC Boton Oct 14 2008 12:49 PM
-
Old School Serial Controlon Sep 30 2008 10:10 AM
-
Help
Leave Comment








