{"docs":[{"id":199,"title":"Robot Motion Control: Motors, Encoders and Control Loops","heading":"Robot Motion Control: Motors, Encoders and Control Loops","subheading":null,"category":"Robotics","body":{"root":{"type":"root","children":[{"type":"heading","tag":"h3","version":1,"children":[{"type":"text","text":"Cascaded loops","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"The innermost current loop sets motor torque and usually runs in the motor drive. A velocity loop around it commands current, and a position loop around that commands velocity. Each inner loop should be considerably faster than the loop outside it so the outer loop sees it as nearly ideal.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Add feedforward of velocity and acceleration from the trajectory to reduce tracking lag, limit the integrator when the output saturates, and filter or take the derivative from the measurement rather than the error.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"tags":"Robotics, Motion Control, PID","cardCta":{"label":null,"link":null},"pageCta":{"label":"Talk to AAVICO engineering","link":"/contact"},"excerpt":"Smooth, accurate robot motion comes from the right motor, good feedback and well-tuned control loops. Here is how the pieces fit together and where projects go wrong.","featuredImage":null,"type":"Blog","readTime":"3 min read","publishedAt":"2026-11-15T13:54:00.000Z","heroImage":null,"introText":"Every robot joint or wheel is a small control system: a motor produces torque, a sensor measures what happened and a controller corrects the difference. The usual structure is a set of nested loops controlling current, velocity and position, each typically using a form of PID control. This article explains the main motor and encoder choices and how the loops are arranged and tuned.","metrics":[{"id":"robot-motion-control-motors-encoders-and-control-metric-1","value":"PID","label":"Proportional, integral and derivative terms acting on the error between target and measurement.","icon":null},{"id":"robot-motion-control-motors-encoders-and-control-metric-2","value":"Cascade","label":"Current, velocity and position loops nested, with the inner loop fastest.","icon":null},{"id":"robot-motion-control-motors-encoders-and-control-metric-3","value":"Quadrature","label":"Two encoder channels a quarter cycle apart give both position and direction.","icon":null},{"id":"robot-motion-control-motors-encoders-and-control-metric-4","value":"4x","label":"Counting every edge on both quadrature channels gives four counts per encoder line.","icon":null}],"gallery":[],"challenge":{"root":{"type":"root","children":[{"type":"paragraph","version":1,"children":[{"type":"text","text":"Control problems are often mechanical problems in disguise. Backlash in a gearbox, friction that changes with temperature and flexible couplings all limit how tightly a loop can be tuned, and no gain setting removes them. Resonances in the structure set a further ceiling on loop bandwidth.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Others come from the controller. A loop that runs too slowly, noisy derivative terms and integrators that wind up while the motor is saturated all cause overshoot, oscillation or sluggish response.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"blockquote":{"quote":"Tune from the inside out. An outer loop can never be better than the loop it commands.","author":"","role":"AAVICO Engineering"},"supportImage1":null,"deliverables":{"root":{"type":"root","children":[{"type":"paragraph","version":1,"children":[{"type":"text","text":"Size the motor and gearing from the required torque, speed and inertia, with margin for acceleration.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Choose feedback resolution from the positioning accuracy, and decide whether absolute position is needed at power-up.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Tune the current, velocity and position loops in that order, then add feedforward and test across the full load range.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"results":[{"id":"robot-motion-control-motors-encoders-and-control-result-1","title":"Accuracy","description":"The axis reaches its target position repeatably."},{"id":"robot-motion-control-motors-encoders-and-control-result-2","title":"Smooth Motion","description":"Tuned loops and feedforward reduce overshoot and vibration."},{"id":"robot-motion-control-motors-encoders-and-control-result-3","title":"Robustness","description":"Behaviour stays stable as load and temperature vary."},{"id":"robot-motion-control-motors-encoders-and-control-result-4","title":"Safe Behaviour","description":"Saturation, limits and faults are handled predictably."}],"lookingAhead":{"root":{"type":"root","children":[{"type":"paragraph","version":1,"children":[{"type":"text","text":"Incremental encoders need a homing move after power-up; absolute encoders report position immediately. Choose according to whether the robot can safely move to find home.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Plan safety functions such as torque limits and safe stopping early, since they shape the drive and the control architecture.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"supportImage2":null,"testimonial":{"quote":null,"author":null,"role":null,"photo":null},"challengesSolved":[{"id":"robot-motion-control-motors-encoders-and-control-challenge-1","title":"Gains tuned around mechanical backlash","description":null,"icon":null},{"id":"robot-motion-control-motors-encoders-and-control-challenge-2","title":"Integrator windup during saturation","description":null,"icon":null},{"id":"robot-motion-control-motors-encoders-and-control-challenge-3","title":"A position loop faster than its velocity loop","description":null,"icon":null},{"id":"robot-motion-control-motors-encoders-and-control-challenge-4","title":"Homing moves that are unsafe","description":null,"icon":null}],"relatedPosts":[],"contactUs":{"show":true},"updatedAt":"2026-11-15T17:32:32.682Z","createdAt":"2026-11-15T17:32:32.682Z"}],"hasNextPage":false,"hasPrevPage":false,"limit":10,"nextPage":null,"page":1,"pagingCounter":1,"prevPage":null,"totalDocs":1,"totalPages":1}