HI,

I would like to implement this control using angle and foc_current.

In angle control,

current_sp = PID_velocity (shaft_velocity_sp - shaft_velocity).

In foc current,

voltage.q = PID_current_q(current_sp - current.d).

Question 1: how do you convert current_sp in angle control to target current for foc_current?

Question 2: where is the current limit (e.g. _constraint(current_sp, -current_limit, current_limit)?