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

8 views (last 30 days)
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 Comment
ENRICO
ENRICO on 14 Sep 2024
I'm going to do a similar task using Simulink/Simscape model I want to use as state predictor in a Kalman filter simulink block. Have you found a suitable solution?

Sign in to comment.

Answers (1)

Steve Miller
Steve Miller on 26 Nov 2022
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.
--Steve
  1 Comment
YASSER
YASSER on 12 Jun 2025
Dear sir @Steve Miller my model is a simscape and i do not have knowledge about its dynamic in state space domain i need to extract the state transition function to use it in UKF
Could you guide me

Sign in to comment.

Categories

Find more on Simscape Multibody in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!