### the system consider the road train system shown below v2 t v1 t t c m1 ft t m2 b12 b 5154738

The System: Consider the road train system shown below. v2(t) v1 (t) (t) C m1 FT(t) m2 b12 b2 The system can be modelled with the states: Z3 = x(t)- l For this example, we will treat the input F,() 0. There is a MATLAB function which contains the state-space model of the system attached to this example. You cannot access this function, but it has following form: function zdot ssmodel (T, Z) m1 5; % [ kg] m2 10; % [ kg] c 1; %[m/N] b1 1; % [Ns/m]; b2 1;[Ns/m]; b12 3; %[Ns/m] ; % Build state – space equations zdot NaN(3,1); zdot (1) b1-b12)/m1*Z (1)+b12/m1* Z ( 2 ) – 1/m1/c*Z(3); zdot (2) (b12) /m2*Z (1 ) + ( – b12 – b2) /m2*Z( 2) +1/m2/c*z(3) zdot (3) Z(1)-Z (2); end This is a common problemsomeone else has developed a model for you (which is stored in the function ssmodel) and you need to use it to do some analysis. Your Task: 1) Simulate, using ODE45, this system for the following initial conditions: Mass m, starts with a velocity of v(0) 2 m/s. Mass my starts from rest v3(0) 0 m/s. The distance between the masses is initially equal to the natural length of the spring x(0) lo Store your initial conditions in the vector ze Simulate the system for 40 seconds total. Allow ODE45 to select the timesteps Define your simulation time in the vector TSPAN 2) Extract the results from your output and store them as follows: Store z,() in a vector called z1 Store z2) in a vector called z2 Store z() in a vector called z3 Store the simuation time r in a vector called t 3) Plot your results Plot each state against time Some of the plot syntax will be given to you Ensure you have axis labels and units. Your Script MATLAB Documentation C Reset 14 15 % Plots 16 fafigure(1); 17 s1-subplot (1,3,1); 18 % Plot z1 vs time 19 plot (t,z1) 20 % Now add axis labels, units, etc. 25 s2=subplot(1,3,2); 26 % Plot z2 vs time 27 28 % Now add axis labels, units, etc 30 33 s3-subplot(1,3,3); 36 Run Script Assessment: Initial conditions defined correctly? Simulation time defined correctly? Result: Time vector extracted/assigned correctly? Result: State Z1 extracted correctly? Result: State Z2 extracted correctly? Result: State Z3 extracted correctly? Have you added X labels? Have you added Y labels?