Simulation Study on Variable Pressure Margin Energy Recovery of Electric Loader Actuator

: The conventional electric loader uses a motor instead of an engine, which aligns with the current energy-saving and emission-reduction trend. However, the motor’s speed control performance and overload capacity are under-utilized, and the actuator suffers from the potential energy waste problem of the boom arm. This study proposes a variable pressure margin energy recovery system for the electric loader actuator. It uses a combination of a permanent magnet synchronous motor (PMSM) and a quantitative pump. It can achieve variable pressure margin control and energy recovery through the pressure feedback closed-loop control. AMESim is used to build the simulation model based on the system control strategy, actuator, supercapacitor, and PMSM mathematical mode. Under typical working conditions, the simulation study is conducted on a 50-type wheel loader to obtain cylinder displacement, system energy recovery, and energy-saving performance. The simulation results show that the system is feasible and can effectively reduce energy consumption. Its energy recovery efﬁciency is 65.4%. The PMSM energy supply is reduced by 28.6% with the variable pressure margin control. It has high energy-saving performance, and the energy-saving efﬁciency is 38.5%. It provides a reference for research on energy-saving systems for electric construction machinery.


Introduction
With global warming, the energy crisis, the rising oil prices, and the increasing improvement of emission regulations, conventional construction types of machinery with low energy efficiency and serious emissions can no longer meet the needs of the countries and the sustainable development of the industries in recent years. The pure electric system is an inevitable trend in developing construction machinery [1]. The electric construction type of machinery eliminates the engines and uses motors as the central drive units, which have the advantages of high power and energy efficiency, zero emissions, and are considered one of the ideal energy-saving and emission-reducing drive methods [2].
The PMSM has attracted more and more attention because of its high torque density and efficiency [3]. It is widely used in electric construction machinery because of its additional advantages of fast torque response and high-performance operation. The speed regulation control strategy of the PMSM is mainly divided into the variable-voltage variable-frequency control (VVVF), the direct torque control (DTC), the speed sensorless control, and the space vector pulse width modulation control (SVPWM) [4]. The SVPWM control system mainly includes a speed loop, current loop, and SVPWM control algorithm. With the development of sensor technology, the system can be detected in real-time and controlled [5,6]. Therefore, many scholars have applied sliding film control, fuzzy control, model predictive control, and other algorithms to PMSM speed control to further improve the performance of the PMSM. The SVPWM is a standard and successful technology for PMSM speed control [7].
The loaders are highly adaptable, flexible, and efficient as essential off-road machinery for construction transports. Therefore, they are widely used in mining, port terminal, and highway construction [8]. The actuator hydraulic system of the loaders also evolved from valve-controlled to pump-controlled technology with the development of hydraulic technology [9]. Using load-sensing (LS) technology to replace the throttling technology can reduce system overflow losses and improve system energy utilization. The series connection of pressure compensating valves before and after the multi-way valves allow the LS system to precisely control multiple actuators under conditions where a single pump is a driving unit [10]. Furthermore, the pressure compensation valves allow the pump outlet pressure to maintain the maximum load pressure value plus the preset LS differential pressure value to meet all the actuators. It also effectively avoids disturbances in flow distribution from individual actuators due to changes in load and operator commands. The preset LS pressure margin value is usually deliberately fixed at a high value to overcome throttling losses under the most severe operating conditions (maximum flow and minimum temperature) [11]. Therefore, it causes system pressure loss which leads to energy loss. Since the machine-hydraulic system with pressure feedback controls the LS pump, the system is less hydraulically damped and less stable under certain operating conditions [12]. Introducing the sensors to build electro-hydraulic control systems can effectively improve the performance of hydraulic systems in conventional scenarios [13][14][15]. Shengjie Fu et al. proposed an LS system of a quantitative pump based on variable speed control. A variable LS pressure margin control strategy was proposed for the static LS differential pressure that cannot meet the high efficiency of construction machinery under complex working conditions. It was tested on an 8 t pure electric drive excavator. The test results showed that it effectively reduced and improved the energy-saving performance of the system [16]. Madau R et al. proposed a variable LS pressure margin control strategy that was applied to the LS systems that used post-valve pressure compensation technology and tested on a full-size wheel loader. The test results showed that the system effectively reduced the loader energy consumption [17]. Therefore, using the sensor-based variable pressure margin LS systems can effectively improve the energy-saving performance of the systems.
The boom cylinders perform cyclic repetitive motion when the loaders perform loading and unloading operations. A large amount of actuator potential energy is converted into heat energy due to the multi-way valve throttling effect, causing the hydraulic oil temperature to rise. In severe cases, it may cause the deterioration of hydraulic oil, directly affecting the loader's service life and work performance [18]. The loader energy recovery can effectively solve this problem. Jiangjiang Feng proposed a potential energy recovery and reuse system for driving the loader boom arm based on the three-chamber hydraulic cylinder, building the test platform of the loader based on it. The test results showed that it had an excellent energy-saving performance and made the operation process of the actuator smoother [19]. Lin Li et al. proposed an electro-hydraulic driving and energy recovery system for the excavator boom arm based on the battery and accumulator. A model of electro-hydraulic driving and power management strategy of a 1.6 t pure electric hydraulic excavator was established. The simulation results showed that the system's potential energy recovery efficiency was as high as 92%, effectively reducing the system's energy consumption [20]. Therefore, the energy recovery of the loader actuators can effectively improve the energy-saving performance of the systems.
A variable pressure margin energy recovery system Is proposed for the electric loader based on the above analysis and combined with the characteristics of the hydraulic system of the actuator. It uses the supercapacitor as the energy storage element. It can realize the variable LS pressure margin control and the variable pressure margin control of the pressure compensation valve according to the input control signal through pressure feedback closedloop control. At the same time, the potential energy of the actuator can be recovered and stored in the supercapacitor when the boom arm drops. The simulation results show that the variable pressure margin control and energy recovery can effectively reduce the energy consumption of the electric loader.
The paper Is organized as follows. Section 2 introduces the working principle of the system. Section 3 introduces the analysis of the system mathematical model. Section 4 Electronics 2022, 11, 4215 3 of 23 introduces the modeling and simulation of the system. Sections 5 and 6 are the discussions and the conclusions, respectively.

