Method and circuit for automatically and synchronously collecting current characteristic points of multi-channel electromagnetic valve
By adopting a multi-channel solenoid valve current feature point automatic synchronous acquisition method, utilizing FPGA parallel processing and sliding window extreme value averaging, combined with frequency conversion sampling and threshold judgment, the problems of misjudgment and hardware resource occupation in solenoid valve current feature point extraction are solved, and efficient and accurate feature point recognition and data transmission are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies for extracting current feature points in solenoid valves suffer from insufficient sampling accuracy and low sampling rate at the hardware design level, resulting in waveform distortion or poor noise suppression after filtering and a high misjudgment rate in feature point extraction. Furthermore, the algorithms are highly complex, computationally intensive, and consume a large amount of hardware resources, making it difficult to effectively extract feature points in gently changing segments, especially in multi-channel, high-reliability, and low-bandwidth applications.
An automatic synchronous acquisition method for multi-channel solenoid valve current feature points is adopted. Utilizing the parallel processing capability of FPGA, feature points are identified through sliding window extreme value averaging and frequency conversion sampling strategies, combined with a threshold judgment mechanism, and the feature point data is uploaded through the LVDS communication interface.
It improves the accuracy of feature point extraction and judgment, reduces the sampling cost of each channel, is highly adaptable, can handle single-peak and multi-peak solenoid valves, reduces FPGA resource consumption, and improves the economy and scalability of the system.
Smart Images

