By Mark Patrick, Mouser Electronics Controlling the motion of modern robots often means managing movements along or around more than one axis. And while state-of-the-art electronics is making highly-precise motion control simpler to achieve, designers are also requiring more from these systems. The result is that motion-control remains a significant challenge. Given the mechanical nature of robotics, part of the control loop will invariably need mechanical systems. These, however, bring with them vibrations, gear backlash, momentum, structural flexibility and many other problems. So, picking the right motor for the desired motion is essential: a brushless DC motor or stepper motor is typically best in low- or moderate-power scenarios. Sensors. Knowing where the end effector is, as well as its speed and acceleration at any time, is extremely important, and normally requires a sensor, whether Hall-effect, optical encoder or synchro/resolver. For optimal accuracy, sometimes it is necessary to mount this sensor near the load endpoint, rather than on the motor. Of course, some applications keep cost and complexity down by not using a sensor. This sensorless field-orientated control takes voltage and current readings at each phase of the motor windings and performs complex calculations to work out the position of the motor. The drawback is that this requires more computing power and more sophisticated programming. Moreover, this approach doesn’t convey the same confidence or robustness as using a sensor. Consequently, sensors remain the preferred choice for many robotics designers. Common Classifications of Robots. When hearing the word “robot”, most would think of a human-like assistant that moves around freely. Most robotic systems in industry are rather different; they are stationary machines with arms set up to do specific tasks. Many can broadly be classified as cartesian, cylindrical or spherical robots: Cartesian robots (Figure 1) are easiest to control, since they move linearly along the x, y and z axes. They’re typically used for applying sealants, simple assembly and pick-and-place. Figure 1: Cartesian robot A cylindrical robot (Figure 2) provides motion along two linear axes, and rotational motion around one of them. This type is widely found in spot welding, handling tools or assembly work. Figure 2: Cylindrical robot Spherical robots (Figure 3) have a pair of rotary joints and a linear one, enabling them to operate in a spherical zone. They’re used for welding, tool-handling and casting. Figure 3: Spherical robot These setups give three degrees of freedom, but not all applications might need them all. Conversely, for those applications that need more than three, this can be achieved using multiple joints. The key challenge is that with added degrees of freedom, it becomes exponentially more difficult to control the robot smoothly and accurately. Choosing a Trajectory Profile. When designing a control system for any robot, an important consideration is the profile of its movement trajectory. For example, getting the arm to its endpoint more quickly can be achieved by accelerating and decelerating faster at each end of the motion. However, you might need to check first if this is acceptable, if it risks the arm overshooting or oscillating around the endpoint. Designers need to think carefully about which tradeoffs they can make, and therefore what form their motion trajectories should take. To make this simpler, there are standard trajectory profiles, such as the simple trapezoid, S-curve and contoured motion. Broadly speaking, these are progressively more refined, but also require more computational power to deliver. To implement the chosen approach, many use the proportional-integral-derivative (PID) closed-loop control algorithm, which usually provides sufficiently accurate control of the motor and end effector. Of course, when expanding into multiple axes and motors that need to be synchronised and coordinated closely, the magnitude of the control challenge increases. A Standard or Custom Controller? Motor controllers aren’t usually the same as motor drivers, which control power to the motor. However, it is possible to integrate controllers with drivers and power devices for smaller motors. If the motion required is relatively standard, there are fixed-function embedded-controller integrated circuits available. While these don’t offer the flexibility of more complex controllers, some provide a choice of motion profiles and the ability to set key parameters. They’re also relatively easy to use and low-cost. If the motion required is more sophisticated, or if the design demands additional connectivity, some form of user-programmable processor, using a field-programmable gate array (FPGA) or digital signal processor (DSP), is likely to be more appropriate. These provide much greater flexibility and a variety of auxiliary processing and support features. There are many options available, some of which offer development kits, code packages and validation tools, helping robotics engineers harness the sophisticated capabilities they need to achieve with their control systems.