First, we extend the state‐space model by adding a third state , to represent the axle motion, and we introduce as the input to the model. This step yields:
Based on this, please complete the following tasks: 1. Write a matlab function to model this systems (see Module 3 for examples and guidance), using the model parameters given above. In this model define the input as follows (a little bump in the road):
In addition to the parameters above ( etc.) include the parameter to represent the possible passenger; set to 0 or 80 kg to represent the empty and loaded situations. QCmodel . m f unc t i on xdot = QCmodel odel ( t , x) % no non nl i nea earr mod odel el of mass- spr i ng- dampe perr syst em % g = 9. 8; M = 995; % kg Bv = 2. 9051e+03; % N- se sec/ c/ m Bc = 0. 2; % N K1 = 12170; % N/ m K3 = 51140; % N/ m^3 i f f t <= 1 % i mpl ement a st ep f unct i on i nput Ut = 0; el s ei ei f t <= 1. 5 Ut =. 2*( t - 1) ; el s e Ut = . 1; end Del t a_xi = x( 1) - x( 3) - 0. 375; xdot xdot ( 1) = x( 2) ; xdot( xdot( 2) = ( - M*g - K1*De *Del t a_xi - K3*De *Del t a_xi ^3 - Bv*( x(2) - Ut ) ) / M; xdot xdot ( 3) = Ut ; xdot = xdot ( : ) ; % make xd xdot ot a col umn ve vect ct or ( f or mat l ab 5. n)
QuarterCar.m
%% - - Val ues - - cl c g = 9. 8 % m/ s Mc=995 % Kg K1=12170 % N/ m K3=51040 % N/ m^3 Eu=0. 375 %m Mp=0 % Kg M=( Mc+4*Mp) / 4 %% - - - Root s - - pol y=[ K3 0 K1 M*g] % R=r oot s( pol ) R=r oot s( pol y) %% del t aE0=R( 3) E0e=Eu+del t aE0 % Equi l i br um Keq= K1+3*K3* ( del t aE0) ^2 % Li near i zed Spr i ng Zet a= 0. 707 Wn=sqr t ( Keq/ M) Bv=2*Zet a* Wn*M %% [ t 3, x3] = ode45( @QCmodel , [ 0, 5] , [ 0 ; 0 ; 0] , 0. 1) ; pl ot ( t 3, x3)
2. Determine the transient response of the model for motion starting from the equilibrium when the vehicle is unloaded (obviously this is an autonomous vehicle ;‐) and plot the response.
3. Repeat the previous task for the loaded case, M p = 80 kg and plot the response.
4. Comment on the diference in the response in the loaded and unloaded cases and compare with the analytic results and evaluation from Assignment 2 (e.g., the values of _ we obtained).
There is a reduced max value of velocity. The difference is 0.04 meters approximately. In time, few delays of 0.014 sec is found.