Abstract

It has been shown that max-plus linear systems are well suited for applications in synchronization and scheduling, such as the generation of train timetables, manufacturing, or traffic. In this paper we show that the same is true for multi-legged locomotion. In this framework, the max-plus eigenvalue of the system matrix represents the total cycle time, whereas the max-plus eigenvector dictates the steady-state behavior. Uniqueness of the eigenstructure also indicates uniqueness of the resulting behavior. For the particular case of legged locomotion, the movement of each leg is abstracted to two-state circuits: swing and stance (leg in flight and on the ground, respectively). The generation of a gait (a manner of walking) for a multi-legged robot is then achieved by synchronizing the multiple discrete-event cycles via the max-plus framework. By construction, different gaits and gait parameters can be safely interleaved by using different system matrices. In this paper we address both the transient and steady-state behavior for a class of gaits by presenting closed-form expressions for the max-plus eigenvalue and max-plus eigenvector of the system matrix and the coupling time. The significance of this result is in showing guaranteed stable gaits and gait switching, and also a systematic methodology for synthesizing controllers that allow for legged robots to change rhythms fast.

Given the previous result, it is sufficient to show that if λ and υ are a max-plus eigenvalue and eigenvector of A respectively, then replacing the state variable x(k−1) by υ and x(k) by λ⊗υ in Eq. 25 holds true:

i) First we analyze the row indices of Eq. 50 that are elements of the sets \(\ell _{2},\dots ,\ell {m}\). For each \(j\in \{1,\dots ,m-1\}\) and for each row p∈ℓj+1 we obtain (notice that according to Eq. 23) all the elements of \(\left [Q_{0}\right ]_{p,\cdot }\) are ε since p∉ℓ1, and that \(\left [\bar {\upsilon }\right ]_{p}=\tau _{\delta }^{\otimes j}\) for p∈ℓj+1):

ii) We now look at all the remaining rows p such that p∈ℓ1 (noticing now that according to (22) all the elements of \(\left [P_{0}\right ]_{p,\cdot }\) are ε and that \(\left [\bar {\upsilon }\right ]_{p}= e\) since p∈ℓ1):

A.4 Proof of lemma 4

Proof

The sub-matrices A12, A22, A32, A42, A21 defined in Appendix B expressions (95) and 94 have all their elements different from ε. The sub-matrix A23 has all diagonal elements different from ε. As such, any node can be reached by any other node via the rows defined by A12, A22, A32, A42 and the columns defined by A21, A22, A23. Therefore \(\bar {A}\) is irreducible. Since A is a similarity transformation away from \(\bar {A}\) then we conclude that A is also irreducible. □

A.5 Proof of of lemma 5

Proof

We consider two cases: i) \(\tau _{\gamma } = \tau _{\delta }^{\otimes m}=\uplambda \). In this situation the circuits presented in Figs. 8a1 and 8a2 in page 41 all belong to the critical graph since their weights are τγ or \(\tau _{\delta }^{\otimes m}\) both equal to the max-plus eigenvalue λ. Note that any circuit c1 of length l made from the nodes of \(t_{\ell _{m}}\), illustrated in Fig. 8a1 in page 41, has an average weight of

Graph reductions. Touchdown and lift off events with indexes belonging to the same set ℓq can be grouped together since they have the same number of output and input arcs with the same weights

Any other circuit in the precedence graph of \(\bar {A}\) must pass through at least one node of tℓm, as illustrated in Figs. 9b, c1, and c2 (with the exception of the self-loops in Fig. 8a3 and the circuits in Fig. 8a4 that we don’t consider since their weights are e and τγ/2 both less then λ). Additionally, arcs starting in nodes from a group tℓq with q < m are only connected to nodes in tℓq+p for p≥0 (or lℓq+p). This is again illustrated in Figs. 9a, c1, and c2. Let t[ℓq]i denote element i of tℓq. Consider the circuit

Elements of the precedence graph of the system matrix A. The total precedence graph of A is composed of all the arcs presented in a) and b), together with the m−1 remaining subgraphs that follow the pattern of Figures c1) and c2)

Circuit c2 is thus also in the critical graph. For the general circuit of the type

Again, circuit c3 is part of the critical graph. Any circuit that passes through any node in lℓq, for any q, will never be in the critical graph. This is due to the fact that arcs within touchdown nodes of different leg groups yield a higher weight:

As such, a path that connects a touchdown node to a lift off node “loses” τγ − τg = τf from the maximum possible weight, a path from lift off to lift off nodes loses τγ, and a path from lift off nodes to touchdown nodes loses τg in weight. This can also be observed in the structure of \(\bar {A}\), in Eq. 92, where the sub-matrix τf⊗(τg⊗W⊕V) overcomes the sub-matrices τg⊗W⊕V, τf⊗W, and W. Consider, for example, the circuit c4:

Since all the nodes in the critical graph are connected (they are all touchdown nodes) we conclude that for the case \(\tau _{\gamma }=\tau _{\delta }^{\otimes m}=\uplambda \) the critical graph of \(\bar {A}\) has a single strongly connected subgraph. Figure 5a in page 25 illustrates the complete critical graph of \(\bar {A}\) for this case.

ii) \(\tau _{\gamma } < \tau _{\delta }^{\otimes m}=\uplambda \). In this situation only circuits of the type c1 are part of the critical graph. Circuits of the type c2 or c3 are not part of the critical graph. Figure 5b illustrates the resulting critical graph of \(\bar {A}\). Since all the nodes of tℓm are connected to each other we conclude that for the case \(\tau _{\gamma }<\tau _{\delta }^{\otimes m}=\lambda \) the critical graph of \(\bar {A}\) has a single strongly connected subgraph.

A third case can be considered: \(\tau _{\delta }^{\otimes m}< \tau _{\gamma }=\uplambda \). In this situation the critical graph of \(\bar {A}\) does not have a single strongly connected subgraph. Figure 5c illustrates this situation, that we document here without proof. □

A.6 Proof of theorem 3

Proof

According to Lemma 4 Matrix A is irreducible, and as such it has a unique max-plus eigenvalue. According to Lemma 5 the critical graph of \(\mathcal {G}^{c}(A)\) has a single strongly connected subgraph, and as such its max-plus eigenvector is unique up to a max-plus scaling factor (see Baccelli et al. (1992), Theorem 3.101). □

A.7 Proof of lemma 6

Proof

Computing successive products of \(\bar {A}\) and taking advantage of its structure, which can be found in Appendix B, and Eqs. 83–85 one can write its p-th power \(\bar {A}^{\otimes p}\), valid for all p ≥ 2, illustrated by Eqs. 72 and 74.

By inspection of the expression of \(\bar {A}^{\otimes p}\) in Eqs. 72–74 one can observe that most terms are max-plus multiplying by a power of the max-plus eigenvalue λ (recall that with assumption A2 we have \(\uplambda = \tau _{\delta }^{\otimes m}\)). To factor out λ of the matrix composed by expressions Eqs. 72 and 74 we show that

Taking advantage of this simplification one can obtain Eqs. 73, 75, and 77–79 (with ⊗ omitted in unambiguous locations). Together with the similarity transformation we obtain the result valid for p ≥ 2:

Transforming an arbitrary gait into a normal gait is very useful since, by effectively switching rows and columns in A, one obtains a very structured matrix \(\bar {A}\) for which a structural analysis is much easier. The interpretation of the similarity matrix \(\bar {C}\) is that legs can be renumbered, simplifying algebraic manipulation. Besides max-plus nilpotency, other properties are invariant to similarity transformations: irreducibility is preserved since the graphs of A and \(\bar {A}\) are equivalent up to a label renaming. Max-plus eigenvalues and eigenvectors are related by:

The structure of \(\bar {A}\) can be obtained via a laborious but straightforward set of algebraic manipulations. For an arbitrary gait G we compute the normal gait \(\bar {\mathrm {G}}\) via the similarity transformation with the matrix C. By observing the structures of \(\bar {A}_{0}^{*}\) and \(\bar {A}_{1}\) (derived from \(\bar {P}\) and \(\bar {Q}\)) a closed-form solution can be obtained for \(\bar {A}_{0}^{*}\):

where W=(τf⊗P)∗, illustrated in Eq. 88 on page 37. The matrix \(\bar {W}\) is defined in Eq. 87 again on page 37. Note that \(\tau _{\mathrm {f}}\otimes \bar {W}\oplus E=W\) and \(W \geq \bar {W}\). An expression for \(\bar {A}\) is then obtained:

