11111111111111111111111111111111111111111111111 Use your own parameters of your choice (mass, damping, stiffness). The M

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

11111111111111111111111111111111111111111111111 Use your own parameters of your choice (mass, damping, stiffness). The M

Post by answerhappygod »

11111111111111111111111111111111111111111111111
Use your own parameters of your choice (mass, damping,
stiffness). The Matlab code in attached just fill in the part where
it says "WRITE dx(1) AND dx(2) AS FUNCTIONS OF x(1),x(2),m,b,k"
11111111111111111111111111111111111111111111111 Use Your Own Parameters Of Your Choice Mass Damping Stiffness The M 1
11111111111111111111111111111111111111111111111 Use Your Own Parameters Of Your Choice Mass Damping Stiffness The M 1 (215.59 KiB) Viewed 86 times
2. Problem 2 Now, let's consider the following mass-spring-damper system. k 77777777 m E b m (1) x(t) In order to simulate the behavior of the system, the following differential equation should be solved. de x dx =f-b - kx dt2 dt In order to solve this differential equation, you need to set up a state-space model of the system: Å = Ax + Bu y = Cx + Du (For now, you don't need to understand this process – this material will be covered in BE315 or ENGR503) (2) Here, what you need to know is that this system behavior can be characterized by these four matrices/vectors: A, B, C, D. For this specific stem, these matrices/vectors will be given as shown below: A = Los c] B-101 [ C = (1 0], D=0 where, x= 6], u=f First you will need to find what these coefficients are: C1, C2, and cz. Use the equations (1) and (2). In other words, compare the equation (1) with the equation (2) – particularly the second row of the first equation. Note that you will have the following equation from the 2nd row of x = Ax + Bu ï = C1x + C2+ C3f Then, the skeleton of the program is provided in the next page. Here, you need to find the equations for å to simulate the system behavior. Fill out the portion left blank. This should look like this: dx(1) = ? dx(2) = ? Here, you need to represent dx(1) and dx (2) as functions of k, b, m, x(1), and x(2). Here, note that your dx(1) is i, and dx(2) is ï. Note that, in this situation, we will consider the case that your force f=0. You can estimate c3, but this will not be a part of the equation in the program (since f=0) When executed, again, this program will ask the user to input information regarding the system (i.e., mass, damping, stiffness), initial conditions (i.e., initial displacement/velocity), and simulation parameters (i.e., time step and final time).
g=9.81; % m/s^2 % System parameters m=input('Mass (kg)? '); b=input('Damping (Ns/m)? '); k=input('Stiffness (N/m)? '); % Initial conditions x0=input('Initial displacement (m)? '); v0=input('Initial velocity (m/s)? '); % Simulation parameters dt=input('Time step (sec)? '); Tf=input('Final time (sec)? '); TimeVec=[0:dt:Tf]'; Nt=length (Timevec); %% Movement prediction/simulation x=zeros (Nt,1); y=zeros (Nt,1); [T,X]=ode 45 (@msd, Timevec, [x0 v0],[],m,b,k); figure, plot (T,X) xlabel ('Time (sec)'); ylabel ('x (m), V (m/s)'); legend ('displacement x', 'velocity v'); pause figure, FigInd=gcf; Xmax=max (X(:,1)); Xmin=min (X(:,1)); Xmax=max ([abs (Xmax) abs (Xmin)]); for k=1:length (T) figure (FigInd); plot ( [0 x(k)], [00],'-'); hold on plot (X (k),0, '0'); hold off axis (Xmax* [-1 1 -1 1]); xlabel (sprintf('Time: %3.2f',Timevec (k))); pause (dt); end function dx = msd (t, x,m,b,k); dx=zeros (2,1); olo % % WRITE dx (1) AND dx (2) AS FUNCTIONS OF x (1), (2),m,b,k HERE % %%% oo ooo olo olo lo olo olo olo olo olo ol ol olo ор olo olo olo olo
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply