Open access peer-reviewed chapter - ONLINE FIRST

# Rolling Biped Polynomial Motion Planning

By Santiago de J. Favela Ortíz and Edgar A. Martínez García

Reviewed: November 12th 2021Published: December 28th 2021

DOI: 10.5772/intechopen.101606

## Abstract

This work discloses a kinematic control model to describe the geometry of motion of a two-wheeled biped’s limbs. Limb structure is based on a four-bar linkage useful to alleviate damping motion during self-balance. The robot self-balancing kinematics geometry combines with user-customized polynomial vector fields. The vector fields generate safe reference trajectories. Further, the robot is forced to track the reference path by a model-based time-variant recursive controller. The proposed formulation showed effectiveness and reliable performance through numerical simulations.

### Keywords

• rolling-biped
• path planning
• motion control
• underactuation

## 1. Introduction

Motion planning is an essential function and a critical aspect in robotics engineering. Motion planning allows increasing the robot’s degree of autonomy. Fundamentally a wide area of robotic tasks needs planning models such as: transportation and vehicular technology, service robotics, search, exploration, surveillance, biomedical robotic applications, spatial deployment, industry, and so forth. Moreover, motion planning is inherently impacted by the degree of holonomy and kinematic constraints in all robotic modalities: robot arms, legged robots, rolling platforms, marine/underwater vehicles, aerial robots, and including their end effectors. Depending on the robotic application, motion planning is designed either global or local. When the robot has an environmental map in advance, it is called global planning even with possibility to globally optimize routes. Alternatively, when there is only robot’s local sensor data and the whole environment is unknown, it uses feedback from local observations. Planning methods can be generalized into four types: deterministic (based on mathematical numeric/analytic functions and models) [1, 2, 3], stochastic (recursive numerical methods based on probabilistic uncertainties) [4, 5, 6], heuristic (algorithms based on logical control and human-heuristic decision-making) [7, 8, 9, 10], and mixed planning methods [11, 12, 13].

In this chapter, a kinematic motion/path planning method for path tracking of an inverted pendulum self-balancing rolling biped is deduced and discussed. This work is focused on the rolling biped motion modeling and simulation of the robot shown in Figure 1. The principal component of a rolling biped is self-balancing by controlling its pitch motion through in-wheel motors that allow rolling motion (inverted-pendulum-like). The robot’s yaw motion is accomplished by the angular velocity resulting from the differential lateral speeds, which is a nonholonomic constrained model. The robot’s design is purposed for missions to collect solid garbage in outdoors (a park), similar to other works [14]. Nevertheless, the robotic mission/task is out of this chapter’s scope, instead a detailed geometry of motion is described in three parts: (i) motion planning for biped’s balance, (ii) navigational path generation, and (iii) path tracking control. The work [15] proposed a balancing and dynamic speed control of a unicycle robot based on variable structure and linear quadratic regulator to follow a desired trajectory. The work [16] modeled a wheeled bipedal robot with analytic solutions of closed-form expressions in kinematic control loops. The work [17] reported a self-balancing two-wheeled robot with a manipulator on-board, using auto-balancing system to maintain force equilibrium. The work [18] applied a proportional integral derivative (PID) control and active disturbance rejection control to balance and steer a two-wheeled self-balancing robot modeled by Lagrange formula. In [19], an adaptive robust control of a self-balancing two-wheeled underactuated robot to estimate uncertainty bound information, using deterministic system performance by Lyapunov method, was reported. In [20], a navigational two-wheeled self-balancing robot control using a PD-PI controller based on the Kalman filter algorithm was reported. Similarly, [21] used variable structure combining proportional integral differential controllers for balance and locomotion deriving a kinematic model based on the center of gravity constraint. Lagrangian-based with Kane’s approach for dynamic balancing was reported in [22]. Moreover, [23] conducted a study using model predictive control for trajectory tracking of an inverted-pendulum wheeled robot. The work [24] reported a self-balancing robot controller using Euler-Lagrange and geometric control, and planar motion is controlled by logarithmic feedback and Lie group exponential coordinates. The work [25] developed a balancing and trajectory tracking system for an inverted-pendulum wheeled robot using a Lagrange-based backstepping structure variable method. This work’s main contributions are an original design of limbs based on four-bar linkages to alleviate damping motion yielded from irregular terrains, from which a kinematic balancing condition is deduced. Further, polynomial vector fields with limit conditions are deduced from user-customized interpolation functions as path-generator models to yield safe routes in advance. Moreover, a recursive time-varying kinematic controller forces the robot to track resulting routes. The proposed system is demonstrated at the level of simulation. This chapter is organized in the following sections. Section 2 deduces the limb kinematics and its effects in the biped’s balance. Section 3 presents the polynomial approach to trajectory generation by directional fields. Section 4 describes a navigation recursive controller for path tracking control. Finally, Section 5 presents the work’s conclusions.

