# Design and Validation of Rule-Based Expert System by Using Kinect V2 for Real-Time Athlete Support
## Materials and Methods
### Modeling of DSP and LR Movements  
The methods used to process the data obtained during training are usually focused on the similarity of pose and movement. Expert poses are used to obtain the most accurate movement, but during these and also during different weights in the gym environment, there is the occurrence of either differences in movement between the experts or due to the fact that one movement which was performed cannot be performed exactly the same again [61]. In addition, an injury can occur during the performance of training exercises until the movement reaches its final form [62]. Therefore, the main thing to note when obtaining the training movements used in the evaluation is that instead of analyzing the final form of the obtained pose or movement the process from the beginning to the end of the movement can be modeled in a way that does not lead to injury. For this purpose, movement models were designed for isotonic DSP and LR movements by consulting the opinions of faculty member of Physical Education and Sports Teaching (Karamanoglu Mehmetbey University) and a certified trainer (Antalya Sport Center). In these models, the changes in angles of shoulder (A2 and A3), elbow (A1 and A4), wrist (A13 and A14), hip (A7 and A8), knee (A9 and A10), ankle (A11 and A12), and spine (A5) are obtained through the data of Kinect during performing the movements shown in Figure 3.  
In the movement models, it is defined how the movements should be performed and warnings are given for correction when the movement is incorrect. If the model created for LR training is explained as shown in Figure 3a,  
* You should be standing upright (Equation (5)) with a dumbbell in each hand in the range of 170-180\({}^{\circ}\) (A5) [63]: \[R_{1}=\left\{ \begin{array}{cc}1,&170\leq\text{A5}<180\\ &0,&\text{Otherwise}\end{array} \right.\] (5)
* The distance between the feet (A11-A12) should be slightly narrower than shoulder width (A2-A3) and slightly more than the width of the hip (A7-A8) (Equation (6)) [63; 64]: \[R_{2}=\left\{ \begin{array}{cc}1,&\text{distance}_{\text{A11-A12}}\leq\text {distance}_{\text{A2-A3}}\text{ And distance}_{\text{A7-A8}}\leq\text{ distance}_{\text{A11-A12}}\\ &0,&\text{Otherwise}\end{array} \right.\] (6)
* Arms should be opened at the elbows (A1 and A4) in the range of 140-160\({}^{\circ}\) (Equation ((7)) [65]: \[R_{3}=\left\{ \begin{array}{cc}1,&140\leq\text{A1}\leq 160\text{ and }140\leq\text{A4}\leq 160\\ &0,&\text{Otherwise}\end{array} \right.\] (7)
* The arms should be raised up sideways until the elbows (A1 and A4) form an angle of 15-30\({}^{\circ}\) at shoulder level (A2 and A3) (Equation ((8)) [63; 65]: \[R_{4}=\left\{ \begin{array}{cc}1,&15\leq\theta_{A1-A2}\leq 30\text{ and }15\leq\theta_{A3-A4}\leq 30\\ &0,&\text{Otherwise}\end{array} \right.\] (8)
* At the last point of movement, the wrists (A13 and A14) should be high enough to create 10-30\({}^{\circ}\) with the elbows (A1 and A4) (Equation ((9)) [65; 66]: \[R_{5}=\left\{ \begin{array}{cc}1,&10\leq\theta_{A1-A13}\leq 30\text{ and }10\leq\theta_{AA-A14}\leq 30\\ &0,&\text{Otherwise}\end{array} \right.\] (9) If the model created for DSP training is explained as shown in Figure 3b,  
Figure 3: Designed movement models: (**a**) lateral raise (LR) model; (**b**) dumbbell shoulder press (DSP) model. * You should be positioned upright when the movement is made by sitting, at a 90\({}^{\circ}\) angle (A5) and when the movement is made by standing, at 170-180\({}^{\circ}\) angle (Equation ((5)) [63];
* Elbows (A1 and A4) should have a vertical angle of 90-100\({}^{\circ}\) on the arms (Equation ((10)) [67; 68]: \[R_{6}=\left\{ \begin{array}{c}1,\ 90\leq\text{A1}\leq 100\text{ and }90\leq\text{A4}\leq 100\\ 0,\ \text{Otherwise}\end{array} \right.\] (10)
* Dumbbells should lie in a vertical line, arms should lie on top of the head and be pushed almost until the dumbbells reach the point of touch (Equation (11)) [66; 67]: \[R_{7}=\left\{