Actuator Parameters
Internal Control Loop of Motor Driver

Current Limit and Current Limit Margin
You can understand current limit and current limit margin as:
"Target current limit" + "protective redundancy margin"
Together, they define the safe operating range of the current controller.
๐ Basic Concepts
Current Limit
๐ The maximum current that the controller is allowed to output under normal operation
Current Limit Margin
๐ A reserved "buffer space" for the controller to handle transient fluctuations / control errors
Actual Hard Limit (Absolute Upper Bound)
current_lim + current_lim_margin
๐ Exceeding this limit will trigger protection (e.g., error / current limit violation)
Block Diagram (Logical Structure)

๐งฉ Detailed Explanation
1๏ธโฃ Role of current_lim (Soft Limit)
In the control loop (FOC):
Iq_cmd = clamp(Iq_target, -current_lim, +current_lim)
๐ The Iq setpoint is constrained within ยฑcurrent_lim
2๏ธโฃ Role of current_lim_margin
Used to detect whether the "actual measured current" is abnormal
Possible sources of error: - ADC error - PWM delay - Back EMF - Dynamic disturbances
๐ Therefore, short-term exceeding of current_lim is allowed
3๏ธโฃ Protection Trigger Condition
|Iq_measured| > current_lim + current_lim_margin
๐ This will trigger:
ERROR_CURRENT_LIMIT_VIOLATION
๐ Example
Assume:
- current_lim = 40 A
- current_lim_margin = 8 A
| Range | Meaning |
|---|---|
| 0 ~ 40A | Normal operation |
| 40 ~ 48A | Transient allowed (margin zone) |
| >48A | โ Protection triggered |
โ ๏ธ Engineering Significance
current_lim determines
๐ Maximum motor output torque
Torque โ Iq
current_lim_margin determines
๐ System stability / robustness
- Too small: prone to false protection triggers
- Too large: may cause overcurrent damage to MOSFETs or motor
๐ง Summary
- current_lim โ "desired maximum current"
- current_lim_margin โ "allowed transient overshoot range"
๐ Engineering Recommendations
Applicable for:
- High dynamic motion (jumping / locomotion)
- Strong nonlinear control (RL control)
Recommended configuration:
- Set margin to 20% ~ 30%
- Combine with:
- Bus current limit
- Temperature protection
- Torque limiter