%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Trim Size: 9.75in x 6.5in
%% Text Area: 8in (include Runningheads) x 5in
%% ws-ijhr.tex   :  9-5-2005 
%% Tex file to use with ws-ijhr.cls written in Latex2E.
%% The content, structure, format and layout of this style file is the
%% property of World Scientific Publishing Co. Pte. Ltd.
%% Copyright 1995, 2003 by World Scientific Publishing Co.
%% All rights are reserved.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%

%%%%%%%%%%%%% FOR TEMPLATE OF TYPING OUT THE BIBLIOGRAPHY TEXT ONLY %%%%%%%%
\newcounter{myctr}
\def\myitem{\refstepcounter{myctr}\bibfont\parindent0pt\hangindent13pt\themyctr.\enskip}
\def\myhead#1{\vskip10pt\noindent{\bibfont #1:}\vskip4pt}
%%%%%%%%%%%%% FOR TEMPLATE OF TYPING OUT THE BIBLIOGRAPHY TEXT ONLY %%%%%%%%

\documentclass{ws-ijhr}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\begin{document}

\markboth{Luís Almeida, Vítor Santos and João Ferreira}{Learning-based analysis of a new wearable 3D force system data to classify the underlying surface of a walking robot}

%%%%%%%%%%%%%%%%%%%%% Publisher's Area please ignore %%%%%%%%%%%%%%%
%
\catchline{}{}{}{}{}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Learning-based Analysis of a New Wearable 3D Force System Data to Classify the Underlying Surface of a Walking Robot}

\author{Luís Almeida}

\address{ Institute of Electronics and Informatics Engineering of Aveiro (IEETA),\\ University of Aveiro, Portugal\\
luis93.pa@gmail.com}

\author{Vítor Santos}

\address{Institute of Electronics and Informatics Engineering of Aveiro (IEETA),\\
Dept. of Mechanical Engineering, University of Aveiro, Portugal\\
vitor@ua.pt}

\author{João Ferreira}

\address{Institute of Systems and Robotics (ISR),\\
Dept. of Electrical Engineering, Superior Institute of Engineering of Coimbra, Portugal\\
ferreira@isec.pt}


\maketitle

\begin{history}
\received{Day Month Year} %
\revised{Day Month Year}  %
\accepted{Day Month Year} %
%\comby{(xxxxxxxxxx)}
\end{history}

\begin{abstract}
Biped humanoid robots that operate in real world environments need to be able to physically recognize different floors to best adapt their gait. In this work we describe the preparation of a dataset of contact forces obtained with eight force tactile sensors for determining the underlying surface of a walking robot. The data is acquired for four floors with different coefficient of friction, and different robot gaits and speeds. To classify the different floors, the data is used as input for two common computational intelligence techniques (CITs): Artificial neural network (ANN) and extreme learning machine (ELM). After optimizing the parameters for both CITs, a good mapping between inputs and targets is achieved with classification accuracies of about 99\%.
\end{abstract}

\keywords{Humanoid Robot locomotion; Instrumented System; Computational Intelligence Techniques; Floor classification.}

\section{Introduction}