Working Principle of the System
This section analyzes the working principle of the conventional system, the new system's working principle, and the system's control strategy.

Working Principle of the Conventional System
As shown in Figure 1, the system is an open-type system. The PMSM 2 drives the LS pump 1 to supply oil to the whole system, and the shuttle valve 6 feeds the maximum load pressure signal of the system to the pump to meet the pressure and flow of the actuator. The actuator can perform compound actions due to the system's pre-valve pressure compensation technology. One-way relief valves 9.1, 9.2, and 9.3 are equipped with overload protection and oil replenishment functions. There is no fuel consumption or pollution emission as the system uses the PMSM as the power source, which aligns with the current energy-saving and emission-reduction trend. However, the PMSM's speed control performance and overload capacity are under-utilized [16]. The LS and pressure compensation valves cannot be adjusted in real time to meet the demand of the actuator, which causes unnecessary energy loss in the system. At the same time, a large amount of actuator potential energy is directly converted into heat energy through boom multi-way valve 7 when the boom arm drops. It results in energy waste. reduce the energy consumption of the electric loader.
The paper is organized as follows. Section 2 introduces the working principle of system. Section 3 introduces the analysis of the system mathematical model. Section introduces the modeling and simulation of the system. Sections 5 and 6 are the discussio and the conclusions, respectively.

Working Principle of the System
This section analyzes the working principle of the conventional system, the n system's working principle, and the system's control strategy.

Working Principle of the Conventional System
As shown in Figure 1, the system is an open-type system. The PMSM 2 drives the pump 1 to supply oil to the whole system, and the shuttle valve 6 feeds the maximu load pressure signal of the system to the pump to meet the pressure and flow of actuator. The actuator can perform compound actions due to the system's pre-va pressure compensation technology. One-way relief valves 9.1, 9.2, and 9.3 are equipp with overload protection and oil replenishment functions. There is no fuel consumpt or pollution emission as the system uses the PMSM as the power source, which alig with the current energy-saving and emission−reduction trend. However, the PMSM speed control performance and overload capacity are under-utilized [16]. The LS a pressure compensation valves cannot be adjusted in real time to meet the demand of actuator, which causes unnecessary energy loss in the system. At the same time, a la amount of actuator potential energy is directly converted into heat energy through boo multi-way valve 7 when the boom arm drops. It results in energy waste.

Working Principle of the New System
As shown in Figure 2, the variable pressure margin energy recovery system for the electric loader actuator is designed based on the above Section 2.1 analysis and simplification of the system. It consists of electro-hydraulic LS and energy recovery systems. The pressure sensors collect the multi-way valve's before and after pressure, and the quantitative pump's output pressure, respectively. They are transmitted to electrical signals and input to the controller. According to the preset pressure margin of the LS and the solenoid pressure compensation valve pressure, the controller outputs the control signal of the solenoid pressure compensation valve and the PMSM to maintain the system differential pressure. The control signal of the PMSM is obtained through pressure feedback closedloop control to make the system meet the load's pressure and flow requirements when the multi-way valve's opening is changed. Oil in the piston chamber of the boom cylinders 11.1 and 11.2 drives the hydraulic motor-generator to charge the supercapacitor 4 through the reversing valve 9 when the boom arm drops, and it realizes energy recovery. It can realize variable pressure margin control and energy recovery through pressure feedback closed-loop control, which can effectively reduce system energy consumption.

Working Principle of the New System
As shown in Figure 2, the variable pressure margin energy recovery system for t electric loader actuator is designed based on the above Section 2.1 analysis a simplification of the system. It consists of electro−hydraulic LS and energy recove systems. The pressure sensors collect the multi-way valve's before and after pressure, a the quantitative pump's output pressure, respectively. They are transmitted to electri signals and input to the controller. According to the preset pressure margin of the LS a the solenoid pressure compensation valve pressure, the controller outputs the cont signal of the solenoid pressure compensation valve and the PMSM to maintain the syste differential pressure. The control signal of the PMSM is obtained through pressu feedback closed−loop control to make the system meet the load's pressure and flo requirements when the multi−way valve's opening is changed. Oil in the piston chamb of the boom cylinders 11.1 and 11.2 drives the hydraulic motor-generator to charge t supercapacitor 4 through the reversing valve 9 when the boom arm drops, and it realiz energy recovery. It can realize variable pressure margin control and energy recove through pressure feedback closed−loop control, which can effectively reduce syste energy consumption.

Control Strategy of the System
This section analyzes the principle of the variable LS pressure margin control, t variable pressure margin control of the pressure compensation valve, and the ener recovery system.

Principle of the Variable LS Pressure Margin Control
As shown in Figure 3, the system's maximum load pressure is detected in real tim through the pressure sensor. Then, the target output pressure of the quantitative pum can be described as:

Control Strategy of the System
This section analyzes the principle of the variable LS pressure margin control, the variable pressure margin control of the pressure compensation valve, and the energy recovery system.

