*Enlace a Spanish version
Materials: [ Cód.: simul3M4Sstandalone.m ] [ PDF ]
This video continues the case study of a 3-mass, 4-spring system whose
first-principle modeling was covered in the videos [
Here, the equations derived in the referred materials are entered in matrix form, simply by entering the constant matrices and by copying them from the theoretical modeling slides. The output equation is implemented so that only the three positions are part of the vector .
Once the model has been typed onto a Matlab script, a simulation is performed under certain initial conditions and a sinusoidal input profile (arbitrarily chosen). To compare the results and the computation time, the numerical integration is performed both with ode45 (a generic simulator, which can also simulate nonlinear systems) and with lsim (a simulator specialized in linear systems). The second case is, at least in this example, several times faster to execute; both simulations are basically coincident, apart from numerical tolerances to the fifth or sixth decimal place.
Animation in order to better apprehend how this system moves and vibrates
will be discussed in the forthcoming video [
*Link to my [ whole collection] of videos in English. Link to larger [ Colección completa] in Spanish.