Most walking robots, operating in real world scenarios, do not have a control system with knowledge about the characteristics of the underlying surface. This information is of critical importance for fine-tune the gait parameters to the floor requirements, so that the humanoid robot can reach a properly and safely locomotion, with a precise and robust control. \\
\indent To this aim, the state-of-the-art literature describes mostly the use of 3D sensors, inertial measurements units, force/torque or tactile sensors to gather data for further classification of the floors using, most commonly, mathematical and learning-based algorithms. Although the majority of the work on floor classification is presented for wheeled robots, mainly for outdoor environments, either through data obtained with 3D sensors (e.g. $^{1-6}$), inertial measurement units (e.g. $^{7-14}$), or multiple sensors fusion (e.g. $^{15-18}$), our interest in the literature is focused on legged robots, more precisely humanoids.  \\
\indent In this scope, examples of vision-based approaches can be found in $^{19-21}$. These works use a bag-of-words (BoW) model and a speeded up robust features (SURF) to extract and treat the images features for further classification using support vector machine (SVM). Even though using vision has the advantage of collecting information from the floors before the locomotion action, the results can be unreliable. For example, two surfaces may look the same, but yet have a different friction property, which leads to the need of two different humanoid gaits. We believe that sensing through physical interaction is a unique and necessary approach to improve humanoid robots mobility skills.\\
\indent In $^{22}$ the authors used body-mounted inertial sensors in a small humanoid robot to identify ten different kind of common floor surfaces on which the robot is standing in home environments. To build the dataset, four full body motions are executed 60 times for each type of floor, and using a decision tree classifier, they achieved a precision of 85.7\%. The highest misclassification is found for relatively hard floors, because these floors are more similar to each other from a point of view of the properties that affect the body motions, unlike what happens with the soft ones. Other work have shown the possibility of using this type of sensors, using data related to three outdoor surfaces.$^{23}$ They implemented a SVM algorithm and used 25\% of the data to test it, achieving a 93.8\% overall accuracy.\\
\indent In $^{24}$ they propose a classification of 5 terrain types, based on the force torque sensor readings installed on the humanoid robot WALK-MAN ankle. A total of 1250 steps of the humanoid robot over the different floors are extracted and two methods were used for data reduction: Fast Fourier Transform (FFT) and Discrete Wavelet Transform (DWT). The learning procedure is performed using SVM over a feature vector of 120 elements or 270 depending on the approach used to reduce the steps data size, FFT or DWT, respectively.  The results look more promising for the DWT approach with a precision of about 95\% vs. 91\%.\\
\indent In $^{25}$ six indoor surface types were distinguished by fusing data from multiple built-in sensors of a Sony ERS-7, such as, force sensors, to collect the ground contact forces, accelerometer, infrared range and motor force sensors. The developed random forest model allowed the classification of the different floors with a cross-validation and accuracy of 96.2\% and 94\%, respectively, for one gait at a fixed speed.  Similarly, by fusing different sensors, a six-legged robot is able to recognize 12 surfaces with a 95\% precision.$^{26}$\\
We propose a novel method to classify four floors with different friction coefficient based only on the data obtained with eight force tactile sensors that are installed in an instrumented shoe that we developed on previous work, to be used with the humanoid robot NAO.$^{27}$ To interpret and recognize the data, two popular computational intelligent techniques (CITs) are explored: artificial neural network (ANN) and extreme learning machine (ELM). In order to obtain a more robust learning classifier the data is also collected for several gaits and speeds.  \\
\indent Past works, show the successful application of ANNs $^{13,15}$, and, to our knowledge, ELM is not yet explored for the humanoid floor classification problem.\\   
\indent The main contribution of this work is the validation that inexpensive tactile sensors together with common, widely used learning-based algorithms can be used to obtain reliable information which allows the correct classification of different floors, thus improving humanoid robots mobility skills. \\
\indent The reminder of the paper is divided as follows. Section II presents the materials and methods for the data collection and manipulation. The CITs implementation and experimental results are presented in Section III. Lastly, section IV presents the conclusions and future challenges. 



\section{Materials and methods}
On previous research we developed an ITshoe (Fig. \ref{fig:1}) to be seamlessly installed on a walking humanoid robot to measure real-time vertical and horizontal GRFs.$^{27}$
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig1.jpg,width=\textwidth}} 
\vspace*{8pt}
\caption{ITshoe schematic structure. The block (A) is the acquisition unit, the block (B) is the streaming unit, and the block (C) is the sensing unit. The main elements of these units are subtitled with numbers: 1- Battery; 2- Step-up voltage regulator; 3- Micro-controller; 4- Bi-directional level converter; 5- WiFi module; 6- Force sensor. On the right side it is visible the position of the eight force sensors and the reference axis used to decompose the tangential forces.$^{27}$}%\cite{100}.}
\label{fig:1}
\end{figure}
\indent The ITshoe has two main parts, outer shoe and inner shoe, and it is designed to be used with the humanoid robot NAO. The inner shoe is used to link the robot's foot and the outer shoe, whereas the outer shoe is the instrumented part of the shoe. The ITshoe is designed to measure and transmit raw data at a frequency of 100 Hz and it is composed by a sensing unit (eight A301 flexiforce sensors), acquisition unit (electrical conditioning and power supply), and a streaming unit (WiFi module). Fig. \ref{fig:2} illustrates an example of the measured GRFs (normalized) for two steps of a walking humanoid robot. The GRFs are divided into total normal force (vGRFs) and total horizontal force (hGRFs). The hGRFs can be represented in the sagittal and transverse plane as depicted in Fig. \ref{fig:1}, and calculated as follows:
\begin{equation}
Fh_{st} = \frac{\sqrt2}{2} \cdot[(S1_{45} + S2_{45}) - (S3_{45}+S4_{45})], \label{eq1}
\end{equation}
\begin{equation}
Fh_{tt} = \frac{\sqrt2}{2} \cdot[(S2_{45} + S4_{45}) - (S1_{45}+S3_{45})], \label{eq2}
\end{equation}

where $Fh_{st}$ is the total horizontal force in the sagittal plane, $Fh_{tt}$ is the total horizontal force in the transverse plane and $S1_{45}$ to $S4_{45}$ are the sensors used to measure these tangential forces.\\
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig2.png,width=0.45\textwidth}} 
\vspace*{8pt}
\caption{GRFs for a walking humanoid robot. Example of two measured steps represented as normal and tangential forces.}
\label{fig:2}
\end{figure}
\indent All datasets presented in this work are obtained with the ITshoe. 

\subsection{Floor classification}

In this study, we attempt to identify which one of four different candidate floors the humanoid robot walked on, having as hypothesis that each ground type has a particular signature when identified by the force sensors that measure the contact forces between the biped feet and the ground. To further facilitate the data collection in the laboratory, we built three shoe soles (using the materials: teflon, aluminium and carpet) to be added to the ITshoe and used the ITshoe acrylic as the fourth material. Fig. \ref{fig:3} shows the shoe soles used in this work.\\
\indent Their coefficient of friction (CoF) is measured against a melamine sheet (base material) on which the robot walks with the distinct shoe soles. The friction coefficients of the testing materials are measured as follows: each shoe sole is positioned on a ramp of the melamine material; the ramp is tilted until the shoe sole starts to slide at a constant velocity; the tilting angle is measured; lastly, the CoF is calculated (equal to the tangent of the measured angle). Fig \ref{fig:4} illustrates the layout for the data acquisition and CoF measurement. \\
\indent The chosen floors (shoe soles) have different friction coefficients, ranging from approximately 0.1 up to 0.5. We decided that the lower friction would be around 0.1 since the biped robot can not walk on more slippery floors, and above 0.5 we considered that the robot can perform well balanced locomotion actions. Regardless the friction range in study, in future work, we intend to extrapolate the results to a wider range. Table \ref{t:1} presents the measured CoF for the different materials. 
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig12.jpg,width=\textwidth}} 
\vspace*{8pt}
\caption{Shoe soles materials. A- teflon; B- acrylic; C- aluminium; D- carpet; E- melamine sheet. }
\label{fig:3}
\end{figure}
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig3.jpg,width=\textwidth}} 
\vspace*{8pt}
\caption{Layout for the data acquisition and CoF measurement. On the left side is the melamine sheet on which "n" robot steps are measured and the humanoid robot with the ITshoes, and on the right side is presented the melamine ramp used to measure the CoF of the materials above identified. }
\label{fig:4}
\end{figure}

\begin{table}[ht]
\tbl{Shoe soles coefficient of friction.\label{t:1}}
{\begin{tabular}{@{}lccc@{}} \toprule
Material & Coefficient of Friction \\ \colrule
Teflon-Melamine & 0.11  \\
Acrylic-Melamine & 0.23  \\
Aluminium-Melamine & 0.35 \\
Carpet-Melamine & 0.52 \\ \botrule
\end{tabular}}
\end{table}

\subsection{Data manipulation}

The output signals from each one of the available sensors are sampled and stored during real-time experiences for subsequent offline analysis. To get more representative and robust data we also decided to gather the data not only for the different floors, but also for different robot gait parameters, such as different step length ({0.02, 0.04, 0.06} [m]) and step frequency ({0.2, 0.4, 0.6}). For these parameters we decided to use equally distanced values, being that for the higher limit of step length we chose the maximum step length (0.06 m) of this robot, and the maximum frequency (0.6) was chosen because larger values did not produce good enough locomotion actions, therefore making it impossible to collect data. To summarize, the robot steps force data is collected for all the 36 resulting combinations between the different floors and the variable gait parameters (4x3x3). Roughly 100 steps are registered for each combination.  \\
\indent Before classifying the floors with CITs, it is necessary to pre-process the raw data. The following procedure describes the developed algorithm methodology to extract the humanoid robot steps that are used as input for the different machine learning approaches. The algorithm takes as input a matrix filled with raw data of 8 flexiforce sensors, and outputs the robot steps separately and normalized in the range [-1,1], as follows:

\begin{romanlist}[(ii)]
\item Use the calibration curves to convert each sensor ($S(i)$) raw data into forces, as described by the following equation:
\begin{equation}
 \begin{array}{l}
F(i) = \frac{b(i)}{R(i)(\frac{1024}{S(i)})-1}\times \frac{1}{m(i)}, \\ \\
\hspace{1mm} i \in \left \{1,2,...,8  \right \},
  \end{array}
\label{t:3}   ,
\end{equation}
where R is the voltage divider resistor, $m$ and $b$ are the calibration curve slope and y-intercept respectively, and 1024 ($2^{10}$) refers to a 10-bit analog to digital converter (ADC);
\item Obtain the start and end of each step: $Fn(i) \approx 0$ (normal force = 0, robot foot is in the air);
\item Normalize each force F(i) to be inside the range [-1,1];
\item Interpolate each step using a linear interpolation to guarantee that all steps have the same size (this is a necessary stage since different gait parameters will generate steps with variable sizes);\\
\item Define Input variables for the CITs:
\begin{romanlist}[(b)]
\item $Fn$   (Normal Force);
\item $Fh_{st}$ (Tangential force in the sagital plane);
\item $Fh_{tt}$ (Tangential force in the transverse plane);
\item $Fu_{st}$ (Equals to $Fh_{st}./Fn$);
\item $Fu_{tt}$ (Equals to $Fh_{tt}./Fn$).
\end{romanlist}
\end{romanlist}

