A New Real-Time Pinch Detection Algorithm Based on Model Reference Kalman Prediction and SRMS for Electric Adjustable Desk

This paper presents a new algorithm based on model reference Kalman torque prediction algorithm combined with the sliding root mean square (SRMS). It is necessary to improve the accuracy and reliability of the pinch detection for avoiding collision with the height adjustable desk and accidents on users. Motors need to regulate their position and speed during the operation using different voltage by PWM (Pulse Width Modulation) to meet the requirement of position synchronization. It causes much noise and coupling information in the current sampling signal. Firstly, to analyze the working principle of an electric height adjustable desk control system, a system model is established with consideration of the DC (Direct Current) motor characteristics and the coupling of the system. Secondly, to precisely identify the load situation, a new model reference Kalman perdition method is proposed. The load torque signal is selected as a pinch state variable of the filter by comparing the current signal. Thirdly, to meet the need of the different loads of the electric table, the sliding root means square (SRMS) of the torque is proposed to be the criterion for threshold detection. Finally, to verify the effectiveness of the algorithm, the experiments are carried out in the actual system. Experimental results show that the algorithm proposed in this paper can detect the pinched state accurately under different load conditions.


Introduction
People spend quite a large portion of their day-time in sedentary behavior [1]. With the continual increase of sitting down hours, musculoskeletal system problems are becoming more and more serious [2]. For the sake of alleviating this problem, the electric height adjustable desk is widely used in today's office worldwide [3]. Automatically adjusting the height of the desk using DC (Direct Current) motors provides an alternative working pattern to choose standing or sitting. Meanwhile, it also brings some safety problems during its rising or falling. Children or careless people may injure themselves when they misuse a height adjustable desk. Thus, during the movement, the state must be monitored and diagnosed effectively to guarantee safe operation and prevent human casualties. Therefore, anti-pinch detection is an essential function in the adjustable height desk and plays a crucial role in reliable operation.
Many researchers have conducted intensive research on anti-pinch detection. In pinch detection of car window, which is similar to the height adjustable desk, angular velocity detection [4,5], armature current detection [6][7][8][9], torque rate detection [10][11][12], and torque detection [13][14][15] of the motor are 2 of 16 often used. As the armature current value and motor torque of DC motor are reflected in the running state, those threshold values are selected as a basis for judgment [7]. When the desk meets obstacles during the rising or falling process, current or torque value exceeds the threshold, and the window begins to retract. Unfortunately, it has a poor performance in the real system. As the desk should keep the position synchronization of different desk legs, the cross-coupling between motors [16] will be obvious. Meanwhile, compared with windows, the PWM (Pulse Width Modulation) signal of motor speed regulation will also introduce noise. To make up for the inadequateness in the practical situation, choosing the appropriate filtering algorithm is the key.
There exist various kinds of filter design, such as H∞ filter [17,18], H_-/H_∞ filter [19], Kalman filter [20,21], particle filters [22,23], fast Fourier transform (FFT) [24,25], wavelet transform (WT) [26][27][28][29], empirical mode decomposition (EMD) [30,31], independent component analysis (ICA) [32], and so on. H∞ filter does not make an assumption about the noise, and it minimizes the maximum estimation error, but H∞ filter cannot guarantee that the pinch system's estimation error is minimized owing to its high computational cost [33]. Particle filtering shows obvious superiority in processing the nonlinear state-space model [34]. Particle filtering uses Monte Carlo simulation to achieve recursive Bayesian filter by a large number of random samples called particles. The core is to use a group of random samples (particles) with corresponding weights to represent the posterior distribution of states, and the weighted sum of random samples is used as estimates of states. Filter design lacks the analysis of the input interference signals, which easily leads to deviations and divergences in the estimates. Owing to its multi-resolution properties and behavior of singularities [29], wavelet transform can locate the particular points and widely used in many domains. However, wavelet transform needs a high operating cost for real-time detection. For electric height adjustable desk pinch detection, the filter method not only should be intelligible to be compatible with different load conditions, but should also have low computational costs. Among these algorithms, the Kalman filter has a lower calculation and is suitable for real-time detection. The Kalman filter is mainly used to estimate system states that can only be observed indirectly or inaccurately by the system itself [35].
On the other hand, the fixed absolute pinch estimator used in the car window [13] is not suitable for our plant. It does have a fast response and is easy to implement. However, the load over the height adjustable desk is uncertain and would be changed anytime. The fixed value cannot distinguish the actual load situation. It might not be a general solution because the plants would easily miss the pinch and make false alarms. A variable threshold will be able to distinguish the situation of the pinch better.
In this paper, the electric height adjustable desk system, which uses sampling resistors as the current detection sensor of the motor, has adopted a new real-time pinch detection algorithm based on model reference Kalman prediction and dynamic threshold using sliding root mean square (SRMS). In this algorithm, the mathematical and simulation model is established to present the relationship between the DC motor load torque and input variables, which contains current signals, voltage, and noises. Moreover, the armature voltage is given by the based on the cross-coupling control. Then, the load torque estimation based on the steady-state Kalman filter is presented. The motor parameter identification [36] is conducted to improve the performance of the steady-state Kalman filter. The SRMS of pinch torque is used as the anti-pinch criterion, which not only quickly identifies the anti-pinch points of different load states, but also has strong robustness under different working conditions.

