Filtering method for measured value of RTD temperature sensor

By adopting improved median filtering and de-extreme average filtering methods in the RTD temperature sensor, combined with the sliding update mechanism, the problem of RTD temperature sensor measurement data jumpability is solved, and efficient filtering effect and flexible adaptability are achieved.

CN119813994APending Publication Date: 2025-04-11JOHNSON CONTROLS AIR CONDITIONING & REFRIGERATION (WUXI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411844207.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When RTD temperature sensors are measured in motor coils, there is a large data jumpability. Traditional filtering methods are difficult to take into account both filtering effects and real-timeness, and lack flexibility and adaptability.

Method used

A software filtering method is adopted, which includes defining an array for storing sampled data, sampling through time intervals and storing it into the array in a first-in-first-out manner, dividing it into multiple groups for improved median filtering and de-extreme average filtering, combined with a sliding update mechanism.

Benefits of technology

It effectively reduces data pulsability, improves the real-timeness of filtering effects, and has the ability to flexibly adapt to different operating environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119813994A_ABST
    Figure CN119813994A_ABST
Patent Text Reader

Abstract

The invention provides a software filtering method for a measured value of an RTD temperature sensor. The software filtering method is suitable for a scene in which the RTD temperature sensor is embedded in a motor coil and is used for measuring temperature. According to the method, an array Arraydata [M * N] is defined, data are sampled at a time interval T and stored in the array, and the data are updated according to a first-in first-out rule. The array is divided into M groups, each group comprises N data, improved median filtering is carried out on each group of data to obtain a representative value Data, then the maximum value and the minimum value are removed from the M representative values, and the average value of the remaining data is taken as a final output value. The method combines the advantages of low-pass filtering, extreme value removing filtering, median filtering and sliding mean filtering, has the characteristic of flexibly adjusting parameters (T, M and N), can adapt to different motor operating environments, effectively eliminates interference, and remarkably reduces temperature jitter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of temperature measurement technology, and in particular to a software filtering method for measuring values ​​of RTD (resistance temperature detector) temperature sensors, which is suitable for application scenarios where RTD temperature sensors are buried in motor coils. Background Art

[0002] At present, RTD temperature sensors are widely used to measure the temperature of motor coils due to their high precision and stability. However, due to the presence of strong interference signals in the motor operating environment, the collected RTD temperature data often has large fluctuations, and the maximum and minimum value difference of temperature fluctuations may be as high as 20°C. Traditional filtering methods such as low-pass filtering, mean filtering and median filtering have their own limitations. It is difficult to take into account both filtering effect and real-time performance at the same time, and they lack flexible adaptability in different operating environments. Therefore, there is an urgent need for an efficient and flexible software filtering method that can effectively eliminate interference noise and meet the use requirements of different environments. Summary of the invention

[0003] The purpose of this application is to provide a software filtering method for RTD temperature sensor measurement values, which can combine the advantages of multiple filtering algorithms, effectively reduce data jitter, and have flexible adaptability to different operating environments.

[0004] Specifically, according to the first aspect of the present application, the present application provides a filtering method suitable for RTD temperature sensor measurement values, including the following steps: S1: define an array Array_data, wherein the array Array_data is used to accommodate M×N data; S2: sample the data of the RTD temperature sensor at a time interval T, and store the sampled data into the array Array_data in a first-in-first-out manner; S3: divide the array Array_data into M groups, each group containing N sampled data; S4: perform improved median filtering on the N sampled data in each group to obtain M representative data; S5: perform de-extreme average filtering on the M representative data to obtain the final temperature value; and S6: update the data in the array Array_data in a sliding manner, and repeat steps S4 and S5.

[0005] According to the first aspect of the present application, the improved median filtering process includes: S4.1: sorting the N sampled data in each group by size to obtain M data sequences; and S4.2: selecting a value of a certain position from each data sequence as the representative data of each group to obtain M representative data.

[0006] According to the first aspect of the present application, N is an odd number, and the improved median filter selects the (N+1) / 2th data after sorting from each data sequence as the representative data of each group.

[0007] According to the first aspect of the present application, the time interval T is configured to be set according to the corresponding time of the RTD temperature sensor.

[0008] According to the first aspect of the present application, the setting range of the time interval T is 10 to 100 milliseconds.

[0009] According to the first aspect of the present application, the number of groups M of the array Array_data is configured to be set according to the interference intensity of the environment in which the RTD temperature sensor is located.

[0010] According to the first aspect of the present application, the setting range of the number of groups M of the array Array_data is 3-100.

[0011] According to the second aspect of the present application, the present application provides an RTD temperature sensor system applied to a motor coil, the system comprising: an RTD temperature sensor, which is buried in the motor coil and is used to collect real-time temperature data of the motor coil; a storage unit, which is used to store the collected temperature data; and a processing unit, which is used to run the aforementioned filtering method, process the collected temperature data, and output a filtered temperature value. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings are not drawn to scale. In the drawings, each identical or nearly identical component represented in different figures is represented by the same reference numeral. For purposes of clarity, not every component may be labeled in every drawing. In the drawings:

[0013] Figure 1 A flowchart 100 of a filtering method for RTD temperature sensor measurement values ​​according to an embodiment of the present application is shown;

[0014] Figure 2 A schematic diagram showing a specific data calculation method of a filtering method according to an embodiment of the present application is shown;

[0015] Figure 3 A comparison chart of the original temperature sampling data of the RTD temperature sensor and the temperature data results after filtering by the filtering method of the present application is shown;

[0016] Figure 4 A schematic block diagram of a filtering system suitable for RTD temperature sensor measurement values ​​according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0017] Various specific embodiments of the present application will be described below with reference to the accompanying drawings which constitute a part of this specification. It should be understood that, where possible, the same or similar reference numerals used in this application refer to the same components.

