Mechatronics Simscape multibody help

3 visualizaciones (últimos 30 días)
Claude Mathias
Claude Mathias el 23 de Jul. de 2023
Comentada: Claude Mathias el 31 de Jul. de 2023
Hello,
I am trying to simulate a 2 revolute joint robot model created in Autodesk inventor in simscape multibody.
Below is my model.
Ideally i shall get match between input and output torque values , input and output joint positions.
However i am not able to get match between input and output joint positions.Input provided is joint angle , velocity and acceleration to caluclate torque.Below are the graphs
I am not able to figure out the error here.
I have been struggling with this from months. I sincerely appreciate any sort of help/guidance on this.
  3 comentarios
Nathan Hardenberg
Nathan Hardenberg el 24 de Jul. de 2023
You do not give much to work with. It would be very helpful if you could provide your model and the referenced CAD-files (combined in a zip-file for example). If this is not possible, at least provide a screenshot of the content in your subsystem. For now it's a black-box with two unkown inputs and four unknown outputs.
Also a screenshot of the robot would be great
Claude Mathias
Claude Mathias el 24 de Jul. de 2023
Hi,
Thank you for the response. Please find the attached zip file containing cad module ans .slx files. There are two versions of slx file twolink - matlab 2022a version and twolink2019 - matlab 2019 version.
I apreciate your help.Please let me know if you need more information.

Iniciar sesión para comentar.

Respuesta aceptada

Nathan Hardenberg
Nathan Hardenberg el 25 de Jul. de 2023
Thanks for providing the model.
First of all, input and output-torque will always be exactly the same, since you already provide the torque as input. Just as information.
Regarding the joint-position: This could obviously have the following causes:
  • wrong torque equations
  • wrong masses/inertia
  • wrong setup of joint
I can not (do not want to :P) factcheck that all, but the main problem lies elsewhere. While in a perfect world and perfect simulation your setup should work, those conditions can not be achieved. In you setup you just give the joint a torque and then hope that the arm moves accordingly. Most likely it will not move exaclty the way you predict, even in the simulation. Now there is an error, even if it is small. But in the next simulation-step you provide a new torque with the assumption that the arm moved perfectly. Since there is a small error you already now give a wrong error estimate. The error now accumulates and the problem gets worse.
To solve this you need a control-system. One easy example would be a PID-controller, but since you have a model, you at least would need a state-space-model, or something else of this kind.
In hindsight, I could have already known this with just the screenshot, but having the model it was easier to see the entire picture.
Looking at your model, it very quickly accelerates, what leaves me to believe that there is also a bigger error introduced somewhere (e.g. with a wrong calculation). I found one small thing, which is probably not the biggest mistake, but still causes an error:
tau1 = (0.33*m1*a1*a1*qdd1) + ...
Your equation suggests 0.33 is . While this is an approximation, it is not a very good one when you consider double floating precision in MATLAB. Just writing 1/3 should be fine and then much better.
One more thing: If you want to make a real robot arm you need a control system. If you just want to validate your (inverse) dynamics, you can still use Simulink. But be aware of comparing only for a short period of time since the errors accumulate.
I recommend testing with very simple configurations.
Also check your joints 0-positions. Your starting position has a small bend to it. I don't know if you compensate for that somewhere, but it seems unintuitive and may also be an error-cause. I tested with gravity on (also adjusted the variable in the funciton) and set the inverse dynamics inputs all 0. This worked for the first second or so but then went out of control. That seems to suggest that the starting position is wrong.
Also if you do not know: You can use the "Simulation Data Inspector" to get graphs of any signal (without Scopes). Just click on the according signal (arrow) and then hover over the three blue dots. Then click the "WiFi-symbol" ("Log Selected Signal"). After simulating you can now double-click the symbol and you get the signal. I find it very useful to work with when debugging, that's why I wanted to tell you about
  1 comentario
Claude Mathias
Claude Mathias el 31 de Jul. de 2023
Nathan Hardenberg I tried to correct my starting position. I allinged the xz plane of origin with xz plane of my base in Inventor software.I still get an angle error of 2.094 before the first revolute joint.Is this normal?
It would be great if you can provide some insights on how to fix starting position.I tried to search matlab documentation but i could not get any useful information.I am pretty confused on where to fix the problem whether it is in 3d software or simscape multibody

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simscape Multibody en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by