Model of Electrical Height Adjustable Desk
The electric height adjustable desk is commonly driven by two permanent magnets brushed DC motors (PMDC). For a DC motor drive system, there are two essential balance equations, including voltage and torque balance equation in model. The voltage balance equation can be expressed as follows: The torque balance equation can be expressed as follows: In Equation (2c), T l is subdivided into T load and T p . T load is the load torque, which is used to drive load in a normal condition of an electric height adjustable desk. T load is proportional to the weight of the load. T p is the pinch torque that only appears when obstacles hinder the raising and lowering of the height adjustable desk. As the vibration torque µ v varies during its operating condition, it can be assumed as a zero-mean white noise input u µ v with the variance Q µ v .
On the basis of the above balance equations, I d and ω are selected as the state variables. The state-space model of DC motor can be expressed as follows: Here, w is the plant noise of the height adjustable desk system and v is the measurement noise of a height adjustable desk system. U d is armature voltage, which is a time variable. It is the output of the following controller, which contains the PWM signal.
There are two motors in the mentioned height adjustable desk, for dual motor position synchronization problem, a cross-coupling control strategy is introduced to solve the dual-motor synchronization problem. The position bias between the two motors uses a cross-coupling control strategy based on PID (Proportion Integration Differentiation) control to compensate for the synchronous position error. The dual-motor position control method of the height adjustable desk system is shown in Figure 1. In the block diagram, for each motor, the error between the target position and real position is the input of the position PID controller. The PID controller is used to regulate the duty cycle of the PWM generator. The trigger signal PWM of power generator drive H-bridge to generate the armature voltage U d , which is used to drive each motor. For dual-motor, there is a bias between real position 1 and 2. The bias as the cross-coupling controller compensates and diminishes the synchronous position error.
The torque balance equation can be expressed as follows: In Equation (2c), is subdivided into and . is the load torque, which is used to drive load in a normal condition of an electric height adjustable desk.
is proportional to the weight of the load.
is the pinch torque that only appears when obstacles hinder the raising and lowering of the height adjustable desk. As the vibration torque varies during its operating condition, it can be assumed as a zero-mean white noise input with the variance . On the basis of the above balance equations, and are selected as the state variables. The state-space model of DC motor can be expressed as follows: Here, is the plant noise of the height adjustable desk system and is the measurement noise of a height adjustable desk system. is armature voltage, which is a time variable. It is the output of the following controller, which contains the PWM signal.
There are two motors in the mentioned height adjustable desk, for dual motor position synchronization problem, a cross-coupling control strategy is introduced to solve the dual-motor synchronization problem. The position bias between the two motors uses a cross-coupling control strategy based on PID (Proportion Integration Differentiation) control to compensate for the synchronous position error. The dual-motor position control method of the height adjustable desk system is shown in Figure 1. In the block diagram, for each motor, the error between the target position and real position is the input of the position PID controller. The PID controller is used to regulate the duty cycle of the PWM generator. The trigger signal PWM of power generator drive Hbridge to generate the armature voltage , which is used to drive each motor. For dual-motor, there is a bias between real position 1 and 2. The bias as the cross-coupling controller compensates and diminishes the synchronous position error.

The Steady-State Kalman Filter Based Pinch Torque Estimation
In this section, pinch torque estimation based on the steady-state Kalman filter is presented. At the beginning of pinch torque estimation, pinch state variables should be selected correctly. Then, the Kalman filter is introduced. Besides, for linear time-invariant systems, the steady-state Kalman filter can replace with traditional Kalman filter to save computational resources. Finally, the flow of pinch detection based on the Kalman filter is presented.

