A PWM average current calculation device and method for a proportional solenoid valve

By designing the PWM average current calculation device and method in the proportional solenoid valve, the problems of low calculation accuracy and high hardware cost in the prior art are solved, and higher control accuracy and lower system resource occupation are achieved.

CN114910694BActive Publication Date: 2025-06-24NANYUE FUEL INJECTION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110745670.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-01
Publication Date
2025-06-24
Estimated Expiration
2041-07-01

AI Technical Summary

Technical Problem

In the prior art, when calculating the average current of the proportional solenoid valve PWM, there are problems such as low calculation accuracy, high hardware cost and excessive system resource utilization.

Method used

A proportional solenoid valve PWM average current calculation device and method are provided, including a acquisition module, a parameter calculation module, a filter module, a current refinement module and an average value calculation module. By collecting the power supply voltage and the peak and valley driving current of the valve core, the PWM driving process is divided into two parts: rising and falling, the circuit equation calculation and low-pass filtering are performed, and the average current is finally calculated by the trapezoidal method.

Benefits of technology

It improves calculation accuracy, reduces hardware costs and system resource occupation, and enhances the rapidity and stability of valve core control accuracy and current control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114910694B_ABST
    Figure CN114910694B_ABST
Patent Text Reader

Abstract

The present invention discloses a PWM average current calculation device and method for a proportional solenoid valve. Its acquisition module acquires the power supply voltage, the peak and valley drive currents of the spool and the corresponding moments; the parameter calculation module calculates parameters such as the inductance and resistance of the proportional solenoid valve coil; the filter module performs low-pass filtering on the coil inductance and resistance; the current refinement module calculates the time constant, establishes the corresponding circuit equation, and calculates the refined current value to determine the current sequence; the average current module performs trapezoidal summation on the current sequence and then divides it by the PWM period to calculate the average current. The present invention not only has the advantage of calculating the average current through software, but also has the advantages of reducing the sampling frequency, reducing costs, improving the calculation accuracy, thereby improving the spool control accuracy, enhancing the rapidity and stability of current control, etc., which is beneficial to eliminating the changes in the resistance of the proportional solenoid valve caused by changes in environmental factors, increasing the adaptability, and at the same time enhancing the responsiveness of the proportional solenoid valve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a proportional solenoid valve PWM average current calculation device and method, belonging to the technical field of proportional solenoid valve electrical control. Background Art

[0002] Electro-hydraulic proportional control technology, due to its high efficiency and low price, is widely used in various actuators such as automobiles, construction machinery, ships, etc., and is an important part of them. The core of electro-hydraulic proportional control technology is the electro-hydraulic proportional solenoid valve. Based on the traditional hydraulic control valve, an electro-mechanical conversion device is added to convert the electrical signal into a spool displacement signal, linearly and proportionally controlling parameters such as the pressure, flow rate or direction of the hydraulic system.

[0003] The core of electro-hydraulic proportional control technology lies in controlling the spool drive current. The controller applies a voltage pulse signal with a certain amplitude and frequency to the spool through PWM (pulse width modulation) technology, forming a corresponding spool drive current in the spool electromagnetic coil, and its amplitude is proportional to the displacement of the spool. Therefore, the spool drive characteristics put forward higher requirements for the solenoid valve control current drive ability, that is, it is necessary to accurately calculate the PWM average current.

[0004] In the existing technical solutions, some use the method of continuously collecting current by adding additional hardware circuits. Although the current accuracy is high, the additional hardware circuits increase the cost of the product, and once the circuit hardware parameters are determined, they cannot be changed during actual use; some use the method of software high-frequency discrete current collection, but its system resource occupancy is high, directly affecting the selection of the controller chip and increasing the cost of the product; some collect the current and time of the peak value and / or valley value, and approximately calculate the average current by using methods such as the average value control law to form the area of a triangle, but the calculation accuracy is low. Summary of the Invention

[0005] To solve the above technical problems, the purpose of the present invention is to provide a proportional solenoid valve PWM average current calculation device for the above-mentioned deficiencies existing in the existing technical solutions.

[0006] To solve the above technical problems, the purpose of the present invention is to provide a proportional solenoid valve PWM average current calculation method for the above-mentioned deficiencies existing in the existing technical solutions.