Principle of the Variable LS Pressure Margin Control
As shown in Figure 3, the system's maximum load pressure is detected in real time through the pressure sensor. Then, the target output pressure of the quantitative pump can be described as: where p p is the target output pressure of the quantitative pump, bar; p Max is the maximum load pressure, bar; ∆p Ls is the LS preset pressure margin, bar.  Figure 3. Closed-loop control block diagram of the system.
The output pressure error of the quantitative pump can be described as follows: where is the output pressure error of the quantitative pump, bar; is the actual output pressure of the quantitative pump, bar.
The target torque of the PMSM can be obtained by feedback control through the PID controller using the as the control quantity. Then, the target torque of the PMSM can be described as follows: where is the target torque of the PMSM, Nm; the proportional value; is the integral value; is the differential value. The target speed of the PMSM can be described as follows: where is the target speed of the PMSM, rev/min; is the PMSM rated power, kW. It can be seen that the actual speed of the PMSM also changes with it when the dynamically changes, from Equations (1)-(4), thus the outlet pressure and flow of the quantitative pump is dynamically controlled. The differential pressure between the actual outlet pressure of the quantitative pump and the is a constant ∆ . The system can follow the new ∆ by controlling the PMSM speed with feedback from the PID controller when the ∆ changes. Thus, it can realize the variable LS pressure margin control.

Principle of the Variable Pressure Margin Control of the Pressure Compensation Valve
The replacement of a solenoid pressure compensation valve with the conventional pressure compensation valve can effectively improve the system response speed and control performance. The variable pressure margin control of the pressure compensation valve can be realized by changing the preset pressure margin of the solenoid pressure compensation valve. The before and after the multi−way valve of the actual differential pressure can be described as follows: The output pressure error of the quantitative pump can be described as follows: where e p is the output pressure error of the quantitative pump, bar; p p is the actual output pressure of the quantitative pump, bar. The target torque of the PMSM can be obtained by feedback control through the PID controller using the e p as the control quantity. Then, the target torque of the PMSM can be described as follows: where T e p is the target torque of the PMSM, Nm; k p the proportional value; k i is the integral value; k d is the differential value. The target speed of the PMSM can be described as follows: where n re f is the target speed of the PMSM, rev/min; P is the PMSM rated power, kW. It can be seen that the actual speed of the PMSM also changes with it when the n re f dynamically changes, from Equations (1)-(4), thus the outlet pressure and flow of the quantitative pump is dynamically controlled. The differential pressure between the actual outlet pressure of the quantitative pump and the p Max is a constant ∆p Ls . The system can follow the new ∆p Ls by controlling the PMSM speed with feedback from the PID controller when the ∆p Ls changes. Thus, it can realize the variable LS pressure margin control.

Principle of the Variable Pressure Margin Control of the Pressure Compensation Valve
The replacement of a solenoid pressure compensation valve with the conventional pressure compensation valve can effectively improve the system response speed and control performance. The variable pressure margin control of the pressure compensation valve can be realized by changing the preset pressure margin of the solenoid pressure compensation valve. The before and after the multi-way valve of the actual differential pressure can be described as follows: where e pd is the before and after the multi-way valve of the actual differential pressure can be described as, bar; p n is the pressure before the multi-way valve, bar; p i is the pressure after the multi-way valve, bar.
Electronics 2022, 11, 4215 6 of 23 The preset differential pressure error of the solenoid pressure compensation valve can be described as follows: where e pdm is the preset differential pressure error of the solenoid pressure compensation valve, bar; ∆p d is the preset pressure margin of the solenoid pressure compensation valve, bar. The control current of the solenoid pressure compensation valve can be obtained by feedback control through the PID controller using the e pdm as the control quantity. Then, the control current of the solenoid pressure compensation valve can be described as follows: where i c is the control current of the solenoid pressure compensation valve, mA. It can be seen that the solenoid pressure compensation valve spool changes when the i c changes dynamically from Equations (5)- (7), thus dynamically controlling the differential pressure between before and after the multi-way valve. The system can follow the new ∆p d by controlling the spool displacement with the PID controller when the ∆p d changes. The principle of the cylinder position control system is the same as that of the solenoid pressure compensation valve, so it will not be analyzed in detail.
The flow of the multi-way valve [21] can be described as follows: where Q is the flow of the multi-way valve, m 3 /s; C d is the flow coefficient of the multi-way valve; w is the spool area gradient of the multi-way valve; x is the multi-way valve spool displacement, m; ρ is the fluid density, kg/m 3 . When taking the maximum load branch as an example, the differential pressure between before and after the solenoid pressure compensation valve [21] can be described as follows: where ∆p C is the differential pressure between before and after the solenoid pressure compensation valve, bar. It can be seen that the Q reduces when the ∆p d reduces from Equation (8). Therefore, the ∆p d cannot be too small to meet the actuator demand. It can be seen that the system pressure loss reduces when the ∆p LS reduces from Equation (9). In summary, reducing the ∆p LS can effectively reduce the system pressure loss and thus reduce the system energy loss under the actuator demand.

Control Principle of the Energy Recovery System
The PMSM control methods are divided into direct speed control, load pressure control, and differential pressure control [22], according to the structural characteristics of the energy recovery system and the operating mode of the hydraulic motor-generator unit. We choose differential pressure control in this paper, as shown in Figure 4. The actual differential pressure between the piston chamber of the boom cylinder and the reversing valve can be described as follows: where ∆p G is the actual differential pressure between the piston chamber of the boom cylinder and the reversing valve, bar; p B is the pressure of the piston chamber of the boom cylinder, bar; p A is the pressure after the reversing valve, bar. where ∆ is the actual differential pressure between the piston chamber of the boom cylinder and the reversing valve, bar; is the pressure of the piston chamber of the boom cylinder, bar; is the pressure after the reversing valve, bar. The target differential pressure error of the PMSM can be described as follows: where is the target differential pressure error of the PMSM, bar; ∆ is the target differential pressure, bar.
The target torque of the PMSM [22] can be described as follows: where is the target torque of the PMSM, Nm; is the hydraulic motor displacement, m 3 /rev.
It can be seen that the changes accordingly to maintain the ∆ at a constant value of the ∆ when the ∆ changes dynamically from Equations (10)- (12). Therefore, the energy recovery system can recover energy at different velocities and loads of the actuator.