[0018] Figure 1 A flowchart 100 of a filtering method applicable to RTD temperature sensor measurement values ​​according to an embodiment of the present application is shown.

[0019] like Figure 1As shown, the flowchart 100 of the filtering method suitable for the measurement value of the RTD temperature sensor starts from step 101. At step 101, first define an array Array_data[M*N], and the number of array elements is M*N. In other words, M*N data can be filled in the array. Among them, the values ​​of M and N can be selected according to actual needs, as long as the subsequent data calculation and processing requirements are met. Then, go to step 102 from step 101. In step 102, the temperature of the motor is sampled by the RTD temperature sensor embedded in the motor coil, the sampling interval is set to T, and the sampled temperature data is stored in the array Array_data in a first-in-first-out manner. In other words, the first sampled temperature data is first stored in the array, and the subsequent sampled data is stored in the array in sequence until the array is filled with M*N temperature data. When the array is filled and the RTD temperature sensor samples the M*N+1th temperature data, the first sampled temperature data is discarded, and the M*N+1th temperature data is filled into the array as the latest temperature data. At this time, the array still retains M*N temperature data. Then, go to step 103 from step 102. In step 103, the sampled data in the array Array_data are continuously divided into M groups according to the order of storage, and each group contains N data. That is to say, from the first data to the Nth data first stored in the array is the first group, from the N+1th data to the 2Nth data is the second group, and so on, until all the data in the array is divided into M data groups. Then, go to step 104 from step 103. In step 104, for each data group in the M data groups, the N data in the group are subjected to improved median filtering processing to obtain a representative data. Thus, a total of M representative data are obtained for the M data groups. Then, go to step 105 from step 104. In step 105, the M representative data obtained in step 104 are subjected to extreme value average filtering, that is, the maximum and minimum values ​​in the M representative data are removed, and then the remaining representative data are averaged to obtain the final temperature value. Then, step 105 is transferred to step 106. In step 106, the data in the array Array_data is updated in a sliding manner, that is, new sampled data is added and the oldest sampled data is removed. After the data in the array Array_data is updated, steps 103-105 are transferred again. Since the data in the array is always updated by sliding, the M data groups divided in the aforementioned step 103, the M representative data obtained in the aforementioned step 104, and the final temperature value obtained in the aforementioned step 105 are also in a dynamic update state accordingly.

