A Virtual Rider for Motorcycles: An Approach ... - Semantic Scholar

2 downloads 0 Views 715KB Size Report
... Colorado, Boulder. Boulder, CO, USA ... derived from ADAMS\Car developed by VI-grade company and devoted to ..... We can express the velocity also using.
A Virtual Rider for Motorcycles: An Approach Based on Optimal Control and Maneuver Regulation Alessandro Saccon

John Hauser

Alessandro Beghi

Dip. di Ingegneria dell’Informazione Universit`a di Padova Padova, Italia Email: [email protected]

Electrical and Computer Engineering University of Colorado, Boulder Boulder, CO, USA Email: [email protected]

Dip. di Ingegneria dell’Informazione Universit`a di Padova Padova, Italia Email: [email protected]

Abstract—Recently developed optimization and nonlinear control strategies are applied to ride a multi-body motorcycle model along a specified path with an associated velocity profile. The resulting control scheme is based on three main pillars: a dynamic inversion procedure to compute the input-state trajectories corresponding to a desired maneuvering task, an inverse optimal control heuristic for designing closed loop dynamics, and a maneuver regulation controller to overcome limitations of standard trajectory tracking scheme. The controller (virtual rider) is implemented on a commercial simulation software. Simulation results are presented. Index Terms— Maneuver regulation, dynamic inversion, motorcycle, virtual rider, multi-body model, single-track vehicles

I. I NTRODUCTION The production of a motorcycle prototype entails a great deal of engineering long before skilled riders are called in to evaluate the performance and handling qualities of the physical motorcycle. It is in this stage, not to mention ongoing design iterations, virtual prototyping can play an important role. A mathematical model of a motorcycle, such as those presented in [1] and [2], can capture significant aspects of the ingoing dynamics, allowing analyses of different design performance and judgment of tradeoffs. One of the basic required task is to follow a path of prescribed geometry respecting an assigned speed profile. Open loop maneuvers commonly used to evaluate car handling, have limited applicability for singletrack vehicles, as those vehicles fall very quickly when driven by open loop steering input that do not compensate for possible lean instability. Recent publications focusing on design of virtual motorcycle controllers include [3], [4], [5], [6], and [7]. Of interest, is also [8]. All these approaches rely on a receding horizon control strategy. This is a natural choice if one thinks about on how a person rides a bicycle or motorcycle: he/she looks ahead, learning a portion of the track, continuously using this information to decide when how steer and accelerate/decelerate the vehicle. He/she never just looks at the ground below, as a causal control strategy would do [9]. The controller proposed in [3], (and further detailed in [4], [5], and [6]) is based on the idea of using a simplified motorcycle model and taking roll angle, instead of steering, as control input, avoiding to deal directly with lean instability. In [7], the control strategy relies on multipoint preview and is based on LQR methods and linearization of a multibody model designed with VehicleSim (a symbolic multi-body software, previously called AutoSim, that should be released commercially). This paper presents a new approach to design a virtual rider for a multi-body motorcycle model. We outline first the multi-

body and simplified control-oriented motorcycle models we use. Then, we detail dynamics inversion, closed loop response design, and maneuver regulation strategies adopted for solving the problem. Finally, the interface between the plant and controller, and simulation results are presented. II. B UILDING A MULTI - BODY MOTORCYCLE MODEL

Fig. 1. The (standard) VI-Motorcycle motorcycle model. The motorcycle is described using different assemblies stored in a database that can be connected to form a complete vehicle, ready for dynamic simulations.

A modern motorcycle is composed of a center assembly (including the frame, engine, gear box, and fuel tank), a rear assembly (including the swing and brake calipers), an upper steering assembly (including the handle bars and upper front fork), a bottom steering assembly (including the lower fork and brake calipers), and front and rear wheel assemblies (including tires, rims, and brake disks). We have modeled these assemblies in the commercial multibody code ADAMS using VI-Motorcycle, a software package derived from ADAMS\Car developed by VI-grade company and devoted to motorcycle dynamics simulation (see Figure 1). In this work, rider is modeled as a rigid body firmly attached to the center assembly. Aerodynamics is added to the model as a pure force attached to the center of pressure, which location is fixed according to wind tunnel measurements. Tire-ground interaction is coded using a Pacejka magic formula tire model (motorcycle version). The model we use includes relaxation length, therefore accounting for the transient force creation due to a change in sideslip, slip angle, and camber. Front suspension is a standard telescopic fork, while rear suspension is composed of one linkage with a spring and damper that connects the frame with the swing arm. Engine is modeled as a disk possessing its own mass and inertia, rotating about an axis orthogonal to the plane of

