Keywords

1 Introduction

We are witnessing a revolution - robots, formerly reserved for industry and the professionals who work in it, are occupying more and more extensive areas of public space in, for example, medical services or education. The work of robots cooperating in spaces shared with humans should be supervised by various types of safety mechanisms and sensors. [1]. There is a number of concepts how to avoid collision. One of them is electronic skin (e-skin) [2], which was originally intended to mimic the sense of touch by a biological organ and was used in grippers and end-effector mechanisms. Current research on e-skin can be divided into those aimed at providing reception of the same stimuli that are received by humans (e.g., temperature [3]), or extending the range of measurements to include those that are not received by human skin (e.g., magnetic fields [4]). At the Faculty of Mechatronics of the Warsaw University of Technology, research is being carried out on the production of e-skin, which, in addition to measuring the pressure force [5], also detects objects at a certain distance [6]. The time, cost and amount of work required to produce and test successive e-skin prototypes introducing improvements and new ideas is significant.

The aim of this paper is to describe an open-source software toolchain developed to simulate the operation of an e-skin electronic printed circuit using the finite element method (FEM). This will enable, among others, the testing of subsequent prototypes of the device without the need for a physical prototype. The main objective of this task is to improve the quality and development of estimating the proximity of human body parts based on e-skin. To this end, the mathematical modeling results developed in the paper are verified by laboratory test results.

The paper is organised as follows. In Sect. 2, the prototype of e-skin is presented. In Sect. 3, finite element method and software toolchain is presented as well as the model of e-skin and the results obtained. Section 4 displays the effect of modelling results comparison with measurements. Finally, Sect. 5 provides the summary and further investigation proposal.

2 Prototype of an E-Skin

The prototype e-skin model used to measure the proximity of human body parts is described in [6]. E-skin consists of two layers of flexible foil 1. One has comb electrodes made of conductive material. On the second layer, resistive touch fields are made based on graphene. Touch estimation is based on measuring the resistance of the variable touch fields in relation to the touch pressure exerted on them. In [6] the principle of operation of the approximation estimation was implemented only with the conductive layer acting as one of the plates of an open capacitor. The second cover is a copper reference plate. The capacity of this setup changes when there is an object nearby with a different permittivity than the surrounding air. This change is measured using a custom electronic driver based on a rectangular signal generator.

Fig. 1.
figure 1

a) Design principle for FSR matrix of size 2 \(\times \) 2 [5]; b) the e-skin [6]: 1 - a conductive layer of comb electrodes printed on plastic foil, 2 - FSR sensors arranged in a rectangular pattern placed on a plastic foil.

In order to confirm the quality of the developed toolchain for modelling the functionality of estimating the object’s proximity to the e-skin, a simplified model was proposed. A simplified e-skin model was built of two 110 \(\times \) 140 \(\times \) 1.6 mm plates placed on a plane. The plates, together with the surrounding air as a dielectric, constituted an open capacitor, similar to that described in [6].

3 Finite Element Method for Simplified E-Skin Modelling

Finite element method (FEM) [7,8,9], along with finite difference method (FDM) and finite-volume method (FVM), is one of numerical methods for solving differential equations numerically, which were originally defined on meshes of data points. The idea of mesh is to split the computational domain into a number of simple geometric elements, usually triangles (for 2D) or tetrahedral (for 3D), and to approximate the solution function over each element with the weighted residual concept. Finally the global solution is obtained by combining the individual solutions. The origins of FEM date back to the early 1960s, and its first application was the analysis of aircraft structures. FEM has been rapidly developed over the years and nowadays it is considered to be the most flexible method [10]. It can be used for a wide range of numerical problems in hydraulic, mechanical, aeronautical [11] and electrical engineering [12] for solving problems involving irregular geometries and steep gradients.

3.1 Toolchain

Due to the huge popularity of FEM, the market offers many packages for FEM analysis. They differ in terms of their features, terms of operation, functionality and areas of application. In case of this project, the most important was the division of tools into commercial and open-source. Commercial packages enable completing the entire project within one environment, but the cost of the license is usually high. When deciding to use free solutions, it is often necessary to select separate software for the implementation of each of the individual modelling stages: defining the geometry of the system, creating a mesh, performing the FEM analysis and graphical visualisation of the results. Figure 2a) shows the developed toolchain which consists of OCTAVEFootnote 1, NETGENFootnote 2, ELMERFEMFootnote 3 and PARAVIEWFootnote 4.

Fig. 2.
figure 2

Toolchain (a) for sensor FEM modelling with open-source software; e-skin mathematical model, 1-water-box, 2,3-capacitor plates: (b) geometry (NETGEN), (c) mesh (ELMER).

