For velocity you're using the velocity of the actuator, instead of hte derivative of the position error, right?
For the standard: "look how well it's working!" step response test, there is no difference. But once you have a dynamic target, that doesn't hold up, Wouldn't it be better to take the difference of the target-velocyt and the actuator velocity?
Simone giertz had a "slave robot" as her latest video. I'm under time-pressure right now, so here is a link to one of her videos. Find her latest video yourself... https://www.youtube.com/watch?v=WcW70-6eQcY
In the case of dynamic targets, like with her slave robots, also taking the average of the target positions speed would help get the same response to a step as with a "step plus linear movement".
FOC encoder position control
-
- Posts: 310
- Joined: 28 Mar 2016, 14:37
- Location: FR Valence [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: FOC encoder position control
Yes, velocity is the velocity of the motor or the derivative of the encoder count (expressed in ERPM).
From the first document I mentionned, there seems to be a difference between PID and PIV even for static target step response (possibly they use a different loop for velocity control and then for position (probably slower) - I used the same loop for simplicity.
I think just taking the difference in velocity between actual and target could accumulate errors that could never be corrected.
As for the dynamic target, I changed the pos-pid-set command: Now I send a "next or future" target along with the position target. So that the control function automatically extrapolates linearly the position target, up to a fixed number of milliseconds.
Ideally, we should make this pos-pid-set with several parameters: position, speed, acceleration, and possibly max time of extrapolation. I think it will be required for robots/printers using trajectory planners.
From the first document I mentionned, there seems to be a difference between PID and PIV even for static target step response (possibly they use a different loop for velocity control and then for position (probably slower) - I used the same loop for simplicity.
I think just taking the difference in velocity between actual and target could accumulate errors that could never be corrected.
As for the dynamic target, I changed the pos-pid-set command: Now I send a "next or future" target along with the position target. So that the control function automatically extrapolates linearly the position target, up to a fixed number of milliseconds.
Ideally, we should make this pos-pid-set with several parameters: position, speed, acceleration, and possibly max time of extrapolation. I think it will be required for robots/printers using trajectory planners.
Re: FOC encoder position control
@pf26 can you post complete changes? For example: how is 'v_array_pointer' defined ... it's used without being defined before
Would be very interested to test this change!
Thanks
Robin
Would be very interested to test this change!
Thanks
Robin
Who is online
Users browsing this forum: No registered users and 4 guests