MATLAB Answers

0

Always getting a 112 peak torque response

Asked by Olgierd Cichorek on 28 Aug 2018
Latest activity Answered by Steve Miller on 1 Apr 2019
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 true
t= 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?

  0 Comments

Sign in to comment.

1 Answer

Answer by Steve Miller on 1 Apr 2019
 Accepted Answer

Pretty hard to say what is going on here just by looking at plots and code. It looks as if your efforts to smooth the trajectory did not have the effect you expected. If you are sure you used the new trajectory, there must be other settings in the model or your test that resulted in the model following the same more coarsely sampled trajectory.
--Steve

  0 Comments

Sign in to comment.