symmetry of the motorcycle corresponding to the crankshaft. Depending on its rotational speed (RPM) and opening percentage of the (virtual!) throttle valve, the engine provides a torque that is counteracted to the frame. Motorcycle gearbox is modeled and connected to the engine. The gearbox includes primary drive gear ratio, 1st to 6th gear ratios, and secondary drive gear ratio, this last specified by drive and wheel sprocket radii. The secondary drive is composed of a massless chain, modeled as two nonlinear “springs” attached at bottom and top of drive and wheel sprockets. Roughly speaking, the spring on top is tight when the engine generates a positive torque (as when the vehicle is accelerating), while bottom spring is tight when the engine provides a braking torque (as when the throttle valve is almost closed). Nonlinearity in the characteristics of the two springs is used to prevent the production of force under compression. Such a chain model serves to reproduce a realistic behavior of the rear suspension. For reason of space, no data and further details on modeling will be provided in this paper. More details can be accessed contacting directly the first author or VI-grade company. III. T HE DYNAMICS OF SLIDING PLANE MOTORCYCLE MODEL

The control strategy is based on a simplified motorcycle model, the sliding-plane motorcycle model. Imagine a rigid body shaped like a rectangle, sliding with one side on the ground and interacting with it at two points. See Figure 2. This rigid body is subject to gravity and aerodynamics, while the two points are an idealization of front and rear wheel contact points of a real motorcycle. Wheels are not modeled. A trivial steering geometry is assumed, with vertical steering axis and zero trail. The intersection of the steering plane with the ground determines with respect to vehicle heading the effective steer angle δf , assumed as control input. The steering assembly has negligible mass and inertia.

magnitude depends on vehicle velocity squared, measured at the rear contact point. We write the dynamics of the sliding-plane motorcycle as q˙ = v, v˙ = f (q, v, u) with q = (xr , yr , ϕ, ψ)T , v = ˙ T , and control u = (F f , δf ). When discussing (x˙ r , y˙ r , ϕ, ˙ ψ) x equilibrium conditions and dynamic inversion, it will result useful to write v˙ = f (q, v, u) explicitly as x¨    x˙   r r xr h ri y ¨ y ˙ r r y F  ϕ¨  = f  r  ,  ϕ˙  , x  . (1) ψ¨

ϕ ψ

ψ˙

δf

IV. A PPROXIMATE DYNAMIC INVERSION OF THE SLIDING PLANE MOTORCYCLE

Dynamic inversion of a nonlinear system refers to techniques that allow the computation of state and input trajectories corresponding to a desired output trajectory. Subject of this section is investigating dynamic inversion for the sliding plane motorcycle model introduced in section III. The desired output for the sliding plane motorcycle model is the rear wheel contact point (xr , yr ). A desired output (or ground) trajectory is a sufficiently smooth curve that we will indicate with (xd (t), yd (t)), t ∈ [0, T ]. Insights in the dynamic inversion problem can be gained by exploring the class of constant speed and constant curvature ground trajectories. Those trajectories, often called steadystate cornering or trim trajectories, are “equilibrium” conditions that emerge due to the presence of mechanical symmetries. The dynamics of the sliding plane motorcycle model (and of any multi-body motorcycle moving on the ground plane) are invariant with respect to rotation and translation on the ground. Changing coordinates is possible to put the dynamics into a form that highlights this property, clarifying the concept of steady state equilibrium. This is the purpose of the following subsection. A. The kinematic frame The velocity frame is a coordinate frame with x-axis oriented along the velocity vector (x˙ d (t), y˙ d (t)), z-axis pointing downward, and y-axis oriented such to define a right handed coordinate frame. The origin of the velocity frame is the rear wheel contact point (xr , yr ), see Figure 3. We rewrite the

Fig. 2. The sliding plane motorcycle model. Generalized coordinates of this mechanical systems are the position of the rear wheel contact point (xr , yr ), roll angle ϕ, and yaw angle ψ. Also depicted is effective steer angle δf and steer angle δf . An inertial reference frame (Ex , Ey , Ez ) is chosen according to the SAE J670e standard, with z-axis pointing downward).