Equations 90–93 illustrate the resulting structure of \(\bar {A}\) written in the system form \(\bar {x}(k)=\bar {A}\otimes \bar {x}(k-1)\), with \(\bar {x}(k)=C\otimes x(k)\), and \(\bar {E}_{i}=E_{\#\ell _{i}}\).

C Precedence Graph of \(\bar {A}\)

With the structure given it is possible to construct the precedence graph of \(\bar {A}\). Since this graph can be quite large for a general \(\bar {A}\), we find it more efficient to first group “similar” nodes into a single node, i.e. apply a procedure called node reduction (Fig. 8 in page 41). Next, we show various subgraphs of the graph of \(\bar {A}\) to better illustrate its structure (Fig. 9 in page 42). The total precedence graph of \(\bar {A}\) is thus the combination of Figs. 8 and 9.

The process of constructing the graph of \(\bar {A}\) starts by grouping all nodes of an event associated with a group of legs ℓi into a single node. This can be accomplished since event nodes from the same group of legs ℓi have “similar” incoming and outgoing arcs. As an example, consider the first set of #ℓ1 rows of \(\bar {A}\) as defined in expression (89):

The precedence graph for Eq. 96 consists of 3×#ℓ1 nodes, since it involves the vectors \(t_{\ell _{1}}\), \(t_{\ell _{m}}\), and \(l_{\ell _{1}}\). The relation between \(t_{\ell _{1}}(k)\) and \(t_{\ell _{1}}(k-1)\) results in #ℓ1 self connected arcs in the tℓ1 events with weights τγ. Instead of expressing all elements of \(t_{\ell _{1}}\) as individual nodes with self arcs, we reduce then to a single node with one self arc, as seen in Fig. 8a2. The dashed attribute used on the self arc indicates that for each node in the group only self arcs exist, as expressed by the “connecting” matrix E1. The relation between \(t_{\ell _{1}}(k)\) and \(t_{\ell _{m}}(k-1)\) is somewhat more involved, since it contains #ℓ1×#ℓm arcs, as expressed by the connecting matrix 𝟙1,m. The resulting node reduction is illustrated in Fig. 8b1. The node reduction for the relation between \(t_{\ell _{1}}\) and \(l_{\ell _{1}}\) is illustrated in Fig. 8a4. Again we use dashed attributes on the arcs to represent the connecting matrix E1. For all other relations with connecting matrices 𝟙 we use solid arcs. We make an exception in Figs. 8-c1 to c4 where different line attributes are used to distinguish arcs from \(t_{\ell _{p}}\to t_{\ell _{q}}\), \(t_{\ell _{p}}\to l_{\ell _{q}}\), etc. The same line attributes are used in Figs. 9c1 and c2. Note that multiple incoming arcs to a node are related via the ⊕ operation, e.g. as in the example Eq. 96 the node \(t_{\ell _{1}}\) has 3 incoming arcs, illustrated in Fig. 9.

Figure 8a2 illustrates the node reduction of the block diagonal of matrix A11 and the \(\tau _{\gamma }\otimes \bar {E}_{m}\) term of A22.

Figure 8a3 illustrates the node reduction of the block diagonal of matrix \([A_{33}^{T}~~A_{43}^{T}]^{T}\).

Figure 8a4 illustrates the node reduction of the term τg⊗Em of sub-matrix A42 together with the block diagonals of matrices A31 and \([A_{13}^{T}~~A_{23}^{T}]^{T}\).

Figures 8b1 and b2 illustrate the node reduction for the columns formed by the matrices (not including the term τg⊗Em from matrix A42 already represented in Fig. 8a4) A12 and \([A_{32}^{T}~~A_{42}^{T}]^{T}\) respectively.

Figures. 8c1 to c4 illustrate the node reduction of the off-diagonal elements of matrices τγ⊗W, τf⊗W, τg⊗W, and W, from expression (92) respectively. Given the node reduction one can now proceed to construct the precedence graph of \(\bar {A}\):

Figure 9a is the graph of the block diagonal of \(\bar {A}\) together with the block diagonals of the sub-matrices \(\left [\begin {array}{cc}A_{31}&A_{32}\\A_{41}&A_{42}\end {array}\right ]\) and \(\left [A_{13}^{T}~~A_{23}^{T}\right ]^{T}\) using the node reductions presented in Figs. 8a1 to a4.

Figure 9b is the graph of the columns formed by the matrices A12 and \(\left [A_{32}^{T}~~A_{42}^{T}\right ]^{T}\) using node reductions presented in Figs. 8b1 and b2.

Figures 9c1 and c2 illustrate two subgraphs of the remaining columns of \(\bar {A}\). Note that we only present the subgraphs of the first sets of #ℓ1 and #ℓ2 out of a total of m−1 columns. These follow the same pattern. We use different attributes on the arcs, such as dashed, thick solid, etc., to distinguish the different node reductions, as presented in Figs. 8c1 to c4.