STATERA Library · Series 07 · Volume 10 · Chapter 03 · EN
Source: https://github.com/Statera-Library/07_Vol_10_Calibration_Engineering/blob/main/Chapter_03_Motor_and_Servo_Calibration/Chapter_03_Motor_and_Servo_Calibration_EN.md
Volume 10 Calibration Engineering
Chapter 03. Motor and Servo Calibration
03.01. Encoder Home Position
Encoder home position calibration establishes the reference relationship between a motor or servo's mechanical configuration and the position reported by its encoder. This reference defines where the control system considers the actuator to be at a known zero or home state. Without a reliable home reference, commanded positions may not correspond to the actual mechanical configuration, even when encoder measurements themselves are precise.
An encoder measures rotational or linear displacement relative to an electrical or digital reference, while the controlled mechanism operates within a physical coordinate system defined by shafts, joints, gears, wheels, or linkages. Encoder home calibration connects these two domains by determining the encoder count or angular value corresponding to a mechanically defined reference position and storing the resulting offset for subsequent control calculations.
The required calibration method depends strongly on encoder technology. Absolute encoders can report a unique position immediately after power-up, but their electrical zero rarely coincides perfectly with the desired mechanical zero after assembly. Incremental encoders provide relative motion information and normally require a repeatable reference event, such as an index pulse, limit switch, proximity sensor, mechanical datum, or controlled hard-stop search, before absolute actuator position can be established.
A typical calibration begins by placing or moving the mechanism into a precisely defined reference configuration. The controller then acquires the encoder reading associated with that configuration and calculates a home offset. If the measured encoder position is \(q_e\) and the desired mechanical reference is \(q_h\), the correction can conceptually be represented as an offset relating measured position to calibrated mechanical position.
Mechanical reference quality directly influences calibration accuracy. Backlash, elastic deformation, bearing clearance, gear compliance, belt tension, fixture tolerance, and inconsistent contact with mechanical stops can cause the same nominal home operation to produce different encoder readings. For this reason, calibration procedures should define not only the reference location but also the direction and motion conditions used when approaching it.
Approach direction is particularly important in geared servo systems. If a joint approaches the home position from opposite directions, transmission backlash may cause different encoder values even though the external mechanism appears to reach approximately the same location. Production procedures therefore commonly use a predefined approach direction, controlled velocity, and low acceleration so that the mechanical load state remains repeatable during reference acquisition.
Index-based incremental encoder calibration normally combines coarse and fine referencing. A limit switch or proximity sensor first identifies a bounded region of travel, after which the actuator moves slowly until the encoder index is detected. The index provides a highly repeatable encoder-domain reference, while the external sensor resolves which revolution or mechanical region corresponds to the intended home position in systems where multiple rotations are possible.
Absolute encoder calibration eliminates the need to rediscover position after every normal power cycle, but an initial mechanical alignment procedure is still necessary. During assembly or commissioning, the mechanism is positioned at its defined datum and the corresponding absolute encoder value is recorded. The controller subsequently converts raw absolute measurements into calibrated joint coordinates using the stored offset and any required direction, gear-ratio, or scaling parameters.
Encoder direction must also be verified during home calibration. Positive motor rotation, positive encoder count direction, and positive mechanical joint motion must follow the coordinate convention defined by the control architecture. An incorrect sign can create severe control errors because feedback may appear to move opposite to the commanded direction. Direction verification should therefore precede aggressive closed-loop operation and dynamic tuning.
Gear ratios and transmission relationships introduce another layer between encoder measurements and output motion. A motor-mounted encoder may measure rotor position rather than final joint position, requiring conversion through reduction ratios and transmission geometry. Harmonic drives, planetary gearboxes, belts, lead screws, and steering linkages can all transform encoder motion differently, so the home offset must be interpreted within the complete mechanical transmission model.
Calibration data should be treated as configuration-controlled engineering data rather than an arbitrary software constant. The stored record may include encoder offset, home direction, reference sensor identity, encoder resolution, gear ratio, calibration timestamp, actuator serial number, software version, and validation result. Maintaining this information supports traceability when motors, encoders, gearboxes, controllers, or mechanical assemblies are replaced during service.
Verification should follow every home-position calibration. The actuator can be moved away from the reference and returned repeatedly while the resulting encoder and mechanical positions are compared. Repeated homing cycles reveal problems such as switch hysteresis, index-detection instability, backlash, loose couplings, encoder mounting errors, or inconsistent hard-stop contact that may not be visible during a single calibration operation.
Calibration accuracy and homing repeatability are related but distinct quantities. A system may return to the same encoder value very consistently while still being offset from the true mechanical reference. Repeatability therefore evaluates the dispersion of repeated home measurements, whereas accuracy evaluates their agreement with an independently defined mechanical datum. Both characteristics should be considered when determining whether calibration is acceptable.
Safety constraints are essential when automatic homing requires actuator motion. The controller should restrict velocity, acceleration, torque, and search distance while monitoring limit sensors and encoder behavior. If the expected reference event is not detected within a defined travel range or time interval, motion should stop and the condition should be reported as a calibration fault rather than allowing the mechanism to continue searching indefinitely.
Multi-turn actuators require additional consideration because identical encoder phase positions can occur at mechanically different configurations. The calibration process must preserve revolution information or combine encoder data with external references so that the controller cannot confuse mechanically distinct positions. This is especially important for steering mechanisms, mobile manipulators, humanoid joints, and other systems where an incorrect turn count could produce unexpected motion.
Temperature and load conditions can also influence the apparent home position through thermal expansion, structural compliance, lubrication behavior, and transmission preload. High-precision systems may therefore define calibration environmental conditions or characterize home-position variation across the operating envelope. Such characterization helps distinguish genuine encoder-reference drift from predictable mechanical displacement caused by temperature or applied force.
In a servo-control architecture, home calibration provides the foundation for subsequent position, velocity, and torque-control activities. Position-loop tuning assumes that measured joint coordinates represent the intended physical configuration, while multi-axis coordination assumes consistent zero definitions across all actuators. Establishing encoder home position before higher-level tuning therefore prevents reference errors from being incorrectly interpreted as controller-performance problems.
For mobile robots and AMRs, the same principle applies to drive, steering, suspension, lifting, and manipulation actuators. Steering modules require a reliable relationship between encoder position and wheel orientation, while lifting or manipulator mechanisms require known joint references for collision avoidance and trajectory execution. Incorrect home offsets can propagate upward into kinematics, odometry, path tracking, docking, and autonomous motion behavior.
Service procedures should define when recalibration becomes mandatory. Replacement of an encoder, motor, gearbox, coupling, controller, or mechanically indexed component can invalidate the stored offset. Mechanical impact, unexplained position deviations, repeated homing failures, or maintenance that changes shaft alignment may also justify recalibration. Automatic reuse of historical calibration values should therefore depend on configuration identity and integrity checks.
Advanced systems can monitor home-reference consistency during operation. Whenever a known index, reference switch, mechanical landmark, or redundant position measurement becomes available, the controller can compare the observed position with the stored calibration model. A deviation beyond an allowed tolerance can indicate coupling slip, encoder movement, transmission wear, sensor degradation, or corrupted calibration data before the error develops into a larger control problem.
Ultimately, encoder home position calibration establishes a trustworthy coordinate origin for electromechanical motion control. Its quality depends not only on encoder resolution but also on reference design, mechanical repeatability, transmission behavior, software conventions, data management, validation, and fault handling. A well-engineered home calibration process allows raw encoder measurements to become dependable physical position information for precise and safe servo operation.
03.02. Torque Constant Identification
Torque constant identification establishes the quantitative relationship between motor current and generated electromagnetic torque. The torque constant, commonly denoted as \(K_t\), is a fundamental motor parameter used by servo drives and motion controllers to translate commanded torque into current. Accurate identification is essential because an incorrect value directly produces errors in torque estimation, force control, actuator modeling, and higher-level robot dynamics.
For an ideal permanent-magnet motor operating within its linear magnetic region, generated torque can be expressed approximately as \(T = K_t I\), where \(T\) is electromagnetic torque and \(I\) is the torque-producing current. In field-oriented control, this current is typically associated with the q-axis component \(I_q\). The torque constant therefore represents the proportional gain between electrical excitation and mechanical output, commonly expressed in newton-meters per ampere.
The value listed in a motor datasheet provides an important initial reference, but the effective torque constant of an assembled actuator may differ from the nominal specification. Motor manufacturing variation, winding temperature, magnetic characteristics, current measurement accuracy, inverter behavior, transmission efficiency, and mechanical losses can influence the relationship observed at the actuator output. Calibration therefore focuses on identifying the effective relationship under controlled operating conditions.
A basic identification experiment applies a sequence of known current commands while measuring the corresponding mechanical torque with an independent reference instrument. The motor may be coupled to a calibrated torque transducer, dynamometer, load cell with a known lever arm, or another traceable force measurement system. Measurements should cover both positive and negative torque directions whenever the mechanical configuration permits bidirectional operation.
During a static lever-arm test, the motor or actuator produces force against a load cell located at a known distance from the rotational axis. The measured force \(F\) can be converted into torque using \(T = F r\), where \(r\) is the effective perpendicular lever-arm distance. The corresponding motor current is recorded simultaneously, allowing multiple current-torque pairs to be collected throughout the intended calibration range.
The torque constant can then be estimated from the slope of the measured torque-current relationship. Rather than calculating \(K_t\) from only one operating point, multiple measurements are normally preferred because regression across a range of currents reduces sensitivity to measurement noise. A practical model may be expressed as \(T = K_t I + T_0\), where \(T_0\) represents an apparent offset caused by sensor bias, preload, or mechanical effects.
Current measurement quality is critical because the identified torque constant is only as accurate as the current used in the calculation. The controller\'s commanded current should not automatically be assumed to equal the actual winding current. Calibration should preferably use measured phase current or a validated q-axis current estimate while considering current-sensor offset, gain error, ADC scaling, inverter dead time, and signal filtering.
Mechanical friction can distort torque constant identification, particularly at low torque. Bearings, seals, gears, belts, harmonic drives, and other transmission components introduce friction that may appear as additional or reduced measured torque depending on motion direction. Static friction is especially problematic near zero speed, where breakaway torque can dominate the measurement and obscure the underlying electromagnetic torque-current relationship.
Bidirectional measurements help distinguish electromagnetic torque production from mechanical friction and sensor offset. Positive and negative current commands can be applied under comparable conditions, and asymmetry between the resulting torque curves can be examined. If the estimated slopes differ significantly by direction, the cause may involve friction, transmission efficiency, current measurement bias, mechanical preload, or nonlinear actuator behavior rather than the motor constant alone.
Transmission ratio must be considered when torque is measured at the actuator output rather than directly at the motor shaft. A gearbox increases output torque according to its reduction ratio while mechanical efficiency reduces the ideal transmitted value. Consequently, a motor torque constant and an actuator-level effective torque constant are different quantities. Calibration records should clearly specify the physical location and coordinate domain in which torque was measured.
Temperature is another important variable because winding resistance and permanent-magnet characteristics vary with temperature. Although torque in a current-controlled permanent-magnet motor is primarily related to current and magnetic flux, magnet temperature can alter effective flux and therefore torque production. Identification should record motor temperature and, for demanding applications, characterize \(K_t\) across representative thermal operating conditions.
Magnetic saturation can cause the torque-current relationship to become nonlinear at high current. A constant \(K_t\) may describe the normal operating region well but become inaccurate near peak torque, where magnetic material and control effects alter incremental torque production. Measurements should therefore span the intended continuous and transient operating regions so that linearity can be evaluated rather than assumed from low-current data.
For brushless AC and permanent-magnet synchronous motors, the identified constant also depends on current and torque conventions. Peak versus RMS current, phase current versus q-axis current, and line-to-line versus phase electrical definitions can produce apparently different numerical constants for the same motor. The calibration procedure must therefore define units and conventions explicitly so that the identified parameter is interpreted correctly by the motor-control software.
Torque constant identification should be performed after fundamental encoder and commutation references have been established. Incorrect rotor electrical angle, encoder direction, pole-pair configuration, or phase mapping can reduce torque production even when current regulation appears functional. In such cases, an apparently low torque constant may actually indicate incorrect motor alignment or commutation rather than a change in the physical motor parameter.
Experimental operation should remain within safe current, voltage, torque, speed, and thermal limits. A restrained motor can generate substantial torque while producing little mechanical motion, causing winding temperature to rise rapidly because electrical power is not converted into significant mechanical output. Current commands should therefore be applied for controlled durations while motor, inverter, fixture, torque sensor, and mechanical reaction loads are monitored.
After data collection, residual errors between measured torque and the fitted model should be evaluated across the calibration range. A good linear fit with randomly distributed residuals supports the use of a single torque constant. Systematic curvature, hysteresis, directional asymmetry, or load-dependent deviations indicate that a more detailed actuator model may be required or that friction, saturation, thermal effects, and measurement errors must be separated.
Validation should use operating points that were not relied upon exclusively to determine the fitted parameter. The controller commands selected currents or torques, and the independently measured output is compared with the prediction obtained using the identified \(K_t\). Repeated tests provide information about repeatability, while tests at different temperatures and load conditions indicate whether the parameter remains valid across the expected operating envelope.
In servo control, the calibrated torque constant becomes a key conversion parameter between requested mechanical torque and commanded electrical current. A controller requesting torque \(T^\*\) may conceptually calculate the required current as \(I^\* = T^\*/K_t\). Errors in \(K_t\) therefore propagate directly into feedforward torque, gravity compensation, impedance control, force control, disturbance estimation, and model-based motion control.
Robotic systems often require actuator-level characterization beyond the bare motor constant. Mobile manipulators, quadrupeds, humanoids, steering actuators, lifting mechanisms, and high-performance AMRs may combine motors with gearboxes and compliant transmissions. For these systems, identifying both motor-domain \(K_t\) and output-domain torque behavior provides a clearer distinction between electromagnetic performance and losses introduced by the mechanical transmission.
Calibration data should preserve the identified torque constant together with motor identity, actuator identity, current convention, transmission ratio, measurement equipment, calibration temperature, operating range, software version, fitting method, uncertainty, and validation results. This traceability becomes particularly important when motors, drives, current sensors, gearboxes, or control electronics are replaced during production or field service.
Recalibration should be considered when actuator hardware changes or when measured torque behavior deviates persistently from the established model. Changes in current sensing, inverter configuration, motor replacement, gearbox replacement, magnetic degradation, mechanical damage, or major thermal exposure can alter the effective torque relationship. Monitoring commanded current against estimated or independently observed load can help detect such degradation.
Ultimately, torque constant identification converts electrical current information into a trustworthy representation of mechanical torque. A robust procedure combines accurate current measurement, traceable torque measurement, controlled mechanical loading, appropriate regression, thermal characterization, transmission awareness, and independent validation. The resulting parameter forms an essential foundation for precise servo calibration and reliable torque-based control throughout the robotic system.
03.03. Current Loop Tuning
Current loop tuning establishes the dynamic response of the innermost servo control loop that regulates motor current. Because motor torque is closely related to torque-producing current, the current loop forms the foundation of torque generation in modern servo drives. Its bandwidth, stability, and tracking accuracy directly influence the performance of outer velocity and position loops, making current-loop calibration a fundamental stage of motor and servo commissioning.
In a permanent-magnet synchronous motor or brushless AC motor, field-oriented control commonly separates measured current into d-axis and q-axis components. The d-axis current primarily controls magnetic flux, while the q-axis current produces torque. Independent current regulators compare commanded values \(I_d^*\) and \(I_q^*\) with measured currents and generate voltage commands that are transformed into phase-voltage commands for the inverter.
The electrical dynamics of a motor winding can be approximated by an resistance-inductance model. In simplified form, the relationship follows \(V = RI + L\,dI/dt + E\), where \(R\) is winding resistance, \(L\) is inductance, and \(E\) represents back electromotive force. At low speed or during restrained identification, the back-EMF contribution can be small, allowing resistance and inductance to dominate the current-loop dynamics.
A proportional-integral controller is widely used for current regulation. The proportional gain \(K_p\) determines how strongly the controller responds to instantaneous current error, while the integral gain \(K_i\) removes persistent steady-state error. If these gains are too low, current tracking becomes slow and torque response is delayed. Excessive gains can instead produce oscillation, noise amplification, voltage saturation, or instability.
Motor electrical parameters provide a useful starting point for analytical tuning. For a simplified \(RL\) plant, controller gains can be selected according to the desired current-loop bandwidth while considering measured resistance and inductance. A commonly used conceptual relationship makes proportional gain dependent on inductance and desired bandwidth, while integral gain depends on resistance and bandwidth, although the exact equations depend on controller implementation and discretization.
The selected current-loop bandwidth must remain compatible with the switching frequency, current-sampling frequency, computational update rate, and inverter delay. A controller cannot reliably regulate electrical dynamics approaching the limits of its digital execution chain. Sampling, filtering, PWM generation, ADC conversion, computation, and transport delays introduce phase lag, so practical bandwidth is normally kept well below the effective control update frequency.
Current sensing must be calibrated before aggressive loop tuning. Sensor offset, gain error, ADC scaling, phase-current reconstruction error, timing mismatch, and excessive filtering can distort the feedback signal observed by the regulator. Increasing controller gains cannot correct an inaccurate current measurement and may amplify measurement noise. Current-loop tuning should therefore begin only after current channels and their sign conventions have been verified.
The motor should also have correct phase mapping, encoder direction, rotor electrical angle, and pole-pair configuration. Incorrect commutation can create coupling between the d-axis and q-axis currents, reduced torque production, unstable behavior, or unexpectedly large current demand. A current regulator that appears difficult to tune may therefore indicate a motor-alignment or transformation problem rather than inappropriate proportional and integral gains.
A practical tuning procedure usually begins with conservative gains and limited current commands. Small current steps are applied while observing reference current, measured current, voltage command, overshoot, rise time, settling behavior, and oscillation. Proportional gain can be increased gradually to improve response speed, after which integral action is adjusted to remove residual error without introducing excessive overshoot or low-frequency oscillation.
Step-response testing provides a direct view of current-loop dynamics. A well-tuned loop should follow a commanded current change rapidly with limited overshoot and without sustained oscillation. Rise time and settling time indicate response speed, while overshoot and ringing provide information about damping. Repeated positive and negative steps can additionally reveal asymmetry caused by current sensing, inverter behavior, dead time, or motor parameters.
Frequency-domain analysis can provide a more systematic assessment when suitable instrumentation is available. A swept-sine or injected excitation can be used to estimate closed-loop or open-loop frequency response. Bandwidth, gain margin, and phase margin then provide quantitative measures of dynamic performance and robustness. This approach is particularly useful for high-performance servo systems where simple visual inspection of step responses is insufficient.
Voltage saturation must be considered because the current controller ultimately commands inverter voltage. At high speed, back EMF consumes an increasing portion of the available DC-bus voltage, leaving less voltage for rapid current regulation. Large current steps may therefore become impossible to track even with correctly tuned gains. Saturation should be distinguished from poor tuning by monitoring voltage commands and available modulation margin.
Integral windup can occur when the requested voltage exceeds inverter capability while the integral term continues accumulating current error. When the actuator returns to a controllable region, the accumulated integrator can cause substantial overshoot and delayed recovery. Anti-windup logic should therefore limit or correct integrator accumulation during saturation, allowing the current loop to recover rapidly when voltage authority becomes available again.
Cross-coupling effects become increasingly important as motor speed rises. Rotating d-q equations contain speed-dependent terms that couple the two current axes and introduce back-EMF effects. Feedforward decoupling can compensate for these predictable components so that each current regulator operates more nearly as an independent loop. The effectiveness of this compensation depends on appropriate motor parameters and accurate electrical-angle estimation.
Digital implementation details can significantly alter tuning behavior. Continuous-time controller gains cannot always be transferred directly into software without accounting for sample period, numerical integration method, PWM synchronization, calculation delay, and current-sampling location. The effective control algorithm should therefore be evaluated as an implemented discrete-time system rather than treating the theoretical continuous controller as the complete plant.
Noise creates an important tradeoff between bandwidth and robustness. Higher current-loop gains improve disturbance rejection and tracking speed but also increase sensitivity to current-sensor noise, quantization, switching ripple, and electromagnetic interference. Excessive filtering is not an ideal solution because filters introduce additional phase delay. Sensor quality, grounding, sampling synchronization, and filtering strategy should be optimized together with controller gains.
Thermal conditions influence current-loop behavior because winding resistance increases as motor temperature rises. Gains derived from cold-motor parameters may therefore produce somewhat different dynamics after the actuator reaches operating temperature. High-performance systems should validate tuning over representative thermal conditions and verify that stability, tracking accuracy, current limits, and torque response remain acceptable throughout the expected operating range.
Current limits must remain active throughout tuning. Initial experiments should use currents well below continuous and peak motor ratings while monitoring winding temperature, inverter temperature, DC-bus voltage, mechanical reaction forces, and unexpected motion. A restrained motor can heat rapidly even at zero speed, so prolonged static current injection should be avoided and each experiment should include appropriate timeout and fault-protection mechanisms.
Validation should include multiple current amplitudes, both current polarities, different rotor positions, and representative motor speeds where practical. A loop that performs well for one small stationary current step may behave differently near high current or high speed. Testing across the intended operating envelope helps reveal saturation, nonlinear inductance, inverter dead-time effects, parameter variation, and d-q coupling that are hidden under simple laboratory conditions.
The current loop should normally be tuned before the velocity and position loops because it must respond substantially faster than the outer control layers. The velocity controller assumes that requested torque-producing current is delivered with minimal delay, while the position controller relies on the velocity loop beneath it. Proper bandwidth separation creates a hierarchical control structure in which each inner loop appears sufficiently fast to the controller above it.
In robotic actuators, current-loop performance affects much more than basic motor rotation. Torque control, impedance control, force interaction, gravity compensation, disturbance rejection, wheel traction, steering response, manipulator contact, and dynamic leg control all depend on predictable current generation. Poorly tuned current regulation can therefore propagate upward and appear as mechanical vibration, inaccurate force, sluggish motion, or unstable robot behavior.
Calibration records should preserve the final \(K_p\) and \(K_i\) gains together with motor resistance, inductance, current-sensor configuration, sampling frequency, PWM frequency, control period, voltage limits, current limits, temperature conditions, firmware version, and validation results. Maintaining these parameters with actuator identity and hardware configuration provides traceability when motors, inverters, sensors, or control electronics are replaced.
Recalibration should be considered after changes to the motor, inverter, current sensors, PWM configuration, control frequency, filtering, firmware, or electrical parameters. Unexpected oscillation, degraded current tracking, increased noise, or abnormal torque response may also justify retuning. The objective is not simply to maximize bandwidth, but to maintain a repeatable balance among speed, stability, noise sensitivity, saturation tolerance, and robustness.
Ultimately, current loop tuning transforms the motor drive from an electrical power converter into a predictable torque-generation subsystem. Accurate sensing, correct motor alignment, suitable PI gains, delay awareness, saturation handling, thermal validation, and systematic testing together establish a fast and stable inner control loop. This calibrated foundation enables subsequent velocity and position tuning to achieve precise, responsive, and reliable robotic motion.
03.04. Velocity/Position Loop Tuning
Velocity and position loop tuning establishes the dynamic behavior of the outer motion-control layers that command a servo actuator after the inner current loop has been stabilized. The velocity loop regulates rotational or linear speed by requesting torque-producing current, while the position loop regulates mechanical position by generating a velocity or torque reference. Their performance therefore depends directly on the accuracy and bandwidth of the underlying current-control system.
A conventional cascaded servo architecture contains current, velocity, and position loops arranged from fastest to slowest. The current loop converts torque demand into controlled motor current, the velocity loop corrects speed error, and the position loop corrects displacement error. This hierarchy separates electrical and mechanical dynamics so that each controller can be designed around a more manageable portion of the complete actuator system.
Bandwidth separation is fundamental to cascaded control. The current loop should respond substantially faster than the velocity loop, while the velocity loop should respond faster than the position loop. If neighboring loops have similar bandwidths, their dynamics interact strongly and can produce overshoot, oscillation, or instability. Appropriate separation allows each inner loop to appear approximately instantaneous from the perspective of the slower outer controller.
Velocity feedback is commonly obtained from an encoder by calculating the change in measured position over time. At high speed this estimate can be accurate and smooth, but at very low speed finite encoder resolution and sampling intervals may produce quantization and noise. Filtering can improve the velocity estimate, although excessive filtering introduces phase delay that reduces achievable velocity-loop bandwidth and can degrade stability.
The velocity controller is commonly implemented using proportional-integral control. The proportional gain \(K_{pv}\) produces torque demand in response to instantaneous velocity error, while the integral gain \(K_{iv}\) eliminates persistent speed error caused by friction or external load. Low gains produce sluggish acceleration and poor disturbance rejection, whereas excessive gains can create mechanical resonance, current saturation, oscillation, and audible vibration.
Velocity-loop tuning should begin only after the current loop has demonstrated stable and predictable operation. Conservative velocity gains are initially selected, and small speed commands or controlled step changes are applied. Reference velocity, measured velocity, current demand, position, overshoot, rise time, settling time, and oscillatory behavior should be observed simultaneously so that controller response can be distinguished from current or mechanical limitations.
Increasing proportional velocity gain generally improves response speed and disturbance rejection until mechanical flexibility, delay, or insufficient damping becomes significant. Integral gain can then be introduced or increased to remove steady-state velocity error. The objective is not to maximize either gain independently, but to obtain fast tracking with acceptable overshoot, adequate damping, and sufficient robustness across expected loads and operating conditions.
Mechanical inertia strongly influences velocity-loop dynamics because commanded torque must accelerate the combined rotor, transmission, payload, and driven mechanism. An actuator tuned for a light load may respond differently after a large payload is attached. Effective inertia should therefore be considered during tuning, particularly for manipulators, lifting axes, mobile platforms, and mechanisms whose configuration causes substantial changes in reflected inertia.
Friction also affects velocity control, especially near zero speed. Coulomb friction, viscous friction, gearbox losses, seals, and static friction can create dead zones or cause the integral controller to accumulate error before motion begins. Excessive integral action may then produce breakaway overshoot. Feedforward friction compensation can improve low-speed behavior when friction characteristics are sufficiently repeatable and have been properly identified.
Velocity feedforward can reduce tracking error during commanded motion by predicting the torque or velocity contribution required from the desired trajectory rather than relying entirely on feedback error. Acceleration feedforward can similarly compensate for known inertia. Feedforward terms improve tracking without requiring excessive feedback gains, but their effectiveness depends on accurate trajectory information and reasonable knowledge of actuator dynamics.
After velocity-loop tuning, the position loop can be calibrated. In a common cascaded structure, position error is converted into a velocity command using a proportional position gain \(K_{pp}\). A larger gain reduces position error and produces faster convergence, but excessive gain can command aggressive velocity changes and excite the dynamics of the inner velocity loop or flexible mechanical structure.
Position-loop tuning typically begins with low gain and moderate motion commands. Step moves, ramps, or smooth trajectories are executed while monitoring commanded position, measured position, position error, velocity command, actual velocity, and current demand. The gain is gradually increased until the desired response is achieved without excessive overshoot, ringing, saturation, or excitation of mechanical resonance.
Position step responses provide useful information but must be interpreted carefully because an ideal mathematical position step implies an instantaneous velocity demand. Real robotic systems normally apply trajectory generators that limit velocity, acceleration, and often jerk. Position-loop performance should therefore be evaluated not only with small diagnostic steps but also with representative motion profiles that reflect actual operating conditions.
Trajectory generation is an important part of position-control performance. Trapezoidal velocity profiles and S-curve trajectories constrain acceleration and jerk so that the controller does not request physically unrealistic motion. Smooth references reduce excitation of flexible structures and drivetrain backlash while decreasing peak current demand. Controller tuning and trajectory limits should therefore be developed as coordinated parts of the motion system.
Mechanical resonance can limit achievable velocity and position bandwidth even when the electrical current loop is very fast. Shafts, couplings, belts, gear teeth, structural members, wheels, and payloads can behave as elastic elements that create resonant modes. Increasing controller gains near these frequencies may amplify vibration. Frequency-response measurements can identify resonances and support appropriate bandwidth selection or notch-filter design.
Backlash introduces another challenge because motor-side motion may occur without immediate movement at the output. During direction reversal, the controller can accumulate position error while the transmission crosses the backlash region, followed by a sudden mechanical response when contact is restored. Excessive position gain can magnify this behavior. Mechanical improvement, backlash compensation, or appropriately conservative control may therefore be required.
Saturation must be monitored throughout velocity and position tuning. Large velocity errors can demand torque beyond the current limit, while aggressive position errors can request velocity beyond configured limits. Once an inner loop saturates, the assumptions underlying cascaded control are temporarily violated. Anti-windup, command limiting, acceleration limiting, and trajectory management help prevent prolonged saturation and improve recovery.
Load disturbances provide an important test of velocity-loop robustness. A controlled external load can be applied while the motor maintains a commanded speed, and the resulting speed deviation and recovery can be measured. A properly tuned controller should reject reasonable disturbances rapidly without excessive current oscillation. Such testing complements command-tracking tests because practical robots must regulate motion while interacting with changing loads.
Position accuracy and dynamic tracking should be evaluated separately. A system may reach a final target accurately but exhibit large transient error during motion, or it may follow trajectories smoothly while retaining a small static offset. Encoder resolution, mechanical compliance, backlash, controller structure, feedforward terms, and friction all contribute differently to static and dynamic performance, so validation should address both behaviors.
Frequency-domain analysis can quantify velocity and position loop bandwidth, gain margin, phase margin, and resonant behavior. Injected excitation or swept-frequency testing can reveal dynamic characteristics that are difficult to identify from time-domain responses alone. Such analysis is particularly valuable for high-performance robotic joints and flexible mechanisms where controller bandwidth must be positioned safely below structural resonances.
Validation should cover representative speeds, accelerations, positions, motion directions, payloads, temperatures, and supply conditions. Performance near zero velocity may differ substantially from high-speed behavior, while payload changes can modify inertia and structural modes. Testing across the expected operating envelope confirms that tuning is robust rather than optimized for a single laboratory condition.
Safety limits must remain active during all tuning operations. Velocity, acceleration, current, torque, position range, and travel limits should initially be conservative, with emergency stopping available. Unexpected instability in an outer loop can command rapid physical motion even when the inner current controller operates correctly, making secure fixtures, collision clearance, limit monitoring, and controlled test trajectories essential.
For robotic systems, well-tuned velocity and position loops provide the motion foundation for navigation, steering, manipulation, lifting, docking, leg control, and trajectory execution. Poor tuning can appear at system level as path-tracking error, wheel oscillation, inaccurate docking, manipulator vibration, slow settling, or unstable contact. Servo calibration therefore directly affects higher-level autonomous and Physical AI behavior.
Calibration records should preserve velocity and position gains, bandwidth targets, encoder configuration, current-loop settings, velocity filters, feedforward parameters, motion limits, payload conditions, sampling rates, firmware versions, and validation results. These records establish traceability and make it possible to determine whether performance changes originate from controller parameters, hardware replacement, software modification, or mechanical degradation.
Recalibration should be considered after changes to the motor, encoder, gearbox, payload range, mechanical transmission, controller frequency, filters, firmware, or inner current loop. Increased vibration, degraded tracking, longer settling time, unexpected overshoot, or repeated saturation can also indicate the need for retuning. Mechanical faults should be excluded before attempting to compensate for degraded hardware simply by increasing controller gains.
Ultimately, velocity and position loop tuning converts stable torque generation into controlled mechanical motion. Correct bandwidth hierarchy, reliable feedback, suitable gains, trajectory management, saturation handling, mechanical awareness, and validation across realistic loads together create a responsive and robust servo system. This calibrated hierarchy enables robotic actuators to execute precise motion while maintaining stability throughout changing operating conditions.
03.05. Multi Axis Calibration
Multi-axis calibration establishes consistent geometric, electrical, and control relationships among multiple actuators that must operate as a coordinated motion system. While single-axis calibration determines parameters such as encoder zero, torque constant, and loop gains independently, multi-axis calibration verifies that all axes share compatible coordinate definitions, reference positions, motion directions, timing behavior, and dynamic responses.
In a multi-axis mechanism, individual actuator errors can combine and appear as a larger end-effector or platform error. A small zero-position offset at one joint may produce substantial Cartesian displacement after propagation through a kinematic chain. Calibration must therefore consider not only the accuracy of each motor or servo but also how errors propagate through the complete mechanical structure during coordinated motion.
Coordinate consistency is one of the first requirements. Each joint axis must have a clearly defined positive direction, zero position, rotation axis, and relationship to neighboring coordinate frames. These definitions must agree with the robot kinematic model used by the motion controller. Incorrect axis signs, joint ordering, frame orientation, or offsets can produce motion that appears locally correct while generating incorrect Cartesian behavior.
Multi-axis calibration normally begins after individual axis calibration has been completed. Encoder home positions should be established, torque constants identified where required, and current, velocity, and position loops tuned to stable operating conditions. This sequence prevents fundamental single-axis errors from being interpreted incorrectly as coupling or kinematic errors when the complete mechanism is evaluated.
A common calibration procedure moves the mechanism into one or more accurately known reference configurations and compares measured joint coordinates with the expected geometric state. Mechanical fixtures, precision alignment tools, optical measurement systems, reference surfaces, external encoders, laser trackers, or vision systems may provide independent observations depending on the required accuracy and physical scale of the machine.
Joint-zero offsets are particularly important because they directly influen...
![Calibration Engineering — Ch.03: Motor and Servo Calibration [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqat5wddi9cpqbl467m42.png)




![Calibration Engineering — Ch.01: Calibration Principles [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftmncxp1hffdw51lehs34.png)
![Calibration Engineering — Ch.04: Steering Calibration [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvfz8vibfo2tquihgjm4w.png)
![Calibration Engineering — Ch.09: Multi Sensor Calibration [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff23dnubmfuu79v9dhafv.png)
![Calibration Engineering — Ch.10: Automated Calibration [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh2st2hnn9xt5b1w28iii.png)