**Linear Stability Analysis: **Learn more about the tool we used to find the shape and motion of the paddle that make sure the ball does not fall off.

**Linear vs. Nonlinear Systems: **Learn more about the differences between linear systems and nonlinear systems. In engineering, we often analyze systems by approximating them with linear systems, because they are straightforward to analyze. However, most physical systems are nonlinear, which are less straightforward to analyze and that have some amazing properties.

**Controllability: **Learn more about the concept of controllability, which can be used to find out if a robot can be controlled to do what we want or not. This concept is an important aspect of the research with the Cloverleaf Blind Juggler.

Stability

How do you build a robot that can juggle a ball without sensing? In a perfect world, it would not be hard to build: the robot would strike the ball with perfect motion and timing, the ball would be perfectly round, and it would bounce along an ideal path to exactly the same height each time.

The world is not perfect, however. Balls that appear round to the eye are actually covered with tiny manufacturing defects, and even the most accurate mechanisms cannot repeat the same motion twice. The result of this imperfect world is that balls do not bounce along a perfect path – they spin, they bounce too high, too low or sideways. In other words, they deviate.

##### Dealing with Deviations

Because the Blind Juggler has no cameras, no microphones or any other sensor to measure the deviations, it cannot actively correct the trajectory of the ball. We must therefor design the robot such that it automatically compensates for the deviations. For example, if the ball bounces up too high, the design has to force the ball to bounce lower again. The goal of the mathematical analysis is to find such a design.

##### Designing a Stable System

In technical terms, a system that automatically compensates for deviations is called a stable system. We have two parameters at our disposal to stabilize the juggling system: 1) the motion and 2) the shape of the paddle. The goal of the mathematical analysis is to find a stabilizing pair of parameters.

The principle of the analysis is simple: After calculating the ideal trajectory of the ball, we add small deviations to the ideal trajectory. For example, we assume the ball starts off a bit too high, and with some small horizontal velocity. We then use the physical laws of free fall and impact to model how these deviations develop over a series of bounces. If the deviations become smaller with each successive bounce, the system is stable. We therefor search a range of motions and shapes that result in deviations that become smaller over time.

##### Designing a Stable System

In technical terms, a system that automatically compensates for deviations is called a stable system. We have two parameters at our disposal to stabilize the juggling system: 1) the motion and 2) the shape of the paddle. The goal of the mathematical analysis is to find a stabilizing pair of parameters.

The principle of the analysis is simple: After calculating the ideal trajectory of the ball, we add small deviations to the ideal trajectory. For example, we assume the ball starts off a bit too high, and with some small horizontal velocity. We then use the physical laws of free fall and impact to model how these deviations develop over a series of bounces. If the deviations become smaller with each successive bounce, the system is stable. We therefor search a range of motions and shapes that result in deviations that become smaller over time.

##### The Key Parameters

**The Motion**: The analysis shows that the paddle must decelerate as it strikes the ball. We can intuitively understand why this makes sense: If the ball bounces too high, it takes longer to return to the paddle; since the paddle is slowing down, the paddle has a lower speed at impact and consequently, the ball bounces less high. The opposite is also true: when the ball is too low, it hits the paddle earlier the next time, so the ball is struck harder and the ball reaches a higher apex again. Therefore, the motion of the paddle forces the ball to maintain a consistent height (Click on the illustration to the right to see a sketch of all those cases). On the hardware page, you will find experimental results showing that the ball’s apex height is indeed very consistent.

**The Shape**: We find that the ball’s trajectory is stabilized in the horizontal directions by a slightly concave paddle shape. The slight curvature of the paddle keeps the ball in the paddle’s center and prevents the ball from falling off. This is shown in the illustration to the right: The further the ball hits the paddle away from the center, the stronger the ball is pushed inwards again. We find in our analysis that the flatter the plate, the higher we should be able to juggle. We manufactured two paddles: one is a bit flatter than the other one. The prediction our mathematical model makes is indeed true: with first paddle, we can juggle up to about 1.4 meters before the ball falls off; with the second flatter paddle we can go up to 2.0 meters (see video pagefor a video demonstrating this).

##### Mathematical Background

*dynamics*of the deviations. The basic idea of the analysis is quite intuitive when we analyze the following dynamics:

Let be the impact location deviation of the ball on the paddle, or, how far the impact occurs from the paddle center. In the ideal case, this deviation is zero. The parameter is some number and the index denotes the number of the impact. The above equation therefore reads: The impact location at impact is times the impact location at impact . Basically, describes how the impact location changes between two impacts.

Now we can think about what this number has to be such that the ball does not fall off the paddle. Let’s assume that is 2, and that we start with a first impact location of . The sequence of impact locations is then

The impact location doubles at every impact, and will get larger and larger. The system is unstable, and the ball will fall off. On the other hand, if we get

The impact locations get smaller and smaller – the system is stable. The same applies to negative values of : as long as is not smaller than , the system is stable. We can therefor conclude that must be in the range

Nonlinear Systems

An excellent book, which covers the material discussed here in greater detail, is *Steven Strogatz’s “Nonlinear Dynamics and Chaos”*.

##### Linear Systems

The linear dynamics we consider on the stability section are

.

Think of as a number describing the dynamical system we analyze (in technical terms, it is called the *state* of the system). For the Blind Juggler, could be the impact location of the ball on the paddle. The index counts the number of impacts, and is some number, for example .

The equation then reads: “The impact location at impact is times the location at impact ”. It describes how the impact location changes between two consecutive impacts.

Let’s analyze the linear dynamics in more detail. First, we find values of for which a sequence remains constant. That means for all , the value of does not change. We find that the only that fulfills the equation is . This specific point where the remains constant is called a fixed point of the system. We can also find this point plotting the equation on a graph. Below, we show the linear system dynamics for a range of values of

On the lower axis, the impact location at the -th impact is shown. We can look up what the next impact location is by finding the value of a colored line on the left, vertical axis. Each color corresponds to a different and describes a different dynamical system. The blue line, for example, corresponds to the equation . The thin black line is where . We can use this line to find the fixed point, which is where the black line intersects with the colored line. The intersection is clearly at for all .

We can also use the black line to visualize how the system evolves over time. Let’s see how that works out for the green system dynamics, where . We start with and find the point on the green line for which . This point is also marked in the figure with . To find the next value of , we draw a horizontal arrow from the point to the black line, and then add a vertical arrow back to the green line. That gets us to . Doing this over and over again, we realize that we will approach , the fixed point of the system. This is because the fixed point 0 is *stable* for , since is smaller than one. We discuss this fact in more detail at the end of the stability analysis.

As an aside: set , and the line describing the system dynamics *coincides *with the black line. Therefore, any is a fixed point and therefore the system has an infinite number of fixed points.

##### Nonlinear Systems

Linear systems are quite straightforward to analyze. To find the fixed point, we need only find the intersection of two straight lines, and we can immediately tell if the fixed point is stable or not by inspecting the parameter . We will see in a second that this is not straightforward for a nonlinear system.

As an example, we analyze one of the most famous nonlinear systems, the *logistic map.* The logistic map can model population growth in biology. You may read more about it here.The system dynamics are

These dynamics do not look that much more complicated, but they can get very interesting depending on the number you choose for . The system is quite straightforward to analyze with the graphical method:

We show the system dynamics for two different values of . The red system has a fixed point at , and we find that this fixed point is stable for any starting value we pick in the interval from 0 to 1. The green curve is where things get interesting: If we check the curve for intersections with the black line, we realize that the green system has two fixed points. It intersects at and . Nonlinear systems can have multiple fixed points. The system evolution for the green system, starting at the same value as the red system, shows that the value quickly gets close to the fixed point at 0.6, and then starts spiraling in to the fixed point. Let’s have a closer look at this spiraling:

We see that the red dashed line is actually a pretty good fit to the green line. Therefore, the linear dynamics described by the dashed line are a good approximation to the green, nonlinear system dynamics. For small deviations of from the fixed point, it is almost perfect. This is exactly how we can analyze the stability of a fixed point of a nonlinear system when deviations are small: We approximate the nonlinear dynamics by linear dynamics, and then analyze these dynamics. This process is called *linearization*. This is what we did to analyze the stability of the ball motions: We linearized the nonlinear dynamics of the impact locations, assuming the impact locations are small, and then analyzed the resulting linear system dynamics for stability.

Back to the example, we find that the approximated system (red, dashed) has the dynamics

.

Since -0.5 is not smaller than -1, the linear, approximated dynamics are stable (see the stability page why larger than -1 is key). Immediately, we also see why the fixed point at 0 of the green system is unstable: The green line is well above the black line. The black line corresponds to linear system dynamics with , where stable linear systems turn unstable. Therefore, we see that the linearized green system at the 0 fixed point has an that is larger than 1, which indicates that this fixed point is unstable.

##### Periodic Orbits

Now things get even more interesting. We set , and analyze the resulting dynamics:

There are still two fixed points. However, it turns out that if you check their linearized dynamics, both fixed points are unstable. However, we can find another kind of stable system behavior: If we start the system at , switches back and forth between 0.8 and 0.51. These two values represent a *periodic orbit* of the system. We write the following equation for this orbit:

