#### Abstract

Linearity is an important index for evaluating the performance of various sensors. Under the Villari effect, there may be some hysteresis between the input force and the output voltage of a force sensor, meaning that the output will be multivalued and nonlinear. To improve the linearity and eliminate the hysteresis of such sensors, an output compensation method using a variable bias current is proposed based on the bidirectional energy conversion mechanism of giant magnetostrictive material. First, the magnetization relationship between the input force, bias current, and flux density is established. Second, a nonlinear neural network model of the force-magnetization hysteresis and a neural network model for the compensation control of the force sensor are established. These models are trained using the magnetic flux density-force curve and the magnetic flux density-current curve, respectively. Taking the optimal linearity as the objective function, the bias current under different input forces is optimized. Finally, a bias current control system is developed and an experimental test platform is built to verify the proposed method. The results show that the proposed variable bias current hysteresis compensation method enables the linearity under the return of the force sensor to reach 1.6%, which is around 48.3% higher than under previous methods. Thus, the proposed variable bias current method effectively suppresses the hysteresis phenomenon and provides improved linearity for giant magnetostrictive force sensors.

#### 1. Introduction

Giant magnetostrictive materials (GMMs) are a new type of functional material that offers a high Curie temperature, high magnetic mechanical coupling coefficient, good frequency response characteristics, and large magnetostrictive strain. They are widely used in transducers [1–4], actuators [5, 6], fuel injectors [7], sensors [8–11], energy collection [12–14], and other fields [15, 16]. The characteristics of GMMs are well suited to the development of high-performance force sensors, especially their fast response speed, high energy conversion efficiency, and high compressive strength [17–19]. However, irreversible phenomena such as domain rotation and domain wall movement in the magnetization process of GMMs will cause energy loss in the system and result in hysteresis, which is characterized by multivalued and nonlinear characteristics in the flux density vector, magnetization vector, and magnetic field intensity vector [20–23]. Different from the common nonlinear links in nonlinear control theory, GMM nonlinearity exhibits its own memory and single-input/multiple-output mapping characteristics. These properties not only reduce the detection accuracy of the system but also produce a phase shift and harmonic distortion related to the amplitude of the input signal, weakening the feedback effect in the closed-loop system and causing system instability. It is these complex factors that introduce great difficulties to the theoretical description of the nonlinear characteristics of GMMs, severely restricting the practicality of force sensors that use GMMs as the sensitive element.

Nonlinear feedforward compensation is a very effective method for solving hysteresis nonlinearities [24–27]. Reference [28] compensated the output displacement error of a GMM-based positioning table drive system using a dynamic recurrent neural network feedforward control strategy. The experimental results showed that this control strategy has an excellent error compensation effect. Reference [29] designed an active disturbance rejection control scheme based on a radial basis function neural network and proposed a dual-channel composite controller scheme using an adaptive neural network for feedforward inverse control and an active disturbance rejection controller for closed-loop feedback control. This scheme is able to estimate and compensate the delayed disturbance, and the effectiveness of the control method was verified through MATLAB simulations. In a recent study [30], an inverse model is formulated to seek real-time compensation of rate-dependent and asymmetric hysteresis nonlinearities of a giant magnetostrictive actuator. The proposed compensator is applied as a feedforward compensator to the actuator can substantially suppress the hysteresis and output asymmetry nonlinearities in the entire frequency range considered in the study. Reference [31] studied the GMM nonlinear compensation problem based on different methods, but only provided general qualitative analysis in terms of iterative compensation and adopted a fixed step size for the iterations. To satisfy the control accuracy requirements, the step size cannot be too large, but very small values will reduce the execution efficiency of the program. Solving the contradiction between the system convergence rate and the steady-state error is a key issue for GMM nonlinear compensation control.

