vsdc spring 2016 homework 01

Upload: hilgad

Post on 07-Jul-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 VSDC Spring 2016 Homework 01

    1/12

    Problem 1: For the powered lawn-mower example presented in the lecture slides, completethe following:

    (a) Work through the steps in the model derivation and add a rolling resistance force.

    Answer (by hand):

  • 8/18/2019 VSDC Spring 2016 Homework 01

    2/12

    (b) Create a Matlab code and model the rolling resistance using a linear longitudinaldamping force. Use your simulation to ‘tune’ the damping coefficient to reach asteady-state velocity of 0.25 m/sec.

    Answer:

    The Matlab code used to this problem was based on initial code provided as an example(from slides presented in previous lectures)The Matlab simulation can be used to tune the “rolling resistance” through a linearlongitudinal damping force “B” when the steady-state velocity is 0.25 m/sec.

    (c) Estimate the linear damping coefficient found in (b) using the analytical solution (pro-vided in the slides).

    Answer:

    In that case (v x,ss=0.25 m/sec), B=F t /v x,ss=827.9N.s/m. Note: In this case N r and N f areconstants (F r is applied to the CG).

    (d) Change the rolling resistance force to be a nonlinear function of the forward velocityand also dependent on a parameter related to the `lawn properties'. Rationalize yourmodel for this case and run simulations comparing two different cases (e.g., heavy vs.light), and compare the power requirements for these cases.

    Answer:

    The rolling resistance force is modeled by the relation, Fr = fr*N.

    Where: fr: It consists of the dimensionless rolling resistance coefficient N: it is the normal load (The normal load may be the contact force for a wheel/tire or ifthe rolling resistance force is to be applied at the CG of a vehicle body then N is typicallytaken as the total vehicle weight).

  • 8/18/2019 VSDC Spring 2016 Homework 01

    3/12

  • 8/18/2019 VSDC Spring 2016 Homework 01

    4/12

    Problem 2: The single rigid wheel is to be driven up a rigid embankment as shown below.

    (a) What is the minimum coefficient of friction, µ, that would allow this simplemaneuver? Assume the wheel has mass, m. State any assumptions made in youranalysis.

    Answer (by hand):

  • 8/18/2019 VSDC Spring 2016 Homework 01

    5/12

    (b) How does the situation change if this is a two-axle vehicle and either the rear or frontwheel(s) can be driven?

    Answer (by hand):

  • 8/18/2019 VSDC Spring 2016 Homework 01

    6/12

    Problem 3: Study the model for the 2D differentially-steered vehicle presented in thelecture slides. Complete the following:

    (a) Provide details on how the body-fixed velocity vector components (v x, vy, and z) arederived .

    Answer (by hand):

  • 8/18/2019 VSDC Spring 2016 Homework 01

    7/12

    (b) Study the derivation for the velocity vector in the inertial frame and justify thosekinematic differential equations.

    Answer:

    Let a 2D differentially driven single axle vehicle

    Assuming:- X-Y is an inertial frame- Wheels roll without friction- Small → ∗ ∗ - Lateral forces on wheels constrain side-slip- Negligible force at front caster/pivot.

    The force, F, must satisfy the constraint that there be no lateral slip. This requires,

    and the constraint that velocity be zero along rear axle:

    0

  • 8/18/2019 VSDC Spring 2016 Homework 01

    8/12

    The vehicle’s kinematic state matrix in the global/inertial frame is represented by

    Velocities in the local (body fixed) re ference frame are related with the inertial frame by the rotation matrix represented below:

    0 00 0 1 Or by using the time derivatives relationship: .

    Now, to obtain the velocities in the global (Inertial) reference frame:

    ∗ 0 00 0 1 From the previous problem (Problem3 (a)):

    2

    So,

    2 2

  • 8/18/2019 VSDC Spring 2016 Homework 01

    9/12

    (c) Study the Matlab simulation code provided for plotting the 2D trajectory of the CG.Reproduce the results.

    Answer:

    Using the Matlab code provided in class as an example.The simulation uses the following parameters:Wheel radius = 0.05 m

    Axle track width = 0.18 m Right wheel angular velocity = 4 rad/sec Left wheel angular velocity = 2 rad/sec

    (d) Explain how you would design a sequence of open loop wheel speed commands sothat the vehicle could traverse a square of a given size over in a given time period.

    Answer:

    - First, provide the physical parameters associated to the vehicle, like: Length, distancebetween wheels, maximum speed, wheels radius, gear ratio, etc.

    - Next, to calculate the dynamic behavior of the vehicle based on its physical parametersdefined previously, Example: engine max speed, wheels max. speed, etc.

    - Define the vehicle’s trajectory to be used in the path planning (in this case with asquare format). The length of one side could be used as input, for example.

    - With the path (and size of the trajectory), and determined the time used to accomplishthe trajectory, it is possible to calculate the proper speed used by the vehicle (of course,it is necessary a verification related to the vehicle’s physical parameters).

  • 8/18/2019 VSDC Spring 2016 Homework 01

    10/12

    - The vehicle will run straight over each side of the square using the calculated speed,at the end change its trajectory (left/right) using the steering angle.

    - This is repeated until the trajectory is completed in the specified time.

    (e) Change the baseline code from (c) to implement the ‘square’ driving algorithm. Itmay also be a good idea to change the solver to use a fixed step routine rather thana variable step solver (i.e., code is shown using ode45(); use rk4fixed() instead). Becareful not to use too large a time step. Experiment with completing the square overdifferent total elapsed times.

    Answer:The Matlab code below, shows the main parts used to implement the square drive algorithmand the velocity and steering command strategy proposed in (d). It is possible to change

    the steering angle for better curves (Note: Not all code is included!).

    % Physi cal par amet er s of t he vehi cl e L = 2. 040; % [ m]B = 1. 164; % Di st ance bet ween t he r ear wheel s [ m]m_max_r pm = 5000; % Mot or max speed [ r pm]gr at i o = 20; % Gear r at i oR_w = 13/ 39. 37; % Radi us of wheel [ m]% Par amet er s r el at ed t o vehi cl em_max_r ads = m_max_r pm*2*pi / 60; % Mot or max speed [ r ad/ s]w_max_r ads = m_max_r ads/ gr at i o; % Wheel max speed [ r ad/ s]v_ max = w_max_ r ads*R_w; % Max vehi cl e speed [ m/ s]% desi r ed t ur n r adi usR_t ur n = 3*L;del t a_max_r ad = L/ R_t ur n; % Maxi mum st eeri ng angl e [ deg]% vel oci t y and st eer i ng commands ( open l oop)v = v_max*ones( 1, n+1) ; % Vel oci t y vect or ( n+1 component s)del t a_r ad = del t a_max_r ad*ones( 1, n+1) ; % St eer i ng angl e vect or ( n+1%component s) [ r ad]psi _r ad0 = psi _deg0*pi / 180; % I ni t i al or i ent at i on [ r ad]v0 = v( 1) ; % I ni t i al vel oci t y [ m/ s ]del t a_r ad0 = del t a_r ad( 1) ; % I ni t i al s t eer i ng angl e [ r ad]q0 = [ x0, y0, psi _r ad0] ; % I ni t i al s t at e vect oru0 = [ v0, del t a_r ad0] ; % I ni t i al cont r ol vect orf i g1 = f i gur e( 1) ; % Fi gur e set - up ( f i g1)axi s( [ - R_t ur n R_t ur n - 0*R_t ur n 2*R_t ur n] ) ; axi s( ' squar e' )hol d on ;% Acqui r e t he conf i gur at i on of vehi cl e f or pl ot[ xb, yb, xf w, yf w, xr l w, yr l w, xr r w, yr r w] = vehi cl e_st at e( q0, u0) ;pl ot qb = pl ot ( xb, yb) ; % Pl ot vehi cl e basepl ot qf w = pl ot ( xf w, yf w, ' r ' ) ; % Pl ot f r ont wheelpl ot qr l w = pl ot ( xr l w, yr l w, ' r ' ) ; % Pl ot r ear l ef t wheelpl ot qr r w = pl ot ( xrr w, yr r w, ' r ' ) ; % Pl ot r ear r i ght wheelq1 = q0; % Set i ni t i al s t at e f or s i mul at i on% Par amet er s r el at ed t o si mul at i onst _max = 10; % Si mul at i on t i me [ s]n = 100; % Number of i t er at i ons

  • 8/18/2019 VSDC Spring 2016 Homework 01

    11/12

    dt = t _max/ n; % Ti me step i nt er valt = [ 0: dt : t _max] ; % Ti me vect or ( n+1 component s) % Begi nni ng of si mul at i onf or i = 1: n+1

    v( i ) = v_max*cos( 2*del t a_r ad( i ) ) ;u = [ v( i ) , del t a_ rad( i ) ] ; % Set cont r ol i nputvc = u( 1) ;del t a_r adc = u( 2) ;t o = t ( i ) ; t f = t ( i ) +dt ;[ t 2, q2] =r k4f i xed( ' ks_vehi cl e_kv' , [ t o t f ] , q1' , 2) ;t 1 = t 2( 2) ;q1 = q2( 2, : ) ;% Acqui r e t he conf i gur at i on of vehi cl e f or pl ot[ xb, yb, xf w, yf w, xr l w, yr l w, xrr w, yr r w] = vehi cl e_st at e( q1, u) ;% Pl ot vehi c l e pos i t i onset ( pl ot qb, ' xdat a' , xb) ;set ( pl ot qb, ' ydat a' , yb) ;set ( pl ot qf w, ' xdat a' , xf w) ;set ( pl ot qf w, ' ydat a' , yf w) ;set ( pl ot qr l w, ' xdat a' , xr l w) ;

    set ( pl ot qr l w, ' ydat a' , yr l w) ;set ( pl ot qr r w, ' xdat a' , xr r w) ;set ( pl ot qr r w, ' ydat a' , yr r w) ;% dr awnowpause( 0. 1) ; % Smal l Pause

    end

  • 8/18/2019 VSDC Spring 2016 Homework 01

    12/12

    References

    [1] Karnopp, D., and D. Margolis, Engineering Applications of Dynamics, Wiley, NewYork, 2008.

    [2] Meriam, J.L., and L.G. Kraige, Engineering Mechanics: Dynamics (4th ed.), Wileyand Sons, Inc., NY, 1997.

    [3] Longoria, R. “VSDC - Vehicle System Dynamics and Control”. Lectures 1-4.University of Texas at Austin - Spring, 2016.