Selecting State Variable for Pinch Detection
In the height adjustable desk system, there are so many state variables that can be selected as pinch detection state variables to detect pinch condition, such as armature current, current rate, motor angular velocity, angular velocity rate, motor torque, and torque rate. Torque and torque rate are less sensitive to the motor parameter. Moreover, it is more straightforward to select motor torque as a pinch detection state variable to detect pinch conditions. However, torque cannot be measured directly. To solve the above problem, state estimation with the Kalman filter is used to predict torque. The traditional torque estimation method is based on control torque as follows: Because the electrical dynamics of the motor is much faster than the mechanical one, the control torque of the motor can be expressed as follows: From Equation (5), it can be seen that T c is proportional to armature current, which is equivalent to estimate armature current. Owing to the impact of dual motor synchronization, the amplitudes of oscillation of the armature current ripple are amplified, which makes it difficult to judge whether the height adjustable desk is encountering obstacles. The measured armature currents when encountering obstacles shown in Figure 2.

The Steady-State Kalman Filter Based Pinch Torque Estimation
In this section, pinch torque estimation based on the steady-state Kalman filter is presented. At the beginning of pinch torque estimation, pinch state variables should be selected correctly. Then, the Kalman filter is introduced. Besides, for linear time-invariant systems, the steady-state Kalman filter can replace with traditional Kalman filter to save computational resources. Finally, the flow of pinch detection based on the Kalman filter is presented.

Selecting State Variable for Pinch Detection
In the height adjustable desk system, there are so many state variables that can be selected as pinch detection state variables to detect pinch condition, such as armature current, current rate, motor angular velocity, angular velocity rate, motor torque, and torque rate. Torque and torque rate are less sensitive to the motor parameter. Moreover, it is more straightforward to select motor torque as a pinch detection state variable to detect pinch conditions. However, torque cannot be measured directly. To solve the above problem, state estimation with the Kalman filter is used to predict torque. The traditional torque estimation method is based on control torque as follows: Because the electrical dynamics of the motor is much faster than the mechanical one, the control torque of the motor can be expressed as follows: From Equation (5), it can be seen that is proportional to armature current, which is equivalent to estimate armature current. Owing to the impact of dual motor synchronization, the amplitudes of oscillation of the armature current ripple are amplified, which makes it difficult to judge whether the height adjustable desk is encountering obstacles. The measured armature currents when encountering obstacles shown in Figure 2. From Equation (2), the following equation can be obtained: In Equation (6), is used to drive the initial load, which varies with the initial load. only appears when the height adjustable desk encounters obstacles. Thus, is selected as the pinch state variable. As shown in Figure 3, calculated by Equation (6) can present the change of load and the situation of encountering obstacles in height adjustable desk. Furthermore, it can be seen that the From Equation (2a-d), the following equation can be obtained: In Equation (6), T load is used to drive the initial load, which varies with the initial load. T p only appears when the height adjustable desk encounters obstacles. Thus, T l is selected as the pinch state variable. As shown in Figure 3, T l calculated by Equation (6) can present the change of load and the situation of encountering obstacles in height adjustable desk. Furthermore, it can be seen that the Sensors 2020, 20, 4699 5 of 16 estimation of T l relies on the estimation of I d and ω. In the next section, the state-space model for pinch detection will be established based on the steady-state Kalman filter. estimation of relies on the estimation of and . In the next section, the state-space model for pinch detection will be established based on the steady-state Kalman filter.

The Steady-State Kalman Filter Based Pinch Detection
In this section, pinch detection of the height adjustable desk based on the steady-state Kalman filter is designed to detect pinch state. From the above Section 3.1, is selected as the pinch state variable. According to [10,11], it is reasonable to augment the torque as an additional state and modeled by a random walk using the zero-mean white noise with the variance as follows: The state-space model can be expressed as follows: Let the process noise and the observation noise be uncorrelated. ( ) is the process noise that is assumed to be drawn from a zero-mean multivariate normal distribution with covariance ( ), which ( ) meets the Gaussian white noise with zero-mean and variance , and ( ) the Gaussian white noise with zero-mean and variance . Similarly, the observation noise ( ) meets the Gaussian white noise with zero-mean and variance ( ).
Before the pinch observer design, it is necessary to prove the observability of (8), the judgment matrix of the observability is presented as follows: where = − * * , = * + * *