To date, there have been many studies on the hysteresis compensation of GMM. Most research has focused on the actuator based on the magnetostrictive effect, with little attention to the hysteresis compensation of sensors based on the inverse magnetostrictive effect. Therefore, from the realization of force sensing application and the demand for giant magnetostrictive device application technology, there is a lack of compensation method suitable for improving the accuracy of a giant magnetostrictive force sensor. Therefore, in this paper, a force sensor based on giant magnetostrictive material is developed. The traditional control strategy is organically combined with intelligent material sensors. Starting from the mechanism of the Villari effect and the magnetization constitutive model under external force, using the magnetization mechanism under magnetic field (current), a compensation idea of variable bias current is proposed to compensate the output signal error of the force sensor. Using machine learning theory [32] and a backpropagation (BP) neural network method based on the beetle antennae search (BAS) algorithm [33], a magnetization hysteresis model and a current compensation model for the GMM under the combined action of a magnetic field and a force are established. The obtained models are trained to optimize the optimal bias current under different input forces, and numerical simulations are carried out. The simulation results show that, compared with other optimization algorithms, BAS-BP has a short runtime and fast convergence speed, thus providing a new approach for describing the hysteresis characteristics of force sensors. The proposed variable bias current compensation idea is effective for improving the linearity of the force sensor. In addition, an experimental platform is built to further verify the performance of the force sensor and the proposed compensation method. The experimental results show that the proposed variable bias current feedforward compensation method effectively reduces the output hysteresis and nonlinearity of the force sensor and improves its linearity. The research results provide a theoretical and technical foundation for high-performance force sensors in the field of industrial detection.

#### 2. Structural Design and Nonlinear Magnetization Model of Force Sensor

##### 2.1. Structural Design

A structural diagram of the force sensor is shown in Figure 1, and a photo is shown in Figure 2. When the external force acts on the push rod, it is transmitted to the GMM rod made of Terfenol-D through the magnetic block. The distribution of magnetic flux density changes under the action of the external force. The changed magnetic flux density is detected through the Hall element installed in the air gap of the magnetic structure, allowing the external force applied to the force sensor to be determined. An aluminum alloy support ring structure is added around the Hall element. As the material has a permeability of close to 1, similar to that of the surrounding air and Hall element, the magnetic flux density passes through the Hall element and its surrounding structure evenly, resulting in improved sensitivity. The magnetic field provided by current excitation can be adjusted by modifying the current. This has the advantages of producing an adjustable bias magnetic field and enabling relatively simple repeated experiments, but does result in coil current heating. Because any change in temperature will cause thermal expansion in the GMM and reduce its magnetic mechanical coupling efficiency, a water-cooling tank is used. The built-in water circulation structure effectively prevents the temperature change from influencing the magnetization and is conducive to the assembly and fixation of the giant magnetic rod.

##### 2.2. Magnetization Model of Force Sensor

For different GMMs, the linear segment and slope of their characteristics will be different, although there is generally an optimal linear segment. Therefore, according to the required force-measuring range and the size, sensitivity, and linearity of the designed force sensor, the GMM needs to be analyzed in detail to determine the optimal bias magnetic field under given working conditions. An excitation current that is too small or too large will cause serious nonlinearity and reduced sensitivity. The proposed force sensor uses a GMM rod made of Terfenol-D as the sensing element. Based on the Jiles-Atherton model, the force-magnetization model of giant magnetostrictive force sensor (the relationship between magnetic parameters and external force ) is established, and the relevant expression is as follows [34–36]: where , , , , , , , , , , , and are total magnetization, nonhysteresis magnetization intensity, flexible coefficient of the magnetic domain, saturation magnetostriction coefficient, saturation magnetization, directional coefficient, effective pinning coefficient, effective force area, permeability of vacuum, magnetic flux density, Weiss molecular field coupling coefficient, and stress. The magnetic field intensity produced by an -turn bias coil when the current is .

Using Equations (1) and (2), the variation in the magnetic flux density with respect to the input external force under different bias currents can be obtained. Using the mathematical model, the relationship curve between magnetic flux density and input external force with bias currents of 0.8 A, 1.0 A, 1.2 A, 1.4 A, and 1.6 A is shown in Figure 3, in which the input external force cycle goes from 0 N to 1500 N and back to 0 N.

The magnetization curve under the action of the force shows that the nonlinear phenomenon of magnetization mainly exists in the initial stage of the force increase (lift) and force decrease (return) phases. In other stages, there is a good linear relationship between the magnetic flux density of the material and the input external force. The wide linear force region is the basis for the better application of GMMs in force sensors. The application of different bias currents modifies the linear region and magnetic flux variation range of the sensor, which is conducive to the design of a suitable measuring range and improving the sensitivity of the force sensor. However, the relationship between magnetic flux density and input external force is multivalued and exhibits a “butterfly” shape. This reduces the electromechanical conversion efficiency, which seriously restricts the practicability of force sensors that use GMMs as the sensitive elements. As the current increases, the scale of the hysteresis phenomenon decreases, but the variation range of the magnetic flux also decreases. Because the hysteresis phenomenon can be compensated by adjusting the current and changing the magnetic flux density, the current with the largest variation range of magnetic flux density is selected as the optimal bias current. When the bias current is 1.2 A, the sensor exhibits the maximum variation in magnetic flux. Nonlinear characteristic control methods generally use the least-squares method or other regression-based techniques to fit the nonlinear curve into a function, but this makes it difficult to achieve high control accuracy. To realize more precise control of the output performance of the force sensor, the hysteresis nonlinearity must be accurately modeled and compensated.