## 2. Balancing motion planning model

The main issue of an inverted-pendulum-like rolling biped is its capability to self-balance by controlling its pitch angle through the wheels velocity longitudinally (Figure 2(b)). This section deduces the balancing kinematics of the limb’s planar linkage shown in Figure 2(a). As a difference from other biomechanical inspired muscle-tendon limbs [26], in this work each limb is comprised of a four-bar linkage operating as a double crank, where bars r and d are linked by a coupling link l with limited rotary angles.

The expressions provided in Proposition 2.1 are obtained from deductions in Appendix A. The passive joint point P1=x1y1mutually depends on the analytic model of the joint located at P2=x2y2to describe a rotary planar motion, proposed by

Proposition 2.1Limbs motion estimation. The four-bar linkage’s passive jointP2is analytically described by.

P2=dcosθsinθ+ΔxΔy.E1

Therefore, based on Definitions 4.1–4.3 of Appendix A, the model solutionP2is

x2y2=dcos2arctanQ±Q24PR2Psin2arctanQ±Q24PR2P+ΔxΔyE2

From Eq. (56) deduced in Appendix A, there are two possible solutions for θ, described as opened or crossed motion. For this work, the type of motion should be Q24PRQ24PRthat must be satisfied. Therefore, by using expressions (47), (52)(56), the plots shown in 3 are obtained.

Furthermore, the wheels position is tracked by Pf (Figure 2(a)). This design assumes the robot’s center of gravity (cog) located at the same length fa(both in Figure 3) that is projected within the biped’s body. Therefore, the cog is described by Definition 2.1:

Definition 2.1Robot’s center of gravity (cog). The robot’s cog is assumed to be located at Cartesian body’s position,

xcog=x2x12+acosπ+arctany2y1x2x1E3

and

ycog=y2y12+asinπ+arctany2y1x2x1.E4

Hence, in accordance to Definition 2.1, it follows that the robot’s falling speed vf due to vertical unbalance is

vf=dxcogdt2+dycogdt22.E5

Taking into account that the robot is a dual differential drive kinematic structure, where vR and vL are the right-sided and left-sided velocities, respectively

dsdt=r2dφRdt+dφLdt,E6

where sis the robot displacement over the ground, and ris the wheel’s radius [m]. Likewise, the dual differential velocity is

vdiff=dφRdtdφLdt.E7

Hence, the robot’s angular velocity ωrad/sin terms of its differential speed vdiffand constrained by its wheels lateral baseline distance bland vdiffis substituted to yield:

ω=2vdiffbl=2rwbldφRdtdφLdt.E8

The biped’s falling angle and angular falling speed are λradand λ̇rad/s, respectively. Let vf[m/s] be the falling velocity affecting the robot’s balance

vf=bλ̇t,E9

which makes the robot’s pitch turn around the wheel’s center. Unbalancing velocity vu[m/s] is an horizontal component such that

vu=vfcosπ2λ=bλ̇cosπ2λ.E10

The wheel’s axis point moves at balancing speed vbthat is parallel to the ground. Wheel’s tangential speed is vw=rφ̇, and linear motion speed is the balancing velocity underneath the biped’s body at the wheel’s axis,