The Steady-State Kalman Filter Based Pinch Detection
In this section, pinch detection of the height adjustable desk based on the steady-state Kalman filter is designed to detect pinch state. From the above Section 3.1, T l is selected as the pinch state variable. According to [10,11], it is reasonable to augment the torque T l as an additional state and modeled by a random walk using the zero-mean white noise µ T with the variance Q T as follows: The state-space model can be expressed as follows: .
Let the process noise and the observation noise be uncorrelated. w(k) is the process noise that is assumed to be drawn from a zero-mean multivariate normal distribution with covariance Q(k), which µ v (k) meets the Gaussian white noise with zero-mean and variance q v , and µ T (k) the Gaussian white noise with zero-mean and variance q T . Similarly, the observation noise v(k) meets the Gaussian white noise with zero-mean and variance R(k).
Before the pinch observer design, it is necessary to prove the observability of (8), the judgment matrix of the observability is presented as follows: It is evident that the rank is 3, which means that the state-space Equation (8) can be observed. Thus, the armature current is suitable to be estimated and is used to estimate state variable T l .
To facilitate the above design in discrete time, it is necessary to discretize the state-space model. Using a sampling period T s , the state-space model can be rewritten as follows: where For simplification to be achieved, using the backward difference to make some approximation, they can be written as follows: Then, Equation (10) can be expressed as follows: After discretization is completed, the Kalman filter is introduced to modify and update the state variables. It is generally known that useful information is always affected by white noise in a real physical system. In this case, the Kalman filter is designed to minimize the variance of the estimation error. The standard Kalman filter consists of two parts: the predict step and update step.
For linear time-invariant systems (system matrices are not varying with time), the posteriori estimation error covariance matrix P(k|k) and the prior estimation error covariance matrix P(k k − 1) will converge towards steady-state values, which can be pre-calculated. Taking account of the real-time implementation issue, the steady-state Kalman filter gain is used. The steady-state estimation error covariance matrix P ∞ holds the following discrete-time algebraic Riccati equation: Then, K(k) can be replaced with K ∞ holding the following equation: Thus, the above five equations about the Kalman filter can be simplified into two equations:

Threshold Design and Judgment Criteria of Pinch Condition
After the pinch torque is estimated, the remaining problem in pinch detection is to determine the threshold level of the torque. To observe the estimated torque data in Figure 4, avoiding the start-up phase of the motor, it can be seen that the torque has a certain distribution characteristic during the stable condition. The quantile-quantile plot is used to check the normality of the torque data. The result is shown in Figure 5. The quantile-quantile plot uses quantiles as the standard for evaluating the normality. If the data completely conform to the normal distribution, the scattered points form a straight line in the figure; the closer the scattered points are to the straight line, the better Sensors 2020, 20, 4699 7 of 16 the normality. From Figure 5, the normality of the torque performs well. Thus, it is reasonable to use the confidence zone method to judge whether the obstacles are pinched [37].  To determine the torque's confidence zone, firstly, obtaining the mean value of the torque in stable condition, m and n correspond to the end moment and the start moment of stable conditions, respectively.
Then, to get the standard deviation of the torque in stable condition, According to the related knowledge of the normal distribution, the 99.73% confidence zone of the torque can be expressed as follows: Ψ probably describes the range of possible changes of the torque when the height adjustable desk is on stable condition. In the case of the stable condition of the height adjustable desk, it is almost   To determine the torque's confidence zone, firstly, obtaining the mean value of the torque in stable condition, m and n correspond to the end moment and the start moment of stable conditions, respectively.
Then, to get the standard deviation of the torque in stable condition, According to the related knowledge of the normal distribution, the 99.73% confidence zone of the torque can be expressed as follows: Ψ probably describes the range of possible changes of the torque when the height adjustable desk is on stable condition. In the case of the stable condition of the height adjustable desk, it is almost To determine the torque's confidence zone, firstly, obtaining the mean value µ T of the torque in stable condition, m and n correspond to the end moment t m and the start moment t n of stable conditions, respectively.
Then, to get the standard deviation of the torque in stable condition, According to the related knowledge of the normal distribution, the 99.73% confidence zone of the torque can be expressed as follows: Ψ T probably describes the range of possible changes of the torque when the height adjustable desk is on stable condition. In the case of the stable condition of the height adjustable desk, it is almost sure that the motor torque value will not exceed the confidence zone. Thus, the prescribed threshold can be set as T th .
On the other hand, because the plant noise and observer noise exist during the height adjustable desk operation, if the prescribed threshold is compared with the estimated torque, there will be a misjudgment of pinch condition. Using the method of sliding root mean square with the estimated torque, the sliding root mean square can be expressed as follows: l m is the window length value of the sliding, which can be determined according to the actual situation. In our application, l m = 16.
Let the smoothed torque T M compare with the prescribed threshold T th , when T M is greater than T th , the anti-pinch function of the height adjustable desk starts, which reverses the motor to release obstacles.