Analysis of the System Mathematical Model
This section analyzes the mathematical model of the actuator, the mathematical model of the supercapacitor, and the analysis and validation of the PMSM mathematical model.

Analysis of the Mathematical Model of the Actuator
As shown in Figure 5, according to the principle of the loader actuator, the XY coordinates are established with the center of rotation of the loader boom arm as the coordinate origin O. The hinge point of the boom cylinder with the frame is A, and the boom arm is B. The hinge point of the boom arm with the rocker's arm is C, and the bucket is D. The center of the gravity point of the actuator is G. The hinge point of the bucket cylinder with the frame is H, and the rocker's arm is F. The hinge point of the pull rod with the rocker's arm is H, and the bucket is E. In the clockwise direction, the kinetic equation of the actuator [23] can be described as follows: where is the rotational inertia of the boom arm with respect to O, kg•m 2 ; is the angle of OB with respect to the x−axis, °; is the combined force on the boom cylinder, N; is the angle between and the x−axis, °; is the distance between points A and B, m; is the gravitational force, N; is the distance between point O and point G, m; is the angle of OG with the x−axis, °; is the moment of resistance to the rotation of the boom arm, Nm. The target differential pressure error of the PMSM can be described as follows: where e G is the target differential pressure error of the PMSM, bar; ∆p 0 is the target differential pressure, bar. The target torque of the PMSM [22] can be described as follows: where T G is the target torque of the PMSM, Nm; D m is the hydraulic motor displacement, m 3 /rev. It can be seen that the T G changes accordingly to maintain the ∆p G at a constant value of the ∆p 0 when the ∆p G changes dynamically from Equations (10)- (12). Therefore, the energy recovery system can recover energy at different velocities and loads of the actuator.

Analysis of the System Mathematical Model
This section analyzes the mathematical model of the actuator, the mathematical model of the supercapacitor, and the analysis and validation of the PMSM mathematical model.

Analysis of the Mathematical Model of the Actuator
As shown in Figure 5, according to the principle of the loader actuator, the XY coordinates are established with the center of rotation of the loader boom arm as the coordinate origin O. The hinge point of the boom cylinder with the frame is A, and the boom arm is B. The hinge point of the boom arm with the rocker's arm is C, and the bucket is D. The center of the gravity point of the actuator is G. The hinge point of the bucket cylinder with the frame is H, and the rocker's arm is F. The hinge point of the pull rod with the rocker's arm is H, and the bucket is E. In the clockwise direction, the kinetic equation of the actuator [23] can be described as follows: where J 1 is the rotational inertia of the boom arm with respect to O, kg·m 2 ; γ is the angle of OB with respect to the x-axis, • ; F 1 is the combined force on the boom cylinder, N; α is the angle between F 1 and the x-axis, • ; L AB is the distance between points A and B, m; F G is the gravitational force, N; L 0G is the distance between point O and point G, m; β is the angle of OG with the x-axis, • ; T 1 is the moment of resistance to the rotation of the boom arm, Nm. is the pressure in boom cylinder, bar; is the area of the rod chamber of the boo damping factor of the oil boom cylinder; is the frictional resis arm cylinder, N.
is the load resistance of the boom cylinder, N the actuator, kg.
A large amount of gravitational potential energy of the ac pressure energy through the piston chamber of the boom cylind the boom arm drops. Therefore, the energy flowing out of th recoverable energy of the boom cylinders. It [24] can be describe where is the recoverable energy of the boom cylinders, kJ; boom cylinders, m/s. It can be seen that the is larger when the is more si (14). It can be seen that the is larger when the is more si (15). In summary, the recoverable energy of the boom cylinders the .

Analysis of the Mathematical Model of the Supercapacitor
The supercapacitor charging and discharging performance voltage change or charge across the positive and negative termin The dynamic equation of the boom cylinder [23] can be described as follows: where p 1 is the piston chamber pressure of the boom cylinder, bar; A 1 is the area of the piston chamber of the boom cylinder, m 2 ; p 2 is the pressure in the rod chamber of the boom cylinder, bar; A 2 is the area of the rod chamber of the boom cylinder, m 2 ; b is the damping factor of the oil boom cylinder; F f is the frictional resistance of the oil-operated arm cylinder, N. F L is the load resistance of the boom cylinder, N; m is the total mass of the actuator, kg. A large amount of gravitational potential energy of the actuator is converted into pressure energy through the piston chamber of the boom cylinders due to gravity when the boom arm drops. Therefore, the energy flowing out of the boom cylinders is the recoverable energy of the boom cylinders. It [24] can be described as follows: where E 1 is the recoverable energy of the boom cylinders, kJ; v 1 is the velocity of the boom cylinders, m/s. It can be seen that the p 1 is larger when the F 1 is more significant from Equation (14). It can be seen that the E 1 is larger when the p 1 is more significant from Equation (15). In summary, the recoverable energy of the boom cylinders depends on the F 1 and the v 1 .