\subsection{Data for CIT training, validation and testing}

The input matrices have 100 lines, one for each point that represents a single step on a specific floor with certain gait parameters, and \textit{N} columns, where \textit{N} represents the number of steps collected for this study. We processed 80 steps for each combination (\textit{gait parameters+floor}), thus obtaining an input matrix of 100x2880. Fig. \ref{fig:5} shows an example of the input data presented in the form of $Fh_{st}$ normalized between -1 and 1. The visible variation between steps of the same class is due to the diverse gait parameters used in the data collection, as expected, a different gait configuration will produce different contact forces.\\
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig4.png,width=0.8\textwidth}} 
\vspace*{8pt}
\caption{Example of the input dataset $Fh_{st}$ normalized. The chart shows 720 processed steps for each floor. }
\label{fig:5}
\end{figure}
\indent Since we want to classify four different floors (classes), our target matrix has 4 lines by N number of steps, being that only one of the lines is filled with the value 1 and the others with the value 0 (e.g. [0,0,1,0]', means that the target is the 3rd floor). The data is prepared and randomly divided into three subsets: the training set (50\%), which is used for computing the gradient and updating the network weights and biases; the validation set (25\%) to measure network generalization and to halt training when generalization stops improving; and the test set (25\%) that is used to compare different ANNs as well as evaluate the ability of the network to correctly classify the floors. To make the classification process more accurate and less biased, the 36 data sets are randomly splitted into the three subsets, to ensure that each has 25\% of the data represented by each of the classes. Table \ref{t:2} shows the final dimensions of the input and target matrices. 
\begin{table}[ht]
\tbl{Dimensions of the input and target matrices\label{t:2}}
{\begin{tabular}{@{}lccc@{}} \toprule
& Input & Target \\ \colrule
Training & 100x1440 & 4x1440  \\
Validation & 100x720 & 4x720 \\
Testing & 100x720 & 4x720 \\ \botrule
\end{tabular}}
\end{table}


\section{CIT experimental results}

As described in chapter I two CITs (ANN and ELM), implemented in MATLAB$^{28}$ are explored to classify the different floors. 

\subsection{ANN}

The ANN studied consists of a generic feed-forward back-propagation neural network with three layers: input, sigmoid hidden and softmax output layer. An example of the studied ANN architecture can be seen in Fig. \ref{fig:6}.\\ 
\indent To tune and obtain the best ANN we developed many experiments, where we varied (1) the number of hidden neurons, (2) the back-propagation mathematical algorithms and (3) the way the inputs are presented to the network (as described in chapter III). Each defined input matrix is trained using 5 different backpropagation algorithms: Scaled Conjugate Gradient (scg), Conjugate Gradient with Powell (cgb), Resilient Back-propagation (rp), Variable Learning Rate Back-propagation (gdx) and Polak-Ribiére Conjugate Gradient (cgp). Additionally, each algorithm is trained 10 times for each number of hidden neurons ranging from 2 to 52. 
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig5.png,width=0.75\textwidth}} 
\vspace*{8pt}
\caption{Neural Network architecture.}
\label{fig:6}
\end{figure}
A total of 500 ANN are trained and tested for each training algorithm. The output of the ANN is an array with 4 numbers between zero and one, being that each number indicates the likelihood of the present floor being one of the four previously labelled and trained, where a value of 0 means not likely and 1 means likely. \\
\indent After evaluating the performance results, with cross-entropy, for the various tested algorithms, the following Fig. \ref{fig:7} shows the overall performance of the ANNs for the diverse input variables, and only for the algorithm that best performed: gdx. It is visible in the chart, that the performance increases significantly as the number of hidden neurons increases up to approximately 20. From here, the increasing number of neurons does not affect the performance in more than 1\%. In attempt to avoid overfitting and bearing in mind that higher number of neurons almost does not improves the performance, we decided that the optimal number of hidden neurons for this network is 20. Observing the chart, can also be seen that the defined inputs that outputs the best overall performance are the tangential forces in both sagittal and transverse planes ($Fh_{st}$ and $Fh_{tt}$). On the other hand, although the normal forces are important to separate the robot steps, these are the ones that present the poorer results. Additionally, the inputs defined as $Fu_{st}$ and $Fu_{tt}
$ present a lower performance when compared with the $Fh_{st}$ and $Fh_{tt}$, possibly due to the negative effect of the normal forces. \\
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig6.png,width=0.85\textwidth}} 
\vspace*{8pt}
\caption{ANN overall performance for the diverse input variables.}
\label{fig:7}
\end{figure}
\indent The confusion matrix presented in Fig. \ref{fig:8} shows the testing accuracy for the best obtained ANN using as input the tangential forces in the transverse plane. The test confusion matrix show us that the network failed to correctly classify 24 out of 720 (3.3\%) steps.\\
\indent With knowledge of the best algorithm (gdx) and the best number of hidden neurons (20) we decided to train a new network using both tangential forces in order to improve the ANN accuracy. The new input matrix has 200 rows (100 for the $Fh_{st}$ and 100 for the $Fh_{tt}$) by 2880 columns. The following confusion matrix presented in Fig. \ref{fig:9}, shows that the testing accuracy increased 2.6\% from 96.7\% to 99.3\%. It seems that the information from both tangential forces are relevant and necessary to best classify the different floors.
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig7.png,width=0.41\textwidth}} 
\vspace*{8pt}
\caption{Best ANN testing confusion matrix using the tangential forces in the transverse plane as input for the network.}
\label{fig:8}
\end{figure}
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig8.png,width=0.41\textwidth}} 
\vspace*{8pt}
\caption{Best ANN testing confusion matrix using both tangential forces as input for the network.}
\label{fig:9}
\end{figure}

