# Characterization and Joint Control Study of Pneumatic Artificial Muscles
## 2 Pneumatic Artificial Muscle Modeling and Dynamic Simulation
### Modeling the Dynamic Properties of Pneumatic Artificial Muscles  
The pneumatic high-speed switching valve used in this design is controlled by the Pulse Width Modulation (PWM) signal generated by the microcontroller's digital output. To facilitate the derivation of the dynamic characteristics of the pneumatic muscle system, the following assumptions are made for the design; moreover, the pneumatic artificial muscle model control schematic is shown in Figure 1:  
(1) The gas is ideal;  
(2) There is no leakage of pneumatic components;  
(3) The pneumatic muscle filling and deflating process are adiabatic processes;  
(4) The thermodynamic process of the gas inside the pneumatic muscle chamber is quasi-static;  
(5) The gas source pressure, ambient pressure and ambient temperature are stable.  
Inside the high-speed switching valve, the gas is subjected to various influences during its motion, and thus its mass flow rate is calculated using the Sanvile formula [17], which is given by:  
\[Q_{g}=\left\{\begin{array}{l}uSp_{1}\sqrt{\frac{2K}{CT(K-1)}}\sqrt{\left(\frac {P_{2}}{P_{1}}\right)^{\frac{2}{K}}-\left(\frac{P_{2}}{P_{1}}\right)^{1+\frac{1 }{K}}},\left(R_{1}<\frac{P_{2}}{P_{1}}<1\right)\\ uSp_{1}(\frac{2}{K+1})^{\frac{1}{K-1}}\sqrt{\frac{2K}{CT(K+1)}},\left(\frac{P_ {2}}{P_{1}}\leq R_{1}\right)\end{array}\right. \tag{2}\]  
where \(Q_{g}\) is the gas mass flow rate, \(u\) is the input pulse width modulation signal duty cycle, \(S\) is the effective cross-sectional area of the valve port circulation, \(R_{1}\) is the critical pressure ratio, \(p_{1}\) and \(p_{2}\) are the upstream and downstream pressures, respectively, \(T\) is the gas source temperature, \(K\) is the adiabatic gas index, and \(C\) is the gas constant.  
The flow of gas inside the chamber of pneumatic artificial muscle obeys the law of thermodynamics and the rule of energy conservation, according to which the energy conservation equation of pneumatic artificial muscle can be obtained as follows:  
\[\dot{p}=\pm\frac{KCT}{V}Q_{g}-\frac{Kp}{V}\dot{V} \tag{3}\]  
where \(p\) is the pneumatic muscle chamber pressure and \(V\) is the chamber volume during pneumatic muscle contraction.  
For pneumatic artificial muscles, there are:  
\[E=e\sin\theta \tag{4}\]  
\[n\pi D=e\cos\theta \tag{5}\]  
where \(e\) is the single fiber length of the pneumatic artificial muscle, \(E\) is the pneumatic tendon length, \(D\) is the cross-sectional diameter of the pneumatic artificial muscle, \(n\) is the number of fiber winding turns, and \(\theta\) is the timing belt pulley rotation angle.  
\[V=\frac{\left(e^{2}-E^{2}\right)E}{4n^{2}\pi} \tag{6}\]  
Taking \(V\) as a constant value, the value is taken as the mean value of the pneumatic artificial muscle inflation volume. At this point, Equation (3) can be replaced by the pneumatic artificial muscle pressure model:  
\[\dot{p}=K_{q}Q_{g} \tag{7}\]  
Figure 1: Control principle diagram of pneumatic artificial muscle model.  
where \(K_{q}=\pm\frac{K\zeta T}{C}\).  
The pressure flow equation for the pneumatic artificial muscle inflation process can be obtained from Equation (3):  
\[\dot{P}=\frac{K\big{(}3 PE^{2}+4n^{2}\pi C\tau TQ_{g}-Pe^{2}\big{)}}{(e^{2}-E^{2})E} \tag{8}\]  
Similarly, from the energy conservation equation of Equation (3), the pressure flow equation of the exhaust process can be derived as follows:  
\[\dot{P}=\frac{K\big{(}-3 PE^{2}+4n^{2}\pi C\tau TQ_{g}+Pe^{2}\big{)}}{(E^{2}-e^{ 2})E} \tag{9}\]  
The joint motion torque for pneumatic artificial muscles can then be obtained as follows:  
\[T_{0}+(F_{1}-F_{2})r=mge_{n}\sin\theta+\zeta\dot{\theta}+I\ddot{\theta} \tag{10}\]  
where \(m\) is the load mass, \(r\) is the joint radius, \(\zeta\) is the system damping factor, \(F_{1}\) and \(F_{2}\) are the tensions of the double pneumatic artificial muscles connecting the joints, respectively, \(e_{n}\) is the linkage length and \(I\) is the linkage rotational inertia.