GLOBAL KNOWLEDGE ARK

Robotics & Mechatronics · Closed-loop robot implementation

Map a supplied controller to robot signals

A known control law can behave badly when connected to the wrong sign, unit or actuator mode. Map every signal to its physical meaning before changing the controller mathematics.

All numerical tables, scenarios and records are original constructed teaching data unless a specific external dataset is named. No physical experiment is claimed. A worked simulation model is distinguished from an executed simulator.

Lesson preparation and course links

Use the local explanations and supplied units, diagrams, tables and examples; advanced chapters build on the named local chapters. External links are point-of-need depth, not a requirement to finish an entire map.

Back to the Robotics chapter

After reading, you can

Connect a known control law to measured state, reference, actuator command and physical limits, making signs and units explicit.

01

Apply a supplied proportional law

The given implementation law is e=r−x and u=clip(Kp e, −1 A, +1 A), with Kp=0.5 A/mm. This is a fictional current-command interface, not a complete drive design.

Apply a supplied proportional law
SignalMeaningUnit
rRequested rail coordinatemm
xCalibrated observed rail coordinate, same referencemm
ePosition error r−xmm
KpGiven proportional gainA/mm
uRequested drive current after clampA
02

Check sign with a small supplied case

At r=10 mm and x=8 mm, e=+2 mm and Kp e=+1 A. Under the supplied actuator convention, positive current tends to move positive. This sign relationship is a device/model assumption to verify; it is not guaranteed by the variable name.

If x were connected with reversed sign, an actual positive movement could make measured x more negative, increasing the error and reinforcing the wrong response. A small conformance test and valid independent observation precede active-loop claims.

03

A unit mismatch can look like poor tuning

If the sensor provides 0.008 m but the controller subtracts it directly from 10 mm, it computes 9.992 as if millimetres. Correct conversion gives 8 mm and error 2 mm. Conversely, using r=0.010 m and x=0.008 m with an unchanged 0.5 A/mm numeric gain yields 0.001 A rather than 1 A.

Transform units at one explicit boundary and retain the conversion version. Do not compensate a thousandfold scale mistake by increasing a gain until the robot “looks right.” The resulting record would hide the interface defect.

04

Map saturation and actual response as well

The clamp constrains the requested current in this model. Measured current, position and fault state remain separate observations. A drive can impose its own limits or reject the mode. A saturated output no longer follows the unconstrained proportional expression.

General feedback/stability and controller design belong to the canonical Engineering and AI depth. This lesson checks a supplied law’s implementation interfaces and test evidence.

Read the clamp and a corrected trace

At r=10 mm and x=6 mm, error 4 mm produces 2 A before clamping, so requested output is+1 A. At x=9 mm, error 1 mm gives 0.5 A. At x=11 mm, error−1 mm gives−0.5 A.

A useful trace retains r, raw state, calibrated x, error, unclamped request, clamped request and measured current. It can then distinguish a scale error, saturation and a drive response discrepancy. A single output-current graph cannot distinguish all three.

Try the reasoning

  1. What unit must Kp have to convert millimetre error to amperes?

    Show the answer and reasoning

    A/mm.

  2. What is u for r=5 mm, x=9 mm?

    Show the answer and reasoning

    Error−4 mm gives−2 A before clamp and−1 A after clamp.

  3. Why not solve a metre/millimetre mismatch by retuning?

    Show the answer and reasoning

    It hides an interface error and invalidates the intended gain/unit relationship.

  4. Does a+1 A request prove+1 A flowed?

    Show the answer and reasoning

    No. Retain measured current and actual drive state separately.

What to carry forward

Check signal identity, sign and units before interpreting controller performance. Preserve pre-limit, post-limit and measured quantities.

References

Sources supporting this lesson’s explanations and examples.

  1. ros-controls project2 sources
    1. ros2_control: Hardware Components and hardware interface typesros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentationcontrol.ros.orgRead source
    2. ros2_controllers: PID Controllerros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentationcontrol.ros.orgRead source
  2. REP 103: Standard Units of Measure and Coordinate ConventionsTully Foote, Mike PurvisOfficial informational specificationCreated 7 October 2010; post-history 31 December 2014ros.orgRead source