[0020] Figure 2 Shows the use of Figure 1Schematic diagram of the specific sampling data calculation method of the filtering method.

[0021] according to Figure 1 In the filtering method, the sampling interval T is set to 20 milliseconds, the number of data groups M is set to 50, and the number of data in each group N is set to 5. Based on the above settings, Figure 2 The specific data calculation method is shown in FIG. Figure 2 As shown in , first set an array Array_data, which can accommodate M*N=250 data. Fill the 250 sampled temperature values ​​into the array in chronological order, that is, data_0, data_1, data_2...data_249 (only data_0 to data_19 are shown in the figure). Divide the 250 sampled data in the array into M=50 groups, each group containing N=5 sampled values. Perform improved median filtering on the 50 data groups respectively to obtain 50 representative data Data. For example, sort the data [data_0, data_1, data_2, data_3, data_4] in the first group by size, and select the (N+1) / 2=3rd data from the sorted data sequence as the representative data of the first group. By analogy, the second group of data is [data_5, data_6, data_7, data_8, data_9]..., the Mth group of data is [data_(M*N-5), data_(M*N-4), data_(M*N-3), data_(M*N-2), data_(M*N-1)], and a total of M representative data Data can be obtained. The maximum and minimum values ​​are removed from the M Data, and the remaining data is averaged as the final output Data, that is, the final temperature value after filtering. Those skilled in the art should understand that T, M, and N in the above description are all set values. The data sampling interval T depends on the response time of the sensor, and the general setting range is 10 to 100ms. The number of data groupings M depends on the interference intensity of the environment in which the RTD temperature sensor is located, and the general setting range is 3-100. In an environment with strong interference, the M value can be set to a larger value. The number of data elements N in each group needs to be set to an odd number, generally in the range of 3, 5, 7, 9, depending on the environmental interference and sampling interval. In an environment with strong interference and fast sampling, the N value can be set to a larger value. Since T, M, and N are settable values, the filtering algorithm of this application has great flexibility, and the setting values ​​of T, M, and N can be changed accordingly according to the different operating interference environments of the motor to achieve a good filtering effect.

[0022] Figure 3 A comparison chart of the original temperature sampling data of the RTD temperature sensor and the temperature data results after filtering by the filtering method of the present application is shown.

[0023] like Figure 3 As shown in the figure, the change curve of the RTD motor winding temperature is shown, where the RTD motor winding 1 temperature is the real-time updated data after being processed by the filtering method, and the RTD motor winding 2 temperature is the original collected data. The X-axis represents the number of RTD temperature sensor samples, and the Y-axis represents the temperature value in degrees Celsius. Figure 3 It can be seen that the original temperature data collected by RTD motor winding 2 has great fluctuations, and the difference between the highest temperature value and the lowest temperature value can reach 10 degrees. However, the real-time temperature value processed by the filtering method of this application is basically stable with little fluctuation. Figure 3 It can be seen that the filtering method of the present application is effective.

[0024] Figure 4 A schematic block diagram of a filtering system 200 suitable for RTD temperature sensor measurement values ​​according to an embodiment of the present application is shown.

[0025] like Figure 4 As shown, the filtering system 200 of the RTD temperature sensor measurement value includes a bus 202, a processor 204, a memory 206, an input interface 208, and an output interface 210. The processor 204, the memory 206, the input interface 208, and the output interface 210 are connected to the bus 202. The processor 204 can read a program (or instruction) from the memory 206 and execute the program (or instruction) to perform the processing of the data. The processor 204 can also write data or a program (or instruction) into the memory 206. The memory 206 can store programs (instructions) or data. By executing the instructions in the memory 206, the processor 204 can control the memory 206, the input interface 208, and the output interface 210.

