NPS-SRL / SPART

Open-source modeling and control toolkit for mobile-base robotic multibody systems
Other
42 stars 17 forks source link

Position and velocity mismatch when compared to Simulink #2

Open Clyde92 opened 2 years ago

Clyde92 commented 2 years ago

I've got a strange mismatch (see image below) between linear position and velocity when comparing results of the SPART FD and an identical model in Simulink. I'm trying to verify that the mass and Coriolis matrices that are computed are correct for the attached simple example. The intention is to use these same functions to compute the dynamic model for legged robot I'm developing, where I'll use the mass and corilos matrices in the control scheme.

The position and velocity results differ significantly; however, only when I give the model an initial body angular velocity. I've included my code below. I'd immensely appreciate any effort to help resolve these differences.

mismatch

float3D_2x2R_sim.zip

Wayne-Z commented 1 year ago

Hi, Clyde92. Did you find the cause of the problem?

Clyde92 commented 1 year ago

No I didn't. Maybe something something solver settings... Something something chaos?

I can say that with 20 Dof multibody system and the dynamics from spart my control stuff in simulink works perfectly in open loop which is a good indication the models match.

Wayne-Z commented 1 year ago

Hi, I checked the simulation results of your model in ADAMS and it gives almost the same results as Simulink, but different results from the calculations of your SPART model. Maybe you should check if the float3D_2×2R_dynamics_spart.m file is written correctly. Keep in contact.