Hello! Do you have the example for double mass-spring-damper system?
@jaisohnkimVT4 ай бұрын
Hello, I don't have any 2DOF mass-spring-damper examples, but MathWorks does (www.mathworks.com/help/simscape/ug/double-mass-spring-damper-in-simulink-and-simscape.html) and this page on the File Exchange seems reputable (www.mathworks.com/matlabcentral/fileexchange/159391-double-mass-damper-mechanical-system)
@georgecoombs5777 Жыл бұрын
Great video thanks!!!!! but how would you plot the acceleration??
@jaisohnkimVT Жыл бұрын
Recall that m*xddot + c*xdot + k*x = u, so the acceleration (xddot) is: xddot = (-c/m)*xdot - (k/m)*x + (u/m) Hopefully this is familiar from when we put the system into state-space form. Therefore, you can do something like: [t,x,v] = ode45(stuff); a = (-c/m)*v - (k/m)*x + (u/m); figure plot(t,a) This is the most "proper" way in my mind. You could alternatively obtain the accel vector by numerically differentiating the velocity vector, although I am not a fan of this because it could introduce noise into the accel vector. Hope this helps!