vb=vw2=rφ̇w2E11

Therefore, the balancing condition is described by Definition 2.2:

Definition 2.2Kinematic balancing condition. The robot’s vertical equilibrium condition is assumed for balancing and unbalancing velocities of equal magnitudes (or very approximated). Thus,

vuvb=0,E12

and redefining, letφ̇Bbe the wheel’s balancing angular speed,

bλ̇cosπ2λrwφ̇B2=0.E13

Therefore, it is of interest to find the wheel’s rotary speed that balances the biped motion and from Definition 2.2, the following Proposition 2.2 arises,

Proposition 2.2Robot’s balancing speed. The wheel’s rolling velocity to satisfy the robot’s body balance is proposed as

φ̇B=2brwλ̇tcosπ2λ.E14

and if and only ifφ̇R=φ̇Lmust exist, assuming that in such period of time, the robot’s yawωt0allowing longitudinal balancing equilibrium. Thus,

vt=rφ̇B,φ̇Rφ̇L,vuvb0r2φ̇R+φ̇L,vuvb0E15

Thus, let us redefine the state variables as x1=λ, x2=ẋ1, ẋ2=x22tanπ2x1. For an stability analysis for the balancing case when vt=rwφ̇B, and equilibrium condition φ¨B=0occurs,

2b2ẋ2cosπ2x1+ẋ22sinπ2x1=0E16

and dropping off the highest-order derivative of the system

λ¨=x22tanπ2x1E17

The system total energy Ek+Ep(kinetic plus potential) is a positive function, which is used as a Lyapunov candidate function, where the robot’s translation motion rwφ̇Bfor equilibrium is

ET=Ek+Ep=12mrw2φ̇B2+mgb21cosλE18

and substituting φ̇B,

ET=2mb2λ̇2cosπ2λ+mgb21cosλ.E19

For Vx=ETand finding out that v(x) and V̇xfulfill V̇0=0. In addition, assuming that 2πλ2π, then V̇0>D0. Assuming that V:DRis a continuous differentiable function. Finally, the following Lyapunov criterion is satisfied (20),

Vxx1Vxx2x2ẋ2=0E20

## 3. Polynomial vector fields

This section introduces the proposed path planning strategy to dynamically generate local paths. Two polynomial models are enhanced as vector fields to exert attractive and repulsive robot’s accelerations. In principle, the desired acceleration functions are designed from the interpolating attractive/repulsive accelerations with respect to (w.r.t.) distance. The method used to fit points is the Lagrange formula:

aδ=ijδδiδiδjai,E21

where the human-user establishes a desired numerical acceleration aiw.r.t. a desired distance δi, from either goal or obstacle. Therefore, the following general cubic polynomial forms attractive aAand repulsive aRare obtained with their respective numeric coefficients λiand βi,

aAδ=λ0+λ1δ+λ2δ2+λ3δ3,aRδ=β0+β1δ+β2δ2+β3δ3E22

It follows that, Definition 3.1 establishes the acceleration path planning model toward a goal of interest.

Definition 3.1Planning toward a goal. Given the kinematic parametersλ0=0,λ1=1875s2,λ2=1875m1s2,λ3=375m2s2, the attraction path modelδκfAδis defined by

fAδg=δ3756δg+6δg2δg3.E23

Assuming that the distance between the goal and the robotδg=x2+y22, such thatxxgxrandyygyr.

Similarly, Definition 3.2 establishes the acceleration path planning model that avoids obstacles zones.

Definition 3.2Planning obstacles avoidance. Given the kinematic parametersβ0=5,β1=109440,β2=1855m1s2,β3=3110m2s2, the avoidance path modelδfRδis defined by

fRδo=δκR5+109440δo1855δo2+311δo3,E24

Assuming that the distance between the obstacle and the robotδ0=x2+y22, such thatxxoxrandyyoyr.