[0007] To achieve the above purpose, the present invention provides a proportional solenoid valve PWM average current calculation device, including:

[0008] A collection module for collecting the power supply voltage, the peak and valley drive currents of the spool and the corresponding times;

[0009] A parameter calculation module, the signal input end of which is connected to the signal output end of the acquisition module, divides the PWM driving process into two parts: rising and falling, and calculates the inductance and resistance of the proportional solenoid valve coil through circuit equations;

[0010] A filter module, the signal input end of which is connected to the signal output end of the parameter calculation module, and the signal feedback end of which is connected to the signal feedback end of the parameter calculation module. The filter module performs low-pass filtering on the inductance and resistance of the solenoid valve coil;

[0011] A current refinement module, the signal input end of which is connected to the signal output end of the filter module, is used to calculate the corresponding rising and falling time constants, establish corresponding circuit equations, and perform sub-calculations on the current values in the rising and falling stages to determine the current sequence;

[0012] An average value calculation module, the signal input end of which is connected to the signal output end of the current refinement module. After summing up the current sequence by the trapezoidal method, it divides by the PWM period to calculate the average current, and the signal output end of the average value calculation module outputs the average current.

[0013] In a preferred embodiment of the present invention, the acquisition module is a controller MCU.

[0014] To achieve the above object, the present invention provides a method for calculating the average current of a proportional solenoid valve PWM, including the following steps:

[0015] Step S1, the acquisition module acquires the power supply voltage, and according to the peak and valley switching points of the PWM signal, acquires the peak and valley currents of the spool and the corresponding clock information;

[0016] Step S2, the parameter calculation module calculates the durations of the rising stage and the falling stage according to the clock information acquired in step S1, calculates the duty cycle, the inductance and resistance in the rising stage and the falling stage through the durations; performs out-of-range diagnosis on the calculated inductance and resistance;

[0017] Step S3, the filter module determines the filter time parameter according to the change of the duty cycle calculated in step S2, and performs low-pass filtering on the coil inductance and resistance values output in step S2 respectively to obtain L(k) up_filtered , L(k) down_filtered and R(k) up_filtered , R(k) down_filtered ; the filtered coil inductance and resistance values will be transmitted back to step S2; where L(k) up_filtered is the coil inductance after low-pass filtering in the rising stage, L(k) down_filteredThe coil inductance and R(k) after low-pass filtering in the falling stage up_filtrred The coil resistance after low-pass filtering in the rising stage, R(k) down_filtered The coil resistance after low-pass filtering in the falling stage.

[0018] Step S4: The current refinement module calculates the time constant τ(k) in the rising stage according to the filtered inductance and resistance calculated in step S3 up and the time constant τ(k) in the falling stage down , and establishes the circuit equations for the rising stage and the falling stage; divides the rising stage and the falling stage by the refinement period T refining rounds down to obtain the corresponding subdivision points, substitutes the corresponding subdivision points into the corresponding circuit equations in turn to solve, obtains the current values at the corresponding subdivision points, and finally determines the current sequence;

[0019] Step 5: Average current module; after summing up by the trapezoidal method according to the current sequence calculated in step S4, divides by the PWM period to calculate the average current I.

[0020] In a preferred embodiment of the present invention, in step S2, the formula for calculating the durations of the rising stage and the falling stage by the parameter calculation module according to the clock information collected in step S1 is as follows:

[0021] T(k - 1) up = t(k - 1) high - t(k - 1) low ①

[0022] T(k - 1) down = t(k) low - t(k - 1) high ②

[0023] In the formula, T(k - 1) up is the duration of the rising stage of the previous PWM period; t(k - 1) high is the peak moment of the previous PWM period; t(k - 1) low is the valley moment of the previous PWM period; T(k - 1) down is the duration of the falling stage of the previous PWM period; t(k) low is the valley moment of the current PWM period.

[0024] In a preferred embodiment of the present invention, in step S2, the formula for calculating the duty cycle by the duration is as follows:

[0025]

[0026] In the formula, D(k - 1) is the duty cycle of the previous PWM period.

[0027] In a preferred embodiment of the present invention, in step S2, the inductance and resistance of the rising stage and the falling stage are known through duration calculation as follows:

[0028] Formula for calculating the coil inductance in the rising stage:

[0029]