Lateral force Fy at each contact point is a function of normal load N and amount of lateral sliding, measured by sideslip angle α. We impose the linear model Fy = −Kα α N , where Kα is the tire cornering stiffness. While lateral forces are governed by the above mentioned tire model, longitudinal rear tire force Fx is taken to be a control input. Only aerodynamics drag is included. It is modeled as a force applied at the center of pressure, parallel to the ground plane, and always lying on the vehicle symmetry plane. Its

Fig. 3. The velocity frame. The velocity frame is attached at the rear wheel contact point and its x-axis defines the direction of travel, which forms an angle χ with respect to the inertial frame. The velocity vector has magnitude v and motorcycle heading with respect to the velocity frame is α.

sliding plane motorcycle dynamics using the magnitude v and

orientation χ of velocity vector in place of x˙ r and y˙ r , using the change of coordinates x˙ r = v cos(χ) ,

y˙ r = v sin(χ) .

(2)

Time derivative of v and χ are χ˙ =

x˙ r y¨r − y˙ r x ¨r , x˙ 2r + y˙ r2

v˙ =

x˙ r x ¨r + y˙ r y¨r 1/2

(x˙ 2r + y˙ r2 )

.

(3)

The sideslip angle α is the vehicle heading measured with respect to the velocity frame. Heading angle ψ, velocity vector orientation χ, and sideslip angle α are related by ψ = χ + α. The sliding plane motorcycle dynamics in the velocity frame assumes the form q˙ = fq (υ), υ˙ = fv (q, υ, u), with q = ˙ T , and control u = (F r , δ). (xr , yr , ϕ, ψ)T , υ = (v, χ, ϕ, ˙ ψ) x In an expanded form, above equations read    v  v cos(χ) xr χ d  yr  v sin(χ)  = fq ϕ˙  =  ϕ˙ , dt ϕ ψ ψ˙ ψ˙

 

   

(4)



v v h i xr d χ yr   χ  Fxr    = fv . ϕ , ϕ˙ , δf dt ϕ˙ ψ ψ˙ ψ˙

(5)

B. From ground to full state motorcycle trajectories From the desired output trajectory (xd (t), yd (t)), we get by time differentiation the desired velocity magnitude vd (t) and desired velocity vector orientation χd (t). Second derivative, then, allows to compute desired ground path curvature σd (t), and longitudinal acceleration v˙ d (t). Supposing vd (t) and σd (t) are slowly varying, intuition suggests that the dynamic roll trajectory ϕ(t) and sideslip trajectory α(t) should remain close to the those obtained by considering the vehicle in steady-state cornering along the desired ground trajectory. This reasoning is pushed forward in the following, defining a quasi-static trajectory. This will provide a suitable starting point for the optimization based approximate dynamic inversion strategy we present. C. Sliding plane motorcycle pointwise trimming When both desired velocity vd (t) and curvature σd (t) are constant, dynamic inversion is reduced to the solution of four nonlinear equations in the unknowns ϕqs , αqs , Fqs , and ∆qs , that are, respectively, the roll angle, sideslip angle, thrust force, and (effective) steer angle. Explicitly, the set of nonlinear equations is         0

0

vd

0

0

αqs

χ˙ d

1

χ˙ d  = fv  0  ,  0  ,  Fqs  , 0 ϕqs 0 ∆qs

Expression (6) is a set of four nonlinear equations in four unknowns. By the implicit function theorem, we know that (6) has a solution for small v˙ d , since the associated jacobian matrix is nonsingular at trim. Experience has shown that a solution exists even for large |v˙ d |, with the maximum depending on the tire cornering stiffness chosen. E. Quasi-static motorcycle trajectory The quasi-static sliding plane motorcycle trajectory is defined as qqs (t) = (xd , yd , ϕqs , ψqs )(t), υqs (t) = (vd , χd , ϕ˙ qs , ψ˙ qs )(t), where the heading angle ψqs and its first time derivative are defined in terms of the quasi-static sideslip angle as ψqs (t) := χd (t) + αqs (t) and ψ˙ qs (t) := χ˙ d (t) + α˙ qs (t). If we evaluate the dynamics (5) along the (0) (0) (0) quasi-static trajectory using uqs (t) = (Fqs (t), ∆qs (t)) found in (6) as input, we find that v˙ d and χ˙ d are no longer achieved since this in no longer a static computation. However, by using the first two (out of four) equations in (5), we enforce this constraint imposing the longitudinal and lateral accelerations to equal the desired ones, i.e., v˙ = v˙ d and χ˙ = χ˙ d . Then, by (0) (0) using Fqs (t) and ∆qs (t) as starting conditions for finding the zero of the two imposed constraints, we get the quasi-static input trajectory uqs (t) = (Fqs (t), ∆qs (t)). F. Dynamic embedding As ϕqs (t) and αqs (t) were obtained by a pointwise (accelerated) trim, we cannot expect that quasi-static state and input trajectories satisfy the differential equation (5). However, we can embed the motorcycle dynamics into a new control system adding two additional (nonphysical) inputs, uϕ and uψ , that allow direct control on yaw and roll accelerations. We get therefore      v     v˙ xr 0 h i χ ˙ χ y F ϕ¨ = fv  r  , ϕ˙  , + 0  (7) ψ¨

