Fall detection in walking robots by multi-way principal component analysis