\subsection{ELM}

The ELM consists in a single hidden layer feed-forward network with a more efficient learning algorithm, which randomly chooses hidden nodes and analytically determines the output weights. One of the advantages of using ELM is its extremely fast learning speed, that most real-time applications require. \\
\indent For the ELM analysis we decided to only use the tangential forces as input (200x2880) since it has been proven previously that these forces are the ones presenting the best results. The ELM was trained with a number of hidden neurons ranging from 100 to 600. In order to change the random variables value we decided to run 10 ELM for each number of neurons. Similarly to the previous approach the activation function used was the sigmoid function. Fig. \ref{fig:10} shows the training and testing accuracy for the different number of neurons.\\
\indent Although both training and testing accuracy increases with the increasing number of hidden neurons, for a number of neurons bigger than 400, it can be seen that the testing accuracy stagnates around 97\%. As result, we propose the optimized ELM with 400 hidden neurons. With this ELM architecture we obtained a testing accuracy of 98.5\%.
Fig. \ref{fig:11} shows the confusion matrix for the chosen ELM network. The test confusion matrix show us that the network failed to correctly classify 11 out of 720 (1.5\%) steps.
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig9,width=0.8\textwidth}} 
\vspace*{8pt}
\caption{ELM training and testing classification performance.}
\label{fig:10}
\end{figure}
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig10.png,width=0.41\textwidth}} 
\vspace*{8pt}
\caption{ELM testing confusion matrix using both tangential forces as input for the network.}
\label{fig:11}
\end{figure}

\subsection{ANN vs ELM: Classification time}

For further application of the CITs in real-time it is important to compare both CITs not only by their final accuracy but also by their real required time for classification. As previously described the data is recorded at a rate of 100hz which means that if we need to take an action (e.g. adapt the humanoid robot gait based on the detected floor information so that the next robot step is optimized for the current floor), we have to do it in less than 10ms.\\ 
\indent The previous results show that the ANN presents better classification accuracy when compared with the ELM, however the ANN takes about 145 times longer than the ELM to classify a floor. Using the software MATLAB$^{28}$, the ANN requires about 15ms to classify a single humanoid robot step. We expect that the application of this ANN using a computer programming language (e.g. C) will lead to a considerable reduction of the required time. In case of the necessary time still exceeds 10ms, the ELM appears as the best suitable solution for this problem. 

\subsection{Step percentage reduction}

The previous approach allows only the correction of the robot gait, for the requirements of the different floors, after it performs a complete step. To ensure that the humanoid robot does not lose its stability before we adapt its gait, we also developed a study where we attempted to reduce the required time for the floor classification problem. For this purpose we evaluated the ability of the network to classify the different floors using only a percentage of the robot step data points. Multiple networks were fed with a decreasing percentage of data points that represent the robot step, and simulated using the optimal parameters described previously. The results are presented on Fig. \ref{fig:12}.\\
\begin{figure}[th]
%\centerline{\psfig{file=ijhrlogo.eps,width=5cm}} 
\centerline{\psfig{file=fig11.png,width=0.8\textwidth}} 
\vspace*{8pt}
\caption{ANN testing performance for different percentage of step data points.}
\label{fig:12}
\end{figure}
\indent Looking at the results, it can be seen that the network has a good accuracy with a loss of less than 2\% even for steps represented only by 40\% of the data points. For steps represented by 60\% of the data points the network performance decreases by approximately 0.5\%. It is seen that, without compromising much the performance we can use a percentage of the robot step to classify the floor and thus control the robot stability much earlier than what was allowed by the previous approach. Additionally, if the decrease in the network accuracy affects the results in real time, a new network can use the chosen percentage of data points to predict the next ones so that the accuracy increases again.

