TN0001 CAN FD MIT Mode and Force Control Tuning Guide
| Item | Description |
|---|---|
| Document No. | TN0001 (Rev. 2.1 · 2026-11-21) |
| Applicable Products | Juxie Intelligent Next-Generation Joint Modules (baselined on R58 V3 and next-gen force-control / standard architectures) |
| Recommended Protocol | CAN FD Fast-Control Protocol (recommended 0x210 multi-axis synchronous frame, 1 Mbps arbitration / 5 Mbps data BRS) |
| Commissioning Baseline | Start real-hardware commissioning from factory-shipped parameters; numerical values in this guide illustrate physical dimensions, bit-packing conversions, and tuning directions |
MIT Impedance Control allows the master controller to command five joint-side physical setpoints simultaneously in every control cycle—desired position, desired velocity, position Stiffness, velocity Damping, and Feedforward Torque—while the drive synthesizes desired joint output torque in real time inside its high-speed internal loop. It is widely deployed in bipedal/quadruped robots, collaborative manipulators, compliant assembly, and human-robot interaction.
This guide walks step-by-step through "Understanding the Impedance Control Law → Distinguishing Hardware Paths With/Without Torque Sensors → Running CAN FD Multi-Axis/Single-Axis Fast Control → Fine-Tuning the Torque Loop (P+D) & Friction Compensation → 6-Step Hardware Commissioning". If your system relies on a traditional CANopen master stack, jump to Section 7 at the end of this guide.
MIT mode directly controls joint output torque. At zero gains (Kp = 0, Kd = 0, τ_ff = 0), the joint will neither hold its current position nor automatically counteract gravity. Before enabling for the first time, ensure links are clear of hard mechanical stops, gravity-loaded links are safely supported, and an emergency stop plus power-supply current limit are ready.
1. Principles of MIT Impedance Control
1.1 Five-Tuple Joint-Side Control Law
In MIT mode, the drive bypasses traditional cascaded "Position Loop → Velocity Loop" integrators and directly synthesizes desired torque inside an internal 4 kHz (250 μs) real-time path using the joint-side spring-damper law, dispatching the result to the 40 kHz field-oriented current loop (FOC):
τ_ref = Kp × (q_des − q) + Kd × (dq_des − dq) + τ_ff
All five command quantities are defined at the reducer output shaft (joint side), so host algorithms never need to manually scale by gear reduction ratios (such as R58 V3's 101 ratio) or motor torque constants:
| Parameter | Physical Meaning | Joint-Side Unit | Core Control Role |
|---|---|---|---|
q_des | Desired joint position | rad | Virtual spring equilibrium point; deviation from actual angle q produces restoring torque |
dq_des | Desired joint velocity | rad/s | Virtual damper reference velocity; set 0 for posture holding, or position time-derivative for trajectories |
Kp | Position Stiffness coefficient | N·m/rad | Compliance "softness/hardness" resisting position error (independent of standard position loop 0x2536) |
Kd | Velocity Damping coefficient | N·m·s/rad | Suppresses velocity error and oscillation (independent of standard velocity loop 0x2534) |
τ_ff | Feedforward Torque | N·m | Summed directly into target torque for gravity or inverse-dynamics compensation |
1.2 Four Common Operating Combinations
By combining Kp, Kd, and τ_ff, a single frame channel seamlessly switches task compliance profiles:
| Parameter Combination | Typical Scenario | Expected Physical Behavior |
|---|---|---|
Kp = 0, Kd = 0, τ_ff = 0 | Post-enable safety self-check | Synthesized target torque is 0; used to verify state transitions and feedback polarity |
Kp = 0, Kd > 0, dq_des = 0 | Pure damping compliant teaching | Smooth viscous resistance in both push directions; stops smoothly without springback when released |
Kp > 0, Kd > 0, dq_des = 0 | Compliant posture holding | External displacement produces elastic restoring torque; smoothly returns to target when released |
Kp > 0, Kd > 0 + dq_des, τ_ff | Dynamic trajectory tracking | Setting dq_des to position derivative paired with dynamics feedforward eliminates tracking lag |
- Never Apply Stiffness Without Damping: Never command large
KpwhileKd = 0; lack of energy dissipation easily triggers sustained mechanical oscillation. - Built-In Multi-Layer Protection: Before reaching the FOC current loop, synthesized
τ_refautomatically passes through soft-travel-limit derating, peak torque clamping, thermal derating, and hard peak phase-current limiting.
2. Modules With Torque Sensor vs. Without Torque Sensor
Represented by the R58 V3 next-generation control architecture, Juxie Intelligent Joint Modules expose an identical MIT frame interface to the master while internally routing commands to the appropriate execution chain depending on whether an output-side joint Torque Sensor is installed.
2.1 Comparison of the Two Hardware Configurations
Before commissioning, confirm which hardware configuration your module uses, as low-level execution, tunable parameters, and feedback frame lengths differ as follows:
| Dimension | Models With Joint Torque Sensor | Standard Models Without Torque Sensor |
|---|---|---|
| Low-Level Torque Execution | Enters 4 kHz Torque Sensor closed loop, comparing measured joint torque in real time to compensate transmission nonlinearities | Converts target torque directly to base current Iq_base via factory-calibrated equivalent torque constant |
| Inner-Loop Tunable Parameters | Supports tuning Torque Loop P / D (0x2548) and Friction Compensation (0x2549) | No inner torque loop (0x2548 unused); supports tuning Friction Compensation (0x2549) |
| Fast-Control Feedback Length | 0x300 + ID is 16 bytes (Byte10..11 returns measured joint torque) | 0x300 + ID is 12 bytes (Byte4..5 returns current-estimated torque in MIT mode) |
| Zero-Torque Calibration | Supports 0x2531 = 2 sensor zero-torque calibration and standalone torque closed-loop mode | Requires standard Set Mechanical Zero (0x2531 = 1) only |
2.2 Zero-Torque Check & Calibration on Sensor-Equipped Models (0x2531)
Any Torque Sensor zero offset adds directly to the closed-loop target, causing slight unidirectional drift under zero command or asymmetric push/pull backdrive feel. Upon initial mounting or fixture changes, verify the sensor zero point while unloaded, free of external contact, and servo-disabled:
- Read Measured Joint Torque
0x6077:00(INT16, resolution0.05 N·m/LSB, e.g., raw20=1.00 N·m):Tx (0x601, DLC=8): 40 77 60 00 00 00 00 00Rx (0x581, DLC=8): 4B 77 60 00 00 00 00 00 // Near 0 when unloaded indicates healthy zero offset - Execute Zero-Torque Calibration If Needed (example for
Dev_ID = 1; distinguish carefully from Set Mechanical Zero):
| Calibration Command | SDO Request Frame (0x601) | Description |
|---|---|---|
| Sensor Zero-Torque Calibration | 23 31 25 00 02 00 00 00 | Zeroes out joint Torque Sensor offset and saves to Flash (must be servo-disabled and unloaded) |
| Set Mechanical Zero (Position) | 23 31 25 00 01 00 00 00 | Sets current joint angle as position 0 only; does not alter Torque Sensor offset |
0x2531 = 2 is a mechanical installation/maintenance procedure. If executed automatically at boot while a robot limb bears gravity or rests against an obstacle, that external load will be recorded as zero torque, causing unintended torque output upon enabling.
3. CAN FD Fast-Control Integration Guide (Recommended)
3.1 Why CAN FD Multi-Axis Synchronous Fast Control Is Recommended
Next-generation Joint Modules default to CAN FD mode (standard 11-bit ID, 1 Mbps arbitration / 5 Mbps data phase with Bit Rate Switch BRS enabled). Install one 120 Ω termination resistor at each physical end of the bus (~60 Ω measured between CAN_H and CAN_L unpowered).
For Joint Modules running CAN FD fast-control firmware (0x100A software version formatted as Vx.00.zz), we strongly recommend using the 0x210 multi-axis synchronous fast-control frame:
- Drive 6 Axes Synchronously in One Frame: A single
64-byte(DLC = 15) broadcast frame dispatches MIT commands to up to 6 joints simultaneously, eliminating per-axis polling skew and bus arbitration overhead (a 12-DoF biped or quadruped requires alternating just two0x210frames). - Stateless Instant Control: Each axis sub-frame embeds servo enable, Brake Release, and fault reset bits, eliminating multi-step CiA 402 state-machine handshakes.
- Immediate High-Speed Feedback: Upon unpacking its assigned slot, each target joint immediately replies with a
0x300 + Dev_IDreal-time status frame. - Clean Separation of Config and Real-Time Traffic: Low-frequency tasks—reading full-scale ranges at boot or tuning Torque Loop
P+Dand Friction Compensation online—use standard SDO (0x600 + Dev_ID⇄0x580 + Dev_ID).
3.2 Step 1: Verify MIT Full-Scale Range Parameters (0x2542 ~ 0x2546)
To pack five floating-point setpoints into a compact 8-byte payload, master packing and drive unpacking must share identical full-scale range constants, stored in Object Dictionary 0x2542 through 0x2546:
| Object Index | Parameter | Unit & Factory Default | Allowed Ceiling | 8B Payload Mapped Physical Span |
|---|---|---|---|---|
0x2542:00 | P_MAX | 0.01 rad/LSB, default 314 (3.14 rad) | 1000 (10.00 rad) | 16 bit maps [-P_MAX, +P_MAX] |
0x2543:00 | V_MAX | 0.01 rad/s/LSB, default 314 (3.14 rad/s) | 1000 (10.00 rad/s) | 12 bit maps [-V_MAX, +V_MAX] |
0x2544:00 | KP_MAX | 1 N·m/rad/LSB, default 2500 | 5000 | 12 bit maps [0, KP_MAX] |
0x2545:00 | KD_MAX | 1 N·m·s/rad/LSB, default 500 | 500 | 12 bit maps [0, KD_MAX] |
0x2546:00 | T_MAX | 1 N·m/LSB, default 300 | 500 | 12 bit maps [-T_MAX, +T_MAX] |
- Auto-Sync Scales on Power-Up: Have your master read
0x2542~0x2546once via SDO during initialization (e.g., readP_MAX:40 42 25 00 00 00 00 00) to populate your packing struct automatically and prevent scale mismatches. - Tighten Ranges to Boost Resolution: For example, R58 V3 has a peak torque around
43 N·m; if your application feedforward never exceeds50 N·m, setting0x2546to50while disabled and saving to Flash improves feedforward quantization resolution by 6×.
3.3 Step 2: Core 8B Bit-Packing & Fast-Control Frame Layouts
In both multi-axis and single-axis fast-control frames, each joint's command consists of a 1-byte fast-control word + 8-byte Big-Endian bit-packed MIT payload (forming a 9-byte axis sub-frame).
Inside the 8-byte MIT payload, fields are concatenated Big-Endian across nibble boundaries (p, v, kp, kd, t are linearly quantized unsigned integers):
Byte0 = (p >> 8) & 0xFF
Byte1 = p & 0xFF
Byte2 = (v >> 4) & 0xFF
Byte3 = ((v & 0x0F) << 4) | ((kp >> 8) & 0x0F)
Byte4 = kp & 0xFF
Byte5 = (kd >> 4) & 0xFF
Byte6 = ((kd & 0x0F) << 4) | ((t >> 8) & 0x0F)
Byte7 = t & 0xFF
00 8-Byte MIT PayloadIn bipolar unsigned quantization, raw code 0 maps to negative full scale (-P_MAX / -V_MAX / -T_MAX), whereas physical zero corresponds to mid-scale codes 0x8000 and 0x800. To guard against uninitialized zero buffers causing violent jumps, firmware rejects and drops any 8-byte payload consisting of all 00 bytes. The valid 8-byte encoding for zero position, zero velocity, zero gains, and zero feedforward is 80 00 80 00 00 00 08 00.
1. Fast-Control Word Encoding (Sub-Frame Byte 0)
The first byte of every 9-byte sub-frame directly controls servo enablement, brake state, fault reset, and mode:
| Bit Field | Name | Value Definition |
|---|---|---|
Bit 7 | Servo Enable | 1 = Request servo enable; 0 = Request controlled disable |
Bit 6 | Brake Control | 1 = Brake Release; 0 = Engage mechanical brake |
Bit 5 | Fault Reset | 0 → 1 rising edge clears latched faults whose physical cause is resolved |
Bit 4 .. 1 | Fast-Control Mode | Fixed at 0x06 for MIT Impedance Control (0x07 for standalone Torque Sensor closed-loop) |
Bit 0 | Reserved | Fixed at 0 |
Quick-reference byte values: 0xCC = MIT Enable + Brake Release; 0x0C = MIT Controlled Disable; 0x2C → 0x0C = Trigger fault clear while disabled.
2. Primary Frame: CAN FD Multi-Axis Synchronous Frame 0x210 (64 Bytes, DLC = 15)
Transmit standard ID 0x210 (CAN FD + BRS enabled) at a fixed 1 ms ~ 5 ms cycle with 64 bytes, packing up to 6 joint slots per frame:
| Byte Range | Field Definition | Packing Rule |
|---|---|---|
Byte 0 .. 8 | Slot 1 Sub-Frame (9B) | Byte 0 control word (e.g., 0xCC) + Byte 1..8 MIT 8B payload |
Byte 9 .. 17 | Slot 2 Sub-Frame (9B) | Control word + MIT 8B payload for 2nd target joint |
Byte 18 .. 26 | Slot 3 Sub-Frame (9B) | Control word + MIT 8B payload for 3rd target joint |
Byte 27 .. 35 | Slot 4 Sub-Frame (9B) | Control word + MIT 8B payload for 4th target joint |
Byte 36 .. 44 | Slot 5 Sub-Frame (9B) | Control word + MIT 8B payload for 5th target joint |
Byte 45 .. 53 | Slot 6 Sub-Frame (9B) | Control word + MIT 8B payload for 6th target joint |
Byte 54 .. 55 | Reserved (2B) | Fixed at 00 00 |
Byte 56 .. 61 | Slot Target ID Map | Target Dev_ID (1~127) for Slots 1 ~ 6 respectively; set unused slots to 00 |
Byte 62 .. 63 | Reserved (2B) | Fixed at 00 00 |
For example, to synchronize only nodes 1 and 2, populate Slot 1 (Byte 0..8) and Slot 2 (Byte 9..17), set Byte 56..61 to 01 02 00 00 00 00, and zero-fill all remaining unused bytes.
3. Bench Debug Frame: CAN FD Single-Axis Frame 0x110 + Dev_ID (12 Bytes, DLC = 9)
For single-joint bench testing, you can alternatively send 12 bytes (the smallest standard CAN FD payload size above 8 bytes, DLC = 9) to ID = 0x110 + Dev_ID:
| Byte Range | Field Definition | Packing Rule |
|---|---|---|
Byte 0 | Fast-Control Word (1B) | Same as above: 0xCC for MIT Enable + Brake Release, 0x0C for Disable |
Byte 1 .. 8 | MIT Payload (8B) | 8-byte Big-Endian 5-tuple packed payload |
Byte 9 .. 11 | Length Padding (3B) | Must pad with 00 00 00 to satisfy the 12-byte CAN FD DLC boundary |
3.4 Interactive Frame Calculator / Hex Decoder & C99 Reference Code
Verify your full-scale constants (0x2542 ~ 0x2546) in Step 1 of the widget below, then enter single-axis setpoints in Step 2: the widget outputs both the 0x210 multi-axis slot bytes (9B sub-frame + 1B ID slot) and the 0x110 + ID single-axis 12B frame. You can also switch to Paste HEX & Decode to inspect captured bus frames:
CAN FD MIT Frame Calculator & Packet Inspector
Byte 0 .. 81B Ctrl + 8B PayloadByte 56CC 80 00 80 00 C5 02 18 00 00 00 00
Click to Expand: Standard C99 Packing & Dual-Axis Synchronous Sine-Tracking Example (8B Payload / 0x210 Multi-Axis 64B / 0x110 Single-Axis 12B)
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
typedef struct {
float p_max_rad; /* Matches 0x2542 * 0.01f, default 3.14f */
float v_max_rad_s; /* Matches 0x2543 * 0.01f, default 3.14f */
float kp_max_nm_per_rad; /* Matches 0x2544, default 2500.0f */
float kd_max_nm_s_rad; /* Matches 0x2545, default 500.0f */
float t_max_nm; /* Matches 0x2546, default 300.0f */
} MitScaleConfig_t;
typedef struct {
uint8_t dev_id; /* Target node ID 1~127; 0 skips this slot */
bool enable; /* true: servo enable, false: disable */
bool release_brake; /* true: Brake Release */
bool clear_fault; /* false -> true rising edge triggers fault reset */
float q_des_rad;
float dq_des_rad_s;
float kp_nm_per_rad;
float kd_nm_s_per_rad;
float tau_ff_nm;
} MitAxisCmd_t;
static uint16_t mit_float_to_uint(float x, float x_min, float x_max, uint8_t bits)
{
const float span = x_max - x_min;
if (!(span > 0.0f) || bits == 0U || bits > 16U) {
return 0U;
}
if (x < x_min) { x = x_min; }
if (x > x_max) { x = x_max; }
const uint32_t raw_max = (1UL << bits) - 1UL;
const uint32_t raw = (uint32_t)lroundf(((x - x_min) * (float)raw_max) / span);
return (uint16_t)((raw > raw_max) ? raw_max : raw);
}
static uint8_t mit_build_ctrl_byte(bool enable, bool release_brake, bool clear_fault)
{
uint8_t ctrl = (uint8_t)(0x06U << 1U); /* MIT fast-control mode code is fixed at 0x06 */
if (enable) { ctrl |= (1U << 7U); }
if (release_brake) { ctrl |= (1U << 6U); }
if (clear_fault) { ctrl |= (1U << 5U); }
return ctrl;
}
/* Pack core 8-byte MIT payload */
void mit_pack_payload8(const MitAxisCmd_t *cmd, const MitScaleConfig_t *scale, uint8_t out8[8])
{
const uint16_t p = mit_float_to_uint(cmd->q_des_rad, -scale->p_max_rad, scale->p_max_rad, 16U);
const uint16_t v = mit_float_to_uint(cmd->dq_des_rad_s, -scale->v_max_rad_s, scale->v_max_rad_s, 12U);
const uint16_t kp = mit_float_to_uint(cmd->kp_nm_per_rad, 0.0f, scale->kp_max_nm_per_rad, 12U);
const uint16_t kd = mit_float_to_uint(cmd->kd_nm_s_per_rad, 0.0f, scale->kd_max_nm_s_rad, 12U);
const uint16_t t = mit_float_to_uint(cmd->tau_ff_nm, -scale->t_max_nm, scale->t_max_nm, 12U);
out8[0] = (uint8_t)(p >> 8U);
out8[1] = (uint8_t)(p & 0xFFU);
out8[2] = (uint8_t)(v >> 4U);
out8[3] = (uint8_t)(((v & 0x0FU) << 4U) | ((kp >> 8U) & 0x0FU));
out8[4] = (uint8_t)(kp & 0xFFU);
out8[5] = (uint8_t)(kd >> 4U);
out8[6] = (uint8_t)(((kd & 0x0FU) << 4U) | ((t >> 8U) & 0x0FU));
out8[7] = (uint8_t)(t & 0xFFU);
}
/* Recommended: Pack 0x210 multi-axis synchronous 64-byte frame (CAN FD DLC = 15, up to 6 joints) */
void mit_pack_canfd_multi64(const MitAxisCmd_t slots[6],
const MitScaleConfig_t *scale,
uint8_t out64[64])
{
memset(out64, 0, 64U);
for (uint8_t i = 0U; i < 6U; i++) {
if (slots[i].dev_id == 0U || slots[i].dev_id > 127U) {
continue;
}
uint8_t *sub = &out64[i * 9U];
sub[0] = mit_build_ctrl_byte(slots[i].enable, slots[i].release_brake, slots[i].clear_fault);
mit_pack_payload8(&slots[i], scale, &sub[1]);
out64[56U + i] = slots[i].dev_id; /* Byte 56..61 stores target node IDs for Slots 1..6 */
}
}
/* Single-axis helper: Pack 0x110 + dev_id single-axis 12-byte frame (CAN FD DLC = 9) */
void mit_pack_canfd_single12(const MitAxisCmd_t *cmd,
const MitScaleConfig_t *scale,
uint8_t out12[12])
{
out12[0] = mit_build_ctrl_byte(cmd->enable, cmd->release_brake, cmd->clear_fault);
mit_pack_payload8(cmd, scale, &out12[1]);
out12[9] = 0x00U;
out12[10] = 0x00U;
out12[11] = 0x00U;
}
/* 1 kHz cyclic call example: Drive ID=1 and ID=2 synchronously along a sine wave via one 0x210 frame */
void mit_sync_two_axes_step_1khz(const float q_init_rad[2], float dt_s, const MitScaleConfig_t *scale)
{
static float t_sec = 0.0f;
MitAxisCmd_t slots[6] = {0};
uint8_t frame64[64];
const float amp_rad = 0.25f;
const float omega = 6.2831853f * 0.40f; /* 0.4 Hz */
t_sec += dt_s;
for (uint8_t i = 0U; i < 2U; i++) {
const float phase = omega * t_sec;
slots[i].dev_id = (uint8_t)(i + 1U);
slots[i].enable = true;
slots[i].release_brake = true;
/* Key dynamic trajectory rule: dq_des must equal the time derivative of q_des(t) */
slots[i].q_des_rad = q_init_rad[i] + amp_rad * sinf(phase);
slots[i].dq_des_rad_s = amp_rad * omega * cosf(phase);
slots[i].kp_nm_per_rad = 120.0f; /* On real hardware, ramp up from low stiffness in small steps */
slots[i].kd_nm_s_per_rad = 4.0f; /* Validate pure damping at Kp=0 first on real hardware */
slots[i].tau_ff_nm = 0.0f;
}
mit_pack_canfd_multi64(slots, scale, frame64);
/* Transmit via low-level CAN FD driver: Standard ID = 0x210, FD + BRS enabled, 64 bytes */
canfd_send_std_brs(0x210U, frame64, 64U);
}
3.5 High-Speed Fast-Control Feedback Frame (0x300 + Dev_ID)
Upon receiving a matching fast-control command (or a 0x080 SYNC frame), the Joint Module immediately replies with a 0x300 + Dev_ID status frame (all multi-byte fields in this frame are Big-Endian):
| Byte Offset | Models With Torque Sensor (16 Bytes, DLC=10) | Models Without Torque Sensor (12 Bytes, DLC=9) |
|---|---|---|
Byte 0 .. 1 | Joint output position INT16 (-32768..32767 maps -π..+π rad) | Same (q_rad = raw × π / 32768) |
Byte 2 .. 3 | Motor shaft speed INT16 (1 rpm/LSB; divide by gear ratio for joint speed) | Same |
Byte 4 .. 5 | Actual Iq current INT16 (1 mA/LSB standard; 10 mA/LSB on peak > 32.7 A models) | Returns current-estimated joint torque in MIT mode |
Byte 6 .. 7 | Active fault code UINT16 (0x0000 = normal) | Same |
Byte 8 .. 9 | Motor winding temperature INT16 (0.1 °C/LSB, e.g., 0x0118 = 28.0 °C) | Same |
Byte 10 .. 11 | Measured Torque Sensor joint torque INT16 (0.05 N·m/LSB) | Byte 10: Mode (0x06); Byte 11: Status bits (upper 4 bits) |
Byte 12 .. 14 | Reserved extension bytes (00 00 00) | — |
Byte 15 | Upper 4 status bits (b7 Enable / b6 Brake Release / b5 Fault / b4 Reached), lower 4 mode bits (0x06) | — |
Low-Frequency SDO Status Cross-Check (Note: SDO payloads are Little-Endian):
0x6064:00Joint position (65536 LSB/rev) ·0x606C:00Motor shaft speed (1 rpm/LSB) ·0x6077:00Measured joint torque (0.05 N·m/LSB) ·0x6078:00ActualIqcurrent ·0x603F:00Fault code (see FC0001 V2.0 Error Codes & SDO Reading).
4. Torque Loop Tuning Guide (P + D, Torque-Sensor Models)
On next-generation modules equipped with a joint Torque Sensor (such as the R58 V3 force-control variant), an independent 4 kHz Torque Sensor closed-loop controller runs inside the drive. Properly coordinating outer MIT impedance gains with inner Torque Loop P + D achieves both effortless backdrivability and harmonic-drive flexspline vibration suppression.
4.1 Inner vs. Outer Loop Roles & Coupling Relationship
Strictly distinguish inner Torque Loop parameters (0x2548) from outer MIT impedance parameters (Kp / Kd):
| Parameter | Object & Resolution | Valid Range | Core Responsibility |
|---|---|---|---|
| Torque Loop P | 0x2548:01 (UINT16, 0.001/LSB) | 1000 ~ 20000 (1.000 ~ 20.000) | Amplifies sensor torque tracking error, effectively scaling down reflected rotor inertia for lighter backdriving |
| Torque Loop D | 0x2548:06 (UINT32, 0.001 N·m·s/rad/LSB) | 0 ~ 10000000 (0 ~ 10000 N·m·s/rad) | Injects active damping from relative torsion velocity between motor and output dual encoders to suppress flexspline resonance |
| MIT Kp / Kd | Sent cyclically in fast-control frames | 0 ~ KP_MAX / 0 ~ KD_MAX | Defines task-space macroscopic virtual spring Stiffness and motion viscous Damping |
Effective inner-loop active damping current gain scales proportionally with (Torque Loop P − 1) × Torque Loop D:
- When
Torque Loop P = 1.000(0x2548:01 = 1000), both torque-error amplification and inner Torque Loop D output drop to zero simultaneously. - Changing
Torque Loop Pscales effective inner damping strength proportionally—always re-evaluate0x2548:06after modifying0x2548:01.
4.2 Real-Time Online Tuning Procedure & SDO Examples
Both 0x2548:01 and 0x2548:06 support online SDO writes while servo-enabled with immediate effect:
- Set Up Tuning State: Place the joint in MIT zero-gain state (
Kp = 0, Kd = 0, τ_ff = 0) while monitoring measured torque and actualIqwaveforms. - Tune Torque Loop P First: Starting from factory baseline (e.g., R58 V3 typical baseline
P = 2.400,D = 16.000 N·m·s/rad), adjust0x2548:01in steps of0.2 ~ 0.3(raw200 ~ 300). Roll back immediately if sensor noise amplification, high-frequency hand buzz, or audible whine occurs. - Match Torque Loop D Next: Hold
Pconstant, fine-tune0x2548:06in small steps while gently flicking and releasing the link until low-frequency elastic ringing decays rapidly without introducing high-frequency spikes onIq.
Example SDO frames for Dev_ID = 1 reading/writing R58 V3 reference values P = 2.400 (2400 = 0x0960) and D = 16.000 (16000 = 0x00003E80):
| Operation | CAN ID | Data (HEX, Little-Endian) | Frame Notes |
|---|---|---|---|
| Read Torque Loop P | 0x601 | 40 48 25 01 00 00 00 00 | Replies 4B 48 25 01 60 09 00 00 (2400 = 2.400) |
Write Torque Loop P = 2.4 | 0x601 | 2B 48 25 01 60 09 00 00 | 2-byte write (2Bh), UINT16 Little-Endian 60 09 |
| Read Torque Loop D | 0x601 | 40 48 25 06 00 00 00 00 | Replies 43 48 25 06 80 3E 00 00 (16000 = 16.0) |
Write Torque Loop D = 16.0 | 0x601 | 23 48 25 06 80 3E 00 00 | 4-byte write (23h), UINT32 Little-Endian 80 3E 00 00 |
Advanced Option: Mechanical Resonance Notch Filter (0x2547:01 ~ 04)
When slender links or high-inertia end-effectors excite a fixed-frequency mechanical resonance, configure the 2nd-order Notch Filter while disabled and save to Flash:
0x2547:01(INT32): Notch Filter enable (0= Disabled,1= Enabled).0x2547:02(INT32): Center frequency (0.01 Hz/LSB, e.g.,1800=18.00 Hz).0x2547:03(INT32): Quality factor Q (0.01/LSB, default400=4.00).0x2547:04(INT32): Attenuation depth (1%/LSB, range0 ~ 100).
5. Friction Compensation Tuning & Flash Persistence (0x2549)
5.1 Global Friction Compensation Ratio Mechanism
Harmonic reducers exhibit static breakaway stiction and Coulomb friction steps during startup and low-speed reversals. Firmware provides unified online compensation scaling via 0x2549:00 (INT32, 1%/LSB, 0 ~ 100 for 0% ~ 100%):
- Unified Across Both Hardware Paths: Scales inner torque-loop Friction Compensation on Torque-Sensor models, and scales the calibrated motor motion friction model on sensorless models (automatically freezing at rest to prevent zero-speed chatter), smoothing out low-stiffness MIT zero-crossing deadzones.
- Smooth Slew-to-Zero on Writing
0: Setting0x2549:00 = 0online ramps compensation current smoothly down to zero without torque steps. - Automatic Heavy-Load Headroom Yielding: Friction Compensation utilizes only remaining current headroom below the peak phase-current ceiling; as base control current approaches the limit, compensation automatically yields to
0, never starving primary control torque.
5.2 Online Tuning Steps & SDO Frames
0x2549:00 supports online SDO writes while servo-enabled with immediate effect:
- Tuning Criterion: Starting from factory default (e.g., R58 V3 default
30%) or0%, increment in10%steps while gently pushing the link back and forth. Aim for smooth breakaway without stiction steps, while coming to an immediate natural rest upon release without coasting or unloaded creep (typical sweet spot:25% ~ 60%). - Scope Reminder: Friction Compensation offsets internal transmission drag only—it cannot replace external link gravity Feedforward Torque
τ_ffor0x2531 = 2Torque Sensor zero calibration.
Operation (Dev_ID = 1 Example) | CAN ID | Data (HEX) | Description |
|---|---|---|---|
| Read Friction Compensation ratio | 0x601 | 40 49 25 00 00 00 00 00 | Reply 1E 00 00 00 indicates 30% |
Write 40% compensation online | 0x601 | 23 49 25 00 28 00 00 00 | Writes decimal 40 (0x28), takes effect immediately |
Temporarily disable compensation (0%) | 0x601 | 23 49 25 00 00 00 00 00 | Smoothly ramps compensation current to zero |
5.3 Saving Parameters to Flash After Stopping (0x1010 / 0x2539)
Online adjustments to 0x2548 and 0x2549, as well as staged changes to 0x2542 ~ 0x2546, must be saved to Flash to persist across power cycles:
- Disable and Stop the Motor First (send fast-control word
0x0Cand confirm power stage is off). - Send Save SDO Command (choose either method, shown for
Dev_ID = 1):- Standard CiA 301 save signature (
0x1010:01 = "save"):23 10 10 01 73 61 76 65 - Vendor quick-save (
0x2539:00 = 1):23 39 25 00 01 00 00 00
- Standard CiA 301 save signature (
- Wait Quietly Before Power-Off: After receiving SDO response
60 ...on0x581, keep power applied for ~500 mswithout cutting power immediately. To restore factory defaults, write"load"to0x1011:03while disabled (23 11 10 03 6C 6F 61 64).
6. Six-Step Safe Hardware Commissioning Procedure
When commissioning MIT mode on a test bench or robot for the first time, unlock control degrees of freedom strictly in the following six steps:
| Step | Action | Pass Criterion |
|---|---|---|
| Step 1 · Verify Scales & Zeroes | Read 0x2542~0x2546 while disabled to sync master scales; check angle, fault code, and 0x6077 torque zero | Stable feedback, fault code 0; run 0x2531 = 2 first if unloaded sensor offset is excessive |
| Step 2 · Zero-Gain Aligned Enable | Set q_des = q_now, dq_des = Kp = Kd = τ_ff = 0; cyclically transmit 0x210 / 0x110+ID | Brake Release (~100 ms), feedback mode reports 0x06 enabled, joint remains completely still |
| Step 3 · Pure Damping Push Test | Hold Kp = 0, dq_des = 0, τ_ff = 0; increment Kd in small steps starting from 0.5 N·m·s/rad | Uniform viscous drag in both directions; settles smoothly without springback when released |
| Step 4 · Inner Loop & Friction Tune | Fine-tune 0x2548 (P+D) on sensor models and 0x2549 friction ratio on both model types | Smooth breakaway, rapid decay after light taps, no coasting on release, clean Iq without whine |
| Step 5 · Latched Compliant Hold | Latch current angle once into constant q_hold, set q_des = q_hold, keep Kd, and increment Kp | Smooth restoring torque when pushed away, returning cleanly without overshoot |
| Step 6 · Dynamic Trajectory & FF | Evolve q_des(t) smoothly with dq_des(t) = d(q_des)/dt; ramp in polarity-verified τ_ff | Lag-free tracking with ample current and thermal headroom |
q_des Every Cycle During Posture HoldingInitialize q_des from measured position only before enabling in Step 2. Once in Step 5 Compliant Hold, q_des must stay latched at fixed constant q_hold (or be updated independently by your trajectory planner). Executing q_des = q_meas inside your cyclic loop forces position error q_des - q to 0 permanently—producing zero stiffness force regardless of how large Kp is!
7. Extension: Full CANopen Mode Integration (0x500 + Dev_ID)
If your Joint Module runs full CANopen firmware (0x100A software version formatted as Vx.10.zz) or your upper controller reuses standard CiA 402 state machine management, transmit MIT payloads via the dedicated 8-byte direct channel 0x500 + Dev_ID (note: Vx.00.zz fast-control firmware disables 0x500 + Dev_ID; both firmware families share identical SDO configuration and tuning dictionaries).
7.1 Operation Mode Code Comparison
Mode numbers between standard CANopen Object Dictionary (0x6060 / 0x6061) and CAN FD fast-control frames map as follows:
| Operation Mode | CAN FD Fast-Control Mode (Byte0 / 0x300) | Full CANopen Mode (0x6060 Write / 0x6061 Read) |
|---|---|---|
| MIT Impedance Control Mode | 0x06 | 11 (0x0B) |
| Joint Torque Sensor Closed-Loop Mode | 0x07 (sensor models only) | 12 (0x0C) (sensor models only) |
7.2 Full CANopen Enable & Cyclic Control Sequence
Because 0x500 + Dev_ID carries only the raw 8-byte MIT payload (no controlword byte, built-in direct firmware channel requiring no 0x1603 PDO remapping), complete the standard CiA 402 handshake first and then refresh 0x500 + Dev_ID every 1 ms ~ 10 ms (an internal 50 ms command freshness timeout applies; example shown for Dev_ID = 1):
| Seq | CAN ID | DLC | Data (HEX) | Action & Status Verification |
|---|---|---|---|---|
| 1 | 0x000 | 2 | 01 01 | NMT Start Node 1 into Operational |
| 2 | 0x601 | 8 | 2F 60 60 00 0B 00 00 00 | Write 0x6060 = 11 (0x0B) to select MIT Impedance Control |
| 3 | 0x601 | 8 | 2B 40 60 00 06 00 00 00 | 0x6040 = 0x0006 (verify (0x6041 & 0x006F) == 0x0021) |
| 4 | 0x601 | 8 | 2B 40 60 00 07 00 00 00 | 0x6040 = 0x0007 (verify (0x6041 & 0x006F) == 0x0023) |
| 5 | 0x501 | 8 | 80 00 80 00 00 00 08 00 | Pre-send zero-gain 8B frame aligned to current angle (use pure 8B mode in Section 3.4 widget) |
| 6 | 0x601 | 8 | 2B 40 60 00 0F 00 00 00 | 0x6040 = 0x000F (verify (0x6041 & 0x006F) == 0x0027 and 0x6061 == 11) |
| 7 | 0x501 | 8 | (Cyclically updated 8B MIT payload) | Refresh 8B payload every 1 ~ 10 ms; write 0x6040 = 0x0006 to stop |
For general TPDO feedback mapping and bit-rate configuration under full CANopen, refer to PR0002 Joint Module CAN FD / CANopen Protocol Quick Guide and TN0002 CANopen Communication Extended Features.
8. Frequently Asked Questions (FAQ)
Q1: Why does the joint neither respond nor reply on 0x300 + ID when sending fast-control frames?
- Check Frame Byte Length & FD/BRS Flags:
0x210must be64 bytes(DLC = 15),0x110 + IDmust pad 3 trailing zero bytes to12 bytes(DLC = 9), and both CAN FD and BRS must be enabled. - Check the
0x210Target ID Map: When sending0x210, verifyByte 56..61contains the targetDev_IDfor each populated slot (if left00, every joint ignores the frame). - Check Firmware Variant & Non-Zero Payload: Read
0x100Avia SDO to confirm fast-control firmwareVx.00.zz, verify the 8B MIT payload is not all0x00, and read0x603Fto rule out active faults such as undervoltage or limit alarms.
Q2: Why does the link jerk violently at the instant of enabling, or mismatch commanded radian angles?
- Unaligned Initial Angle Before Enabling: If the joint rests at
0.8 radand the master enables withq_des = 0and non-zeroKp, an immediate step torque occurs. Always initializeq_desfrom measured position and enable withKp = 0. - Mismatched Full-Scale Constants: Verify
P_MAX ~ T_MAXin your master code match SDO readbacks from0x2542 ~ 0x2546exactly.
Q3: Why is manual backdriving heavy, buzzing slightly, or slowly creeping after release?
- Asymmetric Push/Pull Resistance: On Torque-Sensor models, inspect
0x6077unloaded while disabled; if non-zero offset exists, execute0x2531 = 2zero-torque calibration. - Sticky Breakaway Feel: Increase
0x2549:00Friction Compensation ratio in10%increments. - High-Frequency Buzz or Post-Release Coasting: For high-frequency buzz or whine, step down outer
MIT Kdor inner0x2548Torque LoopP / D; if the link keeps coasting after a light push,0x2549:00is over-compensated—reduce it by10% ~ 15%.