A Fall Prediction System for Humanoid Robots Using a Multi-Layer
Perceptron
Matthias Hofmann, Ingmar Schwarz, Oliver Urbann, and Florian Ziegler2
Abstract— In this paper, we estimate the stability of a walking
humanoid robot using an artificial neural network (ANN). This
way, we predict whether a robot will fall down within a short
period. Fall prediction allows for appropriate countermeasures,
e.g. stopping or slowing down the walk. Our experiments show
that the application of the neural network leads to a significant
decrease of falls while minimizing false positives. We use the
NAO robot by Softbank for our research as a low cost robotic
platform.
I. I NTRODUCTION AND R ELATED W ORK
In the area of humanoid robotics, fall prediction has a long
tradition. This is due to the fact that humanoid robots are
mostly expensive and the hardware is susceptible for damage.
The software that controls the robot usually contains a kind
of balance controller that is able to stabilize the robot and
prevents it from falling. With respect to balancing, it uses onboard sensors, for instance the gyroscope, the foot pressure
sensors, or the accelerometers to estimate the stability of
the robot. However, due to external disturbances, unexpected
events, or other failures, falls are inevitable in humanoid
robotics. If a fall can not be avoided by the balance controller,
immediate fall detection is crucial. There is a possibility
to pass the result of the fall detection to a fall controlling
system to prevent the robot from serious damage. To this end,
multiple strategies have been explored, as shown exemplary
in Goswami [1].
For implementing a fall prediction system, there has been
a vast amount of research that uses a wide variety of different
techniques. Thus, Karsen and Wisse utilized a principal
component analysis to implement a fall detection system [2].
Renner and Behnke detect instabilities in omni-directional
walking by modeling the readings of attitude sensors using
sinusoids [3]. Ruiz-del-Solar et al. implemented a virtual
attitude sensor and detected falls with statistical methods
[4]. Goswami and Kalyanakrishnan introduced a system that
combines supervised learning methods to achieve reliable
prediction [5].
Neural networks are generally one of the classic techniques of supervised learning. Early work by Miller [6] as
well as Kun and Miller [7] show that the approach has been
successfully used to balance a biped robot in the past. By
utilizing neural networks, it is also possible to detect typical
patterns, and make predictions about a future state of the
robot or a system. Thus, it is reasonable to apply neural
networks in the area of motion control in robotics.
1 Robotics
Research Institute, TU Dortmund University, Germany
<forname.surname>@tu-dortmund.de
Our approach is specialized on low cost robot platforms
such as the Softbanks NAO robot. To this end, the training
of the neural network is based on log data from the physical
robot. Data collection requires recording the data during a
fall. The NAO robot allows to collect this data since it is
comparatively robust against damages resulting from a fall.
Moreover, our approach allows to analyze the performance
of the fall prediction system on the physical robot. In the
past, there have been a lot of studies that evaluated the
performance of the fall prediction exclusively in simulation.
II. A RTIFICIAL N EURAL N ETWORKS
ANNs are a well-known approach from the area of machine learning that are able to learn previously unknown
correlations from a given set of input data [8], [9]. Given the
input vector X = (X1 , ..., XN ), we predict the output vector
Y = (Y1 , ..., YM ). x1 , ..., xN and y1 , ..., yM are the instances
of those variables, and the tuple (x1 , ..., xN , y1 , ..., yM ) is
called an example. The real world data is described by the
function Y = y(X1 , ..., XN ) that allows us to predict Y .
In practice, there is an error ε 6= 0 since we derive our
predictions from a subset of the real world data. We try to
approximate Y by the function
Ŷ = ŷ(X1 , ..., XN ) = y(X1 , ..., XN ) + ε,
(1)
where |ε| is to be minimized such that Ŷ ≈ Y . Supervised
learning methods get values for the input variables as well
as the expected values for the output variables to learn Y .
This set of input and associated output variables is called the
training set, or the set of known examples.
Our study is a two-class classification problem since we
assume that a robot is either walking stable or unstable.
Hence, we define f (Ŷ ) as a classifier with
(
1 (=
ˆ robot is stable)
: Ŷ ≥ θ,
f (Ŷ ) :=
(2)
0 (=
ˆ robot is unstable) : Ŷ < θ,
where θ is a constant.
To classify one instance of input variables x =
(x1 , ..., xN ), the perceptron calculates a weighted sum of
its components first, added by an additional weight w0 :
ŷANN (x) :=
N
X
wi xi + w0 .
(3)
i=1
The next step is to normalize the resulting value, e.g. by
a sigmoid function sig : R → (0, 1) and we get ŷ(x) =
sig(ŷANN (x)). Learning data with a perceptron means to
optimize its weights between the perceptrons such that its
classification performance will be maximized.
Since one perceptron is able to classify linear separable
data, we need to use a configuration of multiple perceptrons.
This leads to a multilayer perceptron (MLP). A MLP consists
of multiple layers each of which consists of one or more
units. In a three-layer MLP, the individual layers are called
input layer, hidden layer and output layer. The units transiting
from one layer to another, are fully interconnected.
The units of the input layer are represented by the input
variables and an additional value that is always one. The
hidden layer consists of l1 perceptrons. Thus, each hidden
unit has exactly l1 = N + 1 weights. Finally, the output
units are l2 perceptrons where l2 is the number of classes of
the corresponding classification problem. Hence, in our case
l2 = 2. An example of a MLP is shown in Figure 1.
output layer
hidden layer
1
X1
X2
...
XN
by f (y) = f (sig(yANN (x))) according to equation (3)2 . In
our case, we calculate f (yseq ) based on instantiations of
multiple output variables since consider multiple examples.
Let y(tk ), ..., y(tk+N ) be the instantiations of output variables of the example set3 at the times tk , ..., tk+N . For
f (yseq ), we assume that if at least one of the classifications
f (y(tk )), ..., f (y(tk+N )) results into the value 1, we set
f (yseq ) = 1 and otherwise f (yseq ) = 0. Thus, we define
f (yseq ) := f (yseq (y(tk ), ..., y(tk+N ))) :=
(
1 : f (y(tk )) + ... + f (y(tk+N )) ≥ 1,
0 : else.
(4)
Since the computation time of the neural network depends
on the number of input variables, and we use a low cost
robotic platform with limited computational power, we extensively reduce the dimensionality of the data. Hence, we
choose N = 1004 and divide the time series into ten equally
sized and interconnected regions. The individual arithmetic
means of the elements of these regions are used as input
variables. This results into a new filtered time series of ten
elements. In Figure 2, it is cognizable that choosing a time
series of length 100 is a reasonable approach. The plot of
the gyroscope variable over time reveals the characteristics
of a fall down.
input layer
0.5
Fig. 1: An exemplary three-layer MLP with input X =
(X1 , ..., XN ).
0.0
-0.5
III. FALL P REDICTION
-1.0
A. Input Data
The input data for our analysis consists of a time series
of recorded sensor data from the NAO robot. We exclusively
utilize the gyroscope1 values of the x- and y-axis.
Let xi (tk ) be the value of the sensor data variable Xi
recorded at time tk , where i ∈ {1, ..., N }, and k ∈ N. tk is
the number of frames passed before xi (tk ) was recorded.
With this definition, we set the input vector to xseq :=
(xi (tk ), ..., xi (tk+N )), and Xseq := (Xi (tk ), ..., Xi (tk+N ))
as the input vector for sequenced data. If the temporal
distance is ∆t = tk+1 − tk = 1, we use an input variable
for each frame between tk and tk+N . While not changing
the number of input variables, we sample a larger interval
by increasing ∆t. This way, we can take temporal data into
account. Because we make use of an MLP, it is not possible
to use cycles between the units.
Let Yseq be the output variable and yseq its instantiation. We
further have to define the classification function for f (Yseq ).
To this end, we calculate each y of the training data set
1 During the study, the gyroscope values turned out as most promising and
representative for determining the stability of the NAO robot. Experiments
with accelerometers have been conducted, but did not lead to beneficial
results.
-1.5
18200
18300
18400
18500
18600
18700
Fig. 2: An example of the gyroscope values before the
robot falls down. The x-axes shows the frames and the yaxis the corresponding gyroscope value. The local maxima
(minima) become higher (lower) just before falling which
is represented by the rapidly declining curve. For stability
detection, the interval between 18500 and 18600 (with the
highest local maximum) suffices for predicting a fall.
One drawback of this method is that we have to focus
on one type of sensor data for one MLP. It is possible to
overcome this drawback by combining multiple MLPs using
different sensor data variables. In practice, we show that we
exclusively need the gyroscope value for the y-axis to obtain
satisfying results (see chapter II).
2 This
approach can be used if non-sequenced data is taken into account.
a non-sequenced case
4 This additionally corresponds to the fact that the motion of the NAO
robot can be controlled at the frame rate of 100Hz.
3 for
B. Training Phase
We train the MLP being used for the fall prediction system
with RapidMiner Studio 6.45 . RapidMiner offers a variety of
machine learning methods like MLPs, and support vector
machines (SVMs). Moreover, it is possible to export the
trained model, and evaluate the results on the physical robot.
We use the following parameters to customize the training
process of the MLP (we utilize the values in brackets for our
study):
• Training cycles: Specifies the number of iterations for
training the MLP (1500).
• Learning rate: Sets the magnitude with which the
weights will be changed (0.2).
• Momentum: Adds a fraction of the previous weight
update to the current one. This avoids getting stuck at
local maxima (0.2).
• Decay: A boolean value that decreases the learning rate
over time, iff set to true (’false’).
We recorded the required log data by letting the NAO robot
walk straight forward. For this purpose, we deliberately used
walking parameters that lead to an unstable walk. This way,
the robot often falls down without intervention. Moreover,
we recorded data by using walking parameters that yield to
stable walking and combined the two data sets.
In a two-class classification problem the precision is the
number of correct classifications (as true or false) in relation
to all examples, while the recall is the number of correct
classifications (as true or false) divided by those examples
that should be classified as true resp. false. In the case of
using sequenced data for training the network, we got the
results shown in Table I.
TABLE I: Confusion matrix for evaluation of the learning
process using the mean of ten equally sized and connected
regions taken from a time series consisting of 100 gyroscope
values (for the y-axes), and α = 100.
pred. false
pred. true
class recall
actual false
actual true
class precision
21972
20959
51.18%
3073
185244
98.37%
87.73%
89.84%
It is cognizable that the recall is fair. The reasons are the
increased α value, and that we set f (yseq ) = 1, iff at least one
of the classifications f (y(tk )), ..., f (y(tk+N )) would result
in the value 1 (as explained in section III). The recall will
decrease for a greater value of N such that a robot will more
often be classified as stable, even if it is not.
which the robot was walking straight forward on the field.
If it was not able to walk any further (which means that he
has reached a wall), we turned it around such that it could
continue walking. Whenever it fell down, we picked it up
immediately. Then we counted the number of falls and stops
as a response to the neural network.
In our experiments, we used different realizations of θ (the
threshold of the network) and β (the memory of the network)
for training the MLP. The experiments were carried out for
an unstable walking robot. Each experiment was carried out
three times.
B. Results
The results of the experiments are shown in Table II. The
results depicted in the subtables have been created by using
different parameter configurations for the MLP, i.e. θ and β.
The configuration θ = 0.0075 and β = 0.667 leads to an
MLP that is more sensible in detecting instabilities than for
θ = 0.005 and β = 0.9. In the first experiment, shown in
Table II(a), most of the falls were detected. However, the
number of predictions is significantly larger compared to the
falls shown in Table II(c) (where the neural network is not
active). This strongly suggests the conclusion of a significant
number of false positives. A false positives in this case means
that the MLP predicted a fall, but the robot would probably
not have fallen down.
It is noteworthy that in the experiments shown in Table
II(b), a large number of falls and predictions occurred. This
means that there is a considerable variance in the number of
falls. It is notable that the robot can even be unstable without
falling down. Those events would probably be detected by
the neural network but not shown in the statistics in Table
II(c) where the network is deactivated. From the results
shown in Table II(b) we could conclude that we have less
false positives at the cost of more undetected falls.
The experiments show that with θ = 0.005 and β = 0.9
most of the falls could be predicted while having (probably)
a small number of false positives.
TABLE II: Results for the three different setups in which
the number of falls and the number of fall predictions are
cumulated.
(a) Threshold of 0.0075 and memory of 0.667.
# falls
# predictions
The purpose of the experiments is to show that the usage of
our intelligent fall prediction system indeed prevents robots
from falling, i.e. gives us time advantages to react properly.
The duration of each experiment was set to five minutes in
5 https://rapidminer.com/
2
3
total
mean
3
35
4
33
2
36
9
104
3.000
34.667
(b) Threshold of 0.005 and memory of 0.9.
IV. E VALUATION
A. Experimental setup
1
# falls
# predictions
1
2
3
total
mean
5
30
10
25
4
28
19
83
6.334
27.667
(c) Neural net deactivated.
# falls
1
2
3
total
mean
30
30
26
86
28.667
V. C ONCLUSION AND F UTURE W ORK
This work presented a fall protection system based on a
MLP neural network. Using a time series of gyroscope values
as the input for the MLP, the results of the classification are
promising.
For future work, we plan to improve the quality of the
system by following means: First, we will record more
training data from multiple NAO robots since the robots
slightly differ from each other due to variations in the
production process of the robots. Second, we will conduct
extensive parameter studies during the training phase, and
structural design of the neural network. The latter refers to
the threshold θ and the memory β. Third, studies on the
design of the input values will be proceeded, i.e. different
methods for representing time series will be evaluated.
Another promising approach is to use multiple neural
networks that operate on different input values in parallel.
This could lead to a significant decrease of false positives,
and an improved reliability of the prediction. Moreover, we
plan to implement a fall protection system to an online
algorithm, i.e. constantly updates the model.
R EFERENCES
[1] A. Goswami, S.-k. Yun, U. Nagarajan, S.-H. Lee, K. Yin, and
S. Kalyanakrishnan, “Direction-changing fall control of humanoid
robots: theory and experiments,” Autonomous Robots, vol. 36, no. 3,
pp. 199–223, 2014. [Online]. Available: http://dx.doi.org/10.1007/
s10514-013-9343-2
[2] J. G. D. Karssen and M. Wisse, “Fall detection in walking robots
by multi-way principal component analysis,” Robotica, vol. 27, pp.
249–257, 3 2009. [Online]. Available: http://journals.cambridge.org/
article S0263574708004645
[3] R. Renner and S. Behnke, “Instability detection and fall avoidance for
a humanoid using attitude sensors and reflexes,” in 2006 IEEE/RSJ
International Conference on Intelligent Robots and Systems, Oct 2006,
pp. 2967–2973.
[4] J. R. del Solar, J. Moya, and I. Parra-Tsunekawa, “Fall detection and
management in biped humanoid robots,” in Robotics and Automation
(ICRA), 2010 IEEE International Conference on, May 2010, pp. 3323–
3328.
[5] S. KALYANAKRISHNAN and A. GOSWAMI, “Learning to predict
humanoid fall,” International Journal of Humanoid Robotics,
vol. 08, no. 02, pp. 245–273, 2011. [Online]. Available:
http://www.worldscientific.com/doi/abs/10.1142/S0219843611002496
[6] W. T. Miller, “Real-time neural network control of a biped walking
robot,” IEEE Control Systems, vol. 14, no. 1, pp. 41–48, Feb 1994.
[7] A. Kun and W. T. Miller, “Adaptive dynamic balance of a biped
robot using neural networks,” in Robotics and Automation, 1996.
Proceedings., 1996 IEEE International Conference on, vol. 1, Apr 1996,
pp. 240–245 vol.1.
[8] E. Alpaydin, Introduction to Machine Learning, 2nd ed. Cambridge,
Massachusetts: The MIT Press, 2010.
[9] T. M. Mitchel, Machine Learning. New York: McGraw-Hill, 1997.
© Copyright 2026 Paperzz