0

αqs (t)

χ˙ d (t)

∆qs (t) 1

ψ˙



uϕ uψ

We refer to this new control vector uhg (t) = (uϕ (t), uψ (t)) as the hand of god, as it allows to follow any non physical roll and yaw trajectories. By construction, setting uhg (t) equal to quasi-static accelerations (ϕ¨qs (t), ψ¨qs (t)), the quasi-static state trajectory (qqs , υqs (t)) and input trajectory uqs (t) are now an actual trajectory of the augmented dynamics (7). G. Computing an approximate motorcycle trajectory The dynamics inversion problem consists in finding suitable roll ϕ(t), yaw ψ(t), thrust F (t), and steering ∆(t) trajectories that satisfy      xd (t) vd (t) h · ¸ i ϕ(t) ¨ y (t) χ (t) F (t)  = fv3,4  d  ,  d  , (8) ¨ ψ(t)

where χ˙ d = σd vd and fv as in (5). D. Sliding plane motorcycle pointwise accelerated trimming By accelerated trim, we mean a slightly modified set of nonlinear equations that derive by imposing the sliding plane motorcycle acceleration to achieve a desired acceleration v˙ d during trimming. We get      0    0 vd (t) v˙ d (t) (0) Fqs (t) χ˙ d (t) = fv   0 , 0 ,  . (6)   (0) ϕqs (t) 0 0

ϕ ψ

ϕ(t) ψ(t)

ϕ(t) ˙ ψ(t)

∆(t)

subject to the constraints      vd (t) h xd (t) i h i F (t) v˙ d (t) 1,2  yd (t)  χd (t) , ∆(t)  . ˙ ϕ(t) , ϕ(t) χ˙ (t) = fv d

ψ(t)

(9)

ψ(t)

Also, we want to impose roll angle to be bounded (|ϕ(t)| ≤ π/2) and sideslip angle α(t) = ψ(t) − χd (t) to be small. We use numerical optimization to get an approximate solution. For this purpose, define the nonlinear time-varying

A. Longitudinal and transverse coordinates Suppose the nonlinear control system

control system x˙ = f (t, x, u, uhg ) as 1

f (t, x, u, uhg ) = x1 f 2 (t, x, u, uhg ) = x2



 



x˙ =



xd (t) vd (t) h i h i u u f 3,4 (t, x, u, uhg ) = fv3,4  yd (t)  , χd (t) , u1  + uϕ . x1 x3 2 ψ x2 x4

In this way, we constraint the sliding plane motorcycle to follow the desired ground trajectory by imposing xr , yr , v, and χ) to be equal to xd , yd , vd , and χd . Finally, let h(t, x, u) ∈ R2 be defined as      xd (t) vd (t) h i u hi (t, x, u) = fvi  yd (t)  , χd (t) , 1  , i = 1, 2 . x1 x2

x3 x4

u2

The approximate dynamic inversion problem we solve is Z T min min l(τ , x(τ ), u(τ ), uhg (τ )) dτ +kx(T )−xqs (T )k2P x0 u,uhg

0

(10)