In the process of external force application, the main factors determining the internal magnetic flux density are the force and the rate of change of force. Let and represent the lift and the return, respectively. The magnetization relationship of this process can be described as follows:

When the hysteresis loss of the GMM is in the ideal state, there is no energy loss, and the total magnetization is equal to the nonhysteresis magnetization . This can be written as follows [37]:

In Equation (4), Taylor expands and ignores higher-order terms, which can be obtained after finishing:

Using Equations (4) and (5), we have a model for the change in magnetic flux density with respect to the bias current under the input external force. According to this mathematical model, the relationship between the magnetic flux density and bias current under different input forces is shown in Figure 4.

It can be seen from the figure that the magnetic flux density curve is approximately linear for bias currents in the range [0.8 A, 1.3 A], and the rate of change of the magnetic flux density decreases as the input force increases. We take the position of the optimal bias current (1.2 A) to calculate the rate of change of the magnetic flux density. The results are presented in Table 1.

It can be seen from the table that the input force has little effect on the rate of change of the magnetization curve. Increasing the input force decreases the rate of change of the magnetic flux density curve, and there is a nonlinear relationship between the rate of change and the external force. The relationship between the two can be described as follows:

#### 3. Nonlinear Feedforward Compensation Control of Force Sensor

##### 3.1. Variable Current Feedforward Compensation Principle

According to its working principles, the giant magnetostrictive force sensor preadds a magnetic field and realizes real-time adjustment of the bias magnetic field by providing current to the excitation coil. To overcome the problem of output hysteresis compensation by the force sensor, a variable-current hysteresis nonlinear compensation method is proposed in this paper. A schematic diagram of this method is shown in Figure 5. According to the input external force , the material flux density is compared with the expected flux density curve, and the system compensation current is calculated inversely according to the flux density error signal. The compensation circuit is controlled by a core module that superimposes the compensation magnetic field and the external magnetic field, so that the actual output of the system under the action of the compensation signal is as close as possible to the expected output . From the relationship between the input external force and the material target magnetic flux density, the actual input external force can then be accurately calculated.

##### 3.2. Magnetization Model and Hysteresis Compensation Model Based on BAS-BP

According to the variable-current compensation principle of the force sensor, the force magnetization and current compensation need to be modeled. At present, the main methods for describing GMM hysteresis include experimental approaches [38], the J-A model [39, 40], the Preisach model [41], and other intelligent models [42, 43]. The experimental method requires large amounts of data, which are difficult to obtain. In this study, a mathematical method based on the J-A model is used. The process of establishing the sensor output hysteresis model is complex, requiring an iterative numerical method. The hysteresis loop cannot be obtained under an arbitrary step length, so it is difficult to adjust the model to any specific working point. Neural networks provide an effective black box tool for establishing the nonlinear relationship between an input and an output. They have relatively simple mathematical formulations and require few parameters to describe the nonlinear hysteresis behavior. However, the data involved has the characteristics of small sample size, dynamic and nonlinear data, so the real-time and high prediction accuracy requirements are put forward for the modeling algorithm.

Based on this, this paper combines the BAS optimization algorithm with the traditional BP neural network to model the force-magnetization model and the current compensation model and gives the BAS-BP feedforward compensation system structure schematic diagram of the giant magnetostrictive force sensor, as shown in Figure 6. To quantify and fit the output of the force sensor, the force magnetization hysteresis model is trained by the BAS-BP neural network. Similarly, to compensate the hysteresis nonlinearity of the force sensor, the inverse current magnetization model is trained using BAS-BP. As the method should allow the bias current to be adjusted, the total current entering the force sensor is the sum of the preapplied current and the feedback control current; the preapplied current is selected as the optimal bias current of the force sensor, i.e., 1.2 A.

###### 3.2.1. Principle of BAS Algorithm

