I have built a Simscape Multibody model to solve an inverse dynamics problem. First, I provided the motion to the effector of my rigid body mechanism:
sampled 112 times in a 10s period. Then, I recorded the actuator torque of the joint I'm interested in into my workspace. I plotted it:
I assume the 112 peaks on my torque are caused by the not enough dense sampling of my input motion. So this time I sampled my motion 10x denser, using linear interpolation to calculate values of the new points:
if truet= probki10112; %provide an additional table with time samples from 0 to 100 sampled each 10/112
x=outTraj(3,1).X; % getting all x points from a storage matrix
y=outTraj(3,1).Y; % all y points from a storage matrix
tt=[0.089285714/10:0.089285714/10:10]; % sample time x10 shorter
xx= interp1(t,x,tt,'linear'); % interpolation of x points
yy= interp1(t,y,tt,'linear'); % interpolation of y points
plot(tt,yy,'o');legend('yy');grid on;hold on;plot(t,y);end
The denser sampled motion looks like this:
The plot is so broad because of overlapping of samples points. I started the simulation again, recording the new actuator torque. Nevertheless, my plotted actuator torque still has 112 peaks:
Does anybody know why this happens?
Best Answer