[0030] In the formula, L(k) up is the coil inductance in the rising stage of the current PWM cycle; U is the power supply voltage; R(k - 1) up_filtered is the filtered rising stage resistance calculated in the previous PWM cycle; i(k) high is the peak current collected in the current PWM cycle; i(k) low is the valley current collected in the current PWM cycle. When running for the first time, R(k - 1) up_filtered adopts the default resistance value of the proportional solenoid valve;

[0031] Formula for calculating the coil inductance in the falling stage:

[0032]

[0033] In the formula, L(k) down is the coil inductance in the falling stage of the current PWM cycle; U diode is the voltage drop of the conducting diode; R(k - 1) down_filtered is the filtered falling stage resistance calculated in the previous PWM cycle; i(k + 1) low is the valley current collected at the end of the current PWM cycle. When running for the first time, R(k - 1) down_filtered adopts the default resistance value of the proportional solenoid valve.

[0034] Formula for calculating the resistance in the rising stage:

[0035]

[0036] In the formula, R(k) up is the resistance in the rising stage calculated in the current PWM cycle; L(k - 1) up_filtered is the filtered rising stage inductance calculated in the previous PWM cycle. When running for the first time, L(k - 1) up_filtered is the default inductance value of the proportional solenoid valve.

[0037] Formula for calculating the resistance in the falling stage:

[0038]

[0039] In the formula, R(k) down is the resistance in the falling stage calculated in the current PWM cycle; L(k - 1) down_filteredThe filtered inductor during the falling stage calculated for the previous PWM cycle. During the first run, L(k-1) down_filtered is the default inductor value of the proportional solenoid valve.

[0040] In a preferred embodiment of the present invention, in step S2, the method for diagnosing whether the calculated inductor and resistor are out of range is as follows: First, determine whether the calculated inductor or resistor value exceeds the upper threshold and lower threshold ranges. If it exceeds the range, the corresponding fault count is incremented by 1. If the same fault occurs continuously more than the set count value, the default value of the corresponding inductor or resistor is used instead. Otherwise, the most recent valid value is used. If it does not exceed the range, the calculated value is used.

[0041] In a preferred embodiment of the present invention, in step S3, the calculation formula for the filtering time parameter is:

[0042]

[0043] In the formula, T filter is the filtering time parameter; T1 and T2 are preset filtering time parameters; D threshold is the duty cycle change threshold.

[0044] In a preferred embodiment of the present invention, in step S3, the calculation formula for low-pass filtering the coil inductor and resistor values output from step S2 is as follows:

[0045]

[0046] y(k) = α·y(k-1) + (1-α)·x(k-1) ⑩

[0047] In the formula, α is the coefficient; T sample is the sampling period; y(k) is the current filtered output; y(k-1) is the previous output; x(k-1) is the previous input.

[0048] In a preferred embodiment of the present invention, in step S4, calculate the rising stage time constant τ(k) up and the falling stage time constant τ(k) down using the following formula:

[0049]

[0050] In the formula, τ(k) is the corresponding time constant; L(k) filtered is the corresponding inductor; R(k) filtered is the corresponding resistor.

[0051] In a preferred embodiment of the present invention, in step S4, the circuit equations for the rising stage and the falling stage are as follows:

[0052] The circuit equation in the rising stage is as follows:

[0053]

[0054] Wherein, i(t) up is the current at the t-th moment of the rising stage subdivision; t is a certain subdivision moment;

[0055] The circuit equation in the falling stage is as follows:

[0056]

[0057] Wherein, i(t) down is the current at the t-th moment of the falling stage subdivision.

[0058] In a preferred embodiment of the present invention, in step S4, the calculation formulas for the number of rising stage subdivisions and the number of falling stage subdivisions are as follows:

[0059] Calculation formula for the number of rising stage subdivisions:

[0060]

[0061] Wherein, n(k) is the number of rising stage subdivisions; T refining is the refinement period; INT is the floor function, and the rising subdivision moment of the j-th point is t = j·T refining , where j(1) = i(k - 1) low ;

[0062] Calculation formula for the number of falling stage subdivisions:

[0063]

[0064] Wherein, m(k) is the number of falling stage subdivisions. Then the falling subdivision moment of the j-th point is t = j·

[0065] T refining , where j(1) = i(k - 1) high .