Analysis of the Mathematical Model of the Supercapacitor
The supercapacitor charging and discharging performance can be described by the voltage change or charge across the positive and negative terminals. As shown in Figure 6, the open-circuit voltage [25] can be described as follows: where U is the open-circuit voltage, V; U OC is the ideal capacitor voltage, V; R C1 is the equivalent resistance, Ω; I C is the series circuit current, A; C is the equivalent capacitance, F.
where is the open−circuit voltage, V; is the ideal capacito equivalent resistance, Ω; is the series circuit current, A capacitance, F. Figure 6. Equivalent schematic of the supercapacitor. The stored energy of the supercapacitor [25] can be described as follows: where E is the maximum stored energy of the supercapacitor, J; U max is the maximum open-circuit voltage of the supercapacitor, V; U min is the minimum open-circuit voltage of the supercapacitor, V; E C (t) is the actual stored energy of the supercapacitor, J; T is the time interval, s; ε C is the self-discharge efficiency; η C is the charge and discharge efficiency; P C (t) is the charge and discharge power, W. The charge state of the supercapacitor [25] can be described as follows: where SOC is the charge state of the supercapacitor. It can be seen that keeping the U max and the U min constant, the E is larger when the C is more significant from Equation (17), i.e., more energy is stored in the supercapacitor. It can be seen that the SOC is smaller when the R C1 is larger from Equation (18). In summary, the E is related to the C. The SOC is related to the R C1 .

Analysis and Validation of the PMSM Mathematical Model
This section analyzes the PMSM mathematical model and validation of the PMSM simulation model.

Analysis of the PMSM Mathematical Model
The PMSM is a typical nonlinear system with many internal variables and strong coupling from its structure and principle. The mathematical model is simplified to facilitate the analysis and ensure the result accuracy, and then the equivalent schematic diagram is shown in Figure 7. The electrical mathematical model of the PMSM is established, mainly the equation of the stator voltage, the magnetic chain, the electromagnetic torque vector, and the motion. The stator voltage equation of the PMSM in the ABC coordinate system [26] can be described as follows: where u a , u b , u c are the ABC three-phase stator winding voltages, V; R s is the stator winding resistance, Ω; i a , i b , i c are the ABC three-phase stator winding currents, A; ψ a , ψ b , ψ c is the sum of the magnetic chains generated in the ABC three-phase stator winding, Wb.
where , , are the ABC three-phase stator windi winding resistance, Ω; , , are the ABC three−phase , is the sum of the magnetic chains generated winding, Wb.  The magnetic chain equation of the PMSM in the ABC coordinate system [26] can be described as follows: The electromagnetic torque vector equation of the PMSM in the ABC coordinate system can be described as follows: where T e is the output torque of the PMSM, Nm; N n is the number of the PMSM pole pairs. The mathematical model in the ABC coordinate system can be transformed into the DQ rotating coordinate system to facilitate the analysis of the PMSM steady-state dynamic performance. The ABC coordinate system is first transformed into alpha and beta coordinate systems. Then, it is transformed into the DQ coordinate system, i.e., by Clark and Park coordinate transformation. As shown in Figure 8, the mathematical model in the ABC coordinate system is obtained by transforming its mathematical model in the DQ coordinate system. The stator voltage equation of the PMSM in the DQ coordinate system [26] can be described as follows: where u d , u q are DQ-axis voltages, V; ω e is the rotor angular velocity, rad/s; i d , i q are dp-axis currents, A; ψ d , ψ q are the DQ-axis magnetic chain, Wb. The magnetic chain equation of the PMSM in the DQ coordinate system [26] can be described as follows: The electromagnetic torque vector equation of the PMSM in the DQ coordinate system can be described as follows: where T e is the output torque of the PMSM, Nm. Equation (24) consists of two terms. The first term ψ f i q is the excitation torque, the electromagnetic torque formed by the interaction of the permanent magnet excitation field with the stator current. The second term L d − L q i d i q is the magnetoresistive torque formed by the rotor convex pole effect. The magnetoresistive torque is inherent to the convex polar PMSM. Moreover, for the hidden polar PMSM, no magnetoresistive torque is formed due to L d = L q , from which the output torque of the PMSM can be described as follows: The motion equation of the PMSM can be described as follows: where T L is the load torque, Nm; J is the equivalent rotational inertia converted to the motor shaft, kg·m 2 ; B is the coefficient of viscous friction; ω is the mechanical angular velocity of the PMSM output shaft, rad/s. In this paper, the usual control method i dre f = 0 control in SVPWM control is used, i.e., the speed control of the PMSM by the SVPWM vector control technique. The control principle of the PMSM can be obtained based on the above analysis, as shown in Figure 9. motor shaft, kg•m 2 ; is the coefficient of viscous friction; is the mechanical angular velocity of the PMSM output shaft, rad/s. In this paper, the usual control method = 0 control in SVPWM control is used, i.e., the speed control of the PMSM by the SVPWM vector control technique. The control principle of the PMSM can be obtained based on the above analysis, as shown in Figure  9.

Validation of the PMSM Simulation Model
The PMSM can be divided into generator and motor modes according to its working situation. As shown in Figure 10, the speed and the torque are used as the horizontal and the vertical coordinate, respectively. According to equation = , the PMSM enters motor mode when > 0, and the PMSM enter the generator mode when < 0. The AMESim EMD library is used to build the simulation model shown in Figure 11

Validation of the PMSM Simulation Model
The PMSM can be divided into generator and motor modes according to its working situation. As shown in Figure 10, the speed and the torque are used as the horizontal and the vertical coordinate, respectively. According to equation P m = Tω, the PMSM enters motor mode when P m > 0, and the PMSM enter the generator mode when P m < 0. The AMESim EMD library is used to build the simulation model shown in Figure 11   Speed ω Generator mode Motor mode Ⅲ Ⅳ  As shown in Figure 12, the PMSM enters the motor mode, and the supercapaci SOC is reduced by 0.25% when the PMSM enters the I and III quadrants of operation. shown in Figure 13, the PMSM enters the generator mode, and the supercapacitor SO increases by 0.25% when the PMSM enters the II and IV quadrants of operation. T simulation results are consistent with the previous analysis and verify the feasibility the PMSM simulation model. As shown in Figure 12, the PMSM enters the motor mode, and the supercapacitor SOC is reduced by 0.25% when the PMSM enters the I and III quadrants of operation. As shown in Figure 13, the PMSM enters the generator mode, and the supercapacitor SOC increases by 0.25% when the PMSM enters the II and IV quadrants of operation. The simulation results are consistent with the previous analysis and verify the feasibility of the PMSM simulation model.  As shown in Figure 12, the PMSM enters the motor mode, and the supercapacitor SOC is reduced by 0.25% when the PMSM enters the I and III quadrants of operation. As shown in Figure 13, the PMSM enters the generator mode, and the supercapacitor SOC increases by 0.25% when the PMSM enters the II and IV quadrants of operation. The simulation results are consistent with the previous analysis and verify the feasibility of the PMSM simulation model.