Pinch Detection Experiments
In this section, an electric height adjustable desk platform is given. Then, the dual-motor position synchronization algorithm is verified in MATLAB, which is consistent with the actual control method, as shown in Figure 1. On the basis of dual-motor synchronization, the pinch detection method proposed in this paper is verified with MATLAB. The simulation is conducted under a slight and heavy load situation. In addition, the actual experiment is implemented to validate the performance of the height adjustable desk pinch detection algorithm proposed in this paper.

Simulation Conditions
To validate the performance of the proposed method, the simulations are given with MATLAB. Considering the plant noise caused by the power supply and PWM in practice, and the measurement noise v is introduced into the simulations, where the plant noise w and the measurement noise v conform to a zero-mean, with a Gaussian distribution with variance Q and variance R, respectively. They can be replaced by uncorrelated white noise. The motor parameters are obtained by the recursive least squares (RLS) in Table 1. Owing to the coupling synchronization of two motors, there are mutual influences on their speed and armature current, which makes it hard to detect the pinch condition using them as pinch detection variables. Before the pinch detection, it is necessary to verify the synchronization between the two motors. As shown in Figure 6, there is a difference in the initial load of the two motors. Under the effect of cross-coupling control, dual motors achieve position synchronization. It can be seen that the torque increases distinctly when the height adjustable desk pinching obstacles, but the speed and current reflect the changes indirectly. That consolidates and verifies the accuracy of selecting the torque as a pinch detection state variable. In Figure 6, 'position 1 and 'position 2 represent the position of the two motors. 'est' and 'true' represent estimation results and simulation results of the model calculation mixed with the system noise, respectively.
Sensors 2019, 19, x FOR PEER REVIEW 9 of 16 current reflect the changes indirectly. That consolidates and verifies the accuracy of selecting the torque as a pinch detection state variable. In Figure 6, 'position 1′ and 'position 2′ represent the position of the two motors. 'est' and 'true' represent estimation results and simulation results of the model calculation mixed with the system noise, respectively. On the basis of the position synchronization of dual motors, in order to validate the performance of the height adjustable desk pinch detection algorithm proposed in this paper, the simulation experiments are implemented consisting of slight and heavy loads. According to the standards of the electric lifting desk industry, the pinch force must not exceed 100 N. In practice, the screw lead of the height adjustable desk is generally 20 mm. The transmission efficiency is 90%. The gear ratio is 44:1. The relationship between screw thrust and torque can be expressed as follows: * = 2 * * * * In our simulation experiments, the max load is set as 80 kg, which needs 800 N to drive. According to the above relationship between screw thrust and torque, the needed torque is about 0.064 N*m. Thus, 100 N is equal to 0.008 N*m. The pinching force can be simulated as follows: The simulation experiments are implemented under a slight and heavy load situation, which slight load is set under 30 kg (about 0.024 N*m), and heavy load of 80 kg (about 0.064 N*m). In practice, there is a different load to drive between moto 1 and moto 2. Thus, there exists a bias in loads. In the heavy load situation, the angular velocity, the armature current, and the torque of motor 1 and 2 are illustrated in Figures 7 and 8. As shown in Figures 7 and 8, when the height adjustable desk pinches the obstacles in heavy load, angular velocity slightly decelerates, and the armature current slightly increases as well. However, it can be seen that torque distinctly increases, and torque does not fluctuate like the angular velocity and armature current. In contrast, as shown in Figures 9 and 10, when the obstacles are pinched by the height adjustable desk in a slight load, the angular velocity also slightly decelerates, but the armature current and torque change more obviously, armature current abruptly increases, and torque sharply rises. The simulation results show that the pinch detection algorithm can detect the pinch state regardless of a heavy load or light load. On the basis of the position synchronization of dual motors, in order to validate the performance of the height adjustable desk pinch detection algorithm proposed in this paper, the simulation experiments are implemented consisting of slight and heavy loads. According to the standards of the electric lifting desk industry, the pinch force must not exceed 100 N. In practice, the screw lead L of the height adjustable desk is generally 20 mm. The transmission efficiency η is 90%. The gear ratio i is 44:1. The relationship between screw thrust F and torque can be expressed as follows: In our simulation experiments, the max load is set as 80 kg, which needs 800 N to drive. According to the above relationship between screw thrust and torque, the needed torque is about 0.064 N·m. Thus, 100 N is equal to 0.008 N·m. The pinching force can be simulated as follows: The simulation experiments are implemented under a slight and heavy load situation, which slight load is set under 30 kg (about 0.024 N·m), and heavy load of 80 kg (about 0.064 N·m). In practice, there is a different load to drive between moto 1 and moto 2. Thus, there exists a bias in loads. In the heavy load situation, the angular velocity, the armature current, and the torque of motor 1 and 2 are illustrated in Figures 7 and 8. As shown in Figures 7 and 8, when the height adjustable desk pinches the obstacles in heavy load, angular velocity slightly decelerates, and the armature current slightly increases as well. However, it can be seen that torque distinctly increases, and torque does not fluctuate like the angular velocity and armature current. In contrast, as shown in Figures 9 and 10, when the obstacles are pinched by the height adjustable desk in a slight load, the angular velocity also slightly decelerates, but the armature current and torque change more obviously, armature current abruptly increases, and torque sharply rises. The simulation results show that the pinch detection algorithm can detect the pinch state regardless of a heavy load or light load.