Figure CN121878294A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automatic testing technology, specifically relating to an automatic synchronous acquisition circuit and method for current characteristic points of multi-channel solenoid valves, which can be applied to special fields with limited data transmission bandwidth, such as industrial automation control, instrumentation, and aerospace measurement and control. Background Technology
[0002] Currently, solenoid valves are key actuators in automated control systems, and their operating state directly affects the reliability of the entire system. The operation of a solenoid valve exhibits typical current waveform characteristics: upon energization, the current rises slowly due to the inductive effect; once the current reaches a certain threshold, the armature begins to move, and the change in inductance generates a back electromotive force (EMF), causing the current to decline to an inflection point; after the armature is fully engaged, the current continues to increase until it reaches a steady state. Upon de-energization, the current immediately decreases, and as the back EMF generated by the released armature prevents the current from decaying, the current briefly rises again; after the armature stabilizes, the current eventually decreases continuously to zero. Theoretically, the current waveform of a solenoid valve should have a clear single-peak characteristic. However, due to differences in manufacturing processes and production consistency, in practical applications, the current of a solenoid valve often exhibits a complex state with multiple peaks during the rise and fall processes, which significantly complicates the automatic identification and extraction of feature points.
[0003] Currently, traditional methods for acquiring and monitoring solenoid valve current mainly rely on the continuous acquisition and uploading of complete current waveforms, followed by manual post-analysis. However, in certain specialized applications, particularly in aerospace telemetry and control where telemetry bandwidth is strictly limited, the raw waveform data of the solenoid valve current, as a key measured parameter with high speed and large data volume, cannot be directly transmitted in real time via a bus with limited bandwidth. To resolve this contradiction, the industry has proposed a technical approach of extracting current waveform feature points to maximize the reconstruction of the solenoid valve's operating state, i.e., identifying and transmitting features such as... Figure 1 The six key feature points shown (corresponding to times t1~t5) are used to replace the complete waveform data, thereby significantly reducing the data transmission bandwidth requirements while ensuring the validity of the information.
[0004] There are two main approaches to existing feature point extraction techniques, but both have significant limitations: 1. Point-by-point differential threshold judgment method: Starting from the start-up time of the solenoid valve, the difference between adjacent sampling points is compared with a preset threshold. When the difference between the later point and the previous point changes from being greater than the threshold to being less than the threshold, it is determined as a peak inflection point; otherwise, it is determined as a trough inflection point. The opening time of the solenoid valve is obtained by calculating the time difference between the trough point and the start-up time. The closing time is identified using a similar reverse process. This method requires extremely high smoothness of the current curve and is only suitable for monotonically changing ideal waveforms. Once the waveform fluctuates or has noise, it is very easy to produce misjudgments, resulting in a high misjudgment rate. At the same time, since the electrical characteristics of different models of solenoid valves vary significantly, the threshold parameters must be repeatedly adjusted for each type of valve, which not only increases the debugging difficulty but also leads to a sharp increase in the complexity of model management. More importantly, when the application scenario changes from a single-peak solenoid valve to a multi-peak solenoid valve, the entire recognition algorithm must be replaced, resulting in poor system adaptability.
[0005] 2. A three-layer wavelet packet decomposition algorithm is used for processing. The process includes: first, applying a moving average filter to the original current waveform; then, performing a first-order differential operation on the filtered data to obtain the rate of change; next, performing three-layer wavelet packet decomposition on the rate of change signal to obtain eight wavelet nodes; then, reconstructing the waveform from the eight nodes, and taking the absolute value of the signal from the second node to obtain the feature extraction curve Ydata; finally, accumulating and comparing Ydata using a sliding window with a fixed width WinWidth, and extracting the corresponding feature points by comparing the result with five times the maximum Ydata value. Although this method is theoretically rigorous, the computational process is complex, involving multiple steps such as filtering, differentiation, wavelet decomposition, reconstruction, waveform processing, and sliding comparison, resulting in a huge computational load. In multi-channel synchronous sampling applications, each channel needs to independently execute the above complete process, which will lead to extremely high consumption of hardware resources such as FPGAs and a significant increase in system cost. In addition, when the change in the solenoid valve current waveform is relatively smooth, the feature points extracted by this method have a large deviation in time positioning, and the accuracy is difficult to meet the requirements of high-precision testing.
[0006] Based on existing technologies, current solenoid valve current feature point extraction schemes mainly face three prominent problems: 1. Insufficient sampling accuracy and low sampling rate at the hardware design level lead to waveform distortion or poor noise suppression after filtering, resulting in misjudgment of feature point extraction; 2. High complexity and large computational load of feature point extraction algorithms consume significant hardware resources, thus increasing system design costs; 3. Existing methods struggle to effectively extract feature points from gently changing sections of the current waveform. Even if successful, the corresponding time information contains significant errors, affecting the accurate judgment of the solenoid valve's state. These shortcomings are particularly prominent in special application fields such as aerospace, which require multi-channel, high-reliability, and low-bandwidth applications, necessitating an innovative solution that comprehensively optimizes both hardware architecture and software algorithms. Summary of the Invention
[0007] The purpose of this invention is to provide a method and circuit for automatic synchronous acquisition of current feature points of multi-channel solenoid valves. While reducing the amount of computation, it improves the accuracy of feature point extraction and judgment, and at the same time improves the accuracy of the corresponding time of feature points. It makes full use of chip resources and reduces the sampling cost of each channel while improving accuracy.
[0008] To achieve the above objectives, the present invention provides a method for automatic synchronous acquisition of current characteristic points of multi-channel solenoid valves, comprising the following steps: Convert the solenoid valve current signal into a voltage signal and perform analog-to-digital conversion; The parallel processing capability of the FPGA is used to synchronously sample the current of multi-channel solenoid valves. A sliding window is used to perform extreme value removal and averaging on the sampled data; Feature points characterizing the working characteristics of the solenoid valve are extracted based on the current change trend. A frequency conversion sampling strategy is adopted to set different sampling frequencies at different current change stages; Feature points are identified based on a threshold judgment mechanism; The extracted feature point data is framed and uploaded via the LVDS communication interface.
[0009] Preferably, the sliding window consists of 16 consecutive sampling points. After using bubble sort to remove the four largest and four smallest values, the average of the remaining eight values is calculated as the effective sampling data (the specific data involved in the sliding window and sorting to remove extreme values and calculate the average in this invention are for reference only and are not limited to the parameters of this invention).
[0010] Preferably, the feature points include: peak points during the current rise process, valley points during the current fall process, feature points during the current steady segment, and reverse pulse feature points during the solenoid valve closing process.
[0011] Preferably, the frequency conversion sampling strategy is as follows: a shorter time interval is used for fast sampling during the current rising and falling phases, and a longer time interval is used for slow sampling during the current stabilization phase, in order to adapt to the waveform change rate at different stages and optimize data storage.
[0012] Preferably, the threshold determination mechanism includes: for three consecutive sampling points x, y, z, when y≥x+Δx and y≥z+Δz are satisfied, it is determined as a peak point; when y≤x-Δx and y≤z-Δz are satisfied, it is determined as a valley point, where Δx and Δz are adjustable threshold parameters.
[0013] Preferably, the feature point extraction process includes: recording the starting time t0 when the current starts to increase; recording feature point 1 and its relative time Δt1 when the current changes from increasing to decreasing during the current rising segment; recording feature point 2 and its relative time Δt2 when the current changes from decreasing to increasing during the current falling segment; recording feature point 3 during the current stabilization segment; recording feature point 4 and its relative time Δt3 during the current closing and falling segment; and recording feature point 5 and its relative time Δt4 and feature point 6 and its relative time Δt5 when a reverse pulse is detected during the solenoid valve closing process.
[0014] Preferably, for cases where the solenoid valve current has multiple peak values, when a current decrease is detected again, the data of feature point 1 and feature point 2 are updated again, and when a reverse pulse is detected again, the data of feature point 5 and feature point 6 are updated. The maximum value of feature point 6 in multiple measurements is taken as the final data of feature point 6, and the data of the adjacent feature point 5 is also updated synchronously to the final data.
[0015] Preferably, the relative times Δt1 to Δt5 are obtained by accumulating the time intervals between adjacent valid sampled data points, and the time intervals involved in the accumulation at each stage are dynamically adjusted according to the sampling frequency of that stage.
[0016] Preferably, the LVDS communication framing format includes: frame header, solenoid valve channel number, feature point 1 data and its relative time Δt1, feature point 2 data and its relative time Δt2, feature point 3 data, feature point 4 data and its relative time Δt3, feature point 5 data and its relative time Δt4, and feature point 6 data and its relative time Δt5.
[0017] The technical solution of the present invention also provides an automatic synchronous acquisition circuit for multi-channel solenoid valve current characteristic points, comprising: A sampling resistor connected in series in the current loop of the solenoid valve is used to convert the current signal into a voltage signal; The operational amplifier conditioning circuit connected to the sampling resistor output is used to filter and amplify the voltage signal; A high-speed AD conversion circuit connected to the output of the operational amplifier conditioning circuit is used to convert analog voltage signals into digital signals and output them through the SPI interface; A high-speed isolation circuit connected to a high-speed AD conversion circuit is used to achieve SPI communication isolation; And an FPGA circuit connected to a high-speed isolation circuit. The FPGA circuit contains multiple parallel data receiving channels for synchronously acquiring and processing multi-channel solenoid valve current digital signals and extracting feature points.
[0018] This invention achieves automatic extraction of current characteristic points from multi-channel solenoid valves through optimized software algorithm design, exhibiting significant advantages compared to existing technologies. This invention fully considers the diversity of solenoid valve current waveforms and can effectively handle both single-peak and multi-peak scenarios, thus possessing broad applicability and applicable to all types of solenoid valve testing scenarios. In practical applications, the appropriate processing program can be flexibly selected according to the specific solenoid valve's current waveform characteristics. For solenoid valves that clearly do not have multi-peak waveforms, a simplified algorithm flow can be directly adopted. This configurability avoids the ineffective occupation of FPGA computing resources, significantly reduces the hardware cost of sampling channels, and improves the overall economy and scalability of the system.
[0019] This invention, through in-depth analysis of feature point extraction methods, establishes a theoretical calculation basis for hardware device selection, ensuring the accuracy and rate requirements of current sampling from the system architecture level. Based on parameters such as time interval, number of sampling points, and data precision in the algorithm flow, the required SPI transmission rate and AD conversion rate can be accurately calculated, thereby guiding device selection and effectively avoiding waveform distortion, noise interference, and other problems caused by insufficient hardware performance, thus guaranteeing the quality and reliability of the sampled data from the source.
[0020] The feature point discrimination algorithm of this invention has a significantly lower computational cost than the commonly used three-layer wavelet packet decomposition method in the prior art. It only requires simple sorting, extreme value removal, and average value calculation to obtain effective feature data. This lightweight operation logic has a significant advantage for FPGA devices with strong parallel processing capabilities but relatively weak fixed-point / floating-point computing capabilities. It can efficiently complete real-time processing without adding additional floating-point units, reducing FPGA resource consumption and development difficulty.
[0021] This invention employs a threshold-based trend judgment comparison method, which can comprehensively extract all key feature data from the current waveform. It exhibits particularly excellent recognition capabilities for data features in phases of gradual change, such as accurately capturing the slow current rise during the initial startup phase of the solenoid valve and the stable phase when the current finally returns to zero. In contrast, the three-layer wavelet packet decomposition method is not effective in extracting features from slowly changing phases and is prone to significant errors. This invention effectively solves this problem through a combination of sliding window and trend judgment strategies, improving the temporal and amplitude accuracy of feature point recognition and providing a more reliable data foundation for solenoid valve condition monitoring and fault diagnosis. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the operating current waveform of the solenoid valve. Figure 2 Schematic diagram of hardware design for current sampling of a multi-channel solenoid valve; Figure 3 This diagram illustrates the process of extracting feature points and corresponding times for a solenoid valve. Figure 1 ( Figure 3 The bottom right arrow and Figure 4 The bottom left arrow is the same arrow. Figure 4 This diagram illustrates the process of extracting feature points and corresponding times for a solenoid valve. Figure 2 ( Figure 3 The bottom right arrow and Figure 4 The bottom left arrow is the same arrow. Figure 5 A schematic diagram of the LVDS communication protocol for framing and uploading current characteristic points of a solenoid valve. Figure 6 This is a schematic diagram of the multi-peak waveforms of the solenoid valve current as it rises and falls. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] This invention discloses an automatic synchronous acquisition circuit and method for multi-channel solenoid valve current feature points, involving automatic testing technology for extracting and transmitting solenoid valve current feature points at high speed. It is applicable to aerospace applications where solenoid valve current sampling is required but data bandwidth is limited. This method utilizes unique signal conditioning techniques, current feature point recognition technology, and high-speed data communication transmission technology to compress massive amounts of current data into several feature points characterizing the current properties, thereby allowing the approximate current waveform to be reconstructed from these feature points.
[0025] From a hardware implementation perspective, such as Figure 2 As shown, the hardware circuit mainly consists of a sampling resistor, an operational amplifier conditioning circuit, a high-speed A / D conversion circuit, a high-speed isolation circuit, and an FPGA circuit. This scheme utilizes the parallel processing capability of the FPGA to complete the synchronous acquisition of multi-channel solenoid valve current.
[0026] Specifically, the power supply is connected to the solenoid valve, providing power to drive its operation and generate current changes. A sampling resistor is connected in series in the solenoid valve's current loop, converting the current signal into a voltage signal, thus achieving the physical quantity conversion from current to voltage. The voltage signal output from the sampling resistor is connected to an operational amplifier conditioning circuit. This circuit filters and amplifies the voltage signal, removing high-frequency noise and adjusting the voltage amplitude to a suitable range, providing a high-quality analog signal for subsequent analog-to-digital conversion. The output of the operational amplifier conditioning circuit is connected to a high-speed analog-to-digital converter (ADC). The ADC converts the analog voltage signal into a digital signal, which is then output to a high-speed isolation circuit via SPI communication. The high-speed isolation circuit enables SPI isolation communication between the sampling circuit and the FPGA circuit, isolating interference to ensure stable and reliable data transmission. The high-speed isolation circuit corresponds to different channels of the FPGA circuit (e.g., channel 1, channel 2… channel N). The FPGA circuit utilizes its parallel processing capabilities to synchronously acquire and process the digital signals of the solenoid valve current from multiple channels, thereby achieving parallel extraction and analysis of multi-channel solenoid valve current feature points.
[0027] The power supply drives the solenoid valve to generate current. The sampling resistor converts the current into voltage. The operational amplifier conditioning circuit optimizes the voltage signal. The high-speed AD conversion circuit realizes analog-to-digital conversion. The high-speed isolation circuit ensures reliable transmission of digital signals. Finally, the FPGA circuit completes the acquisition and analysis of the solenoid valve current characteristics through multi-channel synchronous processing.
[0028] The steps for extracting and determining feature points and their corresponding times include: 1. Upon power-on, the current is continuously sampled using a sliding sampling window. The sampling window width is set to 16 consecutive sampling points (the number of sampling points can be adjusted according to actual conditions). The collected data is averaged after removing the beginning and end of the data. Based on the judgment condition, if an increase in current is detected, the solenoid valve is considered to have started to operate, and the system automatically enters the feature point judgment program with the current time point as the starting point t0. 2. When a decrease in current is detected during the current rise, and the judgment condition of feature point 1 is met, the current point can be considered as feature point 1, and the current relative time Δt1 is recorded at the same time. 3. When the current increases during the continuous decrease of the current and the judgment condition of feature point 2 is met, the current point can be regarded as feature point 2, and the current relative time Δt2 is recorded at the same time. 4. If the solenoid valve's rising current is a multi-peak value, and a decrease in current is detected again, satisfying the judgment condition of feature point 1, then the current data is used as the data for feature point 1. Subsequently, the data for feature point 2 is updated according to the judgment condition until the judgment condition of feature point 3 is met (a gradual change in current is detected), and the value of feature point 3 is recorded. If the solenoid valve's rising current is a single-peak value, and a gradual change in current is detected during the current rise, satisfying the judgment condition of feature point 3, then the current point can be considered as feature point 3. 5. When the current decreases from a steady state and meets the judgment condition of feature point 4, the current point can be considered as feature point 4, and the current relative time Δt3 is recorded at the same time. 6. If a sudden increase in current is detected during the continuous decrease of current, and the judgment condition is met, the current point can be considered as feature point 5, and the current relative time Δt4 is recorded at the same time. 7. When a decrease in current is detected during the current rise, and the judgment condition of feature point 6 is met, the current point can be considered as feature point 6, and the current relative time Δt5 is recorded at the same time. 8. If there are multiple peak values during the current decrease, and the current increases, satisfying the judgment condition of feature point 5, then record the current point as another set of feature points 5 generated during the closing process of the solenoid valve, and record the current relative time Δt4. 9. If the current decreases during the current rise process and the judgment condition of feature point 6 is met, then record the current point as another set of feature points 6 generated during the closing process of the solenoid valve, and record the current relative time Δt5 at the same time. 10. Compare the values of feature point 6 obtained from multiple measurements, and take the maximum value as the final data of feature point 6. The value of feature point 5 adjacent to it is also taken as the final data. 11. If the current is detected to be continuously decreasing until it stabilizes, several characteristic data points are framed and uploaded to other modules via LVDS communication.
[0029] Specifically, the method for extracting solenoid valve feature points and corresponding times is as follows: Figure 3 and 4 As shown, after the module is powered on, the steps are as follows: Step 1: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers).
[0030] Step 2: Determine if the data increases consecutively for 3-5 times (the time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step.
[0031] Step 3, at time t0, the timer starts counting; Step 4: SPI continuously reads the ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers).
[0032] Step 5: Determine if the data decreases consecutively for 3-5 times (the time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step.
[0033] Step 6: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point 1, Δt1}; clear the timer and start counting again; Step 7: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers). Step 8: Determine if the data increases consecutively for 3-5 times (the time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step.
[0034] Step 9: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point 2, Δt2}; clear the timer and start counting again; Step 10: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers). Step 11: Determine if the data is basically consistent for 3-5 consecutive times? (The time interval between comparison data is adjustable): If yes, proceed to step 13; if no, proceed to step 12.
[0035] Step 12, determine if the data decreases for 3-5 consecutive times? (The time interval between comparisons is adjustable): If yes, proceed to step 6; if no, proceed to step 10.
[0036] Step 13: Take the intermediate value data in the continuous data as the feature point data; store the data as {feature point 3}; Step 14: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers).
[0037] Step 15: Determine if the data decreases for 3-5 consecutive times? (The time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step. Step 16: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point 4, Δt3}; clear the timer and start counting again; Step 17: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers). Step 18: Determine if there are 3-5 consecutive data increments? (The time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step. Step 19: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point 5, Δt4}; clear the timer and start counting again; Step 20: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers). Step 21: Determine if the data decreases for 3-5 consecutive times? (The time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step. Step 22: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point 6, Δt5}; clear the timer and start counting again; Step 23: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers). Step 24: Determine if the data increases consecutively for 3-5 times (the time interval between comparisons is adjustable): If yes, proceed to step 27; if no, proceed to step 25. Step 25: Determine if the data is basically consistent for 3-5 consecutive times? (The time interval between comparison data is adjustable): If yes, proceed to step 26; if no, proceed to step 23. Step 26: Data frame upload, LVDS interface connects to other receiving modules, end.
[0038] Step 27: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point x, Δtx}; clear the timer and start counting again; Step 28: SPI continuously reads ADC sampling data. The sampling window is 16 sampling points (read 16 times continuously, sort according to the bubble sort method, remove the 4 largest and 4 smallest, and calculate the average of the remaining 8 numbers). Step 29: Determine if the data decreases consecutively for 3-5 times (the time interval between comparisons is adjustable): If yes, proceed to the next step; if no, return to the previous step. Step 30: Take the intermediate value data in the continuous data as the feature point data; read the current timer time; store the data {feature point y, Δty}; clear the timer and start counting again; Step 31: Determine if feature point y > feature point 6. If yes, proceed to the next step; otherwise, return to the previous step. Step 32, update feature points 5 and 6: feature point 5 = feature point x; feature point 6 = feature point y; Δt5 = Δt5 + Δtx; Δt6 = Δt6 + Δty; Step 33: Data frame upload, LVDS interface connects to other receiving modules, end.
[0039] Step 34: Feature point 5, feature point 6, Δt5, and Δt6 remain unchanged; Step 35: Data frame upload, LVDS interface connects to other receiving modules, end.
[0040] The relative time of feature points is obtained by accumulating the time intervals between adjacent points that are involved in the comparison. That is, the time is accumulated once for each data point. However, the time intervals between data points involved in the comparison may be different at different stages of current change. That is, the sampling frequency of the data obtained at different stages of current change is different, similar to a frequency conversion sampling method. This method has two advantages: Firstly, the shorter time intervals during waveform rise and fall allow for more accurate and rapid waveform state determination. Secondly, the longer duration of current stability allows for more accurate waveform determination even with larger time intervals between adjacent points. Thirdly, the variable frequency sampling method facilitates the uploading of counting time data. For example, if the communication protocol requires a specific number of bits for the time data, a shorter time interval means the same number of bits in the time counter register can only record a shorter period of current stability (e.g., a 4-bit register with a maximum count of 0-15, totaling 16 numbers, and a 100µs interval between each sampling point, represents a maximum relative time of 16 * 100µs = 1.6ms; a 1ms interval between sampling points represents a maximum relative time of 16 * 1ms = 16ms). This method cannot record the duration of the solenoid valve's stable state, thus necessitating a variable frequency approach. The data between adjacent points being compared is not simply a matter of size; certain thresholds need to be set. For example, when judging feature point 1, the three consecutive feature points are x, y, and z, and the following conditions must be met: y ≥ x + Δx and y ≥ z + Δz. Δx and Δz need to be adjusted according to the specific waveform to improve the accuracy of the judgment.
[0041] After obtaining complete feature point data, it is uploaded via LVDS communication, with the data frame format as follows: Figure 5 As shown. In the data sequence, the first is the frame header, determined according to the specific protocol; the second is the solenoid valve channel number, with the bit width set according to actual needs; the third is solenoid valve feature point 1, containing the relative time Δt1 of the feature point and the sampled current value, where t0 + Δt1 is the time of feature point 1; the fourth is solenoid valve feature point 2, containing the relative time Δt2 of the feature point and the sampled current value, where t0 + Δt1 + Δt2 is the time of feature point 2; the fifth is solenoid valve feature point 3, containing the sampled current value; the sixth is the solenoid valve feature... Point 4 includes the relative time Δt3 and the sampled current value; t0 + Δt1 + Δt2 + Δt3 equals the time of point 4. The seventh is point 5 of the solenoid valve, including the relative time Δt4 and the sampled current value; t0 + Δt1 + Δt2 + Δt3 + Δt4 equals the time of point 5. The eighth is point 6 of the solenoid valve, including the relative time Δt5 and the sampled current value; t0 + Δt1 + Δt2 + Δt3 + Δt4 + Δt5 equals the time of point 6. The process for determining multiple peak values during current rise and fall (e.g.) Figure 4 The dashed diagram shows the multiple judgment and update process for feature points 1 and 2; and the multiple judgment and update process for feature points 5 and 6. These processes can be added or removed based on the specific characteristics of the solenoid valve. If it is clear that the solenoid valve under test does not have multiple current peaks, the peak judgment process can be removed from the program to further reduce the consumption of FPGA computing resources.
[0042] The method for extracting current characteristic points of a solenoid valve places certain requirements on the selection of components in the hardware design. Assuming... Figure 5 The time interval between t2 and t1 is 1ms. Three consecutive data points are used for comparison, and the time interval between the data points used for comparison is 100us. Therefore, 16 data points need to be acquired within 100us. Each data point has a sampling precision of 12 bits, and the number of data bits that need to be transmitted via SPI within 100us is 12bit * 16 = 672 bits. The SPI transmission rate must be at least greater than 6.72Mbps (672bit / 100us = 6.72Mbps, excluding AD conversion time). Assuming a 10Mbps SPI communication rate is selected, transmitting 16 12-bit data points takes 67.2us, and the conversion time for each data point is approximately 2us. Therefore, an AD converter chip with a conversion rate greater than 500KSPS is required to meet the design requirements. The above theoretical calculations serve as the basic selection basis. In actual selection, an AD chip with a higher conversion rate can be chosen based on the sampling precision and filtering requirements.
[0043] This invention proposes a scheme for extracting feature points from solenoid valve current sampling, reducing the data transmission bandwidth of solenoid valve current data acquisition. This is particularly suitable for fields with limited communication bandwidth, such as aerospace. When monitoring the solenoid valve current waveform is required, data reconstruction is only needed based on the extracted feature points. The current feature point extraction process designs different sampling frequencies for different stages of current change, using a frequency conversion method to improve the accuracy of current judgment and increase the range of time during which the current can maintain stable operation. When comparing the data of the sampling points, it is not a simple size judgment; a certain comparison threshold needs to be set according to the current change. During current data processing, a sliding window is used for continuous sampling. The sampled data is sorted, and the largest and smallest values are removed before taking the average. Hardware design parameters are inferred from the current sampling time interval to improve the accuracy of feature point judgment after current sampling data processing. The program can flexibly choose between single-peak and multi-peak judgment based on the characteristics of the solenoid valve current waveform, improving the utilization of chip resources. Test results are uploaded via LVDS communication.
[0044] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve, characterized in that, Includes the following steps: Convert the solenoid valve current signal into a voltage signal and perform analog-to-digital conversion; The parallel processing capability of the FPGA is used to synchronously sample the current of multi-channel solenoid valves. A sliding window is used to perform extreme value removal and averaging on the sampled data; Feature points characterizing the working characteristics of the solenoid valve are extracted based on the current change trend. A frequency conversion sampling strategy is adopted to set different sampling frequencies at different current change stages; Feature points are identified based on a threshold judgment mechanism; The extracted feature point data is framed and uploaded via the LVDS communication interface.
2. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 1, characterized in that, The sliding window consists of 16 consecutive sampling points. After removing the four largest and four smallest values using bubble sort, the average of the remaining eight values is taken as the valid sampled data.
3. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 2, characterized in that, Feature points include: The peak point during the current rise process, the valley point during the current fall process, the characteristic points of the current steady segment, and the characteristic points of the reverse pulse during the solenoid valve closing process.
4. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 3, characterized in that, The frequency conversion sampling strategy is as follows: during the current rise and fall phases, a shorter time interval is used for fast sampling, and during the current stabilization phase, a longer time interval is used for slow sampling, in order to adapt to the waveform change rate at different stages and optimize data storage.
5. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 4, characterized in that, The threshold determination mechanism includes: for three consecutive sampling points x, y, z, when y≥x+Δx and y≥z+Δz are satisfied, it is determined as a peak point; when y≤x-Δx and y≤z-Δz are satisfied, it is determined as a valley point, where Δx and Δz are adjustable threshold parameters.
6. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 5, characterized in that, The feature point extraction process includes: recording the starting time t0 when the current starts to increase; recording feature point 1 and its relative time Δt1 when the current changes from increasing to decreasing during the current rising segment; recording feature point 2 and its relative time Δt2 when the current changes from decreasing to increasing during the current falling segment; recording feature point 3 during the current stabilization segment; recording feature point 4 and its relative time Δt3 during the current closing and falling segment; and recording feature point 5 and its relative time Δt4 and feature point 6 and its relative time Δt5 when a reverse pulse is detected during the solenoid valve closing process.
7. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 6, characterized in that, For cases where the solenoid valve current has multiple peak values, when a current decrease is detected again, the data of feature point 1 and feature point 2 are updated again. When a reverse pulse is detected again, the data of feature point 5 and feature point 6 are updated. The maximum value of feature point 6 in multiple measurements is taken as the final data of feature point 6, and the data of the adjacent feature point 5 is also updated synchronously to the final data.
8. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 7, characterized in that, The relative times Δt1 to Δt5 are obtained by accumulating the time intervals between adjacent valid sampled data points, and the time intervals involved in the accumulation for each stage are dynamically adjusted according to the sampling frequency of that stage.
9. The method for automatic synchronous acquisition of current characteristic points of a multi-channel solenoid valve according to claim 8, characterized in that, The LVDS communication framing format includes: frame header, solenoid valve channel number, feature point 1 data and its relative time Δt1, feature point 2 data and its relative time Δt2, feature point 3 data, feature point 4 data and its relative time Δt3, feature point 5 data and its relative time Δt4, and feature point 6 data and its relative time Δt5.
10. A circuit applying the automatic synchronous acquisition method for multi-channel solenoid valve current characteristic points according to any one of claims 1-9, characterized in that, include: A sampling resistor connected in series in the current loop of the solenoid valve is used to convert the current signal into a voltage signal; The operational amplifier conditioning circuit connected to the sampling resistor output is used to filter and amplify the voltage signal; A high-speed AD conversion circuit connected to the output of the operational amplifier conditioning circuit is used to convert analog voltage signals into digital signals and output them through the SPI interface; A high-speed isolation circuit connected to a high-speed AD conversion circuit is used to achieve SPI communication isolation; And an FPGA circuit connected to a high-speed isolation circuit. The FPGA circuit contains multiple parallel data receiving channels for synchronously acquiring and processing multi-channel solenoid valve current digital signals and extracting feature points.