Modeling and Simulation of the System
This section analyzes the modeling and simulation results of the system.

Modeling and Simulation of the System
This section analyzes the modeling and simulation results of the system.

Modeling of the System
According to Figure 2, the AMESim hydraulic library is used to build the hydraulic system model. According to Figures 3 and 4, the AMESim signal library is used to build the system control strategy. According to the drawings provided by the manufacturer, the AMESim 2D mechanical library is used to build the actuator model. Furthermore, combined with the simulation model of the PMSM, the simulation model can be built, as shown in Figure 14.
This paper studies and simulates a 50-type wheel loader under typical working conditions. Loaders can perform shoveling and short-distance material transport operations. The I-type working condition has the highest number of times per unit time, which is one of the standard working methods when conducting loaders tests [27]. Therefore, this paper takes the I-type working condition. It is generally lifted by the load and dropped by the no-load when the loader performs loading and unloading operations. Thus, the recoverable energy is mostly the gravitational potential energy of the actuator when the boom arm drops [28]. Therefore, the loader is set up under no-load conditions for the simulation. The system's variable pressure margin control range can be determined based on the pressure margin range of the conventional LS system [29]. The system parameters are set based on the above analysis, as shown in Table 1. The ∆p LS is 25 bar, and the ∆p d is 15 bar in the conventional system. The ∆p LS is 25 bar, and the ∆p d is 15 bar in the before the variable pressure margin control system. The ∆p LS is 20 bar, and the ∆p d is 15 bar in the after the variable pressure margin control and energy recovery systems. Furthermore, the ∆p 0 is 1 bar. The control signal of the cylinders is set, as shown in Figure 15. The system completes the excavation from 0 to 5 s, the raising action from 5 to 11 s, the dumping from 11 to 18 s, and the resetting from 18 to 25 s. This way, the system completes a complete I-type working condition in 25 s. The simulation time is set to 50 s, i.e., the system completes the action twice under the I-type working condition.

Modeling of the System
According to Figure 2, the AMESim hydraulic library is used to build the hydraulic system model. According to Figures 3 and 4, the AMESim signal library is used to build the system control strategy. According to the drawings provided by the manufacturer, the AMESim 2D mechanical library is used to build the actuator model. Furthermore, combined with the simulation model of the PMSM, the simulation model can be built, as shown in Figure 14. This paper studies and simulates a 50-type wheel loader under typical working conditions. Loaders can perform shoveling and short-distance material transport operations. The I−type working condition has the highest number of times per unit time, which is one of the standard working methods when conducting loaders tests [27]. Therefore, this paper takes the I-type working condition. It is generally lifted by the load and dropped by the no−load when the loader performs loading and unloading operations. Thus, the recoverable energy is mostly the gravitational potential energy of the actuator when the boom arm drops [28]. Therefore, the loader is set up under no-load conditions for the simulation. The system's variable pressure margin control range can be determined based on the pressure margin range of the conventional LS system [29]. The system parameters are set based on the above analysis, as shown in Table 1. The ∆ is 25 bar, and the ∆ is 15 bar in the conventional system. The ∆ is 25 bar, and the ∆ is 15 bar in the before the variable pressure margin control system. The ∆ is 20 bar, and the ∆ is 15 bar in the after the variable pressure margin control and energy recovery systems. Furthermore, the ∆ is 1 bar. The control signal of the cylinders is set, as shown in Figure 15. The system completes the excavation from 0 to 5 s, the raising action from 5 to 11 s, the dumping from 11 to 18 s, and the resetting from 18 to 25 s. This way, the system completes a complete I−type working condition in 25 s. The simulation time is set to 50 s, i.e., the system completes the action twice under the I−type working condition.

Simulation of the System
This section analyzes of the characteristics of the cylinder displacement, the system robustness, the system energy recovery performance, and the system energy-saving performance.

Analysis of the Characteristics of the Cylinder Displacement
As shown in Figure 16, after the first working cycle, the boom and bucket cylinders of the conventional and energy recovery systems can carry out compound actions due to the pre-valve pressure compensation technology and the cylinder position control systems. Both the boom and bucket cylinders can track the target displacements. As shown in Figure 17, the displacement error of the energy recovery system is smaller than that of the conventional system when the target displacement of the boom cylinder changes. The same is true when the target displacement of the bucket cylinder changes. Then, the transient performance of the energy recovery system is better. The displacement error of both the energy recovery system and the conventional system is 0 when the target displacement of the boom bucket and cylinder is constant. Then, both the energy recovery and conventional systems have better steady-state performance. In summary, the energy recovery system's transient performance is better than the conventional system. that of the conventional system when the target displacement of the boom cylinder changes. The same is true when the target displacement of the bucket cylinder changes. Then, the transient performance of the energy recovery system is better. The displacement error of both the energy recovery system and the conventional system is 0 when the target displacement of the boom bucket and cylinder is constant. Then, both the energy recovery and conventional systems have better steady−state performance. In summary, the energy recovery system's transient performance is better than the conventional system.

