FOC encoder position control

General topics and discussions about the VESC and its development.
[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
pf26
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

FOC encoder position control

Postby pf26 » 07 Jul 2016, 12:57


rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[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

Postby rew » 08 Jul 2016, 08:47

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".

pf26
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

Postby pf26 » 08 Jul 2016, 17:17

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.

raess
Posts: 6
Joined: 02 Apr 2018, 22:32
Location: sweden
Contact:

Re: FOC encoder position control

Postby raess » 10 Oct 2018, 18:41

@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


[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
[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

Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest