A Framework for Optimal Placement of Strain Gauges on Elastic Elements of Force Sensors Using Genetic Algorithms

This paper presents a digital education tool for learning the specifics and behavior of a multi-objective genetic algorithm (MOGA) used to solve the problem of optimal placement of strain gauges on the elastic element of a force sensor. The paper formulates the problem statement and specifies how this problem can be solved using the MOGA. For the problem, the design variables are the locations of strain gauges and angles at which they are positioned. The goal functions are the output signal of the sensor and the measurement error from bending moments, which can be caused by the off-centric application of load. The solution algorithm is implemented within a framework that can be used to investigate and learn how parameters of MOGA influence its performance. The framework is used to run computational experiments for the given problem to find the optimal placement of strain gauges on the elastic element of a given force sensor. The performance of the MOGA in solving this problem is compared to that of the traditional approach.


Introduction
Currently, digital technologies are increasingly used in education, meaning that all information used in education tends to be is transformed into digital form [1][2]. This trend is expressed by taking tests using computers, online universities, and online courses [3]. Moreover, the digitization of educational tools is another critical trend [4][5].
Another trend in engineering education is that engineering becomes more and more complex, and students need to learn the skills of solving optimization problems in their respective domains on knowledge. Unfortunately, there is little emphasis on that in engineering curriculums. Besides, most of the design problems in engineering are inherently multi-objective. So, the task of developing a digital educational tool for learning how a multi-objective engineering problem can be solved using MOGA is relevant.
The paper has a two-fold goal. First, the paper must present a solution of a multiobjective problem from a specific engineering domain, namely, determining the optimal placement of strain gauges on the elastic element of a force sensor. Second, the solution of problem must be implemented as a piece of software for investigating how the parameters of the MOGA influence the speed of convergence and the quality of the obtained Pareto-optimal solutions. Third, the software must be used to solve the given problem, and performance of MOGA must be compared to that of traditional optimization methods.

Development of the framework
The framework is comprised of a Python module for solving the problem of determining the optimal placement of strain gauges on the elastic elements of a given sensor, as well as user interface modules for defining the parameters of the MOGA and post-processing the results. The following subsections formulate the problem and show how this problem is solved with the MOGA using the pymoo library for multi-objective optimization using genetic algorithms [6].

