Skip to main content

 Download White Paper     

     A motion control system is a collection of components put together in such a way that creates movement to a specific position, velocity, or acceleration. A closed loop motion control system consists of a motor, amplifier, motion controller, and feedback sensor.

 

Intro_Motion_Control_Diagram_600x318.png

Figure 1. Motion Control System Block Diagram

 

     An analogy for this system can be seen in the human body where the brain commands the arm to move in some direction, the muscles move the arm, and the eyes watch the arm to know when it arrives. The motion controller is the brain, therefore it commands the muscles while receiving feedback from the eyes. The muscles are the amplifier that takes the command from the brain to move the arm. The arm is the motor that physically moves while the eyes are the feedback sensor so the brain knows the position of the arm. Each component plays an important role in the overall control system therefore without each piece the system can not work.

     Controlling motion systems can take several forms. One of the most common forms is using the PID filter. The Proportional Integral Derivative filter is a compensation method driven by a disturbance or error in the system. If the system's current state or position matches a reference position (the commanded position), then the motion controller commands no change to the system. It is only when there is an error or difference between current position and reference position that the motion controller will command some change. The amount of error at any given time is used to generate a signal to cause the system to remove that error. In torque based systems the error will go through the PID filter to produce a torque that causes an acceleration to overcome the error in the system. It is this acceleration that moves the system back to the commanded position. By tuning the PID filter coefficients, a stable system performance can be realized.

     Taking a look at each piece of the motion control system will demonstrate how they have their own unique role in achieving stable closed-loop control. Take for example a point to point movement application with a DMC-40x0, the -D3040 500W servo amplifier, and a BLM-N23 servo motor. This system contains the motion controller, amplifier, motor, and feedback sensor needed for a closed loop motion control system.

 

Controller: The Brain

     The controller must have high performance and intelligence in order to interpret the system's feedback, perform the PID filter calculations, output motor command signals, receive motion commands, and develop motion profiles. The amount of torque needed to eradicate the error in the system is dependent upon the proportion of error, the accumulated error in the system over time, and the rate of change in the error. Each of these components are taken into account in the PID filter each time the motion controller reads the encoder. The required torque value to eliminate the error is expressed as a voltage signal from the controller to the amplifier.

     Specifically, the PID filter includes the P or proportional parameter which provides the amount of torque needed to close the position loop. Its purpose is to provide stiffness and responsiveness to the system (how fast the motor will go to the desired position). Although this parameter does most of the work in the PID filter, it does not provide any stability to the system. The D or derivative parameter is used to provide this stability. Like a pendulum submerged in a viscus fluid, the derivative parameter dampens the system's response, therefore stabilizing the system. With these two gains tuned correctly, one would be able to effectively control a closed-loop system. However, this closed-loop system would not be accurate. This is because the amount of error or torque provided by the P and D gains may not be enough to overcome the mechanics of the system. This is where the I or integral parameter will increase over time until the error is completely eliminated. Keep in mind that these gains are going to be different for unique loads and overall system mechanics. Therefore, they will need to be tuned accordingly. The equation below expresses the output of the PID filter with its proportional, integral, and derivative gains.

 

PID_600x111.png

Figure 2. PID Filter Equation

 

     The controller needs to sample the encoder about 10-20 times faster than the motor can move. This insures the controller sees the peaks in velocity and position required to accurately update the PID filter values and close the control loop. In this example, the DMC-40x0 has a default servo update time (TM) of 1000µsec, allowing motors with up to 50Hz of bandwidth to be easily controlled. Given an error of 1000 counts, the DMC-40x0 will generate a voltage signal consisting of three parts. The first part is the error count multiplied by the KP gain or proportional gain. For example 1000 counts times KP 6 equals 6000 counts for the filter. The second part is the total error over time multiplied by the KI gain or integral gain. For example, assuming the system has been in error for 10 samples with a total error over time of 2000 and a KI 1, the amount of counts calculated for the filter equals 2000. The last part is the KD gain or derivative gain. For example, if the motor is moving at 10 counts per second toward a set point with KD 60, the counts implemented in the filter would be -600. The total filter counts is 6000 + 2000 – 600 = 7400. This number is the output of the PID filter for this time sample. The number needs to be expressed as part of the overall motion control system. The output can be expressed between -10V and +10V with a 16-bit binary number. The equation below gives the milli-volts per binary division.

 

adc_600x84.png

Figure 3. Digital to Analog Converter Voltage Output per Division

 

     Expressing the filter number 7400 as a voltage is completed by multiplying it by the volts per division value of .000305 which is equal to 2.257 Volts. These calculations update the “Motor Command” voltage signal at the servo loop update rate.

 

Amplifier: The Muscles

     The amplifier must be able to receive the motor command signal and deliver the current to the motor required by the controller. The amount of current supplied to the motor is dependent on the voltage signal from the controller and the gain setting of the amplifier.

 

ampgain_600x48.png