.

The value of repeats every other on this orbit. Therefore, the *period *of this orbit is two (fixed points are a special class of periodic orbits with period one). Lastly, we find that this periodic orbit is stable: If we start the system close to the orbit, it will converge to the orbit, just like with the stable fixed points earlier.

With the Blind Juggler, we can also find multiple stable periodic orbits.

##### Bifurcation Diagram

The behavior of the nonlinear system changes dramatically when we change the parameter , very much in contrast to the linear system dynamics, where the parameter just determines stability of the single fixed point at zero. The changing system dynamics may well be captured with a *Bifurcation Diagram. *Basically, we plot all the values of that lie on a stable orbit for a given system parameter . We obtain the following figure (taken from Wikipedia, click for large version):

For every , we search the values of that are part of a *stable *periodic orbit of the system. Then, we mark all these points with a black dot. For example, recall the dynamics for , we found a single stable fixed point at . Now check the above figure: If you go up from the location on the bottom axis where , you will hit the black line exactly at . That means that if we increase from 2.4 to 2.8, the fixed point also increases, from slightly below 0.6 to about 0.65.

You can also see that strange things begin to happen as gets larger. Between 2.4 and 3.0, things are not yet very special; there is only a single stable fixed point. At about 3.0, the fixed point turns into a stable periodic orbit of period two (if you look at the shape of the curve there, it is also clear why this phenomenon is called a *bifurcation*). At about 3.45, the stable periodic orbit of period two turns into a four-periodic orbit. Further along, we find an 8 period orbit, then 16, and so on, until at about 3.6, the system goes completely bananas: it is now *chaotic.*

##### Chaos

A chaotic system has two key properties:

### 1) Local Instability

The system is *locally *unstable: If you start the system from two values that are very close to each other, that small difference is amplified and the system quickly evolves very differently for the two starting values (this is illustrated below).

The figure shows the system evolution of the logistic map (a = 3.7) for two starting values that are very close to each other. The blue starting value is just one percent larger than the red starting value, but the system quickly evolves very differently.

### 2) Strange Attractor

While the system is locally unstable, the system state does not get arbitrarily large, and remains near a specific set of values called the *strange attractor*. In the Bifurcation Diagram above, you see that for … MISSING TEXT

Controllability is an important concept in dynamical system theory. For complicated systems with many degrees of freedom and many different control parameters, controllability analysis can tell us whether a system can be controlled to arbitrary configurations from any initial configuration by applying a sequence of control actions. Roughly speaking, the analysis tells us if we have enough ways to influence the system to make it do what we want it to do.

This concept is best explained with a simple toy example. Consider a coin on a plate. The number describes whether the coin is heads up () or tails up (). In dynamical system theory, is called the *state* of the system. We can pick up the coin and turn it to the other side, which is the control parameter we may choose. We can describe the system in the same way as we do in the stability analysis and nonlinear systems introduction. The *dynamics* of the system are

At time , we can decide whether to turn the coin over or not. Not turning the coin at time means we choose the control action to be . This implies that , and the coin remains unchanged. If we choose , the coin is turned over. For example, the coin is tails up, , and we choose . We get . The coin is now heads up. In order for the math to make sense, we define that is reset to , which is the case when we turn the coin from heads to tails: and . This system is *controllable. *No matter what side of the coin is facing up, we can simply turn it to the side we wish to be facing up. We can now introduce a system that is similar to juggling multiple balls on a single paddle. Consider two coins on a plate that we can only turn over *together*. The dynamics are

describes the state of the first coin at time and the state of the second coin. If we choose the control action , we flip both coins *together. T*he system is *uncontrollable:* If the coins start with the same side up, we cannot control them to one coin being heads up and the other tails up, no matter what sequence of control actions we apply.

Let’s assume we could also choose an additional control action: a simultaneous toss of both coins with a *random* outcome. If we apply this control, each coin may land face up or tails up with 50% probability each. Now the system is *controllable* in a *stochastic* (*random*) sense. Suppose the coins are both face up, and we want to get them to show different sides up. We simply apply the coin toss control action until the coins show different sides. This is a similar strategy to what we use to control multiple balls on the Cloverleaf Blind Juggler into a desired juggling pattern, about which you may read more here.

**Figure 1**

Long exposure shot of first prototype juggling a table tennis ball.

**The Motion**

Illustration of vertical stability (click to enlarge).

**The Shape**

Illustration of horizontal stability trough paddle shape.

Impact location data, juggling height 1.05m, 5789 impacts.

Histogram and fitted Gaussian Distribution to apex height deviation data. Juggling height 1.05m, 1079 measurements.