[0066] In a preferred embodiment of the present invention, in step S5, the trapezoidal method summation formula is as follows:

[0067]

[0068] t(k - 1) up = T(k - 1) up - n·T refining

[0069] Wherein, S(k - 1) upFor the sum of the areas of the current trapezoid method in the rising stage; t(k - 1) up Is the remaining time after refinement in the rising stage;

[0070]

[0071] t(k - 1) down = T(k - 1) down - m·T refining

[0072] Wherein, S(k - 1) down Is the sum of the areas of the current trapezoid method in the falling stage; t(k - 1) down Is the remaining time after refinement in the falling stage;

[0073] S(k - 1) = S(k - 1) up + S(k - 1) down

[0074] Wherein, S(k - 1) is the sum of the areas of the current trapezoid method in the PWM period.

[0075] In a preferred embodiment of the present invention, in step S5, the calculation formula of the average current I is as follows:

[0076]

[0077] Compared with the prior art, the present invention has the following advantages:

[0078] Not only realizes the advantages of calculating the average current through software, such as universality, compatibility, and expandability, etc., but also adds the following advantages:

[0079] 1. By collecting the peak and valley drive currents of the spool valve and the corresponding moments through a current sensor, the sampling frequency is reduced, the hardware requirements are simplified, and the cost is reduced;

[0080] 2. The PWM drive process is divided into two parts: rising and falling, and modeled and solved separately to improve the calculation accuracy, and then improve the spool valve control accuracy;

[0081] 3. The average current calculation method can be used for PWM control with a fixed frequency and variable amplitude, and can also be used for PWM control with a variable frequency and variable amplitude, improving the rapidity and stability of current control;

[0082] 4. Multiple iterative calls of the average current calculation method are beneficial to eliminating the changes in the resistance of the proportional solenoid valve caused by changes in environmental factors, increasing the adaptability, and at the same time improving the responsiveness of the proportional solenoid valve. Description of the Drawings

[0083] Figure 1 It is a schematic diagram of the principle of a device for calculating the PWM average current of a proportional solenoid valve provided by the present invention.

[0084] Figure 2 It is a schematic diagram of the duration of the PWM period

[0085] Figure 3 It is an out-of-range diagnostic diagram. Specific implementation manners

[0086] To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with embodiments and the accompanying drawings.

[0087] Refer to Figure 1 , a method for calculating the PWM average current of a proportional solenoid valve shown in the figure includes an acquisition module 10, a parameter calculation module 20, a filter module 30, a current refinement module 40, and an average value calculation module 50.

[0088] The acquisition module 10 is a controller MCU, which is used to acquire the power supply voltage, the peak and valley drive currents of the spool and the corresponding moments.

[0089] The signal input end of the parameter calculation module 20 is connected to the signal output end of the acquisition module 10. The PWM driving process is divided into two parts: rising and falling. The inductance and resistance of the proportional solenoid valve coil are calculated through circuit equations.

[0090] The signal input end of the filter module 30 is connected to the signal output end of the parameter calculation module 20. The signal feedback end of the filter module 30 is connected to the signal feedback end of the parameter calculation module 30. The filter module 30 performs low-pass filtering on the inductance and resistance of the solenoid valve coil.

[0091] The signal input end of the current refinement module 40 is connected to the signal output end of the filter module 30, which is used to calculate the corresponding rising and falling time constants, establish corresponding circuit equations, and perform sub-calculations on the current values in the rising and falling stages to determine the current sequence.

[0092] The signal input end of the average value calculation module 50 is connected to the signal output end of the current refinement module 40. After summing the current sequence by the trapezoidal method, it divides by the PWM period to calculate the average current, and the signal output end of the average value calculation module outputs the average current.

[0093] As Figure 1 shown, the implementation process of a method for calculating the PWM average current of a proportional solenoid valve provided by this embodiment includes:

[0094] Step S1, the acquisition module 10, such as the controller MCU, acquires the power supply voltage, and acquires the peak and valley currents of the spool and the corresponding clock information according to the peak and valley switching points of the PWM signal.

[0095] Step S2, the parameter calculation module 20 calculates the durations of the rising stage and the falling stage according to the clock information acquired in step S1, calculates the duty cycle, the inductance and resistance of the rising stage and the falling stage through the durations; performs out-of-range diagnosis on the calculated inductance and resistance.