Experimental Verification
The electric height adjustable desk test platform and control system structure are adopted in this paper to validate the performance of the proposed method, as shown in Figures 11 and 12. In this platform, a DC power is supplied to the whole platform. The SIRIUS data acquisition instrument collects the motor armature currents and armature voltages with a 20 kHz sampling rate. The collected data observed by the SIRIUS are stored on the host computer. These collected data are used to estimate the torque. Two hall sensors are used to measure the height of the desk. Two sampling resistors are used to detect motor armature current. The STM32F103C8T6 produced by S.T. is selected as the control chip. The electric height adjustable desk is equipped with a separate lifting DC motor at each leg. Though a special motor drive chip, the control signal from STM32 is used to control the electric lifting desk movement.

Experimental Verification
The electric height adjustable desk test platform and control system structure are adopted in this paper to validate the performance of the proposed method, as shown in Figures 11 and 12. In this platform, a DC power is supplied to the whole platform. The SIRIUS data acquisition instrument collects the motor armature currents and armature voltages with a 20 kHz sampling rate. The collected data observed by the SIRIUS are stored on the host computer. These collected data are used to estimate the torque. Two hall sensors are used to measure the height of the desk. Two sampling resistors are used to detect motor armature current. The STM32F103C8T6 produced by S.T. is selected as the control chip. The electric height adjustable desk is equipped with a separate lifting DC motor at each leg. Though a special motor drive chip, the control signal from STM32 is used to control the electric lifting desk movement.  In practice, the experiments are conducted in two situations, rising and lowering. As shown in Figure 13, there is an abrupt change of armature current and torque during the rising of the height adjustable desk when the desk pinches the obstacle. Figure 13b shows that the smoothed torque is greater than the threshold at about 6.6 s, which can trigger the motor's retracting to release the obstacle. As shown in Figure 14, the torque effect will be less than 0 during the lowering of the desk owing to the effect of gravity. However, when the obstacle appears, there will be positive torque. The