Figure 4(a) shows the robot’s instantaneous acceleration toward a goal of interest. The attraction acceleration starts when the goal-robot distance δg<9m. The planner allows start from fA0to realistically provide speeds physically possible. Figure 4(b) shows the robot’s instantaneous acceleration away from obstacles. The avoidance acceleration starts when the obstacle-robot distance δo<8m. This avoidance planner fRis faster than fAto increase confidence against obstacles.

Therefore, extending to two-dimension Cartesian space, let us deduce the following algebraic process for the goal-attraction planner fA:

fAx=κA6xx2+y22+12x3x2x2+y22,E25

as well as

fAy=κA6yx2+y22+12y3y2x2+y22.E26

Similarly, for the robot’s acceleration to avoid obstacles, let us develop the following fR, by substituting the functional form of δointo the gradient function

fRxy=κR5+109440x2+y221855x2+y2+3110x2+y23/2,E27

subsequently by applying the gradient operator,

fRx=109x440x2+y22+18x559x110x2+y22E28

and

fRy=109y440x2+y22+18y559y110x2+y22E30

Thus, by substituting terms in both local planners, the general attractive motion planning is a negative function with amplitude coefficient κA=375s2is represented by

fAxfAy=κA6δt+1232δgxgxtygytE31

The attractive field is a positive function working within limits 0δg<9, thus

limδg9fRδg=0;andlimδg6fRδg=3.75E32

and the repulsive with κR=1440s2

fRxfRy=κR109δo288+36δoxoxtyoyt.E33

The repulsive field is a negative function that works within range 0δo8,

limδo8fRδo=0;andlimδo0fRδo=5.E34

The direction fields produced are shown in Figure 5, where for both cases the coordinates origin represents either goal or obstacle locations.

Moreover, when neither goals of interest nor obstacles are within the observation field of the robot, it must keep navigating along a prior route plan. The routing plan is map comprised of a sequence of Cartesian points gkR2, gk=xy.

When the robot accomplishes either fAor fR, it continues toward the following route point, expressed in terms of unit vectors:

ato=aogk+1gkgk+1gk,E35

where aois an ideal or averaged acceleration toward the next route point g2 from g1. Therefore, the total path planner mode is given by Proposition 3.1.

Proposition 3.1Total mission path planning. The total path planning model subjected to adaptive environmental changes is proposed as a vector fields sum:

at=ato+gκA3δg26δg12xgxtygyt+oκR288109δo36δox0xtyoytE36

and the robot’s instantaneous navigational total velocity vTR2, vT=xTẏTis obtained by

vT=t1t2atdt.E37

Thus, to automatically limit the speed until the robot’s maximal velocity vmax, the real physical velocity vphis constrained by the final planning motion

vphvTvmax=vTvmax,vTvmax<1vmax,vTvmax1E38

Figure 6 shows simulation results of the total navigation planner.

## 4. Path tracking

This section deduces an algebraic trajectory tracking linearized controller based on the kinematics geometry of the reference path: linear and angular velocities. Considering from previous Section 3, let vphbe called the reference velocity that is going to be tracked. Likewise, let (x1,2, y1,2) be the next local planning coordinates to be reached (from location 1 to location 2). Hence, let us define x1,2x2x1and y1,2y2y1. Such that ṡ1,2m/sis a segment of the planning speed. Hence, let us obtain the first-order derivative,

ṡ1,2=ddtx1,22+y1,222=x1,2ẋ1,2+y1,2ẏ1,2x1,22+y1,222.E39

Similarly, by obtaining the desired robot’s orientation θ1,2, its first-order derivative w.r.t. time is

θ̇1,2=ddtarctany1,2x1,2=x1,2ẏ1,2y1,2ẋ1,2x1,22+y1,22.E40

It follows that, the tracking control vector is u̇tR2, such that u̇t=ṡ1,2θ̇1,2. Therefore, by stating (39) and (40) as a system of linear equations, the first-order derivatives must simultaneously be solved:

x1,2s1,2ẋ1,2+y1,2s1,2ẏ1,2=ṡy1,2s1,22ẋ1,2+x1,2s1,22ẏ1,2=θ̇,E41

