Simple passive dynamic walker integration (ode45) returns discontinuous state estimations

I'm using Andy Ruina's simplest walker simulation (http://ruina.tam.cornell.edu/research/topics/locomotion_and_robotics/ranger/ranger_paper/Reports/Ranger_Robot/control/simulator/index.html) to create an ideal simulation to use as ground truth for further experimentation with model manipulation. The simulation uses a loop to perform integration of a noncontinuous function, as each heelstrike collison creates said discontinuity; however, I was under the assumption that the walker is governed by a system of ODEs that are continuous per gait cycle.
% ODE definition
% y1: theta
% y2: thetadot
% y3: phi
% y4: phidot
% gam: slope of incline (radians)
% First order differential equations for Simplest Walking Model
ydot = [y(2);
sin(y(1)-gam);
y(4);
sin(y(1)-gam)+sin(y(3))*(y(2)*y(2)-cos(y(1)-gam))];
But, when integrated, the plotted states look almost like a linear-piecewise function, but only for the first part of the gait cycle as well as the very end. (First image is theta over 3 gait cycles, each heelstrike denoted by the vertical black line; the second image is a zoomed in plot of theta for one gait cycle.)
I have tried various other ode solvers (simulation does not run), changed the tolerances (simulation does not run), set max step size (still looks like a linear-piecewise function), used forward Euler to gut-check that the system of ODEs are actually continuous (they are), and checked that the linear sections were equal in length (each is 30 points) but I have no idea why that's helpful.
I would appreciate any insight/suggestions and happy to answer any questions or clarifications, as I am counting on continuous time series data for further data science exploration.

댓글 수: 1

I wasn’t aware of that site, or the simulaltion. Thank you!
The ‘tspan’ argument in the ‘onestep’ function is a linspace call with 1000 elements, so it appears very smooth when I run it using the included solver, ode113 (in R2019a).
I’m running the code in simplest_walker.m, after deleting the three clc, clear all, and close all statements in the beginning.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

질문:

2019년 5월 29일

댓글:

2019년 5월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by