[0096] As Figure 2 shown, the duration calculation formulas for the rising stage and the falling stage are:

[0097] T(k-1) up =t(k-1) high -t(k-1) low ①

[0098] T(k-1) down =t(k) low -t(k-1) high ②

[0099] In the formula, T(k-1) up is the duration of the rising stage of the previous PWM cycle; t(k-1) high is the peak moment of the previous PWM cycle; t(k-1) low is the valley moment of the previous PWM cycle; T(k-1) down is the duration of the falling stage of the previous PWM cycle; t(k) low is the valley moment of the current PWM cycle.

[0100] Duty cycle calculation:

[0101]

[0102] In the formula, D(k-1) is the duty cycle of the previous PWM cycle

[0103] Rising stage coil inductance calculation formula:

[0104]

[0105] In the formula, L(k) up is the rising stage coil inductance of the current PWM cycle; U is the power supply voltage; R(k-1) up_filtered is the filtered rising stage resistance calculated in the previous PWM cycle; i(k) hihh is the peak current acquired in the current PWM cycle; i(k) low is the valley current acquired in the current PWM cycle. When running for the first time, R(k-1)up_filtered Adopt the default resistance value of the proportional solenoid valve.

[0106] Coil inductance calculation formula in the falling stage:

[0107]

[0108] In the formula, L(k) down is the coil inductance in the falling stage of the current PWM cycle; U diode is the voltage drop of the conducting diode; R(k - 1) down_filtered is the filtered falling-stage resistance calculated in the previous PWM cycle; i(k + 1) low is the valley current collected at the end of the current PWM cycle. When running for the first time, R(k - 1) down_filtered adopts the default resistance value of the proportional solenoid valve.

[0109] Rise-stage resistance calculation formula:

[0110]

[0111] In the formula, R(k) up is the rise-stage resistance calculated in the current PWM cycle; L(k - 1) up_filtered is the filtered rise-stage inductance calculated in the previous PWM cycle. When running for the first time, L(k - 1) up_filtered is the default inductance value of the proportional solenoid valve.

[0112] Falling-stage resistance calculation formula:

[0113]

[0114] In the formula, R(k) down is the falling-stage resistance calculated in the current PWM cycle; L(k - 1) down_filtered is the filtered falling-stage inductance calculated in the previous PWM cycle. When running for the first time, L(k - 1) down_filtered is the default inductance value of the proportional solenoid valve.

[0115] Out-of-range diagnosis: It is divided into two types of diagnosis for inductance and resistance. The out-of-range diagnosis process is as Figure 3 shown. First, determine whether the calculated inductance or resistance value exceeds the upper and lower threshold ranges. If it exceeds the range, the corresponding fault is incremented by 1. If the same fault occurs continuously more than the set count value, the default value of the corresponding inductance or resistance is used for substitution, otherwise the nearest valid value is used for substitution; if it does not exceed the range, the calculated value is used.

[0116] Step S3, the filter module 30 determines the filtering time parameter according to the change of the duty cycle calculated in step S2, and performs low-pass filtering on the coil inductance and resistance values output in step S2 respectively to obtain L(k) up_filtered ,L(k) down_filtered and R(k) up_filtered ,R(k) down_filtered ; The filtered coil inductance and resistance values will be transmitted back to step S2. Among them, L(k) up_filtered is the coil inductance after low-pass filtering in the rising stage, L(k) down_filtered is the coil inductance after low-pass filtering in the falling stage and R(k) up_filtered is the coil resistance after low-pass filtering in the rising stage, R(k) down_filtered is the coil resistance after low-pass filtering in the falling stage.

[0117] Filtering time parameter calculation formula:

[0118]

[0119] In the formula, T filter is the filtering time parameter; T1 and T2 are preset filtering time parameters; D threshold is the duty cycle change threshold.

[0120] Low-pass filtering calculation formula:

[0121]

[0122] y(k) = α·y(k - 1)+(1 - α)·x(k - 1) ⑩

[0123] In the formula, α is the coefficient; T sample is the sampling period; y(k) is the current filtered output; y(k - 1) is the previous output; x(k - 1) is the previous input.

