Keywords

1 Introduction

Modern lifestyles with demanding and time-consuming jobs, combined with extended periods of time spent on commuting journeys and related traffic jams, all contribute to a lack of free time and can lead to excessive stress. At the end of the day people with this routine usually feel exhausted and tend to be absorbed in their daily tasks. This lack of time also leads to poor nutrition habits as people eat out more often and consume more and more fast food. This factor combined with patterns of no exercise may lead to health issues, such as cardiac diseases, diabetes, etc. Nevertheless, people are starting to become more aware of these issues and, as a result of this awareness, fitness trends have been growing for a couple of years. Nowadays people have several ways to train, depending on what they want to achieve. Users have many options for different types of training, such as weight training, running, CrossFit training, etc. One of the most important factors for success in training is the assistance of a personal trainer, especially during the first sessions. However, getting a personal trainer might not be an easy task since it can be expensive and users have to coordinate their schedule with that of the personal trainer.

It is our belief that the challenges described above can be tackled through the use of technologies which maximize remote interactions between users and their personal trainers. For this purpose, we present a health training platform in the present paper. In short, health training platform users are able to train according to their time and location availability and their exercise results are collected by sensors connected to a mobile device, which are later sent to the personal trainer for evaluation and guidance.

The remainder of the paper is organized as follows: related work is presented in Sect. 2, followed by the architecture in Sect. 3. Section 4 describes the implementation. Section 5 contains the tests. Conclusions and future work are presented in Sect. 6.

2 Related Work

As previously mentioned, people’s interest in a healthier lifestyle through sports is increasing. However, despite this significant trend, time availability and financial constraints are still problems which limit the practice of physical exercise.

In this section we will describe the most relevant current applications being used by personal trainers, which are then compared to our motivation and proposed work.

The Wello Online Service [1] is a paid online service providing workouts over live video adapted to mobile devices. These live videos allow users to train anywhere. Users may filter these live videos by activity type, days of the week and start time, as well as enroll in sessions, joining a workout group with a trainer.

Another tool for personal trainers and their clients is Fity [2]. The idea of this application is to provide video streaming so the client and the personal trainer can interact with each other. The application also includes other features so that the client can have a complete training session at the moment of the training execution.

The Remote Coach [3] application has an interactive platform where the personal trainer can communicate with its clients and upload special materials that the client would need in order to execute the training session. The application also provides personal trainers with a report tool allowing them to measure different aspects of the users’ training.

Despite being very useful resources, there are still some issues to be overcome, such as the lack of flexible solutions that may be used in both gymnasium and non-gymnasium environments. Collected data input can also be improved by using sensors that can automate and facilitate the process. With these concerns in mind, we propose a novel Health Training Platform. The architecture of this new platform is presented in the next section.

3 Architecture

The architecture of the novel Health Training Platform includes 3 major entities (i) the personal trainer, (ii) the clients and (iii) the gymnasiums. Due to the structure of the architecture, the scalability and the adaptation to any business model are ensured. For instance, we can have a scenario where a personal trainer interacts directly with clients without requiring a gymnasium or, alternatively, one which includes a gymnasium.

Regarding (i) the personal trainers, they are able to access their clients’ workouts, interact with the clients by giving them feedback on their activities and motivating them, both in presence and at a distance.

Concerning the (ii) the clients, they are able to perform their workout, access the results, and interact with their personal trainer, receiving feedback and asking questions. The interaction with their personal trainer can also be in presence or at a distance. The remote interaction between clients and their personal trainers provide time flexibility, which is extremely important for clients with busy schedules. Remote interaction can also lead to cost reduction, since personal trainers and clients do not have the obligation of meeting in person.

Regarding (iii) the gymnasiums, they are optional as personal trainers can directly interact with clients who may perform their workouts in other facilities besides a gymnasium. Nevertheless, the presented architecture includes gymnasiums as an entity that can be present in the business model.

Regarding the procedures, there may be some distinctions depending on the chosen configuration. The clients use their smartphone to collect the data from their training. The smartphone then sends the data to the database server. The location of the database and application server is one of the nuances of the architecture, since it can be either in the cloud or in a gymnasium, depending on the configuration. Besides collecting the data, clients can use their smartphone to access their personal workouts and check on their personals trainer’s feedback.

The personal trainers use their smartphones or other connected electronic devices to login into the system and retrieve the data from the database server of its clients. They then send a response to the clients, with adjustments to the training session in order for clients to improve their techniques and exercises.

Figure 1 shows different approaches that can be taken with this project, enhancing its flexibility. It shows the 3 entities – personal trainers, clients and gymnasiums – and the possible interactions between them.

Fig. 1.
figure 1

Architecture

The next section presents the implementation of the architecture described above.

4 Implementation

For the purpose of implementation, we have developed an application for clients and personal trainers – the client application – and have set up the server for communication between the two applications, using open source tools – the server application. Additionally, we have used SME (Sistema Móvil de Entrenamiento) with Arduino microcontroller to gather information from clients. Figure 2 represents a diagram of the implementation. A detailed explanation is included afterwards.

Fig. 2.
figure 2

Implementation

We have set up a virtual machine to implement the server. It was implemented in Laravel Homestead with the pre-packaged Vagrant “box” which allowed for the development of the environment without requiring each tool to be installed. The server was configured as Nginx web server.

The server application was developed in PHP (1). The database was stored in the server and was implemented using MySQL engine. The passwords saved in the database are encrypted using the bcrypt [4] encryption (2).

The HTTP proxy server implementation and the communication with the client application were developed in PHP. The database that was implemented on the server was the MySQL engine (3).

In order to ensure security of the server and client applications, communications were carried out with HTTPS, using a symmetric cipher [5] generated by OpenSSL certification. Also the communication is encrypted using AES_256_CBC with HMAC-SHA1 for authentication of messages (4).

Additionally, a token is generated each time users perform their login. All the tokens have a limited life period, so that the time the user can use the application is controlled (5). Also the user’s password is encrypted with bcrypt [4] and based on the blowfish encryption (6).

As mentioned above, one of the improvements that can be made in training solutions is the method of how data is collected from the clients. In our specific solution we have used SME [6]. We have added a new module to the SME [6] system which allows communication with the server, user token based login and client registration. We have developed it in Java language for the Android platform.

Moreover, the SME system uses the Arduino Microcontroller to connect sensors for evaluating the exercise. The connection between the mobile device and the Arduino [7] microcontroller is performed with a Bluetooth module (Bluetooth RN42) [8]. Figure 3 represents the SME with the Arduino microcontroller.

Fig. 3.
figure 3

SME with Arduino microcontroller

The sensor that is used to evaluate the performance of the exercises is an ultrasonic sensor (SRF04) [9]. This sensor is capable of generating, transmitting and detecting ultrasound waves. The sensor is attached to a muscle, in this case the bicep. Using the pulses provided by the sensor to the Arduino, it is relatively simple to determine the position of the bicep in relation to the training time (7).

The information that is gathered by the sensor and Arduino [7] is sent to the mobile device and the clients send this information to the personal trainers. The data sent to the personal trainers allow them to be informed of what exercise the clients are doing and how it was executed. Then the personal trainers can send feedback to the clients in order to improve exercise execution or even as a motivational response.

5 Tests

After building the prototype, we performed several tests. Since the human body is extremely complex, we have focused the tests on the bicep muscle, using the curl bicep exercise to verify the angle of the exercise execution.

In order to do so, on the clients’ side we have used ultrasonic sensors - SRF04 - which must be calibrated to the training area. The use of two SRF04 sensors allowed us to detect the correct position of the arm when doing the exercise. These two SRF04 sensors gathered the information of the arm in each half second.

The Arduino gets this data from the sensor and converts the ultrasonic sound into a distance in “cm” and sends the data of the exercise execution to the smartphone via Bluetooth. This execution is then sent to the “Health Training Platform” by the users.

Afterwards, on the personal trainers’ side, they can access the platform and check the exercise execution and validate if the users executed it correctly, send feedback to the users so they can improve the exercise execution.

As the SME was already developed, we focused the tests on the server and the connection between the smartphone and the server.

The certification applied to test this system uses the AES (Advanced Encryption Standard) [10] with 256 bits and CBC (Cipher Block Chaining) [11] as a mode of operation. The authentication messages used was the HMAC (Hash Message Authentication Code) [12] and SHA1 (Secure Hash Standard) [13].

On the server’s side, the data was encrypted with the bcrypt [4] cryptographic method.

6 Conclusions and Future Work

In modern societies, people are getting more absorbed by daily tasks such as demanding jobs, child care, household activities and social involvement. This lack of time usually has negative impacts on people’s nutrition and exercise habits since they tend to consume more processed and fast food and not practice any physical activity on a regular basis. However, people are becoming aware of this negative impact and are trying to change their habits. Additionally, it is a fact that personal trainer’s help promote more successful training sessions. But having a personal trainer can be expensive and it is not affordable for everyone. Therefore, the challenge is to maximize physical activity for populations with time constraints, while simultaneously providing cost-effective training methods.

With this motivation in mind, we have proposed a novel Health Training Platform which stands out by its scalability and flexibility. In short, clients receive their workouts by smartphone, allowing them to practice whenever they have time (in a gymnasium, at home, outdoors, etc.). The results of their workout are sent from an Arduino Microcontroller to a personal trainer. The personal trainer checks the training and sends feedback to the client. This feedback can be to provide some instructions to correct the exercise or give motivation. The client receives the personal trainer’s feedback and acts accordingly.

After developing the Health Training Platform architecture, we have built and tested a prototype. The tests have shown that this platform solved the current problem of people who start training and can’t have a personal trainer. This kind of system provides a certain freedom to the users to train and manage their time in different ways. The personal trainers’ feedback helps the users to improve their training and to achieve their goals.

As for future work, we will apply this platform using a real time system in order to allow the personal trainers to monitor a client in real time in project NanoStima (NORTE-01-0145-FEDER-000016). Other possible improvements is the creation of an application for a personal computer. The objective of that application is to allow several clients to be monitored at the same time by only one personal trainer.