The BAS algorithm [44] is a new technique for multiobjective function optimization based on the beetle foraging principle. Its biological principle is that a foraging beetle does not know where the food is, but can identify the strength of the food’s odor. The beetle has two long antennae. If the odor intensity received by the left antennae is greater than that received by the right antennae, the beetle will fly to the left in the next step, and vice versa. According to this simple principle, the beetle can effectively find food. Similar to genetic algorithms (GA) and particle swarm optimization (PSO), BAS automatically realizes the optimization process without knowing the specific form of the governing equation or gradient information. As BAS considers only one individual, its optimization speed is significantly improved over other optimization algorithms. Therefore, the combination of the BAS optimization algorithm and traditional BP neural network has high prediction accuracy and fast training speed, which is in line with the modeling requirements of relevant data in the article. The principle of BAS is illustrated in Figure 7, where is the distance between the two antenna coordinates; and represent left and right contact angles, respectively.

The modeling steps are as follows:

Create a random vector to be oriented by the beetle and normalize it: where is a random function and is the spatial dimension.

Create spatial coordinates of the left and right necessaries of the beetle: where is the spatial position of the beetle in the search and is the length of the whisker in the search.

Determine the odor intensity of left and right whiskers: where is the step length of the detected movement of the search and is the fitness function.

###### 3.2.2. Establishment of BAS-BP Neural Network Model

Because the initial weight and threshold of the BP algorithm are determined at random, and the gradient descent method is used to dynamically adjust the weight and threshold in the learning process, BP models can easily become trapped around local optima and converge slowly. First, a model combining BAS and a BP neural network is established to optimize the initial weight and threshold of the BP network. Learning and training is then conducted on the basis of optimization. The proposed BAS-BP method speeds up the convergence process, avoids becoming trapped around local optima, and finally improves the accuracy of the prediction model [45].

The modeling steps are as follows: (1)Create a random direction vector representing the BAS behavior. For the BP network with a structure, the search space dimension is the sum of the weight to be optimized and the number of thresholds, , where is the number of input layer units and is the number of hidden layer units(2)Determine the fitness function. The mean square error (MSE) between the model output and the expected output is taken as the fitness function, and the weight and threshold corresponding to the smallest value of the fitness function correspond to the optimal solution:where is the number of training samples, is the model output value of the sample, and is the actual value of the sample (3)Beetle position initialization. The random number between is taken as the initial solution set of the BAS, which is stored in (the optimal initial position of the beetle), and its fitness function is calculated and stored in (the optimal fitness function value of the initial position)(4)Update the position of the beetle’s left and right antennas. Update the position of the beetle’s left and right antennas using Equation (8)(5)Update spatial location. According to the position of the left and right antennas, the fitness function values of the left and right antennas are calculated, the strength is compared and the position of the beetle is updated according to Equation (9); that is, the weights and thresholds of the BP neural network are adjusted, and the fitness function values at the current position are calculated. If the fitness function value at this time is better than , then and are updated(6)Optimal solution generation. Whether the fitness function value meets the accuracy requirement or whether it meets the highest iteration number is determined. If the algorithm terminates when any condition is satisfied, otherwise step (3) is returned. When the algorithm stops iteration, the solution in is the optimal solution of training, namely, the optimal initial weights and thresholds of the BP neural network. The above optimal solution is brought into the BP neural network for secondary training and learning, and finally, the BAS-BP neural network model is formed

Perform the specific process of BAS-BP regression, as shown in Figure 8.

##### 3.3. Construction of Force Hysteresis Model and Current Compensation Model

Figures 9 and 10 show the fitting results of the BP neural network and BAS-BP neural network prediction model training set, respectively. It can be seen that the optimized model prediction curve is close to the real values. Figure 11 shows the curve of best fit to the BAS-BP model. It is clear that the optimal solution can be found after 11 and 5 iterations, respectively, and the convergence speed is significantly higher than that of other optimization algorithms.

**(a)**

**(b)**

**(a)**

**(b)**

**(a)**

**(b)**

In this paper, the average relative error (), the determination coefficient (), and the CPU running time during iteration () are selected to evaluate the performance of the model, and the calculation formulas are as follows: where is the number of samples and and are the predicted and real values.

From Equation (11) and Equation (12), it can be seen that the smaller the value of , the closer the value of to 1, indicating that BAS-BP has a better prediction performance.

To further verify whether the BAS-BP prediction model is superior to other intelligent optimization algorithms as a force hysteresis model, GA-BP [46] and PSO-BP [47] neural network models were established. In addition, ten groups of different sample data sets are obtained offline, calculating the different model prediction performance index as shown in Figure 12, where the solid line represents the force-magnetization hysteresis model, and the dotted line represents the current compensation model. Finally, the accuracy of the model is described by calculating the average values of , , and , respectively, as shown in Table 2.