Experimental Verification
The electric height adjustable desk test platform and control system structure are adopted in this paper to validate the performance of the proposed method, as shown in Figures 11 and 12. In this platform, a DC power is supplied to the whole platform. The SIRIUS data acquisition instrument collects the motor armature currents and armature voltages with a 20 kHz sampling rate. The collected data observed by the SIRIUS are stored on the host computer. These collected data are used to estimate the torque. Two hall sensors are used to measure the height of the desk. Two sampling resistors are used to detect motor armature current. The STM32F103C8T6 produced by S.T. is selected as the control chip. The electric height adjustable desk is equipped with a separate lifting DC motor at each leg. Though a special motor drive chip, the control signal from STM32 is used to control the electric lifting desk movement.  In practice, the experiments are conducted in two situations, rising and lowering. As shown in Figure 13, there is an abrupt change of armature current and torque during the rising of the height adjustable desk when the desk pinches the obstacle. Figure 13b shows that the smoothed torque is greater than the threshold at about 6.6 s, which can trigger the motor's retracting to release the obstacle. As shown in Figure 14, the torque effect will be less than 0 during the lowering of the desk owing to the effect of gravity. However, when the obstacle appears, there will be positive torque. The  In practice, the experiments are conducted in two situations, rising and lowering. As shown in Figure 13, there is an abrupt change of armature current and torque during the rising of the height adjustable desk when the desk pinches the obstacle. Figure 13b shows that the smoothed torque is greater than the threshold at about 6.6 s, which can trigger the motor's retracting to release the obstacle. As shown in Figure 14, the torque effect will be less than 0 during the lowering of the desk owing to the effect of gravity. However, when the obstacle appears, there will be positive torque. The above simulation and experiment indicate that the pinch detection algorithm proposed in this paper can successfully detect the pinch condition. above simulation and experiment indicate that the pinch detection algorithm proposed in this paper can successfully detect the pinch condition.

Conclusions
A new algorithm based on the model reference Kalman torque prediction algorithm combines with the sliding root mean square (SRMS) is proposed to conduct the pinch detection of the electric height adjustable desk. To implement pinch detection, the system model is established by DC motor dynamics. Considering the position synchronization of the dual-motor, the cross-coupling control strategy is introduced into the system model. To eliminate the influence of dual motor synchronization and noise from PWM, a new pinch state variable for pinch detection is proposed and compared with the traditional pinch state variable. To save computational cost in MCU (Microcontroller Unit), the steady-state Kalman filter is introduced to estimate the pinch state variable. To improve the performance of the steady-state Kalman filter, the motor parameter is obtained by RLS. To judge pinch state, the sliding root means square method combined with the confidence zone is used to determine the dynamic threshold.
The simulations and experiments show that the electric height adjustable desk pinch detection method can successfully detect the pinch condition in different situations. Moreover, the proposed pinch detection algorithm can recognize pinch state under different loads. The proposed pinch detection method will improve the reliability and safety of the current electric adjustable desk antipinch function.

Conclusions
A new algorithm based on the model reference Kalman torque prediction algorithm combines with the sliding root mean square (SRMS) is proposed to conduct the pinch detection of the electric height adjustable desk. To implement pinch detection, the system model is established by DC motor dynamics. Considering the position synchronization of the dual-motor, the cross-coupling control strategy is introduced into the system model. To eliminate the influence of dual motor synchronization and noise from PWM, a new pinch state variable for pinch detection is proposed and compared with the traditional pinch state variable. To save computational cost in MCU (Microcontroller Unit), the steady-state Kalman filter is introduced to estimate the pinch state variable. To improve the performance of the steady-state Kalman filter, the motor parameter is obtained by RLS. To judge pinch state, the sliding root means square method combined with the confidence zone is used to determine the dynamic threshold.
The simulations and experiments show that the electric height adjustable desk pinch detection method can successfully detect the pinch condition in different situations. Moreover, the proposed pinch detection algorithm can recognize pinch state under different loads. The proposed pinch detection method will improve the reliability and safety of the current electric adjustable desk antipinch function.

Conclusions
A new algorithm based on the model reference Kalman torque prediction algorithm combines with the sliding root mean square (SRMS) is proposed to conduct the pinch detection of the electric height adjustable desk. To implement pinch detection, the system model is established by DC motor dynamics. Considering the position synchronization of the dual-motor, the cross-coupling control strategy is introduced into the system model. To eliminate the influence of dual motor synchronization and noise from PWM, a new pinch state variable for pinch detection is proposed and compared with the traditional pinch state variable. To save computational cost in MCU (Microcontroller Unit), the steady-state Kalman filter is introduced to estimate the pinch state variable. To improve the performance of the steady-state Kalman filter, the motor parameter is obtained by RLS. To judge pinch state, the sliding root means square method combined with the confidence zone is used to determine the dynamic threshold.
The simulations and experiments show that the electric height adjustable desk pinch detection method can successfully detect the pinch condition in different situations. Moreover, the proposed pinch detection algorithm can recognize pinch state under different loads. The proposed pinch detection method will improve the reliability and safety of the current electric adjustable desk anti-pinch function.