\section{Conclusions}

In this paper, we have addressed the problem of floor classification with a biped robot based only on the ITshoe force data and a learning-based analysis. \\
\indent The 2880 labelled steps of a walking biped robot over four different floors are used to train and test two CITs. The comparison between the ANN and ELM performed in this study, suggests that the ANN is the best CIT to classify the different floors considering that the time required for classification is lower than 10ms. The ANN outperform the ELM with a final testing accuracy of 99.3\% vs. 98.5\%.\\
\indent In the near future we expect that the application of this CITs in real-time, will not only help to classify the present floor but also, lead to a more efficient gait, since a controller can be developed to optimize the robot gait based on the classified floor. 


\section*{Acknowledgements}

The Fundação para a Ciência e Tecnologia (FCT) is gratefully acknowledged for funding this work with the grants SFRH/BD/136680/2018 and PTDC/EEI-AUT/5141/2014 (Automatic Adaptation of a Humanoid Robot Gait to Different Floor-Robot Friction Coefficients). The authors also acknowledge the COMPETE 2020 program for the financial support with the PTDC/EEI-AUT/5141/2014.

\vspace*{-7pt}   %ONLY NECESSARY

%%PLS. NOTE TEMPLATE HERE SHOWN FOR DIFFERENT STYLES FOR 
%%TEXT IN JOURNALS, BOOKS, REVIEW VOLUME AND PROCS. ETC.
%%AT ACTUAL WORK PLS. TYPE WITHOUT THE \myhead COMMAND. 
%%YOU CAN FOLLOW MY EXAMPLE FOR THE COMMAND OF 
%%\thebibliography AFTER THE \end{document} COMMAND.

\vspace*{-5pt}   %ONLY NECESSARY

\begin{thebibliography}{0}