[0026] The input interface 208 is configured to receive temperature sampling data sampled from the RTD temperature sensor and output the temperature sampling data to the memory 206 .

[0027] The processor 204 is configured to process the temperature sampled data in the memory 206 to generate a filtered temperature value. In one embodiment, the processor 204 groups the temperature sampled data in the memory 206, performs an improved median filter process on each group of data after grouping, and performs a de-extreme average filter process on each group of representative data obtained, thereby obtaining a filtered temperature value.

[0028] The output interface 210 is configured to receive the filtered temperature value from the processor 204 and output the temperature value for subsequent use.

[0029] The software filtering method for RTD (resistance temperature detector) temperature sensor measurements of the present application has the following advantages:

[0030] First, the parameters T, M, N and so on in the filtering method of the present application are settable values, which makes the filtering algorithm extremely flexible and applicable. The set values ​​of T, M, N can be changed accordingly according to the operating interference environment of different motors to achieve good filtering effect;

[0031] Second, the filtering method of the present application organically combines low-pass filtering, de-extreme value filtering, median filtering, and sliding mean filtering, making filtering more efficient;

[0032] Although the present application has been described in conjunction with the examples of the embodiments summarized above, various alternatives, modifications, changes, improvements and / or substantially equivalent solutions, whether known or currently or foreseeable in the near future, may be apparent to those skilled in the art. In addition, the technical effects and / or technical problems described in this specification are exemplary rather than restrictive; so the disclosure in this specification may be used to solve other technical problems and have other technical effects and / or may solve other technical problems. Therefore, the examples of the embodiments of the present application as stated above are intended to be illustrative rather than restrictive. Various changes may be made without departing from the spirit or scope of the present application. Therefore, the present application is intended to include all known or earlier developed alternatives, modifications, changes, improvements and / or substantially equivalent solutions.

Claims

1. A filtering method suitable for RTD temperature sensor measurement values, characterized in that: The method comprises the following steps: S1: define an array Array_data, wherein the array Array_data is used to contain M×N data; S2: sampling the data of the RTD temperature sensor at a time interval T, and storing the sampled data into the array Array_data in a first-in-first-out manner; S3: Divide the array Array_data into M groups, each group containing N sampling data; S4: performing improved median filtering on the N sampled data in each group to obtain M representative data; S5: performing de-extreme value averaging filtering on the M representative data to obtain a final temperature value; and S6: Update the data in the array Array_data by sliding, and repeat steps S4 and S5.

2. The filtering method according to claim 1, characterized in that: The improved median filtering process comprises: S4.1: sort the N sample data in each group by size to obtain M data sequences; and S4.2: Select a certain value from each data sequence as the representative data of each group to obtain M representative data.

3. The filtering method according to claim 2, characterized in that: The N is an odd number, and the improved median filter selects the (N+1) / 2th data after sorting from each data sequence as the representative data of each group.

4. The filtering method according to claim 1, characterized in that: The time interval T is configured to be set according to the response time of the RTD temperature sensor.

5. The filtering method according to claim 4, characterized in that: The setting range of the time interval T is 10 to 100 milliseconds.

6. The filtering method according to claim 1, characterized in that: The number of groups M of the array Array_data is configured to be set according to the interference intensity of the environment in which the RTD temperature sensor is located.

7. The filtering method according to claim 6, characterized in that: The setting range of the number of groups M of the array Array_data is 3-100.

8. A filtering system for RTD temperature sensor measurements applied to motor coils, the system comprising: An RTD temperature sensor is embedded in the motor coil and is used to collect real-time temperature data of the motor coil; A storage unit, the storage unit is used to store the collected temperature data; as well as A processing unit, wherein the processing unit is used to run the filtering method according to any one of claims 1 to 7, process the collected temperature data, and output a filtered temperature value.