[0124] Step S4, the current refinement module 40 calculates the time constant τ(k) in the rising stage according to the filtered inductance and resistance calculated in step S3 up and the time constant τ(k) in the falling stage down , and establishes the circuit equations for the rising stage and the falling stage. The rising stage and the falling stage are rounded down to obtain the corresponding subdivision points with the refinement period T refining , and the corresponding subdivision points are successively substituted into the corresponding circuit equations for solution to obtain the current values of the corresponding subdivision points, and finally the current sequence is determined.

[0125] Time constant calculation formula:

[0126]

[0127] Where τ(k) is the corresponding time constant; L(k) filtered is the corresponding inductance; R(k) filtered is the corresponding resistance.

[0128] Formula for calculating the number of subdivision points in the rising stage:

[0129]

[0130] Where n(k) is the number of subdivision points in the rising stage; T refining is the refinement period; INT is the floor function. Then the rising subdivision time of the j-th point is t = j·T refining , where j(1) = i(k - 1) low .

[0131] Formula for calculating the number of subdivision points in the falling stage:

[0132]

[0133] Where m(k) is the number of subdivision points in the falling stage. Then the falling subdivision time of the j-th point is t = j·T refining , where j(1) = i(k - 1) high .

[0134] The circuit equation in the rising stage is:

[0135]

[0136] Where i(t) up is the current at the t-th subdivision in the rising stage; t is a certain subdivision time.

[0137] The circuit equation in the falling stage is:

[0138]

[0139] Where i(t) down is the current at the t-th subdivision in the falling stage.

[0140] Step S5, after the average current module 50 performs trapezoidal summation on the current sequence calculated in step S4, it divides by the PWM period to calculate the average current.

[0141] Trapezoidal summation formula:

[0142]

[0143] t(k - 1) up = T(k - 1) up - n·T refining

[0144] In the formula, S(k - 1) up is the summation area of the current trapezoidal method in the rising stage; t(k - 1) up is the remaining time after refinement in the rising stage;

[0145]

[0146] t(k - 1) down = T(k - 1) down - m·T refining

[0147] In the formula, S(k - 1) down is the summation area of the current trapezoidal method in the falling stage; t(k - 1) down is the remaining time after refinement in the falling stage;

[0148] S(k - 1) = S(k - 1) up + S(k - 1) down

[0149] In the formula, S(k - 1) is the summation area of the current trapezoidal method in the PWM period;

[0150] Calculation formula of average current I:

[0151]

[0152] It can be seen from the technical solutions of the above embodiments that this embodiment is simple and efficient.

[0153] The present invention not only realizes the advantages of calculating the average current through software, such as universality, compatibility, and expandability, etc., but also adds the following advantages: 1. By collecting the peak and valley drive currents of the spool and the corresponding moments through a current sensor, the sampling frequency is reduced, the hardware requirements are simplified, and the cost is reduced; 2. The PWM drive process is divided into two parts: rising and falling, and modeled and solved separately to improve the calculation accuracy, and then improve the spool control accuracy; 3. The average current calculation method can be used for PWM control with a fixed frequency and variable amplitude, and can also be used for PWM control with a variable frequency and variable amplitude, improving the rapidity and stability of current control; 4. Multiple iterative calls of the average current calculation method are beneficial to eliminating the changes in the resistance of the proportional solenoid valve caused by changes in environmental factors, increasing the adaptability, and at the same time improving the responsiveness of the proportional solenoid valve. It has good application value.

[0154] Although the embodiments disclosed in the present invention are as described above, the content described is only an embodiment adopted for the convenience of understanding the present invention and is not intended to limit the present invention. Any person skilled in the art within the technical field to which the present invention pertains may make any modifications and changes in the form of implementation and details without departing from the spirit and scope disclosed in the present invention. However, the scope of patent protection of the present invention shall still be subject to the scope defined by the appended claims.

Claims

