Doing inverse dynamics and then actuating the delta robot from 'Pick and Place Robot' does not give the correct trajectory

13 ビュー (過去 30 日間)
Using the delta robot from 'Pick and Place Robot' example, I'm trying to make it move along my own trajectory while using the torque actuation on the actuator joints. I have computed the actuator positions, velocities and accelerations to achieve this trajectory (stored in variable Q) and when I use it as input to the actuator joints, the robot moves as it should. To get the needed torques, I sense them in the actuator joints and log them using a scope. Then I change joint's input from Motion to Torque and use the logged ones. But the motion is not the same as in the first run, it gets worse over time (see the plots).
What am I doing wrong? Is it even possible to do it like this (sense the torques and then use them as inputs without any feedback loop to control it, as in the original example)? I guess the sensed torques are not that precise and when I am using them as inputs the error gets cumulatively bigger. What settings should I change to make it even more precise? I've tried to change 'dt_solver' (step size of solver) and 'Consistency tolerance' in the 'Solver Configuration' block. The torques sensed in the second run are identical to the ones in the first run. I have set the State Targets for both position and velocity to match the first row of data in Q.
End effector position
Positions of actuators

回答 (1 件)

Steve Miller
Steve Miller 2022 年 11 月 30 日
Hi Filip,
The process you are following (run inverse dynamics closed loop, save torques, run forward dynamics open loop) can work, but it is very sensitive to numerical differences between the two runs. It is not surprising that the magnitude of the differences increase with time, for as soon as the simulations start to diverge, the divergence will increase rapidly as the expected position and actual position get increasingly out of sync. Longer simulation runs with complex motion profiles are unlikely to produce identical results when moving from closed-loop to open-loop unless the step size is really small.
Here are a few things I would recommend:
  1. To ensure the positions are exactly comparable, let Simscape calculate the first and second derivatives of position (to get velocity and acceleration) so that the states are exactly consistent. See screenshot below.
  2. Shrink the step size as much as is tolerable - this should reduce (but not eliminate) numerical differences.
--Steve
Let Simscape calculate velocity and acceleration rather than specifying it externally.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by