Analysis of the System Robustness
To further test the system's robustness, 1 t and 2 t of material are added to the bucket and compared with the conventional system. The cylinder displacement error curves are shown in Figure 18. When the material mass is 1 t, the maximum displacement error of the boom cylinder of the conventional system is 0.058 m, and the bucket cylinder is 0.082 m. The maximum displacement error of the boom cylinder of the energy recovery system is 0.043 m, and the bucket cylinder is 0.064 m. Then, the maximum displacement error of the boom cylinder is reduced by 25.9%, and the maximum displacement error of the bucket cylinder is reduced by 22%. When the material mass is 2 t, the maximum displacement error of the boom cylinder of the conventional system is 0.073 m, and the bucket cylinder is 0.105 m. The maximum displacement error of the boom cylinder of the energy recovery system is 0.057 m, and the bucket cylinder is 0.091 m. Then, the maximum displacement error of the boom cylinder is reduced by 21.9%, and the maximum

Analysis of the System Robustness
To further test the system's robustness, 1 t and 2 t of material are added to the bucket and compared with the conventional system. The cylinder displacement error curves are shown in Figure 18. When the material mass is 1 t, the maximum displacement error of the boom cylinder of the conventional system is 0.058 m, and the bucket cylinder is 0.082 m. The maximum displacement error of the boom cylinder of the energy recovery system is 0.043 m, and the bucket cylinder is 0.064 m. Then, the maximum displacement error of the boom cylinder is reduced by 25.9%, and the maximum displacement error of the bucket cylinder is reduced by 22%. When the material mass is 2 t, the maximum displacement error of the boom cylinder of the conventional system is 0.073 m, and the bucket cylinder is 0.105 m. The maximum displacement error of the boom cylinder of the energy recovery system is 0.057 m, and the bucket cylinder is 0.091 m. Then, the maximum displacement error of the boom cylinder is reduced by 21.9%, and the maximum displacement error of the bucket cylinder is reduced by 13.3%. In summary, the energy recovery system effectively reduces the cylinder displacement error and has better robustness than the conventional system when the bucket material mass changes.
shown in Figure 18. When the material mass is 1 t, the maximum displacement error the boom cylinder of the conventional system is 0.058 m, and the bucket cylinder is 0.08 m. The maximum displacement error of the boom cylinder of the energy recovery syste is 0.043 m, and the bucket cylinder is 0.064 m. Then, the maximum displacement error the boom cylinder is reduced by 25.9%, and the maximum displacement error of th bucket cylinder is reduced by 22%. When the material mass is 2 t, the maximu displacement error of the boom cylinder of the conventional system is 0.073 m, and th bucket cylinder is 0.105 m. The maximum displacement error of the boom cylinder of th energy recovery system is 0.057 m, and the bucket cylinder is 0.091 m. Then, the maximu displacement error of the boom cylinder is reduced by 21.9%, and the maximu displacement error of the bucket cylinder is reduced by 13.3%. In summary, the energ recovery system effectively reduces the cylinder displacement error and has bett robustness than the conventional system when the bucket material mass changes.
Electronics 2022, 11, x FOR PEER REVIEW 18 of Figure 18. Cylinder displacement error curves when material mass is 1 t and 2 t.

Analysis of the System Energy Recovery Performance
As shown in Figure 19, after two working cycles, the input power of the PMSM 11.8 kW, and the recovery power of the supercapacitor is 10.5 kW in the energy recover system when the boom drops during 18 to 24 s and 33 to 39 s. The energy recove efficiency of the PMSM is 89%. The input energy of the PMSM is fully recovered an stored in the supercapacitor.

Analysis of the System Energy Recovery Performance
As shown in Figure 19, after two working cycles, the input power of the PMSM is 11.8 kW, and the recovery power of the supercapacitor is 10.5 kW in the energy recovery system when the boom drops during 18 to 24 s and 33 to 39 s. The energy recovery efficiency of the PMSM is 89%. The input energy of the PMSM is fully recovered and stored in the supercapacitor.

Analysis of the System Energy Recovery Performance
As shown in Figure 19, after two working cycles, the input power of the PMSM is 11.8 kW, and the recovery power of the supercapacitor is 10.5 kW in the energy recovery system when the boom drops during 18 to 24 s and 33 to 39 s. The energy recovery efficiency of the PMSM is 89%. The input energy of the PMSM is fully recovered and stored in the supercapacitor. As shown in Figure 20, after two working cycles, the total recoverable energy of the boom cylinders is 185.3 kJ, the multi−way valve is 160.4 kJ, and the hydraulic motor−generator is 135.9 kJ. Furthermore, the supercapacitor stored energy is 121.2 kJ. Therefore, the energy loss through the multi−way valve is 24.9 kJ, the reversing valve is 24.5 kJ, and the hydraulic motor−generator is 14.7 kJ. The system energy loss diagram is shown in Figure 21. The energy recovery efficiency of the system is 65.4%, and most of the gravitational potential energy generated by the boom cylinders is recovered when the boom arm drops. In summary, the system has high energy recovery efficiency and good energy recovery performance. As shown in Figure 20, after two working cycles, the total recoverable energy of the boom cylinders is 185.3 kJ, the multi-way valve is 160.4 kJ, and the hydraulic motorgenerator is 135.9 kJ. Furthermore, the supercapacitor stored energy is 121.2 kJ. Therefore, the energy loss through the multi-way valve is 24.9 kJ, the reversing valve is 24.5 kJ, and the hydraulic motor-generator is 14.7 kJ. The system energy loss diagram is shown in Figure 21. The energy recovery efficiency of the system is 65.4%, and most of the gravitational potential energy generated by the boom cylinders is recovered when the boom arm drops. In summary, the system has high energy recovery efficiency and good energy recovery performance. As shown in Figure 22, the total energy provided by the PMSM of the conventional system is 981.1 kJ, the before system is 873.4 kJ, the after system is 700.4 kJ, and the energy recovery system is 722.6 kJ after two working cycles. Because the speed of the conventional system of the PMSM is higher than the one before, after, and energy recovery  As shown in Figure 22, the total energy provided by the PMSM of the conventional system is 981.1 kJ, the before system is 873.4 kJ, the after system is 700.4 kJ, and the energy recovery system is 722.6 kJ after two working cycles. Because the speed of the conventional system of the PMSM is higher than the one before, after, and energy recovery