subject to x˙ = f (t, x, u, uhg ), x(0) = x0 , with cost l(τ , x, u, uhg ) given by · ¸ 2 2 2 k(x, u)−(xqs , uqs )kQ,R+ρ kuhg k +k(v˙ d , χ˙ d )−h(τ , x, u)k , where xqs := (ϕqs , ψqs , ϕ˙ qs , ψ˙ qs )T . The matrices Q, R, and P are suitable weighting matrices and ρ is a penalty parameter. Note that initial condition x0 is also optimized over. Optimal solution of (10) is indicated with x∗ (t) = (ϕ∗ , ψ ∗ , ϕ˙ ∗ , ψ˙ ∗ )(t), u∗ (t) = (F ∗ , ∆∗ )(t), and u∗hg = (u∗ϕ , u∗ψ )(t), t ∈ [0, T ]. For sufficiently large ρ, the control uhg becomes very small (practically zero) so that roll ϕ∗ (·) and yaw ψ ∗ (·) trajectories obtained are close to a sliding plane motorcycle trajectory. The penalty term ρ also forces the derivatives χ˙ and v˙ to stay close to desired v˙ d and χ˙ d . A typical difficulty in solving optimal control problems is the choice of an initial feasible trajectory for the nonlinear system. Within our setup, however, we have a perfect candidate, that is the quasi-static trajectory just computed. At (0) the beginning of the optimization, uhg forces the motorcycle to follow an initial, rather nonphysical, trajectory. Then, this control is optimized away and we are left with a sliding plane motorcycle trajectory corresponding to desired ground path specification. To solve (10), we use the projection operator based optimization presented in [10]. V. M ANEUVER REGULATION Maneuver regulation is a control strategy for nonlinear systems which circumvents a potentially dangerous and unrecoverable phenomenon in trajectory tracking due to loss of time synchronization between desired and actual state trajectories. Its main feature is to rewrite the dynamics of the system by using — instead of time — a longitudinal parameterization, expressing the actual “position” along the desired state trajectory. Often, a suitable nonlinear change of coordinates is employed to split the state space around the desired state trajectory into transverse and longitudinal coordinates. We refer to [11], [12], [13], and reference therein for further details. Here we give only a brief review of the theory with no details and proofs.

n

f (x, u) ,

(11)

m

is given, with x ∈ R and u ∈ R . Furthermore, suppose given the output map y = h(x), where y ∈ Rp , p ≤ n, together with η = n(x) ∈ Rn−p such that (y, η) = (h(x), n(x)) defines a diffeomorphism of Rn into itself. The output y is used to specify the desired output or task, i.e., the trajectory yξ (t), t ∈ R the system has to be regulated to. In section IV, given a desired trajectory (xd , yd )(t), t ∈ [0, T ], we have addressed the dynamic inversion problem for the sliding plane motorcycle model Given yξ (·) (supposed a regular curve), we specify an invertible and, at least, of class C 1 new parameterization sξ (·) : R → R, t 7→ sξ (t) . Its inverse is denoted t¯ξ (·), and we have sξ (t¯ξ (θ)) = θ. First derivative of sξ (t) defines the velocity along yξ , νξ (t) := dsξ (t)/dt. We can express the velocity also using sξ , obtaining ν¯ξ (θ) = νξ (t¯ξ (θ)). An overline is used to distinguish between a curve parametrized by sξ or time. We can parameterize the output as well as state and control trajectories using new parameterization sξ , obtaining as well y¯ξ (θ), η¯ξ (θ), x ¯ξ (θ), u ¯ξ (θ), etc. Around y¯ξ we define a set of local coordinates (θ, ρ) = Φ(y), θ ∈ R, ρ ∈ Rp−1

(12)

so that ρ vanishes when y is on y¯ξ , and also Φ(¯ yξ (θ)) = (θ, 0). The first component of Φ(·) will also be denoted π : Rp → R and can be defined, e.g., as π(y) = arg min ky − y¯ξ (θ))k2 . θ∈R

(13)

Using Φ(y), we may construct another invertible transformation x 7→ (s, w1 , . . . , wn−1 ) about the state space curve x ¯ξ (s) having similar properties, i.e., such that x ¯ξ (s) is mapped into (s, 0, . . . , 0). This transformation will be denoted (s, w) = Ψ(x). We will call s the longitudinal coordinate and w = (w1 , . . . , wn−1 ) the transverse coordinates of x. B. Transverse form of the dynamics The diffeomorphism x = Ψ(s, w) allows to write the dynamics of the nonlinear system (11) in the longitudinal and transverse coordinates. We get Proposition 5.1 (Transverse form): The dynamics of the nonlinear system (11) on a neighborhood of the trajectory x ¯ξ can be written in the following trasverse form s˙ = ν¯ξ (s) + f1 (s, w, v) , w˙ = A(s)w + B(s)v + f2 (s, w, v) ,

