A torque sensor signal filtering method, device, equipment, medium and product
Patent Information
- Application Number
- CN202510565732.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2045-04-30
AI Technical Summary
[0002]在新能源汽车动力总成测试系统中,扭矩传感器采集的信号数据通常包含噪声,影响了被测样件测试的准确性和一致性
[0020] This invention first acquires the signal data set from the torque sensor, then obtains the window size, and generates an initial queue based on the signal data set according to the window size. If new data is added, it is inserted into the initial queue to obtain a target queue. Finally, the torque sensor signal is filtered based on the target queue. By combining the advantages of moving average filtering and median filtering methods, and employing an insertion sort mechanism to optimize computational efficiency, this invention improves the real-time performance and accuracy of torque signal processing while reducing computational complexity.
Smart Images

Figure CN120489406B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of powertrain control technology for new energy vehicles, and in particular to a method, device, equipment, medium, and product for filtering torque sensor signals. Background Technology
[0002] In new energy vehicle powertrain testing systems, the signal data collected by torque sensors often contains noise, affecting the accuracy and consistency of the tested components. While traditional moving median filtering can effectively remove noise, it requires reordering the data within the window for each calculation, increasing computational complexity and proving inefficient, especially in scenarios with high real-time requirements. On the other hand, while moving average filtering is computationally simple, it easily introduces hysteresis when processing abrupt signals. Therefore, combining the advantages of both filtering methods while optimizing computational efficiency has become a pressing issue. Summary of the Invention
[0003] This invention provides a method, apparatus, device, medium, and product for filtering torque sensor signals, which can improve the real-time performance and accuracy of torque signal processing while reducing computational complexity.
[0004] According to one aspect of the present invention, a torque sensor signal filtering method is provided, comprising:
[0005] Acquire the signal data set from the torque sensor;
[0006] Obtain the window size, and generate an initial queue based on the signal data set according to the window size;
[0007] If new data is added, the new data is inserted into the initial queue to obtain the target queue;
[0008] The signal from the torque sensor is filtered based on the target queue.
[0009] According to another aspect of the present invention, a torque sensor signal filtering device is provided, the device comprising:
[0010] The acquisition module is used to acquire the signal data set from the torque sensor.
[0011] A generation module is used to obtain the window size and generate an initial queue based on the signal data set according to the window size;
[0012] An insertion module is used to insert new data into the initial queue if new data exists, thereby obtaining the target queue;
[0013] The filtering module is used to filter the signal from the torque sensor based on the target queue.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the torque sensor signal filtering method according to any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the torque sensor signal filtering method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the torque sensor signal filtering method described in any embodiment of the present invention.
[0020] This invention first acquires the signal data set from the torque sensor, then obtains the window size, and generates an initial queue based on the signal data set according to the window size. If new data is added, it is inserted into the initial queue to obtain a target queue. Finally, the torque sensor signal is filtered based on the target queue. By combining the advantages of moving average filtering and median filtering methods, and employing an insertion sort mechanism to optimize computational efficiency, this invention improves the real-time performance and accuracy of torque signal processing while reducing computational complexity.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1This is a flowchart of a torque sensor signal filtering method according to an embodiment of the present invention;
[0024] Figure 2 This is a flowchart of an exemplary torque sensor signal filtering method in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of a torque sensor signal filtering device according to an embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the torque sensor signal filtering method of the present invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and their derivatives, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0030] Example 1
[0031] Figure 1 This is a flowchart of a torque sensor signal filtering method according to an embodiment of the present invention. This embodiment is applicable to the filtering of powertrain torque sensor signals. The method can be executed by the torque sensor signal filtering device in this embodiment of the present invention, which can be implemented in software and / or hardware, such as... Figure 1As shown, the method specifically includes the following steps:
[0032] S101, Acquire the signal data set from the torque sensor.
[0033] As we know, a torque sensor is a sensor used to measure torque (i.e., rotational torque) in rotating shafts or transmission systems. It is widely used in various industrial and automotive fields to monitor and control the torque output of mechanical systems. Signal filtering processing of torque sensors is a crucial step in ensuring the accuracy and reliability of measurement data.
[0034] The torque sensor signal filtering method of this invention can be applied to the powertrain testing scenario of new energy vehicles. In this embodiment, the torque sensor is mainly the torque sensor in the powertrain testing system of new energy vehicles. It should be noted that the signal data set can be a collection of signal data collected by the torque sensor.
[0035] Specifically, in the new energy vehicle powertrain testing system, the raw signals from the torque sensors on the new energy vehicle powertrain test bench are acquired in real time, and the raw signals are used to form a signal data set.
[0036] S102. Obtain the window size and generate an initial queue based on the signal data set according to the window size.
[0037] In this embodiment, a fixed-size sliding window can be initialized for signal filtering from the torque sensor. This embodiment does not limit the specific window size; users can set the window size based on actual conditions or experience.
[0038] It should be explained that the initial queue can be a sorted queue formed by arranging the signal data within the window according to a certain sorting rule. For example, the sorting rule could be arranged in ascending order of signal data value from smallest to largest, or in descending order of signal data value from largest to smallest. In actual operation, the queue can essentially be a circular queue.
[0039] Specifically, a fixed-size sliding window is initialized, and the signal data in the signal data set is arranged according to a certain sorting rule to generate an initial queue.
[0040] S103. If there is new data, insert the new data into the initial queue to obtain the target queue.
[0041] The new data can be new signal data collected by the torque sensor.
[0042] In this embodiment, the target queue can be a queue in an ordered state obtained by inserting new data into the initial queue according to the sorting rules.
[0043] Specifically, each time the torque sensor collects new torque signal data, it inserts it into a circular queue to ensure that the queue is always in an orderly state.
[0044] S104. Filter the signal from the torque sensor based on the target queue.
[0045] Specifically, a moving average is calculated based on the updated queue to generate the final filtered result.
[0046] This invention first acquires the signal data set from the torque sensor, then obtains the window size, and generates an initial queue based on the signal data set according to the window size. If new data is added, it is inserted into the initial queue to obtain a target queue. Finally, the torque sensor signal is filtered based on the target queue. By combining the advantages of moving average filtering and median filtering methods, and employing an insertion sort mechanism to optimize computational efficiency, this invention improves the real-time performance and accuracy of torque signal processing while reducing computational complexity.
[0047] Optionally, obtain the window size and generate an initial queue based on the signal data set according to the window size, including:
[0048] Obtain the window size, and divide the signal data in the signal data set based on the window size to obtain a subset of the signal data within the window.
[0049] Here, a subset of signal data can refer to the set of signal data included within the window.
[0050] Specifically, the signal data in the signal data set can be divided according to the window size to obtain a subset of signal data included within the window. For example, if the window size is 5, meaning a sliding window can hold 5 signal data points, then 5 signal data points are selected from the signal data set and placed into the window. In actual operation, the order in which the signal data is selected can be, for example, according to the chronological order in which the signal data was acquired by the torque sensor. For example, the subset of signal data can be represented as {X1, X2, X3, X4, X5}.
[0051] Sort the signal data in the subset of signal data within the window in ascending order of their numerical values to obtain the sorted subset of signal data.
[0052] For example, in this embodiment, the sorting rule is ascending order, that is, the signal data in the subset of signal data within the window are arranged in ascending order of their numerical values. For example, the sorted subset of signal data can be represented as {X3, X2, X5, X1, X4}.
[0053] An initial queue is generated based on the sorted subset of signal data.
[0054] Specifically, the signal data is arranged in ascending order to form a sorted queue.
[0055] The technical solution of this invention uses a circular queue as the data storage structure for the sliding window, which avoids frequent memory allocation and release, and significantly reduces memory overhead and management complexity.
[0056] Optionally, an initial queue is generated based on the sorted subset of signal data, including:
[0057] The marking time corresponding to each signal data is determined based on the sorting position of each signal data in the sorted signal data subset.
[0058] It should be noted that the sorting position can be the order in which the signal data is sorted within the window. For example, if a signal data X5 is the 3rd position in the window from smallest to largest, then the sorting position of the signal data X5 is 3.
[0059] In this embodiment, the marking time can be the time when each signal data enters the circular queue.
[0060] Specifically, time stamps can be applied based on the order of each signal data point in the initial queue, marking the order in which each signal data point was added to the queue. For example, the order of each signal data point in the sorted subset can be marked with its corresponding time stamp order, i.e., time stamp initialization. For instance, the time stamp of the signal data at position 1 in the initial queue can be assigned as T1, the time stamp of the signal data at position 2 can be assigned as T2, and so on. Here, T1 is earlier than T2, meaning that the signal data at position 1 in the initial queue was added to the initial queue earlier than the signal data at position 2.
[0061] Generate a data pair corresponding to each signal data based on each signal data and the corresponding marker time.
[0062] In this embodiment, the data pair can be a two-dimensional data pair consisting of signal data and a marker time.
[0063] Specifically, each signal data and its corresponding tag time are paired to form a data pair. For example, a data pair can be represented in the form of (signal data, tag time).
[0064] An initial queue is generated based on the data pairs corresponding to each signal data.
[0065] Specifically, the final initial queue is composed of each data pair. For example, the initial queue can be represented as {(X3, T1), (X2, T2), (X5, T3), (X1, T4), (X4, T5)}. Here, T1 is earlier than T2, T2 is earlier than T3, and so on.
[0066] The technical solution of this invention uses a two-dimensional data pair consisting of signal data and marker time to represent the data, so that the order in which the signal data was added to the queue can still be known after the signal data is sorted.
[0067] Optionally, if new data is added, the new data is inserted into the initial queue to obtain the target queue, which includes:
[0068] If new data is added, the data pair with the largest marked time in the initial queue will be deleted.
[0069] Specifically, after the torque sensor acquires new torque signal data each time, it searches for the data pair with the longest marked time in the circular queue and deletes it. For example, if T5 is the longest marked time in the initial queue {(X3, T1), (X2, T2), (X5, T3), (X1, T4), (X4, T5)}, then the data pair (X4, T5) can be deleted.
[0070] The newly added data is compared with each signal data in the initial queue in ascending order to determine the data pair corresponding to the first signal data in the initial queue that is greater than the newly added data.
[0071] Specifically, the newly added data is compared with each signal data in the initial queue in ascending order, until the first signal data in the initial queue that is greater than the newly added data is found. This identifies the data pair corresponding to the first signal data in the initial queue that is greater than the newly added data. For example, if the newly added data is X6, then X6 is compared sequentially in the order of X3, X2, X5, and X1. Assuming X3 is less than X6, X2 is less than X6, and X5 is greater than X6, then X5 is the first signal data in the initial queue that is greater than the newly added data, and (X5, T3) is the data pair corresponding to the first signal data in the initial queue that is greater than the newly added data.
[0072] For each signal data pair in the initial queue that is greater than the newly added data, shift its sorting position one position to the right in the initial queue.
[0073] For example, the sorting positions of (X5, T3) and (X1, T4) in the initial queue can be shifted one position to the right, and then the initial queue can be represented as {(X3, T1), (X2, T2), empty, (X5, T3), (X1, T4)}.
[0074] The target queue is obtained by inserting the new data before the first data pair in the initial queue that is greater than the new data.
[0075] For example, new data is inserted into an empty position in the initial queue to generate the target queue.
[0076] The technical solution of this invention implements an insertion sort mechanism based on a circular queue. The ordered nature of the data is dynamically maintained within the circular queue, ensuring that the data in the queue is always ordered and guaranteeing the rapid retrieval of the median. Since the queue is already ordered, there is no need to re-sort when inserting new data, avoiding re-sorting for each calculation and improving computational efficiency.
[0077] Optionally, the newly added data is inserted before the first data pair in the initial queue corresponding to the signal data greater than the newly added data, to obtain the target queue, which includes:
[0078] Assign the target time to the marker time of the new data, and generate new data pairs based on the new data and the target time.
[0079] In this embodiment, the target time can be T0, which represents the time when new data is added to the queue.
[0080] Specifically, the tagging time of the newly added data can be recorded as T0, and a new data pair can be generated with the newly added data. For example, the new data pair can be represented as (X6, T0).
[0081] Insert the new data pair before the first data pair in the initial queue that corresponds to the signal data that is greater than the new data pair.
[0082] Specifically, new data pairs are inserted into empty positions in the initial queue. For example, the queue can then be represented as {(X3, T1), (X2, T2), (X6, T0), (X5, T3), (X1, T4)}.
[0083] Increment the marker time of all data pairs in the target queue except for newly added data by one to obtain the target queue.
[0084] For example, the target queue can be represented as {(X3, T2), (X2, T3), (X6, T0), (X5, T4), (X1, T5)}.
[0085] The technical solution of this invention, by employing an insertion sort mechanism, can maintain the order of the circular queue and ensure the rapid extraction of the median.
[0086] Optionally, the torque sensor signal is filtered based on the target queue, including:
[0087] The set of data pairs whose positions are in the middle of the target queue is determined based on the window size.
[0088] The target quantity can be a value preset by the user based on actual conditions or experience; this embodiment does not limit this.
[0089] It should be noted that the data pair set can be a set consisting of the number of data pairs in the middle of the target queue.
[0090] For example, when the window size is odd, the target quantity can also be set to odd; when the window size is even, the target quantity can also be set to even, making it easier to determine the data pair closest to the center position.
[0091] A moving average is calculated on the data set to filter the torque sensor signal.
[0092] Specifically, the average value of the signal data of the middle target number of data pairs in the current target queue is calculated, and the final filtering result is generated by combining the advantages of moving average and median filtering.
[0093] The technical solution of this invention combines the smoothing characteristics of moving average and the noise reduction characteristics of median filtering, thus balancing signal smoothness and transient response capability.
[0094] Figure 2 This is a flowchart illustrating an exemplary torque sensor signal filtering method in an embodiment of the present invention. Figure 2 As shown, the flow of the torque sensor signal filtering method can be described as follows:
[0095] Step a: Generate an initial queue of length N two-dimensional data pairs (signal data, tag time).
[0096] Specifically, in the new energy vehicle powertrain testing system, signal data from torque sensors on the new energy vehicle powertrain test bench is acquired in real time. A fixed-size sliding window is initialized, with the window size represented by N. The signal data is divided according to the window size, and then the signal data within the window is arranged in ascending order. Each signal data point is time-stamped according to its position in the initial queue, indicating the order in which each signal data point was added to the queue. Each signal data point and its corresponding time stamp are combined into a two-dimensional data pair (signal data, time stamp) to generate the initial queue.
[0097] Step b: Was any new data collected? If yes, proceed to step c; otherwise, return to step b.
[0098] Specifically, determine whether the torque sensor has acquired new torque signal data (i.e., new data). If new data has been acquired, proceed to step c to find and delete the data pair with the longest marked time in the initial queue; otherwise, return to step b to determine whether the torque sensor has acquired new data.
[0099] Step c: Find the data pair with the longest marked time in the initial queue and delete it.
[0100] Specifically, each time the torque sensor acquires new torque signal data, it searches for the data pair with the longest marked time in the initial queue and deletes it.
[0101] Step d: Find the sorting position of the new data in the queue according to the ascending order rule.
[0102] Specifically, the new data is sorted in ascending order and compared with each signal data in the initial queue until the first signal data in the initial queue that is greater than the new data is found. This process then identifies the data pair corresponding to the first signal data in the initial queue that is greater than the new data. At this point, the new data's position in the queue is before the data pair corresponding to the first signal data in the initial queue that is greater than the new data.
[0103] Step e: Shift all data pairs that are larger than the newly added data one position to the right.
[0104] Specifically, for each data pair in the initial queue corresponding to a signal data greater than the newly added data, shift its sorting position one position to the right. Then, insert the newly added data before the first data pair in the initial queue corresponding to a signal data greater than the newly added data.
[0105] Step f: Record the marking time of the newly inserted data as T0, and increment the marking time of all other data pairs by 1 to obtain the target queue.
[0106] Specifically, the marking time of newly added data can be recorded as T0, and the marking time of the remaining data pairs can be incremented by 1 to obtain the target queue.
[0107] Step g: Take the average value of the W signal data in the middle of the target queue and output it.
[0108] Here, W represents the target quantity. Specifically, the moving average of the middle W signal data points in the target queue can be calculated, and the final filtering result can be output.
[0109] The technical solution of this invention provides an improved filtering algorithm for powertrain torque sensor signal processing. By combining the advantages of moving average filtering and median filtering, and using an insertion sort mechanism to optimize computational efficiency, it can improve the real-time performance and accuracy of torque signal processing while reducing computational complexity.
[0110] Example 2
[0111] Figure 3 This is a schematic diagram of a torque sensor signal filtering device according to an embodiment of the present invention. This embodiment is applicable to powertrain torque sensor signal filtering. The device can be implemented using software and / or hardware, and can be integrated into any device that provides torque sensor signal filtering functionality, such as… Figure 3 As shown, the torque sensor signal filtering device specifically includes: an acquisition module 201, a generation module 202, an insertion module 203, and a filtering module 204.
[0112] The acquisition module 201 is used to acquire the signal data set of the torque sensor;
[0113] The generation module 202 is used to obtain the window size and generate an initial queue based on the signal data set according to the window size;
[0114] The insertion module 203 is used to insert the new data into the initial queue if there is new data, so as to obtain the target queue;
[0115] The filtering module 204 is used to filter the signal from the torque sensor based on the target queue.
[0116] Optionally, the generation module 202 includes:
[0117] A partitioning unit is used to obtain the window size and partition the signal data in the signal data set based on the window size to obtain a subset of signal data within the window;
[0118] The sorting unit is used to sort the signal data in the signal data subset within the window in ascending order according to their numerical values, so as to obtain the sorted signal data subset.
[0119] The generation unit is used to generate an initial queue based on the sorted subset of signal data.
[0120] Optionally, the generation unit is specifically used for:
[0121] The marking time corresponding to each signal data is determined based on the sorting position of each signal data in the sorted signal data subset;
[0122] Generate a data pair corresponding to each signal data based on each signal data and the corresponding marker time of each signal data;
[0123] An initial queue is generated based on the data pairs corresponding to each of the signal data.
[0124] Optionally, the insertion module 203 includes:
[0125] The deletion unit is used to delete the data pair with the largest marked time in the initial queue if new data is added.
[0126] The comparison unit is used to compare the newly added data with each of the signal data in the initial queue in ascending order, and determine the data pair corresponding to the first signal data in the initial queue that is greater than the newly added data.
[0127] The shift unit is used to shift the sorting position of each data pair corresponding to a signal data that is greater than the newly added data in the initial queue one position to the right in the initial queue.
[0128] An insertion unit is used to insert the new data into the initial queue before the first data pair corresponding to the signal data that is greater than the new data, thereby obtaining the target queue.
[0129] Optionally, the insertion unit is specifically used for:
[0130] Assign a target time to the tagging time of the newly added data, and generate a new data pair based on the newly added data and the target time;
[0131] The newly added data pair is inserted before the data pair corresponding to the first signal data that is greater than the newly added data in the initial queue;
[0132] The target queue is obtained by incrementing the marker time of all data pairs in the target queue except for the newly added data by one.
[0133] Optionally, the filtering module 204 is specifically used for:
[0134] Based on the window size, determine the set of data pairs in the target queue that are at the middle number of data pairs;
[0135] A moving average is calculated on the data set to filter the signal from the torque sensor.
[0136] The above-mentioned products can perform the torque sensor signal filtering method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects of performing the method.
[0137] Example 3
[0138] Figure 4 A schematic diagram of an electronic device 30 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0139] like Figure 4 As shown, the electronic device 30 includes at least one processor 31 and a memory, such as a read-only memory (ROM) 32 or a random access memory (RAM) 33, communicatively connected to the at least one processor 31. The memory stores computer programs executable by the at least one processor. The processor 31 can perform various appropriate actions and processes based on the computer program stored in the ROM 32 or loaded from storage unit 38 into the RAM 33. The RAM 33 can also store various programs and data required for the operation of the electronic device 30. The processor 31, ROM 32, and RAM 33 are interconnected via a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.
[0140] Multiple components in electronic device 30 are connected to I / O interface 35, including: input unit 36, such as keyboard, mouse, etc.; output unit 37, such as various types of monitors, speakers, etc.; storage unit 38, such as disk, optical disk, etc.; and communication unit 39, such as network card, modem, wireless transceiver, etc. Communication unit 39 allows electronic device 30 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0141] Processor 31 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 31 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 31 performs the various methods and processes described above, such as torque sensor signal filtering methods:
[0142] Acquire a set of data pairs corresponding to the torque sensor, wherein the data pairs include signal data and the marker time corresponding to the signal data;
[0143] Obtain the window size, and generate an initial queue for the set based on the data according to the window size;
[0144] If a new data pair exists, the new data pair is inserted into the initial queue to obtain the target queue;
[0145] The signal from the torque sensor is filtered based on the target queue.
[0146] In some embodiments, the torque sensor signal filtering method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 38. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 30 via ROM 32 and / or communication unit 39. When the computer program is loaded into RAM 33 and executed by processor 31, one or more steps of the torque sensor signal filtering method described above may be performed. Alternatively, in other embodiments, processor 31 may be configured to perform the torque sensor signal filtering method by any other suitable means (e.g., by means of firmware).
[0147] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0148] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0149] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0151] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0152] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0153] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the torque sensor signal filtering method of any embodiment of the present invention.
[0154] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0155] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0156] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for filtering torque sensor signals, characterized in that, include: Acquire the signal data set from the torque sensor; Obtain the window size, and generate an initial queue based on the signal data set according to the window size. The initial queue consists of multiple data pairs, each data pair including signal data and the corresponding marking time. The marking time is determined according to the sorting position of the signal data in the initial queue. If new data is added, the data pair with the largest marked time in the initial queue is deleted; the new data is compared with each signal data in the initial queue in ascending order to determine the data pair corresponding to the first signal data in the initial queue that is greater than the new data; the sorting position of each data pair corresponding to the signal data that is greater than the new data in the initial queue is shifted one position to the right in the initial queue. Before inserting the new data into the data pair corresponding to the first signal data greater than the new data in the initial queue, assign the target time to the marker time of the new data, and generate a new data pair based on the new data and the target time; increment the marker time of all other data pairs in the target queue except for the new data by one to obtain the target queue; The signal from the torque sensor is filtered based on the target queue.
2. The method according to claim 1, characterized in that, Obtain the window size, and generate an initial queue based on the signal data set according to the window size, including: Obtain the window size, and divide the signal data in the signal data set based on the window size to obtain a subset of signal data within the window; The signal data in the subset of signal data within the window are sorted in ascending order according to their numerical values to obtain the sorted subset of signal data. An initial queue is generated based on the sorted subset of signal data.
3. The method according to claim 2, characterized in that, An initial queue is generated based on the sorted subset of signal data, including: The marking time corresponding to each signal data is determined based on the sorting position of each signal data in the sorted signal data subset; Generate a data pair corresponding to each signal data based on each signal data and the corresponding marker time of each signal data; An initial queue is generated based on the data pairs corresponding to each of the signal data.
4. The method according to claim 1, characterized in that, The signal from the torque sensor is filtered based on the target queue, including: Based on the window size, determine the set of data pairs in the target queue that are at the middle number of data pairs; A moving average is calculated on the data set to filter the signal from the torque sensor.
5. A torque sensor signal filtering device, used to perform the torque sensor signal filtering method as described in any one of claims 1-4, characterized in that, include: The acquisition module is used to acquire the signal data set from the torque sensor. A generation module is used to obtain the window size and generate an initial queue based on the signal data set according to the window size; An insertion module is used to insert new data into the initial queue if new data exists, thereby obtaining the target queue; The filtering module is used to filter the signal from the torque sensor based on the target queue.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the torque sensor signal filtering method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the torque sensor signal filtering method according to any one of claims 1-4.
8. A computer program product comprising a computer program that, when executed by a processor, implements the torque sensor signal filtering method according to any one of claims 1-4.
Citation Information
Patent Citations
Tango tree construction method and system based on sliding window
CN111488496A
Well logging torque sensor signal processing method based on improved Kalman filtering
CN117386351A