It can be seen from Figure 12 that the of BAS-BP and PSO-BP prediction models under different samples is close to 0, which indicates that BAS-BP and PSO-BP have a high fitting effect. In addition, the values under different samples fluctuate to a certain extent. However, due to the large order of magnitude of the data in the force-magnetization hysteresis model and the current compensation model, the fluctuation error has little effect on the identification stability. It can be seen from Table 2 that the average value of of BAS-BP and PSO-BP prediction models is close to 0, and the average value of is close to 1, which further indicates that BAS-BP and PSO-BP have a high fitting effect. The error accuracy of the PSO-BP network is not much different from that of BAS-BP, but the training speed of the proposed BAS-BP network is much higher than that of PSO-BP. Therefore, based on the overall prediction accuracy and convergence speed, BAS-BP produces the best effect, indicating that BAS-BP regression has good applicability in the force magnetization model and current compensation model. Therefore, the neural network model has certain practicability for a variable current compensation strategy.

##### 3.4. Analysis of Simulation Results

To reduce the hysteresis nonlinearity of the force sensor output and reduce the return error, the force magnetization model and current compensation model trained by the neural network were used to determine the relationship between the compensation current, total current, and input external force. The results are shown in Figure 13.

During the simulations, the input external force was cycled from 0 N to 1500 N and back to 0 N in steps of 10 N. The input current of the force sensor was defined as the total current after the addition of the preadded current of 1.2 A and the feedback control current. The BAS-BP feedforward control variable-current compensation method was used to obtain the variation curve of magnetic flux density with respect to external force before and after compensation, as shown in Figure 14.

As can be seen from the figure, compared with the magnetization curve before hysteresis compensation, the linearity between the input and output after compensation has improved, and the hysteresis phenomenon has been effectively suppressed. In addition, the variation range of the magnetic flux density has become larger, which means that the sensitivity of the force sensor has improved. Compared with the target flux density curve, the error in the initial stage of the lift and return of the input external force is large, because the nonlinearity in these areas is obvious. Therefore, the variable-current compensation control method effectively reduces the force magnetization hysteresis nonlinearity of the force sensor and improves the output accuracy of the force sensor.

#### 4. Experimental Study of Hysteresis Nonlinear Feedforward Compensation Control

##### 4.1. Construction of Experimental Platform

To verify the performance of the force sensor and the effectiveness of the proposed hysteresis compensation method, the experimental platform shown in Figure 15 was constructed. An it6332b three-channel programmable DC power supply provides the current for the bias coil of the sensor. The temperature compensation system includes a water pump, switching power supply, and water tank to prevent temperature changes from affecting the GMM rod. A GMA driver provides the input external force for the force sensor, while two dynamometers (AT8203 and TDA08A) calibrate the input force in real time. The computer uses LabVIEW to detect the output voltage of the Hall element.

In accordance with the Hall effect, the Hall output voltage of the force sensor is as follows: where is the Hall coefficient, is the magnetic flux density transfer coefficient, is the permeability of vacuum (), and is the static voltage of the Hall element.

In the experiment, the output signal uses a standard voltage:

##### 4.2. Output Characteristics under External Force

The output variation in the external force is the main performance index of a force sensor, and its linearity directly determines the accuracy and effectiveness of external force detection. To evaluate the performance of the force sensor, a bias coil current of 1.2 A was applied to premagnetize the giant magnetostrictive rod. As the output voltage of the sensor has a nonlinear relationship with the force at small magnitudes, mutual cooperation between the nut and the disc spring is required to apply a certain preload to the giant magnetostrictive rod and eliminate the nonlinear phenomenon of the sensor output. The preload was set to 150 N. Due to the limitations of the experimental conditions, the output characteristics of the force sensor were only tested up to a 200 N input external force. The input external force cycled from 0 N to 200 N and back to 0 N, and the output voltage was measured. The results are shown in Figure 16.

Under the bias magnetic field generated by the excitation coil with a 1.2 A current and a preload of 150 N, the sensor exhibits a relatively good voltage variation range and linearity. The linearity is expressed as the percentage of the maximum deviation between the fitted curve and the real working curve:

The sensitivity of force measurement can be expressed as follows:

When the fitting curve is a linear target curve without hysteresis, Equation (14) calculates the linearity of the developed force sensor under lift and return to be 1.9% and 3.1%, respectively, in the range of 0–200 N. According to Equation (15), the sensitivity of the developed force sensor under lift and return is 0.36 mV/N and 0.34 mV/N, respectively.

##### 4.3. Output Characteristics under Bias Current

The magnetization model of the bias current is the main factor determining the magnetization hysteresis nonlinearity under a variable current compensation force. Under a preload of 150 N, the relationship between the output voltage and the input current of the force sensor under different external forces is shown in Figure 17. This relationship allows the rate of change in the magnetic flux density to be calculated; some results are presented in Table 3.

As can be seen from Figure 17, when the current is in the range 1.1–1.3 A, there is a good relationship between the output voltage and the bias current. Table 3 indicates that, as the input force increases, the rate of change in the magnetization decreases, which is consistent with the conclusion obtained by the numerical simulations.

##### 4.4. Output Characteristics before and after Current Compensation

The output of the force sensor before and after compensation is compared in Figure 18. The experimental results show that the nonlinear feedforward compensation control achieves a high level of accuracy, and the linearity of the force sensor under the return is 1.6%. Compared with the output characteristics before compensation, the linearity under the return has improved 48.3%, and the sensitivity has improved 1.4%. In addition, the hysteresis phenomenon is effectively suppressed. This is consistent with the numerical simulations, which demonstrates that the proposed compensation method using a variable bias current is a reasonable and effective means of improving the hysteresis nonlinearity and linearity of the force sensor. However, the sensitivity and linearity under lift have not been significantly improved because of the characteristics of the target output curve.

The error curve between the compensated output voltage and the ideal output voltage is shown in Figure 19. The maximum error between the actual output voltage and the ideal output voltage is 1.9 mV.

Repeatability generally refers to multiple measurements of the same object under the same conditions to measure the degree of consistency between the measurement results. For the force sensor, repeatability is one of its important performance indicators. If the repeatability is higher, the detection performance of the sensor is better and the use-value is higher. To further verify the proposed variable bias current compensation method, the giant magnetostrictive force sensor was measured five times under the same test conditions, and the results are shown in Figure 20.

According to the calculation of the test results, the maximum output voltage error of the developed magnetostrictive force sensor for five measurements is 0.64 mV, which has high repeatability. It further verifies that the compensation idea of variable bias current proposed in this paper is reasonable and effective for improving the hysteresis nonlinearity and linearity of the force sensor. In addition, the following work needs to add a feedback control method to improve the compensation idea of variable bias current to further improve the accuracy of compensation.

#### 5. Conclusions

Based on the material characteristics and magnetostrictive inverse effect of GMMs, a force sensor that uses Terfenol-D as the sensing element has been designed. (1)In view of the hysteresis and nonlinearity between the input external force, bias current, and flux density of the force sensor, the magnetization hysteresis model and current compensation model have been optimized using the BAS algorithm. Identification and prediction of the output results of the J-A model showed that the proposed BAS-BP algorithm achieves better identification accuracy and faster identification speed than GA- and PSO-based algorithms. These results demonstrate that the BAS-BP regression prediction model has good applicability for modeling the force magnetization and current compensation(2)Based on the hysteresis nonlinearity of the GMM and the BAS-BP controller, a variable bias current feedforward compensation method for hysteresis was proposed. Simulation results showed that the linearity between the input and output after compensation had improved and the hysteresis phenomenon was effectively suppressed. In addition, the variation range of the magnetic flux density became larger and the sensitivity of the force sensor was enhanced(3)An experimental platform was constructed to verify the performance of the force sensor and the proposed method. Using the hysteresis compensation method under a variable bias current, the linearity under the return of the force sensor was found to be approximately 1.6%, which is around 48.3% higher than before, the sensitivity was calculated to be 0.345 mV/N, and the maximum repeat error is only 0.64 mV. In addition, the hysteresis phenomenon was effectively suppressed. The experimental results show that the proposed method using a variable bias current is effective, providing a new method for the development of high-linearity sensors. In future work, the accuracy of force sensor control will be further improved by adding feedback control

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare no conflicts of interest.

#### Acknowledgments

The authors would like to thank Anhui University of Science and Technology for its support. This work is supported by the National Natural Science Foundation of China (No. 52105042 and No. 51675003), the Anhui Provincial Natural Science Foundation (No. 2008085QE214), and the China Postdoctoral Science Foundation (No. 2019M652159).