(14) (15)

where v = u − u ¯ξ (s), and f1 (·, ·, ·) and f2 (·, ·, ·) satisfy f1 (s, 0, 0) = 0, f2 (s, 0, 0) = 0, ∂f2 (s, 0, 0)/∂w = 0, ∂f2 (s, 0, 0)/∂v = 0. ¤ C. Transverse dynamics and linearization When the input v is not a direct function of t, but only of s and w, the dynamics of the transverse coordinate w can be written as a differential equation in the longitudinal parametrization s, and dependence on time t is dropped. We have Proposition 5.2: For any trajectory ((s(t), w(t)), v(t)) of (14) and (15) for which s(·) is invertible (i.e., there exist

t¯(·) such that s(t¯(θ)) = θ), the transverse coordinates expressed as a function of the longitudinal parameterization, i.e., w(θ) ¯ = w(t¯(θ)), satisfy dw ¯ = A| (θ)w ¯ + B| (θ)¯ v + f| (θ, w, ¯ v¯) , (16) dθ where A| (θ) := A(θ)/¯ νξ (θ), B| (θ) := B(θ)/¯ νξ (θ), and f| (·, ·, ·) is of higher order in w ¯ and v¯, that is f| (θ, 0, 0) = 0, ∂f| /∂w(θ, 0, 0) = 0, and ∂f| /∂v(θ, 0, 0) = 0. Also, v¯ = v¯(θ) is equal to v(t¯(θ)). ¤ With a slight abuse on notation, we will write in the following (16) using s in place of θ as dw ¯ = A| (s)w ¯ + B| (s)¯ v + f| (s, w, ¯ v¯) . (17) ds Writing the transverse dynamics as a differential equation in s allows the design of a time independent control law to regulate the transverse dynamics to zero (i.e., to follow the desired output curve) A central role is played by the Definition 5.1 (Transverse linearization): . The differential linear system given by dw ¯ = A| (s)w ¯ + B| (s)¯ v (18) ds is the transverse linearization associated to the transverse form given in (14) and (15). D. Maneuver regulation control law A linear feedback with gain matrix depending on the “current position” s along the maneuver is sufficient to make the transverse linearization (when stabilizable) uniformly exponentially stable. This result, obtained in the domain of the transverse coordinates without an explicit dependence on time t, can be restated in the original coordinates and in the usual setting of a differential equation in t for the original nonlinear dynamics. We give first the following Definition 5.2: Given to curves ζ(t) and ξ(t), t ∈ R we say that ζ(t) converges to the maneuver [ξ] and we write ζ(t) → [ξ], if ∃tD ∈ R such that ζ(t) → ξ(t − tD ) for t → ∞. ¤ The following result holds Proposition 5.3: Suppose the feedback law v¯ = −K(s)w ¯ makes the linear system dw ¯ = (A| (s) − B| (s)K(s))w ¯ ds (uniformly) exponentially stable. Then, applying u=u ¯ξ (π(h(x))) − K(π(h(x))W (x)

(19)

(20)

to the nonlinear system (11), we have x(t) → [xξ ] (and y(t) → [yξ ]) for t → ∞, for a sufficiently close initial condition x(0) to the curve xξ . ¤ E. Longitudinal and transverse coordinates for the sliding plane motorcycle model A natural choice for the parameterization sξ (t) of the output R t p 2 curve 2yξ (t) = (xd (t), yd (t)) is the arclength x˙ d (t) + y˙ d (t) dt. Given any point P in a neighborhood 0 of y¯ξ (s), we choose as coordinates the arclength of the point on y¯ξ (s) that has minimum distance from P and the (signed) distance of P from y¯ξ (s), as shown in Figure 4. This choice defines the transformation (s, w1 ) = Φ(xr , yr ). Note that Φ(¯ xr (s), y¯r (s)) = (s, 0), as required. While w1

Fig. 4. Local coordinates around desired path. The arclength s of the point having minimum distance from (xr , yr ) and the (signed) distance w1 of (xr , yr ) from the path are the coordinates of rear wheel contact point.

is the first transverse coordinates, w2 , . . . , w7 are chosen as w2 = ϕ − ϕ¯ξ (s), w3 = ψ − ψ¯ξ (s), w4 = v − v¯ξ (s), w5 = χ − χ ¯ξ (s), w6 = ϕ˙ − ϕ¯˙ ξ (s), and w7 = ψ˙ − ψ¯˙ ξ (s). VI. C LOSED LOOP RESPONSE DESIGN Once given the transverse coordinates w, the transverse linearization A| (s) and B| (s) can be computed. Interesting, A| (s) and B| (s) become constant in steady-state cornering. This is implied by the particular choice of w and mechanical system symmetry. Although we do not give a formal proof here, this result is important to discuss close loop response design. In steady-state cornering, one eigenvalue of the A| is unstable due to the inverted pendulum like dynamics. Note that the self-stability region predicted by accurate single-track models (see, e.g., [SharpLimebeer], [Ruina]) is not observed, in particular because the steering is controlled kinematically. Designing a stabilizing feedback for these particular steadystate equilibria can be obtained by standard Linear Optimal Control (LQR) [14]. Interesting, we found a heuristic that allow to choose constant Q and R matrices suitable for a wide range of different velocities and curvatures. Roughly, the heuristics is based on decoupling the lateral modes and longitudinal mode of the vehicle. To the lateral dynamics (Alat , Blat ) is controlled by the steering input, while the longitudinal dynamics by the thrust force. Chosen a sustained velocity and lateral acceleration, by pole placement we design desired lateral response, obtaining the lateral gain Kl at. Inverse optimal control is then used to obtain, from (Alat , Blat , Klat ), weighting matrices Qlat and Rlat that provide the same (closed loop) poles of (Alat −Blat Klat ). Furthermore, weighting matrices Qlong and Rlong are designed to impose desired longitudinal dynamics. Longitudinal and lateral weighting matrices are then combined (juxtaposed) and closed loop properties evaluated on the design point and, if satisfactory, on the entire range of velocities and curvatures of interest. Once suitable Q and R matrices have been devised, an step that may required some adjustments during the described heuristic, maneuver regulation matrix gain K(s) is computed by solving the (space-varying) optimal control problem Z L min wT (s)Qw(s) + v T (s)Rv(s)ds + w(L)T PL w(L) 0

s.t.

dw = A| (s)w + B| (s)v, ds

. w(0) = w0

(21) Optimal gain matrix K(s) is given by K(s) = R−1 B|T (s)P (s), where P (s) is the solution of the Differential

40.0

of the maneuver, lateral acceleration reaches almost 1 g (at the apex) of the two turns. Roll angle goes up to 42 degrees, see Figure 5 (d). Maximum path error, with chosen Q and R matrices, was slightly less that 9 cm.

[m/s]

33.75

27.5

21.25

15.0 1.0

(a) Animation snapshots

138.25

275.5 [m]

412.75

550.0

(b) Desired and closed loop vel.

1500.0

45.0

35.0

25.0 1125.0

15.0

[deg]

[N]

5.0 750.0

0.0 -5.0

-15.0

IX. C ONCLUSIONS AND FUTURE WORK The proposed control strategy showed unexpected robustness to unmodeled dynamics as those induced by suspension, gear shifting, and short lived wheelies. A journal version of this work is in preparation containing detailed data, modeling description, theoretical insights, and numerical results. Further work is directed toward the inclusion of rider motion, frame compliance, 3D road description, advanced aerodynamics.

375.0 -25.0

-35.0

0.0

-45.0 1.0

138.25

275.5 [m]

412.75

(c) Front wheel normal load

550.0

1.0

138.25

275.5 [m]

412.75

550.0

(d) Closed loop roll angle

Fig. 5. A chicane maneuver. Part (a) shows a sequence of animation snapshots taken from the closed loop simulation, (b) shows the desired (dashed blue line) and closed loop (solid red line) velocity profiles of the virtual motorcycle, reported as a function of arclenght, (c) is the motorcycle roll angle along the chicane maneuver, and (d) shows front wheel normal load variations along the chicane.

Riccati Equation (DRE) dP = AT| (s)P + P A| (s) − P B| (s)R−1 B|T (s)P + Q , ds with end point condition P (L) = PL . To improve numerics when computing the DRE, constant curvature and constant speed portions are added at the beginning and at the end of the desired ground path. −

VII. I MPLEMENTATION ISSUES The controller inputs (i.e.,roll angle ϕ, yaw angle ψ, rear wheel contact point coordinates x and y, and their derivatives) are a selection of available measurements from the multi-body model, and therefore need no preprocessing. Instead, an interface is needed between the maneuver regulation controller and multi-body model. The controller outputs (i.e.,thrust force Fxr and effective steer angle δf ) are “translated” into the multi-body motorcycle inputs by designing ad hoc control loops. In particular, the closed loop thrust force is split into throttle and (front) brake commands, gear shifting logic with the inclusion of a clutch engagement/disengagment strategy is added, and also effective steer angle is converted into a steering demand for the front steering assembly. VIII. C LOSED LOOP SIMULATION EXAMPLE We show results relative to a chicane in Figure 5. Part (a) shows a collection of animation snapshots taken during the closed loop simulation. Minimum curvature radius along the maneuver is 55 m. Part (b) shows desired and closed loop velocity profiles. Along the chicane, velocity drops due to gear shifting can be spotted. As virtual rider enters the first turn, speed is reduced to prevent risk of tire force saturation [15] while downshifting. Once passed the apex of the turn, high acceleration is experienced with front wheel coming off the ground, as it can be deduced by front wheel load shown in Figure 5 (c). The second turn is a mirrored version of the first turn, then the vehicle accelerates out straightening up. During the execution

X. ACKNOWLEDGEMENTS We want to thank Prof. Ruggero Frezza for support and useful discussion on motorcycle modeling and control, and Eng. Diego Minen and his collaborators for providing technical feedback on MSC.ADAMS and motorcycle multi-body modeling. R EFERENCES [1] V. Cossalter and R. Lot. A motorcycle multi-body model for real time simulations based on the natural coordinates approach. Vehicle System Dynamics, 37:423–447, 2002. [2] R. S. Sharp, S. Evangelou, and D. J. N. Limebeer. Advances in the modelling of motorcycle dynamics. Multibody System Dynamics, 12(3):251–283, 2004. [3] R. Frezza and A. Beghi. Simulating a motorcycle driver. In W.Kang, M. Xiao, and C. Borges, editors, New trends in Nonlinear Dynamics and Control and their Applications, pages 175–186. Springer-Verlag, 2003. [4] R. Frezza, A. Beghi, and A. Saccon. Model predictive and hierarchical control for path following with motorcycle: Application to the development for the pilot model for virtual prototyping. In 43rd Conference on Decision and Control, Paradise Island, Bahamas, 2004. [5] A. Saccon, J. Hauser, and R. Frezza. Control of a bicycle using model predictive control strategy. In Proc. 6th Symposium on Nonlinear Control Systems (NOLCOS), Stuttgart, Germany, 2004. [6] R. Frezza and A. Beghi. A virtual motorcycle driver for closed-loop simulation. IEEE Control Systems Magazine, 26(5):62–77, october 2006. [7] R.S. Sharp. Motorcycle steering control by road preview. Journal of Dynamic Systems, Measurement, and Control, 129:373–381, 2007. [8] N.H. Getz. Dynamic Inversion of Nonlinear Maps with Applications to Nonlinear Control and Robotics. PhD thesis, University of California at Berkeley, CA, USA, 1995. [9] J. Hauser, A. Saccon, and R. Frezza. Achievable motorcycle trajectories. In Proc. 43rd IEEE Conference on Decision and Control (CDC), Atlantis, Paradise Island, Bahamas, 2004. [10] J. Hauser. A projection operator approach to optimization of trajectory functionals. In IFAC World Congress, Barcelona, 2002. [11] J. Hauser and R. Hindman. Maneuver regulation from trajectory tracking: Feedback linearizable systems. In Proc. IFAC Symposium on Nonlinear Control Systems Design, Lake Tahoe, CA, USA, 1995. [12] A. Banaszuk and J. Hauser. Feedback linearization of transverse dynamics for periodics orbits. Systems and Control Letters, 26:95–105, 1995. [13] A. Saccon. Maneuver Regulation of Nonlinear Systems: The Challenge of Motorcycle Control. PhD thesis, University of Padova, Padova, Italy, 2006. [14] B. D. O. Anderson and J. B. Moore. Linear Optimal Control. PrenticeHall, Inc., 1971. [15] J. Hauser and A. Saccon. Motorcycle modeling for high-performance maneuvering. IEEE Control Systems Magazine, 26(5):89–105, october 2006.