Problem statement
A strain-gauged force transducer is a transducer converting applied force to an electrical signal by measuring induced strain using strain gauges connected in the Wheatstone circuit. One of the key characteristics of a strain-gauged force transducer is its output signal at the rated load. The magnitude of the output signal influences the resolution of the instrument and its Signal-to-Noise ratio. Another important characteristic of a force sensor is the immunity to side loads and bending moments that can occur due to incorrect application of force. If the bending moment is applied to the force sensor, it will induce some strain, which will be measured by the strain gauges along with the strain from the vertical load.
However, if the construction of the elastic element is perfectly symmetrical, and the strain gauges are located accurately, and their gauge factors are identical, the influence of the bending moment will be eliminated by the topology of the Wheatstone bridge. The nature of this phenomenon was thoroughly elaborated in [7]. Briefly, the sensitivity to the bending moment arises when the responses of the individual arms of the Wheatstone bridge to the strain from the bending moment are not anti-symmetrical. Such a response can be caused by errors in positioning strain gauges on the elastic element, the variation of the gauge factor across strain gauges of the circuit, or a non-anti-symmetrical strain field from the bending moment. Although the paper only considers bending moments, the same can be applied to other parasitic loads. In multi-axis force/torque sensors, this behavior is called cross-talk, and eliminating cross-talk is the task of utmost importance is designing forcemeasuring instruments for robotics [8][9][10].
The problem is considered for the case of a membrane compression force sensor, Fig. 1, investigated in [7]. The sensor can measure vertical compressive force in the range of 0...25000 N. During operation, bending moments Mx and My can act on the force sensor. The magnitude of Mx and My is 35 N*m.
The bridge circuit is comprised of two strain gauges (SGs) experiencing tension and two SGs experiencing compression. Figure 2 shows the layout of the SGs on the surface A of the elastic element. The centers of the measuring grids of the SGs are located on the X-axis. The vector of design variables is as follows: where R1 is the distance from the center of the surface A to the centers of the measuring grids of SG1 and SG3, R2 is the distance from the center of the surface A to the centers of the measuring grids of SG2 and SG4, φ1 and φ2 are the angles between the main axes of the SG1 and SG2 and the X-axis, respectively. For SG3 and SG4, the angles are φ1+π and φ2+π, respectively. R1 and R2 vary in the range of 0…42 mm, and φ1 and φ2 vary in the range of 0… π/2. The placement of SGs is symmetrical with respect to ZY plane to eliminate most of the interference from bending moments.
The vector of the goal functions is as follows: where OS is the output signal of the bridge circuit, and S is the sensitivity of the sensor to the bending moments Mx and My. The sensitivity S is treated as a random variable because it is probabilistic by nature, as actual positions of SGs and their gauge factors are governed by a random distribution. Therefore, the sensitivity S is calculated as follows: S are the standard deviation values of the sensitivity to Mx and My, respectively. The simulation is conducted according to the method described in [10].
The parameters of the probabilistic simulation for calculating the sensitivity to Mx and My are as follows: Positioning tolerance: ±0.05 mm; Angular positioning tolerance: ±0.5º; Gauge factor tolerance: ±1.5%. The SGs are generic constantan (gauge factor is 2) linear strain gauges type LA11 produced by HBM [11].  The strain data is obtained using FEA system Code_Aster [7].

Solution of the problem using a MOGA
There are many libraries for multi-objective optimization using genetic algorithms. Deb and Blank gave a thorough review of them in [6]. In this study, the pymoo library is chosen [12]. This is an open-source library under the Apache 2.0 license. The library supports the most popular MOGAs, and it supports user-defined optimization problems. The library is written in Python. In [7], the procedure for calculating the sensitivity to bending moments was written in Octave language. For this study, the procedure is ported to Python, which is an easy task given the similarity between Octave and Python.
To define a user-defined problem, a class PlacementProblem is created. This is a child class of the Problem class [12]. PlacementProblem contains all procedures requires to calculate GF.
For a single solution with the design variable vector X, GF is evaluated as follows. First, it is checked that none of the gauges violate topological constraints, i.e., none of the gauges overlap, and none of the gauges go beyond the boundaries of the surface for mounting SGs. Figure 5 presents possible violations of the topological constraints. If the solution satisfied the topological constraints, GF is calculated using the procedure presented in [7].
The problem formulated above solved using NSGA II [13]. This is one of the most known MOGAs. NSGA II was used on many multi-objective problems [14][15][16][17][18]. Using NSGA II, the problem is solved as follows. First, the strain data required for calculating GF is loaded from a text file obtained from FEA. Second, the PlacementProblem class is initialized. Lastly, the algorithm is executed and the results of the algorithm are stored in text files for postprocessing. This procedure is implemented as a Python script. The input data for the script is as follows: 1. Population size; 2.
Number of generations until termination; 3.
Mutation probability; The output data of the script is the following: 1. Evolution of design variables; 2.
Values of indicator functions for each generation. The indicator functions are the Inverted Generational Distance Plus (IGD+) and Hypervolume [19]. IGD+ shows how close the obtained Pareto set is to reference Pareto set, and HV shows the hypervolume dominated by the current Pareto set. Calculating IGD+ requires a reference Pareto set. Unlike classical test problems for MOGA with known exact Pareto sets [20], this study is limited to the approximation of the exact Pareto set to be used as reference. The approximation is made by sampling the design space with a dense mesh using a Sobol sequence. The number of elements in the Sobol sequence is 500000. Figure 6 shows the approximation of the Pareto set used as a reference set for calculating IGD+. The information about the reference Pareto set is stored in a text file similar to FEA strain data. To ease the interaction with the script, a user interface is built around it. The interface has controls for setting the parameters of the MOGA and running it, Figure 7. The results can be investigated using two postprocessing modules. The first module, Fig. 7, shows the evolution of the population in the objective space using plots of performance indicators and scatter plots. Other modules, Fig.8, show the evolution of the population in the design space using histograms of design variables. The modules for postprocessing results are also capable of animating the process of population evolution.