NETGEN is an automatic 3D tetrahedral mesh generator that contains modules for mesh optimisation and hierarchical mesh refinement [13].

ELMER FEM is a finite element software for the numerical solution of partial differential equations and multiphysical problems [14], enabling the modeling of mechanical, thermal, electrical, and magnetic systems.

ParaView is a data visualization application that enables qualitative and quantitative analysis techniques [15]. The data obtained were explored interactively in 3D, but it is also possible to use batch processing.

OCTAVE is a high-level programming language developed under the GNU Project for scientific computing and numerical computation. It may be also used for batch processing and in presented toolchain it was used to automate a series of calculations.

All programs were run in the LINUX MINT 19.1 operating system. Although each of them can also be used in Windows, they have been optimised for LINUX.

Data flow between applications was carried out using text files. This solution allowed for the validation of the results at each stage of modelling and batch processing. The automation of the calculations was carried out by OCTAVE, which generated batch .geo files for consecutive variants of the system’s geometry, ran meshing in NETGEN, and then FEM computation in ELMER FEM. Finally, the modelling results were processed in the OCTAVE environment to create graphs and in PARAVIEW, which was used to visualise the distribution of the magnetic field.

3.2 Modelling

The effect of mesh generated from GEO geometry import is displayed in Fig. 2 b). The model is set up of two capacitor plates of dimensions 110 \(\times \) 140 \(\times \) 1.6 mm placed on a plane, a 80 \(\times \) 80 \(\times \) 80 mm cuboid of water as an object approaching an open capacitor. Those three elements were placed inside a sphere of atmospheric air with a diameter of 500 mm. The next variants of the modelled system differed in the distance between the water box and the plane of the capacitor plates. This distance varied from 1 to 50 mm with an increment of 1 mm.

Each of the 50 .geo models was meshed in the NETGEN batch processing environment. For the project described, Delaunay tetrahedral meshing modules [16] were used. An example of the meshing result is presented in 2c). The maximum height of a tetrahedral element was set up to 0.005 m, hence each final mesh consisted of 25553 points, 138243 elements, which established 21648 surface elements. Then each of the meshes was saved in a format dedicated for ELMER FEM. The ELMER FEM environment provides an opportunity to solve Maxwell’s Eqs. (14) that govern the macroscopic electromagnetic theory.

$$\begin{aligned} \nabla \cdot \vec {D} \quad =\quad \rho \end{aligned}$$
(1)
$$\begin{aligned} \nabla \cdot \vec {B} \quad =\quad 0 \end{aligned}$$
(2)
$$\begin{aligned} \nabla \times \vec {E} \quad =\quad -\frac{\partial {\vec {B}}}{\partial {t}} \end{aligned}$$
(3)
$$\begin{aligned} \nabla \times \vec {H} \quad =\quad \vec {J}+\frac{\partial {\vec {D}}}{\partial {t}} \end{aligned}$$
(4)

where: \(\nabla \) denotes the three-dimensional gradient operator, \(\vec {D}\) is the electric flux density, \(\vec {B}\) is the magnetic flux density and \(\vec {E}\) is the electric field strength, and \(\vec {H}\) is the magnetic field strength.

For linear materials the fields and fluxes are simply related with Eqs. (5) and (6).

$$\begin{aligned} \vec {B} \quad =\quad \mu \vec {H} \end{aligned}$$
(5)
$$\begin{aligned} \vec {D} \quad =\quad \epsilon \vec {E} \end{aligned}$$
(6)

where the permittivity \(\epsilon = \epsilon _0 \epsilon _r\) is defined through the permittivity of vacuum \(\epsilon _0\) and the relative permittivity of the material \(\epsilon _r\). In the modelled stationary case the electric field may be expressed with a help of an electric scalar potential \(\phi \) according to Eq. (7).

$$\begin{aligned} \vec {E} \quad =\quad - \nabla \phi \end{aligned}$$
(7)

Assuming linear material law and using the Eq. (1) gives Eq. (8)

$$\begin{aligned} - \nabla \cdot \epsilon \nabla \phi \quad =\quad \rho \end{aligned}$$
(8)

where \(\rho \) is the charge density. The energy density of the field is expressed by Eq. (9).

$$\begin{aligned} e = \frac{1}{2} \vec {E} \cdot \vec {D} =\frac{1}{2} \epsilon (\nabla \phi )^2 \end{aligned}$$
(9)

Thus the total energy of the field may be computed from Eq. (10).

$$\begin{aligned} E = \frac{1}{2} \int _{\varOmega }^{} \epsilon (\nabla \phi )^2 d\varOmega \end{aligned}$$
(10)