1. A PWM average current calculation device for a proportional solenoid valve, characterized in that Including: A collection module for collecting the power supply voltage, the peak and valley drive currents of the spool valve, and the corresponding moments; A parameter calculation module, the signal input end of which is connected to the signal output end of the collection module, divides the PWM drive process into two parts: rising and falling, and calculates the inductance and resistance of the proportional solenoid valve coil through circuit equations; A filter module, the signal input end of which is connected to the signal output end of the parameter calculation module, the signal feedback end of which is connected to the signal feedback end of the parameter calculation module, and the filter module performs low-pass filtering on the inductance and resistance of the solenoid valve coil; A current refinement module, the signal input end of which is connected to the signal output end of the filter module, is used to calculate the corresponding rising and falling time constants, establish corresponding circuit equations, and perform sub-calculations on the current values in the rising and falling stages to determine the current sequence; An average value calculation module, the signal input end of which is connected to the signal output end of the current refinement module, sums the current sequence by the trapezoidal method and then divides by the PWM period to calculate the average current, and the signal output end of the average value calculation module outputs the average current.

2. The PWM average current calculation device for a proportional solenoid valve according to claim 1, wherein The collection module is a controller MCU.

3. A method for calculating the PWM average current of a proportional solenoid valve, characterized in that, Including the following steps: Step S1: The collection module collects the power supply voltage, and according to the peak and valley switching points of the PWM signal, collects the peak and valley currents of the spool valve and the corresponding clock information; Step S2: The parameter calculation module calculates the durations of the rising and falling stages according to the clock information collected in Step S1, calculates the duty cycle, the inductance and resistance of the rising and falling stages through the durations; performs out-of-range diagnosis on the calculated inductance and resistance; Step S3, the filter module determines the filtering time parameter according to the change of the duty cycle calculated in step S2, and performs low-pass filtering on the coil inductance and resistance values output in step S2 respectively to obtain L(k) up_filtered ,L(k) down_filtered and R(k) up_filtered ,R(k) down_filtered ; The filtered coil inductance and resistance values will be transmitted back to step S2; where L(k) up_filtered is the coil inductance after low-pass filtering in the rising stage, L(k) down_filtered is the coil inductance after low-pass filtering in the falling stage and R(k) up_filtered is the coil resistance after low-pass filtering in the rising stage, R(k) down_filtered is the coil resistance after low-pass filtering in the falling stage, Step S4: The current refinement module calculates the time constant τ(k) in the rising stage based on the filtered inductance and resistance calculated in step S3 up and the time constant τ(k) in the falling stage down , and establishes the circuit equations for the rising stage and the falling stage; The rising stage and the falling stage are rounded down with the refinement period T refining to obtain the corresponding subdivision points, and the corresponding subdivision points are successively substituted into the corresponding circuit equations for solution to obtain the current values at the corresponding subdivision points, and finally the current sequence is determined; Step 5: Average current module; After summing the current sequence calculated in Step S4 by the trapezoidal method, divide by the PWM period to calculate the average current I.

4. A method for calculating the PWM average current of a proportional solenoid valve according to claim 3, characterized in that In Step S2, the formula for calculating the durations of the rising and falling stages by the parameter calculation module according to the clock information collected in Step S1 is as follows: T(k - 1) up = t(k - 1) high - t(k - 1) low ① T(k - 1) down = t(k) low - t(k - 1) high ② where T(k - 1) up is the rising stage duration of the previous PWM cycle; t(k - 1) high is the peak moment of the previous PWM cycle; t(k - 1) low is the valley moment of the previous PWM cycle; T(k - 1) down is the falling stage duration of the previous PWM cycle; t(k) low is the valley moment of the current PWM cycle.

5. A method for calculating the PWM average current of a proportional solenoid valve according to claim 4, characterized in that, In Step S2, the formula for calculating the duty cycle through the duration is as follows: In the formula, D(k - 1) is the duty cycle of the previous PWM period.