\bibitem{1.} C. Winkens, F. Sattler and D. Paulus, Hyperspectral Terrain Classification for Ground Vehicles, {\it Proc. VISIGRAPP}, (2017), 417-424. \url{https://dx.doi.org/10.5220/0006275404170424}

\bibitem{2.} A. El-Kabbany, A. Ramirez-Serrano, Terrain roughness assessment for high speed ugv navigation in unknown heterogeneous terrains, {\it Int. J. Hum. Robot.} 7(2) (2010), pp. 165-176. \url{https://dx.doi.org/10.1142/S0219878910002142}

\bibitem{3.} Laible, S., Khan, Y. and Zell, A., Terrain classification with conditional random fields on fused 3D LIDAR and camera data, in {\it European Conference on Mobile Robots}, (Barcelona, 2013).\url{ https://dx.doi.org/110.1109/ICPR.2010.987}

\bibitem{4.} M. Woods, J. Guivant and J. Katupitiya, Terrain Classification using Depth Texture Features, in {\it Australasian Conference on Robotics and Automation (ACRA)}, (Australia, 2013).

\bibitem{5.} R. Manduchi, A. Castano, A. Talukder and L. Matthies, Obstacle Detection and Terrain Classification for Autonomous Off-Road Navigation, in {\it Autonomous Robots}, {\bf 18}(1) (January 2005), p. 81-102. \url{https://dx.doi.org/10.1023/B:AURO.0000047286.62481.1d}

\bibitem{6.} S. M. Abbas, A. Muhammad, S. A. Mehdi and K. Berns,  Improvements in accuracy of single camera terrain classification, in {\it 16th International Conference on Advanced Robotics (ICAR)}, (Montevideo, 2013), pp. 1-6. \url{https://dx.doi.org/10.1109/ICAR.2013.6766493}

\bibitem{7.} F. Lomio, E. Skenderi, D. Mohamadi, J. Collin, R. Ghabcheloo, H. Huttunen, Surface Type Classification for Autonomous Robot Indoor Navigation, (2019).


\bibitem{8.} F. Oliveira, E. Santos, A. Neto, M. Campos, D. Macharet, Speed-invariant terrain roughness classification and control based on inertial sensors, in {\it Latin American Robotics Symposium (LARS) and Brazilian Symposium on Robotics (SBR)}, IEEE, (2017). \url{http://dx.doi.org/10.1109/SBR-LARS-R.2017.8215332}

\bibitem{9.} C. A. Brooks and K. Iagnemma, Vibration-based terrain classification for planetary exploration rovers, in {\it IEEE Transactions on Robotics}, Vol. 21, no. 6, (December 2005) pp. 1185-1191. \url{https://dx.doi.org/10.1109/TRO.2005.855994}

\bibitem{10.} C. Weiss, H. Frohlich and A. Zell, Vibration-based Terrain Classification Using Support Vector Machines, in {\it IEEE/RSJ International Conference on Intelligent Robots and Systems},(Beijing, 2006), pp. 4429-4434. \url{https://dx.doi.org/10.1109/IROS.2006.282076}

\bibitem{11.} P. Giguère and G. Dudek, Clustering sensor data for autonomous terrain identification using time-dependency, in {\it Autonomous Robots}. Vol. 26, (March 2009) pp. 171-186. \url{https://dx.doi.org/10.1007/s10514-009-9114-2}

\bibitem{12.} P. Giguère and G. Dudek, Surface identification using simple contact dynamics for mobile robots, in {\it IEEE International Conference on Robotics and Automation}, (Kobe, 2009), pp. 3301-3306. \url{https://dx.doi.org/10.1109/ROBOT.2009.5152662}

\bibitem{13.} C. Bai, J. Guo, H. Zheng, Three-dimensional Vibration-based Terrain Classification for Mobile Robots, in {\it IEEE Access}, (2019), Vol 7, pp. 63485-63492. \url{https://dx.doi.org/10.1109/ACCESS.2019.2916480}

\bibitem{14.} D. Tick, T. Rahman, C. Busso and N. Gans, Indoor robotic terrain classification via angular velocity based hierarchical classifier selection, in {\it IEEE International Conference on Robotics and Automation}, (Saint Paul, MN, 2012), pp. 3594-3600. \url{https://dx.doi.org/10.1109/ICRA.2012.6225128}

\bibitem{15.} L. Ojeda,J. Borenstein, G. Witus, R. Karlsen, Terrain characterization and classification with a mobile robot, {\it J. Field Robotics} {\bf 23} (2006) 103-122. \url{https://dx.doi.org/10.1002/rob.20113}

\bibitem{16.} C. Brooks, K. Iagnemma, Self-supervised terrain classification for planetary surface exploration rovers, {\it J. Field Robotics} {\bf 29} (2012) 445-468. \url{https://dx.doi.org/10.1002/rob.21408}

\bibitem{17.} C. Weiss, H. Tamimi and A. Zell, A combination of vision- and vibration-based terrain classification, in {\it IEEE/RSJ International Conference on Intelligent Robots and Systems}, (Nice, 2008), pp. 2204-2209. \url{https://dx.doi.org/10.1109/IROS.2008.4650678}

\bibitem{18.} J. Wietrzykowski and P. Skrzypczynski, Terrain classification for autonomous navigation in public urban areas, {\it Int. J. Hum. Robot.} 15(3) (2018). \url{https://doi.org/10.1142/9789813231047_0040}

\bibitem{19.} P. Filitchkin and K. Byl, Feature-based terrain classification for LittleDog, in {\it IEEE/RSJ International Conference on Intelligent Robots and Systems}, (Vilamoura, 2012), pp. 1387-1392. \url{https://dx.doi.org/10.1109/IROS.2012.6386042}

\bibitem{20.} S. Zenker, E. E. Aksoy, D. Goldschmidt, F. Wörgötter and P. Manoonpong, Visual terrain classification for selecting energy efficient gaits of a hexapod robot, in {\it IEEE/ASME International Conference on Advanced Intelligent Mechatronics}, (Wollongong, NSW, 2013), pp. 577-584. \url{https://dx.doi.org/10.1109/AIM.2013.6584154}

\bibitem{21.} Y. Zhu, C. Jia, C. Ma, Q. Liu, SURF-BRISK–Based Image Infilling Method for Terrain Classification of a Legged Robot, {\it Applied Sciences}, Vol. 9 (2019). \url{https://dx.doi.org/10.3390/app9091779}

\bibitem{22.} R .Matsumura, M. Shiomi, T. Miyashita, I. Hiroshi, N. Hagita, What kind of floor am I standing on? Floor surface identification by a small humanoid robot through full-body motions, {\it Advanced Robotics} {\bf 29}(7) 469-480. \url{https://dx.doi.org/10.1080/01691864.2014.996601}

\bibitem{23.} F. Bermudez, R. Julian, D. Haldane, P. Abbeel, R. Fearing, Performance analysis and terrain classification for a legged robot over rough terrain, in {\it IEEE/RSJ International Conference on Intelligent Robots and Systems}, (Vilamoura, 2012), pp. 513-519. \url{https://dx.doi.org/10.1109/IROS.2012.6386243}

\bibitem{24.} K. Walas, D. Kanoulas and P. Kryczka, Terrain classification and locomotion parameters adaptation for humanoid robots using force/torque sensing, in {\it IEEE-RAS 16th International Conference on Humanoid Robots (Humanoids)}, (Cancun, 2016), pp. 133-140. \url{https://dx.doi.org/10.1109/HUMANOIDS.2016.7803265}

\bibitem{25.} C. Kertesz, Rigidity-based surface recognition for a domestic legged robot, in {\it IEEE Robotics and Automation Letters}, Vol. 1 (2016), pp. 309-315. \url{https://dx.doi.org/10.1109/LRA.2016.2519949}

\bibitem{26.} K. Walas, Terrain classification and negotiation with a walking robot, {\it J. Intelligent and Robotic Systems}, (2015). \url{https://dx.doi.org/10.1007/s10846-014-0067-0}

\bibitem{27.} L. Almeida, V. Santos, F. Silva, A Novel Wireless Instrumented Shoe for  Ground  Reaction  Forces  Analysis in  Humanoids, in {\it18th  IEEE  International  Conference  on  Autonomous  Robot  Systems  and  Competitions}, (2018). \url{https://dx.doi.org/10.1109/ICARSC.2018.8374157}

\bibitem{28.} MATLAB, 2018. version 9.5.0 (R2018b), Natick, Massachusetts: The MathWorks Inc.
\end{thebibliography}
\eject

%euuu AUTHOR
%\vspace*{13pt}
\noindent%
\parbox{5truein}{
\begin{minipage}[b]{1truein}
\centerline{{\psfig{file=luis,width=1in,height=1.25in}}}
\end{minipage}
\hfill         %to 2nd column
\begin{minipage}[b]{3.85truein}
{{\bf Luís Almeida} obtained a 5-year degree in Mechanical Enginee-
\break
ring in 2016, at the University of Aveiro, Portugal, where he later, started to pursue his PhD in Mechanical Engineering in 2018. He participated in a research project and some conferences in the area of humanoid robotics. His current research interests include humanoid robots locomotion and control, human-robot interaction and computational intelligent techniques.   \hfilneg}
\end{minipage} } %close for parbox

\vspace*{13pt}  




%FIRST AUTHOR
%\vspace*{13pt}
\noindent%
\parbox{5truein}{
\begin{minipage}[b]{1truein}
\centerline{{\psfig{file=vs.png,width=1in,height=1.25in}}}
\end{minipage}
\hfill         %to 2nd column
\begin{minipage}[b]{3.85truein}
{{\bf Vítor Santos} obtained a 5-year degree in Electronics Enginee-
\break
ring and Telecommunications in 1989, at the University of Aveiro, Portugal, where he later obtained a PhD in Electrical Engineering in 1995, and the Habilitation in Mechanical Engineering in 2018. He was awarded fellowships to pursue research in mobile robotics during 1990-1994 at the Joint Research Center, Italy. He his currently Associate Professor at the \hfilneg}
\end{minipage} } %close for parbox

\vspace*{3.9pt}  
\noindent
University of Aveiro and lectures courses related to advanced perception and robotics, and has carried out research activity on mobile robotics, advanced perception and humanoid robotics. At the University of Aveiro he has coordinated the ATLAS project for mobile robot competition that achieved 6 first prizes in the annual Autonomous Driving competition and has coordinated the development of ATLASCAR the first real car with autonomous navigation capabilities in Portugal. He is one of the founders of the Portuguese Robotics Open in 2001 where he maintained active participation for more than 12 years. He his also co-founder of the Portuguese Society of Robotics, and participated several times in its management since its foundation in 2006. His current interests extend to humanoid robotics and the application of techniques from perception and mobile robotics to autonomy and safety in Autonomous Driving and Driving Assistance systems.




%SECOND AUTHOR
\vspace*{13pt}  
\noindent%
\parbox{5truein}{
\begin{minipage}[b]{1truein}
\centerline{{\psfig{file=joao,width=1in,height=1.25in}}}
\end{minipage}
\hfill %to 2nd column
\begin{minipage}[b]{3.85truein}
{{\bf João P. Ferreira} received his BSc degree in Electri-
\break
cal Engineering in 1999, Master in Industrial Automation in 2002 and PhD in Instrumentation and Control in 2010 from the Univ. of Coimbra. Currently, he is a Professor of the Electrical Engineering Department at the Superior Institute of Engineering of Coimbra, Coordinator of specialization course of Industrial Automation, Robotics and Maintenance and Researcher at 
\hfilneg}
\end{minipage} } %close for parbox

\vspace*{4.8pt}  
\noindent
the Institute of Systems and Robotics of Univ. of Coimbra. He has coordinated and participated in several funding projects in the area of humanoid and medical rehabilitation robotics, with more than sixty scientific publications in international journals/conferences, over than two hundred participations as a reviewer of scientific manuscripts and have a national patent (nº. 108143). His research interests include humanoid robots, human gait, rehabilitation robotics and artificial intelligence and its application.

\vfill\eject

\end{document}


%%BELOW HERE ARE THE SAME BIBLIOGRAPHY TEXT AS ABOVE.
%%PLS. USE THIS COMMAND FOR ACTUAL WORK.





\end{document}

