How to obtain the State Transition Matrix from Simscape Multibody model?

7 ビュー (過去 30 日間)
Mitzi Anaid Ramírez Estrada
Mitzi Anaid Ramírez Estrada 2020 年 11 月 18 日
回答済み: Steve Miller 2022 年 11 月 26 日
I need to include the Dynamic of the robot I'm using, imported from an URDF file, to a Extended Kalman Filter as the State Transition Function in order to estimate the states of the system. I tried to put all the simscape model inside a Simulink Function, but it brings Error1 saying I can't put the solver configuration block (from the robot's body tree) inside a subsystem. I came back and also tried taking the solver configuration block out of the Simulink Function and brin it in using a Connection Port, but it sends now Error2 saying all the elements of the body tree must be in the same level.
Error1: "'brazo_2dof/Simulink Function/Solver Configuration' has been placed in the function call subsystem 'brazo_2dof/Simulink Function' but does not support this configuration. Move the block out of the function call subsystem."
Error2: "Connections of the Physical Network cross nonvirtual boundaries. If any blocks in a Physical Network are within a nonvirtual subsystem, then all blocks of that network must be in the same nonvirtual subsystem. Either move affected blocks out of the nonvirtual subsystem, move network blocks into exactly one nonvirtual subsystem, or reconfigure affected nonvirtual subsystems to be virtual subsystems."
How else could I include the dynamics of my system, imported from the URDF, as the StateTransitionFunction?

回答 (1 件)

Steve Miller
Steve Miller 2022 年 11 月 26 日
It seems like you need the state of your multibody system evaluated at a specific configuration. If you create an inverse kinematics object and call it from a MATLAB function, you can obtain the state and then pass it to the Extended Kalman Filter.
If you post your model, we can look into it further.

Community Treasure Hunt

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

Start Hunting!

Translated by