Figure 4. Gain Equation for the Transconductance Amplifier

 

     A transconductance amplifier converts a voltage signal to a current signal. The proportion of voltage to current is the gain. The two major types of amplifiers are linear and switching. Linear amplifiers are less efficient than switching amplifiers because any power not sent to the motor is wasted in the amplifier as heat. In switching amplifiers the full voltage is turned on and off to the motor to achiev the desired current. The amplifier also acts as a motor driver by providing a way to commutate or change the direction of the current to achieve the desired motion on the motor. In brushed motors, simply changing the direction of the current will change the direction of rotation. In more complex 3-phase systems, Hall Effect sensors tell the amplifier drive which phases to energize in order to achieve motion. Sinusoidal commutation uses an encoder to tell the drive what proportion of current to send which phase and optimizes current distribution among the phases. In this example the AMP-43020 amplifier is a switching amplifier and uses Hall Effect sensors for commutation. This is also called a trapezoidal drive due to the trapezoidal shape of the phase switching. The amplifier gain (AG) setting is user defined. Amplifier gain settings for the AMP-43020 include .4, .7, and 1 amps/volt. With a chosen gain setting of .7 the 2.257V signal to the amplifier translates to an 1.58A current to be supplied to the motor. This current is supplied to the motor in order to zero the position error in the system.

 

Motor: The Arm

     The motion element of the motion control system comes only from the motor. Motors can come in many shapes, sizes, and configurations. Motors can be single-phase brushed motors, three-phase brushless motors, and other more exotic configurations. Motors will have operating ranges including peak current, continuous current, and speed ratings. Regardless of how the motor is built, getting the motor to move is dependent on the current through the motor. The current through the motor will induce a magnetic field which produces a torque on the shaft. The amount of torque present at the motor shaft is dependent on the current supplied from the amplifier and the torque constant of the motor.

 

torque_600x55.png

Figure 5. Gain Equation for the Motor

 

     In the example the motor being used is a three-phase brushless motor with Kt = 0.08 Nm/A. The amount of torque produced by the system to correct the error is the 1.58 A multiplied by 0.08 Kt to equals 13Nm. This torque will cause an acceleration on the motor shaft. As the shaft accelerates it will spin an encoder that is tracking position.

 

Encoder: The Eyes

     The system's sensing comes from the encoder attached to the motor. It provides the information to the controller about the direction, speed, and position of the motor. The units of the system are determined by the feedback device. In the case of an incremental encoder, counts on the controller are the pulses from the encoder. Quadrature encoder consist of a number of lines or slits in a medium where light is passed through. The light is detected on the other side of the slit to form a pulse signal. Two channels are used with a phase-shift of 90 degrees. By adding a second channel the number of pulses per revolution quadruples compared to the slits alone. The quadrature encoder provides direction information depending on which rising edge leads the other.

 

wavedrom_600x71.png

Figure 6. Quadrature Encoder Signal Waveform

 

     The value of the encoder is sampled by the controller and these units are passed into the PID filter. Additional circuitry is needed to keep track of the changes in position and report the correct value when the controller asks. The DMC-40x0 contains a Galil designed custom Application Specific Integrated Circuit (ASIC) called the GL-1800 to keep track of the encoder counts up to 15MHz. Other feedback options exist such as absolute encoders using the SSI and BiSS digital interfaces. Analog feedback is another form of absolute feedback in the form of a voltage. This voltage is proportional to a position that the controller can read from its Analog to Digital Converter. In the example the BLM has a 1000 line encoder equating to 4000 counts per revolution of the motor.

 

Profiler: The Command

trap_profile_600x249.png

Figure 7. Trapezoidal Motion Profile for Point-To-Point Move


     After the controller, amplifier, motor, and encoder are all connected and functioning, the system can be configured to remain stable, in position, and account for disturbances. What the system does not have at this point is direction on what to do. The motion control system needs a user command to perform some function. The role of the profiler is to take in a user command for motion and develop a sample by sample path of set points that the motion controller can track. When the user issues a command for a point to point move, the profiler develops a trapezoidal motion profile based on the settings for acceleration, slew speed, and deceleration.

     Over time the profiler adjusts the set point which introduces error in the system. The PID filter works to eliminates the error and the motion control system now is performing a function based on a user command. These user commands can be developed into a program that can perform application specific tasks.

 

Issues Involved in a Closed-Loop System

     There are many issues to consider when implementing closed-loop systems. Here are just a few of which to be mindful. Make sure all filters are tuned properly to provide stability, accuracy, and responsiveness to the system. Keep in mind that by increasing the PID parameters, one can increase the accuracy and responsiveness (how fast the motor will go to the desired position). However, if these parameters are excessively increased, an unstable system will develop. At this point the system will continuously overshoot the desired position, resulting in oscillation. By decreasing the PID parameters, the system may be stable but it will not be as accurate or responsive. Other factors which must be overcome include nonlinearities in system components, friction, deadband, natural frequencies (resonances), and any other external forces. Properly dealing with these common issues will ensure a closed-loop system's proper performance.

 

Conclusion

     Each component in a motion control system serves a specific purpose with the end goal of allowing the user to apply motion commands and perform work with a motor. The motion controller must be able to receive motion commands from the user, read the feedback from sensors, develop motion profiles, perform PID calculations, and send motor command signals. The amplifier must be able to receive motor command signals, turn these signal into current, and use this current to perform motor commutation in order to drive motors. The motor must be able to handle the current from the amplifier to produce motor shaft torque. Finally the encoder must be able to send signals based on the position of the motor. Motion control systems react by closing a feedback loop to eliminate error. The profiler leads the motion control system by introducing incremental position error. Users of motion control systems build useful applications by combining different profiled commands and adding more axes of motion. From pick-and-place machines to gantry systems to automation robots, motion control systems are at the heart of innovation, built from the fundamentals of physics and mathematics.