6. The PWM average current calculation method of a proportional solenoid valve according to claim 5, characterized in that In Step S2, the well-known formulas for calculating the inductance and resistance of the rising and falling stages through the duration are as follows: Coil inductance calculation formula for the rising stage: Where L(k) up is the coil inductance in the rising stage of the current PWM cycle; U is the power supply voltage; R(k - 1) up_filtered is the filtered rising stage resistance calculated for the previous PWM cycle; i(k) high is the peak current collected in the current PWM cycle; i(k) low is the valley current collected in the current PWM cycle; When operating for the first time, R(k - 1) up_filtered adopts the default resistance value of the proportional solenoid valve; Coil inductance calculation formula for the falling stage: where, L(k) down is the coil inductance in the falling stage of the current PWM cycle; U diode is the voltage drop of the conducting diode; R(k - 1) down_filtered is the filtered falling stage resistance calculated in the previous PWM cycle; i(k + 1) low is the valley current collected at the end of the current PWM cycle. At the first run, R(k - 1) down_filtered adopts the default resistance value of the proportional solenoid valve; Resistance calculation formula for the rising stage: where R(k) up is the rising-stage resistance calculated for the current PWM cycle; L(k - 1) up_filtered is the filtered rising-stage inductance calculated for the previous PWM cycle. At the first run, L(k - 1) up_filtered is the default inductance value of the proportional solenoid valve; Resistance calculation formula for the falling stage: where R(k) down is the resistance in the falling stage calculated for the current PWM cycle; L(k - 1) down_filtered is the filtered inductance in the falling stage calculated for the previous PWM cycle. At the first run, L(k - 1) down_filtered is the default inductance value of the proportional solenoid valve.

7. A method for calculating the PWM average current of a proportional solenoid valve according to claim 6, characterized in that, In Step S2, the method for performing out-of-range diagnosis on the calculated inductance and resistance is: first determine whether the calculated inductance or resistance value exceeds the upper and lower threshold ranges. If it exceeds the range, the corresponding fault count is incremented by 1. If the same fault occurs continuously more than the set count value, the default value of the corresponding inductance or resistance is used for replacement, otherwise the nearest valid value is used for replacement; if it does not exceed the range, the calculated value is used.

8. The method for calculating the PWM average current of a proportional solenoid valve according to claim 3, wherein In Step S3, the filter time parameter calculation formula: where T filter is the filtering time parameter; T1 and T2 are preset filtering time parameters; D(k - 1) is the duty cycle of the previous PWM period; D threshold is the duty cycle change threshold.

9. A PWM average current calculation method for a proportional solenoid valve according to claim 8, characterized in that In Step S3, the calculation formula for performing low-pass filtering on the coil inductance and resistance values output in Step S2 is as follows: y(k) = α·y(k - 1) + (1 - α)·x(k - 1) ⑩ where α is a coefficient; T sample is the sampling period; y(k) is the current output after filtering; y(k - 1) is the previous output; and x(k - 1) is the previous input.

10. A method for calculating the PWM average current of a proportional solenoid valve according to claim 3, characterized in that, In step S4, calculate the time constant τ(k) in the rising phase up and the time constant τ(k) in the falling phase down The formulas are as follows: where τ(k) is the corresponding time constant; L(k) filtered is the corresponding inductance; R(k) filtered is the corresponding resistance.

11. A method for calculating the PWM average current of a proportional solenoid valve according to claim 10, characterized in that, In step S4, the circuit equations for the rising phase and the falling phase are as follows: The circuit equation for the rising phase is: where, i(t) up is the current at the t-th moment during the rising stage; t is a certain subdivision moment; The circuit equation for the falling phase is: where, i(t) down is the current at the t-th moment of the subdivision in the descending stage.

12. A method for calculating the PWM average current of a proportional solenoid valve according to claim 11, characterized in that In step S4, the calculation formulas for the number of subdivision points in the rising phase and the number of subdivision points in the falling phase are as follows: Calculation formula for the number of subdivision points in the rising phase: Where n(k) is the number of subdivision points in the rising stage; T refining is the refinement period; INT is the floor function, then the rising subdivision time of the j-th point is t = j·T refining , where j(1) = i(k - 1) low ; Calculation formula for the number of subdivision points in the falling phase: Where m(k) is the number of subdivision points in the descending stage; then the descending subdivision time of the j-th point is t = j·T refining , where j(1) = i(k - 1) high .

13. A method for calculating the PWM average current of a proportional solenoid valve according to claim 3, characterized in that, In step S5, the trapezoidal method summation formula is as follows: where S(k - 1) up is the summation area of the current trapezoidal method in the rising stage; t(k - 1) up is the remaining time after refinement in the rising stage; where S(k - 1) down is the summation area of the current trapezoidal method in the descending stage; t(k - 1) down is the residual time after refinement in the descending stage; In the formula, S(k - 1) is the trapezoidal method summation area of the PWM cycle current.

14. A method for calculating the PWM average current of a proportional solenoid valve according to claim 13, characterized in that, In step S5, the calculation formula for the average current I is as follows: