# A Method for Precise Tracking Control of Pneumatic Artificial-Muscle-Driven Exoskeletal Robot
## 2 Pneumatic-Muscle-Driven Upper Limb Exoskeletal Robot System
### PAM Driver
#### 2.1.2 Inverse Model of PAM Output Force  
According to the output force formula, output force is determined based on load and atmospheric pressure, while the inverse model is responsible for calculating atmospheric pressure from output force, load, and length. Due to a strong non-linear relationship, great challenges have been posed for determining the inverse model. Therefore, this study uses a BP neural network as a method to build an inverse model of PAM's output force. A BP neural network consists of an input layer, a hidden layer, and an output layer. Layers are all connected to each other; however, for units in the same layer, there is no connection. Information is transmitted upward, from the input layer to the output layer. The BP neural network algorithm adjusts and modifies the connection weighting factor through the inverse transmission of the network output error, thus minimizing its error and establishing mapping from the input to output among a given number of samples. The three-layer BP neural network has a topological structure, as described below: For the input layer, there are n nodes; there are q nodes on the hidden layer; and there are m nodes on the output layer. The weighting factor for connections between input layer and hidden layer is v\({}_{\text{k}}\); for connections between the hidden layer and output layer, this factor is w\({}_{\text{jk}}\). The BP neural network is trained as follows:  
1. Initialize the weighting factor: randomly assign factors in the network v\({}_{\text{k}}\) (0) and w\({}_{\text{jk}}\) (0)
2. Output of the calculated sample data is given, employing the initialized values determined in step 1. The neural network will then give outputs for every neuron. The output of the hidden Layer is: \[h_{k}=f_{h}\left(\sum_{i=1}^{n}v_{ki}x_{i}-b_{k}\right)\] (13) Here, k = 1, 2, \(\ldots\), qx are sample input data, b\({}_{\text{k}}\) is neuron bias, and f\({}_{\text{h}}\) is the transfer function of the hidden layer neuron. The nodes on the output layer give outputs, as shown below:  
\[y_{j}=f_{o}\left(\sum_{k=1}^{q}w_{jk}h_{k}-b_{j}\right) \tag{14}\]  
Here, j = 1, 2, \(\ldots\), m, and f\({}_{\text{o}}\) is the transfer function for output layer. 3. Then, errors are calculated reversely: According to the expected output and the actual output of all neurons from the given sample data, the errors of all neurons can be calculated in reverse with the result. The input error is:  
\[E=\frac{1}{2}\sum_{j=1}^{m}\left(g_{j}-y_{j}\right)^{2} \tag{15}\]4. The correction coefficient: According to the principle of the gradient drop of the error, the weighting factor, previously assigned in step 1, will be corrected layer by layer; the correction coefficient for the weighting factor is: \[w_{jk}^{N+1}=w_{jk}^{N}+\eta\delta_{j}^{o}h_{k}\] (16) \[\delta_{j}^{o}=\big{(}g_{j}-y_{j}\big{)}y_{j}\big{(}1-y_{j}\big{)}\] (17) The correction coefficient for the input layer's weighting factor is: \[v_{ki}^{N+1}=v_{ki}^{N}+\eta\delta_{k}^{h}x_{i}\] (18) \[\delta_{k}^{h}=\left[\sum_{k=1}^{q}\big{(}g_{j}-y_{j}\big{)}y_{j}\big{(}1-y_{ j}\big{)}w_{jk}\right]h_{k}(1-h_{k})\] (19)
5. Loop condition and Termination: If the errors do not fulfill the expectation, then the calculation will enter a loop by jumping to step 2. If expectations are met, then the iteration will be terminated, and the final weighting factor and errors during training are recorded. In order to collect PAM's variation in displacement, air pressure, load, and output force, The experimental setup as shown in Figure 4 is assembled. A pneumatic cylinder (RIGHT PNEUMATIC, Ningbo, China) is used to represent the load, thus reducing random errors caused by weight suspension. In this experiment, PAM is horizontally placed. One of its ends is anchored to the experiment surface through a force transducer (MEIKONG, Hangzhou, China); the other end is connected to a baffle equipped with a laser displacement transducer (Panasonic INDUSTRX, Tangshan, China); this is further connected to a pneumatic cylinder.