Simscape model robot direct dynamics

조회 수: 4 (최근 30일)
ENRICO
ENRICO 2024년 8월 8일
댓글: Yifeng Tang 2024년 8월 15일
I'm trying to use output of an inverse dynamics model of a robot for getting actuation torques required for a given planned motion and input them onto a direct dynamics model for verifying its correctness. At present I'm not able to keep two simulations aligned for more than some second fraction with a stepsize suitable for a reasonable simulation time, and I despair getting down with stepsize would not be helpful. Is it just matter of numerical errors or am I doing something wrong? Waiting for your suggestions.
Soldà Enrico
  댓글 수: 1
Yifeng Tang
Yifeng Tang 2024년 8월 15일
I can see how integrating the sensed torque to get hte planned motion can be tricky. It's like integrating an acceleration to get the displacement. And all numerical integration is susceptible to "drifting". The tolerance in numerical integration can lead to larger error in the 2nd integral for sure. Also, the sensed torque itself isn't "exact" but within numerical tolerance, so that's another possible source of discrepancy.
The sensed torque you get from the planned motion exercise, I think, is a great way to find out about the required sizing of components, e.g. the ratings of a motor. Then in reality, one would control the inputs to the actuator to get to the desired position. I wonder if you can try something similar: control the torque to get to the desired position at each time interval. Then compare the torque input into the joints to the previous sensed one, as well as the motion trajectory. I would expect with a reasonable controller, the trajectory will be similar, and the force be close but not exact. I think I've seen the forces/torques tends to be more "spikey" as the controller try to follow the desired positions.

댓글을 달려면 로그인하십시오.

답변 (1개)

Pratyush
Pratyush 2024년 8월 13일
Hi Enrico,
To align your inverse and direct dynamics simulations, consider the following steps:
  1. Ensure both models share the same parameters, initial conditions, and assumptions.
  2. Start with a smaller time step and gradually increase it to balance accuracy and simulation time.
  3. Use higher-order methods like ode45 or stiff solvers like ode15s for better stability.
  4. Adjust relative and absolute error tolerances in your ODE solver.
  5. Print intermediate results to identify where divergence occurs.
Hope this helps.
  댓글 수: 1
ENRICO
ENRICO 2024년 8월 14일
First, let me thank you for replying. I'm actually proceeding this way, but still encountering a lot of issues.
I followed your suggestions, keeping same model, for what was possble (I had of course to change input to joints), and model parameters caught from variables. There's no way to do that automatically?
One of course, and was expected, long simulation time, by far beyond my expectations anyway.
Two, I was trying with a simple static simulation, just to check all was fine. It was fine up to 15s of simulation, when suddendly it started to diverge. I'm seriously concerned about because should be a very basic case and work all simulation through.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Multibody Dynamics에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by