where \(\varOmega \) is any volume with closed boundary surface. As there is only one potential difference \(\phi \) present then the capacitance C may be computed from (11).

$$\begin{aligned} C = \frac{2E}{\phi ^2} \end{aligned}$$
(11)

The StatElecSolve module by Leila Puska, Antti Pursula, Peter Råback was used for this purpose. This module enables for calculating the electrostatic potential in a linear dielectric material and a conductive medium. Depending on the potential, different domain variables can be calculated as well as physical parameters such as capacitance. The mesh definition together with the .sif file defining the used constants, solvers and simulation boundary conditions constituted batch files for individual models calculated in ElmerSolver which is the module of ELMER FEM. In this project solvers using conjugate gradient-oriented algorithms were used. For electric potential Dirichlet boundary conditions were used to define the value of the potential on boundaries of capacitor plates (0 V and 3 V). The simulation results were saved both in .dat files (containing individual values of electric capacity of the system) and in .vtu files dedicated to PARAVIEW 3.

Fig. 3.
figure 3

E-skin modelling visualisation (PARAVIEW) - the electric potential distribution.

4 Tests

The section contains a description of the tests performed to verify the correctness of the simulations’ results. For this purpose, a robotic workstation was developed using the Fanuc M10iA industrial robot. It goes on to describe the comparison of the results obtained by simulation and measurement.

4.1 Experimental Setup

For initial tests, a plastic 80 \(\times \) 80 \(\times \) 80 mm thin-walled box filled with water was proposed as an object approaching an open capacitor. The test object was suspended over a simplified e-skin model by attaching it with thin nylon lines to the robot’s handle. This allowed precise positioning of the object’s distance from the e-skin and eliminated the influence of robotic components on the measurement. Preliminary measurements were used to determine the number n of periods of the signal generated by the e-skin electronic driver depending on the distance of the test object from the e-skin. A dedicated electronic circuit described in [6] was used to determine this value. The circuit indirectly measures the frequency f depending on the capacitance of the open capacitor based on a number n counted at a fixed time T of 720 \(\upmu \)s. As a result, each measurement point of the Fig. 4a) plot was determined from about 10, 000 of recorded measurements of n values.

4.2 Comparison of the Measurement Results with the Simulation Model

The simplified e-skin model was modelled and simulated using the toolchain described in Sect. 3. As a result of the simulation, the model presented the capacitance of an open capacitor as a function of the distance of a container of water near it. In order to compare the measurement results with the simulation results, it was necessary to calculate the capacitance of the open capacitor based on the measured value of n. The relationship is described by the formula (12).

$$\begin{aligned} C(d) = \frac{k}{R} \cdot \frac{1}{f(d)}, \end{aligned}$$
(12)

where: C - capacity [pF] of the open capacitor, d - distance [mm] to the object being approached, \(f = n/T\) - frequency [1/s] of the signal generated by the electronic system, k- experimental constant coefficient characterising the system, R- resistance characterising the system, \(k/R = 0,00001\) [pF/s].

The measurement results had the same character of changes as those obtained in simulations, but the dynamics of their changes differed significantly. Therefore, a linear function was developed to transform the measurements of the physical system to match the simulation results. The transformation was made according to formula (13).

$$\begin{aligned} C_t(d) = a \cdot (C(d)+b) +c, \end{aligned}$$
(13)

where: \(a = 50.0, b = -3.0, c = -7.5\) - constant transformation coefficients; a is unitless; b and c in [pF].

Finally, a comparison of the simulation results obtained and the transformed measurement data is shown in Fig. 4b).

Fig. 4.
figure 4

(a) Test stand proximity measurements; (b) proximity simulation verification.

5 Summary

The mathematical modelling proposal presented in the article reduces the costs of creating prototypes and testing them in the laboratory. This enables faster acquisition of knowledge and reduced material consumption for producing prototypes for research. The developed toolchain allows for the optimisation of sensors used in robotics (and not only) without the need to incur the costs of software licenses for FEM. Although all the described software is free, there is no technical limitation to using it for more complicated geometry and for many more solvers for modelling other physical phenomena for the same project. ELMER FEM enables parallel computation - it historically used message passing but now is developed towards multithreading using OpenMP. ELMER FEM can be used on multiple cores, and it also supports several ways of geometry partitioning. The only inconvenience of using the described environment is the need to master several tools and transfer files between them. However, using four different applications makes it possible to optimise the workflow through parallel data processing on hardware with adequate computing power and an operating system that works better with a particular application. As the developed toolchain is free, it significantly reduces the optimisation and implementation costs of the developed solutions. The software used to build the toolchain is also open source, which allows for code validation and modification required by the newly developed materials. Commercial solutions do not offer such possibilities.