## 3 Mathematical Modeling  
### Mathematical Model of One Module  
An important step before attempting to design a controller for a module is, to create an inverse kinematic model of the module first. In other words, to find a way to map the desired output parameters to the input parameters; in this case, the tilting angles to the extension/contraction of the bellows, see Figure 4. Inspiration is taken from the work of [37], where bellows-type actuators are represented by two elements connected by a translational joints and connected to the bottom and top plate by universal joints. This approach greatly simplifies kinematic modelling. For the purpose of modelling the dynamics of an actuator, the model needs to be augmented by adding torque on both universal joints that represent resistance to bending of the actuator.  
For our design, there exists a closed form solution to inverse kinematics in the form of  
\[l_{i}=\mid\mathbf{a}_{i}-\mathbf{H}_{i}\mathbf{b}_{i(\mathbf{a}_{x},\mathbf{a }_{y})}\mid \tag{1}\]  
\[\mathbf{H}_{t}=\mathbf{T}_{z01}\mathbf{R}_{y12}\mathbf{R}_{x23}\mathbf{T}_{z34} \tag{2}\]  
where \(i\in\{1,2,3\}\) denotes the bellows, \(\mathbf{a}_{i}\in\mathbb{R}^{3}\) are the coordinates of the center of the bellows on the bottom plate, \(\mathbf{b}_{i}\in\mathbb{R}^{3}\) are the coordinates of the center of the bellows on the top plate, \(l_{i}\) is the distance between point \(\mathbf{a}_{i}\) and \(\mathbf{b}_{i}\). Matrix \(\mathbf{H}_{t}\in\mathbb{R}^{4\times 4}\) represents  
Figure 4: Schematic representation of the pneumatic module  
Figure 3: Flow of information and energy.  
the transformation matrix between the fixed coordinate frame \(x_{a}y_{a}z_{a}\) and the top plate coordinate frame \(x_{b}y_{b}z_{b}\). \(\mathbf{T}_{z01}\), \(\mathbf{T}_{z34}\), \(\mathbf{R}_{x23}\), \(\mathbf{R}_{y12}\in\mathbb{R}^{4\times 4}\) where \(\mathbf{T}_{z01}\) is the translation matrix between the base frame and a parallel but offset frame \(x^{\prime}y^{\prime}z^{\prime}\), \(\mathbf{R}_{y12}\) is the rotation matrix rotating frame \(x^{\prime}y^{\prime}z^{\prime}\) around its y axis by \(\alpha_{y}\) into \(x^{\prime\prime}y^{\prime\prime}z^{\prime\prime}\), \(\mathbf{R}_{x23}\) is the rotation matrix rotating frame \(x^{\prime\prime}y^{\prime\prime}z^{\prime\prime}\) around its x axis by \(\alpha_{x}\) into \(x^{\prime\prime\prime}y^{\prime\prime}z^{\prime\prime\prime}\) and \(\mathbf{T}_{z34}\) is the translation matrix between the frame \(x^{\prime\prime\prime}y^{\prime\prime\prime}z^{\prime\prime\prime}\) and a parallel but offset top plate frame \(x_{b}y_{b}z_{b}\), see Figure 5. Angle \(\alpha_{x}\) is the tilt angle of the top plate around axis \(x\) and \(\alpha_{y}\) is the tilt angle of the top plate around axis \(y\).  
The role of the established kinematic model in relation to the posture control of the module described in later chapters is a central one. The goal of posture control of the platform is achieved indirectly by controlling the extension and total pressure in the respective bellows. The presented inverse kinematic model converts the reference tilt and actual tilt sensed by rotation sensors into the required extension/contraction and actual deformation of the bellows.