Approbation of the framework
The efficacy of the framework is checked by solving the problem of determining the optimal placement of strain gauges on the elastic element of the force sensor presented in Section 2.1. First, the problem is solved using the developed framework with different parameters of the MOGA. Second, the problem is solved using a conventional approach to multi-objective problems. Lastly, the quality of the obtained Pareto-optimal solutions is compared using a quality indicator. The quality indicator is the generational distance (IGD+), which shows how close the obtained Pareto set to the reference Pareto set.

Solving the problem using the framework
To test the influence of the parameters of NSGA II on the quality of the obtained Pareto set and the rate of convergence, the problem is solved several times with different settings of NSGA II. The vector of parameters of the algorithms is as follows: where Npop is population size, Crossover is the crossover operator. The mutation operator is PM, and the probabilities of crossover and mutation are 0.95. The algorithm terminates after 20 generations. The population is initialized by Latin Hypercube sampling. Table 1 specifies the possible values of Npop, and Crossover [12] (Simulated Binary Crossover, Uniform Crossover, One-point Crossover).  Figure 9 shows the heatmap of the mean and standard deviation values of IGD+ for all combinations. The distributions are plotted for the last generation.
Based on Fig. 9 (a), the Pareto set obtained by NSGA II is closest to the reference set if Npop = 40. Besides, the greater Npop is the smaller the variation of results.  It is seen from the plots, that the greater the population, the less the variation from run to run. Figure 11 shows the distribution of Pareto optimal solution in the design space for NSGA II with UX, Npop = 10, the number of generations to termination is 50. Fig. 11. Distribution of Pareto optimal solutions in the design space, red and blue markers correspond to SGs experiencing tension and compression, respectively.

Solving the problem using a traditional approach and comparing performance with NSGA II
The problem is solved using a traditional approach by sampling the design space with a Sobol sequence and determining the Pareto set, followed by calculating IGD+ based on the reference Pareto set. The number of elements in the Sobol sequence is 1000.
For benchmarking, NSGA II is executed for Npop = 20 and for each crossover type, the number of generations to termination is 20.  Based on benchmarking results, Fig. 12, the efficacy of NSGA II in solving the problem of determining the optimal placement of strain gauges on the elastic element of force sensors is confirmed. The Python module the framework is based upon can be used as a part of the system for automation and control of the process of managing lifecycle of strain-gauged force transducers described in previous papers [21,22]. Moreover, the formulation of the placement problem can be readjusted to include such goal functions as nonlinearity or temperature error from non-uniform heating.

Conclusions
This paper presents a digital education tool for studying the performance of a multiobjective genetic algorithm used to solve the problem of optimal placement of strain gauges on the elastic element of a force sensor. The paper formulates the problem statement, and specifies how this problem can be solved using the MOGA NSGA II. The solution algorithm is implemented within a framework that can be used to investigate and learn how parameters of NSGA II influence its performance. The framework is used to run computational experiments for the given problem of determining the optimal placement of strain gauges on the elastic element of a given force sensor. Compared to a traditional approach, NSGA II gives better results in terms of Pareto set at fewer computational costs. Python modules used to build the framework can be used as submodules in a system for optimal design of strain-gauged force sensor, whereby better characteristics of strain gauges can be obtained just by changing placement of strain gauges without changing the elastic element.