thus, by factorizing both, the common term 1/s1,2and the first-order derivatives, the matrix form of the forward tracking law is

u̇=1s1,2x1,2y1,2y1,2s1,2x1,2s1,2ẋ1,2ẏ1,2.E42

Likewise, as the inverse tracking law is of our interest, it is inversely dropped off

ẋ1,2y1,2=s1,2x1,2y1,2y1,2s1,2x1,2s1,21u̇.E43

For notation simplicity, let us redefine ζ̇tẋ1,2ẏ1,2and the time-variant control matrix Ktas

Kt=x1,2y1,2y1,2s1,2x1,2s1,2,E44

thus from Section 3, let urefbe the global reference planning model during time segment t1,2t2t1such that,

uref=vpht1,2arctanẏTẋT.E45

Therefore, the recursive path tracking control law is stated as

1:ζt+1=ζt+s1,2Kt1urefût2:ut+1=ut+1s1,2Ktζt+1ζ̂tE46

where ûtis the instantaneous sensors observation of both components, displacement ŝand yaw θ̂. The prediction control speed vector ζt+1is the next desired local reference in line 2, while ζ̂tis the robot’s Cartesian speed observer vector. Finally, ut + 1 is the control vector global prediction (Table 1).

ParameterValueParameterValueParameterValueParameterValue
l[m]0.03a[m]0.25κAs23/75Ix[kg2]0.12
d[m]0.15bl[m]0.4κRs21/440Iy[kg2]0.12
ea [m]0.08bm0.75ao[m/s2]0.5Iz[kg2]0.13
r[m]0.15m[kg]0.76rw[m]0.1υmaxm/s1.5

### Table 1.

Simulation parameters deployed with high-density range scanner Hokuyo URG 04LX.

High stiffness non-rigid bar.

## 5. Conclusion

The mechanical design of the biped’s lower-limb mechanical structure was configured as a double-crank four-bar linkage with passive-allowed motions. Motion planning began from determining the limbs’ linkage positions causing the robot’s height and pitch varying overtime producing unbalanced motions. Inferring balancing velocities to yield robot’s vertical balance was possible and worked stable. The proposed balancing rolling condition was analyzed throughout its total energy model as a Lyapunov candidate function resulting stable in three criteria: V(0) = 0, v(x) = 0, and V̇x=0. The proposed navigational approach allowed human-user to design short range-limited trajectories by cubic polynomials obtained from four empirical coordinates distance-acceleration by Lagrange interpolation. Both polynomial planning models have initial conditions a0t0=0m/s2. Thus, the robot did not require an infinite acceleration to reach a desired speed at t0. Physically, the model is applied to any motion in equilibrium. For goal attraction the maximal acceleration is reached at the 55% of the distance, subsequently decreases monotonically until the goal position.

The navigational general planning model is a set of partial derivatives model combined, allowing dynamic local planning among multiple obstacles, goals, and routes. The navigational general planning model worked as the reference model for the tracking control system. It consisted of a set of time-varying linear equations, with recursive feedback showing suitable performance. The work was implemented in simulation and coded in C++ under Linux. Future improvements will consider the inclusion of kinetic models and dynamic forces fitted to the proposed planer.

This appendix provides the algebraic deduction of the limb’s Cartesian motion model described in Section 2.

Let P1=x1y1be the Cartesian point of passive joint between links b and , obtained by

x1y1=rcosϕsinϕ.E47

Likewise, let P2=x2y2be the coordinate of passive joint between links rand , expressed by:

x2y2=rcosϕsinϕ+l2y1y22l2x1x22.E48

Both expressions (47) and (48) are described in terms of ϕ, but can similarly be described in terms of the angle θby

x2y2=dcosθsinθ+ΔxΔy,E49

where the distances Δxand Δyseparate the joints phiand thetaalong the chassis, see Figure 2(a). By algebraically treating the Cartesian components separately, let us equal the xcomponents of (48) and (49) to form the equation