Analysis of the System Energy-Saving Performance
As shown in Figure 22, the total energy provided by the PMSM of the conventional system is 981.1 kJ, the before system is 873.4 kJ, the after system is 700.4 kJ, and the energy recovery system is 722.6 kJ after two working cycles. Because the speed of the conventional system of the PMSM is higher than the one before, after, and energy recovery systems, more energy is consumed under the same friction coefficient. It can be seen that the before system provides less energy by 11% than the conventional system under the guarantee of the functional performance of the boom and bucket cylinders, combined with the analysis in Section 4.2.1. The after system provides less energy by 28.6%. The energy recovery system provides less energy by 26.3%. The energy recovery system provides only 2.3% more energy than the after system due to the hydraulic motor-generator acting behind the multi-way valve and increasing the system load. In summary, the variable pressure margin control is feasible and can effectively reduce the system pressure loss, thus reducing the system energy loss. The energy recovery system has less impact on the variable pressure margin control. The before, after, and energy recovery systems are more energy-saving than the conventional system. As shown in Figure 23, the supercapacitor SOC of the energy reco 68.6%, the after system is 67.5%, the before system is 65.6%, and the conve is 64.6% after two operating cycles. Therefore, the supercapacitor SOC recovery system reduces by 6.4%, the after system reduces by 7.5%, the be 9.4%, and the conventional system reduces by 10.4%. Then, the energy before the system is reduced by 9.6% than the conventional system, the reduced by 27.9%, and the energy recovery system is reduced by 38.5 recovery system is more energy−saving than others due to the variable p control and energy recovery. In summary, the variable pressure margin e system is feasible and can effectively reduce energy consumption than th before, and after systems.  As shown in Figure 23, the supercapacitor SOC of the energy recovery system is 68.6%, the after system is 67.5%, the before system is 65.6%, and the conventional system is 64.6% after two operating cycles. Therefore, the supercapacitor SOC of the energy recovery system reduces by 6.4%, the after system reduces by 7.5%, the before reduces by 9.4%, and the conventional system reduces by 10.4%. Then, the energy consumption before the system is reduced by 9.6% than the conventional system, the after system is reduced by 27.9%, and the energy recovery system is reduced by 38.5%. The energy recovery system is more energy-saving than others due to the variable pressure margin control and energy recovery. In summary, the variable pressure margin energy recovery system is feasible and can effectively reduce energy consumption than the conventional, before, and after systems. reduced by 27.9%, and the energy recovery system is reduced by 38.5 recovery system is more energy−saving than others due to the variable p control and energy recovery. In summary, the variable pressure margin e system is feasible and can effectively reduce energy consumption than th before, and after systems.

Discussion
A sensor−based variable pressure margin energy recovery system loader is constructed, modeled, and simulated based on the hydraulic conventional electric loader actuator; it analyzes system energy con simulation results show that the variable pressure margin control and e can effectively reduce the energy consumption of the electric loader.
The system pressure loss is reduced by reducing the preset LS pressu reducing the system energy consumption under the guarantee of performance of the boom and bucket cylinders based on the above simulat

Discussion
A sensor-based variable pressure margin energy recovery system for the electric loader is constructed, modeled, and simulated based on the hydraulic system of the conventional electric loader actuator; it analyzes system energy consumption. The simulation results show that the variable pressure margin control and energy recovery can effectively reduce the energy consumption of the electric loader.
The system pressure loss is reduced by reducing the preset LS pressure margin, thus reducing the system energy consumption under the guarantee of the functional performance of the boom and bucket cylinders based on the above simulation results. The system simulation results are similar to [30] in that when the preset LS pressure margin is 10 bar, the motor energy supply is reduced by one-third of that when the pressure difference is 30 bar. In this paper, the PMSM energy supplies less energy by 17.6% due to the preset LS pressure margin being less under the guarantee of the functional performance of the boom and bucket cylinders. The system simulation results are similar to [31] in that the system's energy consumption is reduced by 32.22% through the energy recovery of the boom cylinder. This paper proposes a method which reduces the system's energy consumption by 38.5% due to the variable pressure margin control. A large amount of gravitational potential energy is recovered. The energy recovery system combines the advantages of the above references to reduce system energy consumption further.
The system optimizes the drive unit to reduce energy losses and recover potential energy. Therefore, it can be applied to electric construction machinery such as loaders, excavators, and forklifts to reduce system energy consumption and can be tested and studied later.

Conclusions
The working principle, control strategy, and mathematical and simulation model of the electric loader actuator's variable pressure margin energy recovery system are analyzed. Some conclusions that can be obtained: 1 The energy recovery system's transient performance is better than that of the conventional system. 2 The energy recovery system effectively reduces the cylinder displacement error and has better robustness than the conventional system when the bucket material mass changes. 3 The system has high energy recovery efficiency and good energy recovery performance, and the energy recovery efficiency is 65.4%. 4 The variable pressure margin control is feasible and can effectively reduce the system pressure loss, thus reducing the system energy loss. The energy recovery system has less impact on the variable pressure margin control. The before, after, and energy recovery systems are more energy-saving than the conventional system. 5 The variable pressure margin energy recovery system is feasible and can effectively reduce energy consumption than the conventional, before, and after systems. 6 The energy recovery system has high energy-saving performance, and the energysaving efficiency is 38.5%. Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: Data sharing is not applicable.