dcosθ+Δx=rcosϕ+l2y1y22,E50

dropping off the squared root term of (50),

l2y1y22=dcosθ+ΔxrcosϕE51

and squaring both sides of the equality, the following is obtained,

l2y1y22=dcosθ+Δxrcosϕ2E52

and algebraically expanding the squared binomials and substituting y1 and y2 from expression (47) and (49) respectively into (52),

d2cos2θ+2Δxdcosθ2rdcosθcosϕ+Δx22Δxrcosϕ+r2cos2ϕ=l2r2sin2ϕ+2rdsinθsinϕ+2Δyrsinϕd2sin2θ2ΔydsinθΔy2E53

and organizing trigonometric terms by their degree, Eq. (53) becomes:

2rdcosθcosϕ+2rdsinθsinϕ=d2cos2θ+d2sin2θ+Δx2+Δy2+r2cos2ϕ+r2sin2ϕ+2Δxdcosθ2Δxrcosϕ+2Δydsinθ2Δyrsinϕ.E54

By factorizing the common terms of (47) and exchanging terms with suitable identities such as cos2α+sin2α=1and c2=Δx2+Δy2in order to obtain Eq. (55)

cosθcosϕ+sinθsinϕ=r2+d2+c2l22rΔxcosϕ+Δysinϕ+2dΔxcosθ+2dΔysinθ2rdE55

In order to simplify the main expression, some constant terms are rewritten as

K1=r2+d2+c2l22rd,K21d,K3=Δxr,K4=Δyr.E56

Therefore, the following simplified algebraic expression is deduced:

cosθcosϕ+sinθsinϕ=K1+K2Δxcosϕ+Δysinϕ+K3cosθ+K4sinθ.E57

The trigonometric identity forms sinθ=2tanθ21+tan2θ2and cosθ=1tan2θ21+tan2θ2are substituted into (57) to produce (58),

cosϕ1tan2θ21+tan2θ2+sinϕ2tanθ21+tan2θ2=K1+K2Δxcosϕ+Δysinϕ+K31tan2θ21+tan2θ2+K42tanθ21+tan2θ2E58

and by multiplying both sides of the equality (57) by common denominator 1+tan2θ2and algebraically simplifying:

cosϕcosϕtan2θ2+2sinϕtanθ2=K1+K1tan2θ2+K2Δxcosϕ+Δysinϕ+K2Δxcosϕ+Δysinϕtan2θ2+K3K3tan2θ2+2K4tanθ2.E59

Hereafter, to find a root for θas independent variable, common terms are factorized and Eq. (59) is equated to zero to obtain

tan2θ2K1+K2Δxcosϕ+ΔysinϕK3+cosϕ+tanθ22K42sinϕ+K1+K2Δxcosϕ+Δysinϕ+K3cosϕ=0,E60

in order to reduce expression complexity, the following Definitions are stated:

Definition 4.1[term P]. Let Pbe defined as a Cartesian horizontal decreasing segment by expression:

P=K1+K2Δxcosϕ+ΔysinϕK3+cosϕ.E61

Definition 4.2[term Q]. Let Qbe defined as a Cartesian vertical segment that is expressed by:

Q=2K42sinϕE62

and

Definition 4.3[term P]. Let Rbe defined as a Cartesian horizontal increasing segment by expression:

R=K1+K2Δxcosϕ+Δysinϕ+K3cosϕE63

Therefore, by substituting the terms of Definitions 4.1–4.3 into Eq. (60), the following quadratic form is deduced,

Ptan2θ2+Qtanθ2+R=0.E64

By analytically solving (64), which is a second-degree equation using the general form, a real solution for θis possible, thus

θ=2arctanQ±Q24PR2PE65

chapter PDF

## More

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## How to cite and reference

### Cite this chapter Copy to clipboard

Santiago de J. Favela Ortíz and Edgar A. Martínez García (December 28th 2021). Rolling Biped Polynomial Motion Planning [Online First], IntechOpen, DOI: 10.5772/intechopen.101606. Available from: