Infrared detector temperature compensation method and system based on particle swarm optimization
The particle swarm algorithm optimizes the ambient temperature and distance compensation formula and adjusts the focal length of the infrared detector, solving the problem that the infrared detector is affected in non-ideal environments, and achieving higher temperature measurement accuracy and stability.
Patent Information
- Application Number
- CN202410991292.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-12-03
AI Technical Summary
Infrared detectors have a great impact on the temperature measurement accuracy in non-ideal environments due to the ambient temperature and the temperature measurement distance, resulting in an increase in temperature measurement errors. It is difficult for the prior art to effectively compensate for the influence of these factors.
The temperature compensation method based on the particle swarm algorithm is adopted to measure the distance through a binocular ultrasonic distance measuring sensor, and the particle swarm algorithm is used to optimize the ambient temperature and distance compensation formula, adjust the focal length of the infrared detector to reduce the influence of external radiation energy, and improve the temperature measurement. Accuracy.
It significantly improves the temperature measurement accuracy of the infrared detector, reduces the impact of external radiation energy on the temperature measurement results, and enhances the accuracy and stability of temperature compensation.
Smart Images

Figure CN119063849A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of particle swarm algorithm, and in particular to a temperature compensation method and system for an infrared detector based on a particle swarm algorithm. Background Art
[0002] In a non-ideal natural environment, the emissivity of power equipment, ambient temperature, illumination, temperature measurement distance, dust, electromagnetic interference, etc. will affect the temperature measurement accuracy of infrared detectors, among which ambient temperature and temperature measurement distance have a particularly serious impact on temperature measurement accuracy. In a practical environment, the infrared chip of the detector not only receives the radiation energy emitted by the object being measured, but also receives the radiation energy of high-temperature objects in the surrounding environment reflected by the object being measured and the radiation energy of the atmosphere. If the temperature of the latter gradually increases, the radiation energy received by the detector will increase, and finally reflected as an obvious drift of the temperature of the object being measured. The temperature measurement error of the infrared detector caused by the temperature measurement distance can be analyzed from the following aspects. First, when the focal length of the infrared model is a fixed value and the temperature measurement distance increases, the object being measured cannot fill the field of view, then the radiation energy received by the infrared chip from the object being measured will decrease, resulting in a decrease in temperature measurement accuracy. Secondly, the temperature measurement accuracy will be affected by atmospheric absorption. When the temperature measurement distance increases, this absorption effect will be enhanced, which is reflected in the decrease in the transmittance of the atmosphere, reducing the radiation energy received by the infrared temperature measurement equipment, resulting in temperature measurement errors.
[0003] Based on this, the present invention proposes a temperature compensation method for infrared detectors based on particle swarm algorithm and variable focal length. The method utilizes the variable focal length characteristics of infrared detectors and adjusts the focal length according to the temperature measurement distance, so that the object to be measured occupies as much of the field of view of the infrared detector as possible, and the influence of the temperature measurement distance on the temperature measurement accuracy is weakened as much as possible. According to the analytical formula of the actual temperature of the object to be measured, the compensation formula of the ambient temperature and the temperature measurement distance is constructed, and the optimal solution of the unknown quantity in the formula is found through the particle swarm algorithm, so as to achieve the purpose of significantly improving the temperature measurement accuracy of the infrared system. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problems solved by the present invention are:
[0006] To solve the above technical problems, the present invention provides the following technical solutions: a temperature compensation method for an infrared detector based on a particle swarm algorithm, comprising: collecting the ambient temperature and heating the black body until the temperature of the black body rises to a set temperature.
[0007] Use binocular ultrasonic ranging sensor to measure the distance and calculate the distance between the object being measured and the infrared detector.
[0008] Compensation calculation is performed on the ambient temperature and distance, and the particle swarm algorithm is used to search for the optimal value to obtain the compensated temperature.
[0009] As a preferred solution of the infrared detector temperature compensation method based on particle swarm algorithm described in the present invention, wherein: the collecting of the ambient temperature and heating the black body until the black body temperature rises to the set temperature includes using an ambient temperature sensor to obtain the ambient temperature T at this time a At this ambient temperature, the black body is heated by a heating platform and the temperature is measured by a thermal resistor sensor until the black body temperature rises to the set temperature and the temperature T0 is maintained.
[0010] As a preferred solution of the infrared detector temperature compensation method based on particle swarm algorithm described in the present invention, wherein: the distance is measured using a binocular ultrasonic ranging sensor, and the distance between the object to be measured and the infrared detector is calculated, the distance measured by the binocular ultrasonic ranging sensor is L1 and L2, the infrared detector is placed at the midpoint of the line connecting the two distance sensors, the black body temperature remains unchanged, the distance between the infrared detector and the object to be measured {L(1), L(2), ..., L(i)} is artificially changed, and the corresponding temperature information is measured respectively by the infrared detector. The distance calculation formula is expressed as:
[0011]
[0012] Wherein, L3 represents the distance between two binocular ultrasonic ranging sensors.
[0013] As a preferred solution of the infrared detector temperature compensation method based on particle swarm algorithm described in the present invention, wherein: the use of a binocular ultrasonic ranging sensor to measure the distance and calculate the distance between the object to be measured and the infrared detector also includes changing the temperature of the heating table, and after the black body temperature stabilizes, repeating the distance calculation operation to obtain infrared temperature measurement results at different black body temperatures {T0(1), T0(2), ..., T0(j)} and different temperature measurement distances.
[0014] Repeat at different times of the day to obtain different ambient temperatures {T a (1),T a (2),...,T(n)}, infrared temperature measurement results under different blackbody temperatures and different temperature measurement distances.
[0015] As a preferred solution of the infrared detector temperature compensation method based on particle swarm algorithm described in the present invention, wherein: the compensation calculation of ambient temperature and distance includes that the obtained temperature measurement result is not compensated and has a large deviation from the actual temperature {T0(1), T0(2), ..., T(i)} of the black body. In order to eliminate the deviation, the ambient temperature T aand distance L. The radiation energy of a black body changes nonlinearly with increasing temperature and is proportional to the fourth power of the temperature. However, in reality, there is no absolute black body. The radiation energy of an actual object is expressed as:
[0016] M(T)=ε·σ·T 4
[0017] Among them, σ represents the Stefan-Boltzmann constant, which is approximately 5.67×10-8. ε represents the emissivity of the actual object, 0<ε<1, and only the black body has ε=1.
[0018] In actual environments, infrared detectors not only receive radiation energy from the object being measured, but also receive radiation energy reflected by the object from high-temperature objects in the surrounding environment and radiation energy from the atmosphere. The total energy received by the infrared detector is expressed as:
[0019] M s (T)=ε0τM o +τρM t +ε a M a
[0020] Among them, M o Indicates the radiation energy of the object under ideal conditions, M t Represents the radiation energy of the surrounding high temperature objects, M a represents the radiation energy of the atmosphere under ideal conditions, ε o Indicates the emissivity of the object being measured, ε a represents the self-emissivity of the atmospheric spectrum, represents the reflectivity of the object being measured, and τ represents the spectral transmittance of the atmosphere.
[0021] When the object reaches infrared radiation balance, For the atmosphere, ε a =1-τ, then the total energy received by the infrared detector can be changed to:
[0022] M s (T)=ε0τM o +τ(1-ε0)M t +(1-τ)M a
[0023] Substitute the radiation energy of the actual object into:
[0024]
[0025] Among them, T s Indicates the temperature obtained by the infrared temperature measurement system, T o Indicates the actual temperature of the object being measured, T tIndicates the ambient temperature of the background during measurement, T a Indicates the atmospheric temperature at this time.
[0026] When the temperature measurement distance increases, the object being measured cannot fill the entire infrared detector field of view, resulting in a decrease in the radiation energy received by the detector. In addition, the absorption effect of the atmosphere on radiation energy increases, which is mathematically manifested as a decrease in atmospheric transmittance:
[0027] τ(L)=e -βL
[0028] The analytical formula for the actual temperature of the object being measured is derived as follows:
[0029]
[0030] The actual temperature is about T, T t , T a and L, where T, T a and L are directly measured experimentally. t Set the constant term in the temperature compensation fitting formula to obtain the independent variables T, T a And L temperature compensation formula:
[0031]
[0032] The quantities that are difficult to measure in the experiment are represented by unknown quantities K0, K1, and K2, and the particle swarm algorithm is used to find the values of K0, K1, and K2 within the set range until the required accuracy range is reached.
[0033] As a preferred solution of the infrared detector temperature compensation method based on particle swarm algorithm described in the present invention, wherein: the optimal value search using particle swarm algorithm includes generating an initial solution at the beginning of the algorithm, randomly initializing a population Z composed of m particles in the feasible solution space = {Z1, Z2, ..., Z m}, where the position Z of each particle i ={z i1 ,z i2 ,z i3}, respectively represent a set of possible values of K0, K1, K2, and calculate whether they meet the requirements based on the objective function. The objective function is expressed as:
[0034]
[0035] If the accuracy requirement is not met, the search for a new solution will continue. In each iteration, the particle will track two extreme values to update itself. One is the best solution Pbest found by the particle itself. i , and the other is the optimal solution Gbest currently searched by the entire population.
[0036] Each particle has a velocity V i = {v i1 ,v i2 ,…,v in}, when both optimal solutions are found, each particle is iteratively updated according to the velocity vector and position vector:
[0037] The velocity vector iteration is expressed as:
[0038] V i =ωV i +c1r1(Pbest i -Z i )+c2r2(Gbest-Z i )
[0039] The position vector iteration is expressed as:
[0040] X i =X i +V i
[0041] Among them, ω represents the inertia weight of PSO, which is between [0,1]. c1 represents the learning factor, c2 represents the learning factor. r1 represents the random probability value between [0,1], and r2 represents the random probability value between [0,1].
[0042] As a preferred solution of the infrared detector temperature compensation method based on particle swarm algorithm described in the present invention, wherein: the optimal value search using particle swarm algorithm also includes that the standard particle swarm optimization algorithm process includes:
[0043] Initialize a group of particles with a group size of m, including random positions and velocities.
[0044] The fitness of each particle is evaluated according to the objective function.
[0045] For each particle, its fitness value is compared with its best position P best Compare and if it is better, take it as the current best position P best .
[0046] For each particle, compare its fitness value with the best position G experienced globally best Compare and if it is better, reset G best The index of .
[0047] The velocity and position of the changing particle are expressed as:
[0048]
[0049] Among them, v kid represents the velocity of particle i after the kth iteration in dimension d, v k-1 id represents the velocity of particle i after the k-1th iteration in dimension d, p id represents the best historical position of particle i in dimension d, p gd represents the best historical position of the entire group on dimension d, x k id represents the position information of particle i after the kth iteration in dimension d, x k-1 id Represents the position information of particle i after the k-1th iteration in dimension d.
[0050] If the end condition is not met, the objective function is calculated repeatedly.
[0051] After obtaining K0, K1, and K2, the radiation energy of the actual object and the independent variables T, T a and L temperature compensation formula are written into the MCU.
[0052] An infrared detector temperature compensation system based on particle swarm algorithm, characterized by: comprising:
[0053] The temperature collection module collects the ambient temperature and heats the black body until the black body temperature rises to the set temperature.
[0054] The distance calculation module uses a binocular ultrasonic ranging sensor to measure the distance and calculate the distance between the object being measured and the infrared detector.
[0055] The compensation module performs compensation calculations on the ambient temperature and distance, and uses the particle swarm algorithm to search for the optimal value to obtain the compensated temperature.
[0056] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0057] A computer-readable storage medium stores a computer program, which implements the steps of the method described above when executed by a processor.
[0058] Beneficial effects of the present invention: The infrared detector temperature compensation method based on particle swarm algorithm and variable focal length provided by the present invention can reduce the influence of external radiation energy on temperature measurement accuracy, and use distance information and temperature information to compensate the output temperature of the infrared detector, thereby improving the temperature measurement accuracy as much as possible. The present invention constructs a compensation formula for ambient temperature and temperature measurement distance based on the analytical formula of the actual temperature of the object being measured, and uses the particle swarm algorithm to fit the temperature compensation function, thereby accelerating the convergence speed and compensation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0060] Figure 1 An overall flow chart of a temperature compensation method for an infrared detector based on a particle swarm algorithm is provided for the first embodiment of the present invention.
[0061] Figure 2 A block diagram of the composition of an infrared temperature measurement system of an infrared detector temperature compensation method based on a particle swarm algorithm provided in the first embodiment of the present invention.
[0062] Figure 3 A binocular ultrasonic ranging sensor diagram of a temperature measurement system of an infrared detector temperature compensation method based on a particle swarm algorithm provided in the first embodiment of the present invention.
[0063] Figure 4 A schematic diagram of the distance of the object to be measured and the focal length of the field of view of the infrared detector in a temperature compensation method of an infrared detector based on a particle swarm algorithm provided in the first embodiment of the present invention.
[0064] Figure 5 A flow chart of a particle swarm algorithm based on a particle swarm algorithm for a temperature compensation method for an infrared detector provided in the first embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0066] Example 1
[0067] Reference Figure 1 to Figure 5 , as an embodiment of the present invention, provides an infrared detector temperature compensation method based on particle swarm algorithm, comprising:
[0068] S1: Collect the ambient temperature and heat the black body until the black body temperature rises to the set temperature.
[0069] Use the ambient temperature sensor to obtain the ambient temperature T at this time aAt this ambient temperature, the black body is heated by a heating platform and the temperature is measured by a thermal resistor sensor until the black body temperature rises to the set temperature and the temperature T0 is maintained.
[0070] It should be noted that a system block diagram of a temperature compensation method for infrared detectors based on particle swarm optimization and variable focal length is shown in Figure 2 As shown, the following steps are included:
[0071] The uncooled infrared detector receives the radiation energy of the object being measured, generates uncorrected temperature information, and sends the temperature information to the MCU.
[0072] In order to obtain the accurate temperature measurement distance between the object to be measured and the infrared detector, two ultrasonic distance measuring sensors are used to measure the distance simultaneously, and the infrared detector is placed at the midpoint of the line connecting the two, and the accurate temperature measurement distance is calculated using the triangulation principle, such as Figure 3 shown.
[0073] A thermocouple temperature sensor is used to measure the ambient temperature in real time, and the ambient temperature information is transmitted to the MCU for compensation of the ambient temperature.
[0074] The microcontroller receives the distance information returned by the two ultrasonic distance measuring sensors and calculates the real distance between the infrared detector and the object being measured. Based on the temperature measurement distance, the focal length of the infrared detector lens is dynamically adjusted to make the object being measured fill the field of view as much as possible and reduce the influence of external radiation. Figure 4 As shown in the figure, when the object being measured gradually moves away from the infrared detector, from L1 to L3, the focal length of the infrared detector controlled by the MCU also changes accordingly. When the focal length is fixed, the MCU reads the data output by the infrared detector and the thermocouple temperature sensor accordingly, and uses the previously obtained distance data as the independent variable of the compensation function to solve the compensated temperature and output it to the display interface.
[0075] S2: Use binocular ultrasonic ranging sensor to measure the distance and calculate the distance between the object to be measured and the infrared detector.
[0076] The distances measured by the binocular ultrasonic distance measuring sensor are L1 and L2. The infrared detector is placed at the midpoint of the line connecting the two distance sensors. The black body temperature remains unchanged. The distance between the infrared detector and the object being measured {L(1), L(2), ..., L(i)} is artificially changed. The corresponding temperature information is measured by the infrared detector respectively. The distance calculation formula is expressed as:
[0077]
[0078] Wherein, L3 represents the distance between two binocular ultrasonic ranging sensors.
[0079] The temperature of the heating stage is changed. After the blackbody temperature is stable, the distance calculation operation is repeated to obtain the infrared temperature measurement results at different blackbody temperatures {T0(1), T0(2), ..., T0(j)} and different temperature measurement distances.
[0080] Repeat at different times of the day to obtain different ambient temperatures {T a (1),T a (2),...,T(n)}, infrared temperature measurement results under different blackbody temperatures and different temperature measurement distances.
[0081] S3: Perform compensation calculation on the ambient temperature and distance, use the particle swarm algorithm to search for the optimal value, and obtain the compensated temperature.
[0082] The obtained temperature measurement result is not compensated and has a large deviation from the actual temperature of the black body {T0(1), T0(2), ..., T(i)}. In order to eliminate the deviation, it is necessary to adjust the ambient temperature T a and distance L to compensate.
[0083] It should be noted that the Stefan-Boltzmann law states that the radiation energy of a black body changes nonlinearly with increasing temperature and is proportional to the fourth power of the temperature. However, since there is no absolute black body in reality, the radiation energy expression of an actual object is:
[0084] M(T)=ε·σ·T 4
[0085] Among them, σ represents the Stefan-Boltzmann constant, which is approximately 5.67×10-8. ε represents the emissivity of the actual object, 0<ε<1, and only the black body has ε=1.
[0086] In actual environments, infrared detectors not only receive radiation energy from the object being measured, but also receive radiation energy reflected by the object from high-temperature objects in the surrounding environment and radiation energy from the atmosphere. The total energy received by the infrared detector is expressed as:
[0087] M s (T)=ε0τM o +τρM t +ε a M a
[0088] Among them, M o Indicates the radiation energy of the object under ideal conditions, M t Represents the radiation energy of the surrounding high temperature objects, M a represents the radiation energy of the atmosphere under ideal conditions, ε o Indicates the emissivity of the object being measured, ε arepresents the self-emissivity of the atmospheric spectrum, ρ represents the reflectivity of the object being measured, and τ represents the transmittance of the atmospheric spectrum.
[0089] When the object reaches infrared radiation balance, ρ = 1-εo, and for the atmosphere, ε a =1-τ, then the total energy received by the infrared detector can be changed to:
[0090] M s (T) = ε0τM o +τ(1-ε0)M t +(1-τ)M a
[0091] Substituting the radiation energy of the actual object into:
[0092]
[0093] Among them, T s Indicates the temperature obtained by the infrared temperature measurement system, T o Indicates the actual temperature of the object being measured, T t Indicates the ambient temperature of the background during measurement, T a Indicates the atmospheric temperature at this time.
[0094] When the temperature measurement distance increases, the object being measured cannot fill the entire infrared detector field of view, resulting in a decrease in the radiation energy received by the detector. In addition, the absorption effect of the atmosphere on radiation energy increases, which is mathematically manifested as a decrease in atmospheric transmittance:
[0095] τ(L)=e -βL
[0096] The analytical formula for the actual temperature of the object being measured is derived as follows:
[0097]
[0098] It should be noted that the actual temperature formula of the object being measured shows that the actual temperature is about T, T t , T a and L, where T, T a Both T and L can be directly measured through experiments. At the same time, because the actual environment of the object under test will not change for a long time, and because of the zoom effect, the background radiation energy entering the detector is minimized as much as possible, so T t Set the constant term in the temperature compensation fitting formula, so as to determine the independent variables T, T a And L temperature compensation formula:
[0099]
[0100] The quantities that are difficult to measure in the experiment are represented by unknown quantities K0, K1, and K2, and the particle swarm algorithm is used to find the values of K0, K1, and K2 within the set range until the required accuracy range is reached.
[0101] At the beginning of the algorithm, an initial solution is generated. A population of m particles Z = {Z1, Z2, ..., Z m}, where the position Z of each particle i ={z i1 ,z i2 ,z i3}, respectively represent a set of possible values of K0, K1, K2, and calculate whether they meet the requirements based on the objective function. The objective function is expressed as:
[0102]
[0103] It should be noted that in the particle swarm algorithm, the solution of each optimization problem is regarded as a bird in the search space, namely a "particle". At the beginning of the algorithm, an initial solution is generated, that is, a population Z = {Z1, Z2, ..., Z m}, where the position Z of each particle i ={z i1 ,z i2 ,z i3}, representing a set of possible values of K0, K1, and K2 respectively, and calculating whether they meet the requirements based on the objective function. If they do not meet the accuracy requirements, they will continue to search for new solutions. In each iteration, the particle will track two extreme values to update itself, one of which is the best solution Pbest found by the particle itself. i , and the other is the optimal solution Gbest currently searched by the entire population. In addition, each particle has a speed V i = {v i1 ,v i2 ,…,v in}, when both optimal solutions are found, each particle is updated iteratively according to the following formula:
[0104] The velocity vector iteration is expressed as:
[0105] V i =ωV i +c1r1(Pbest i -Z i )+c2r2(Gbest-Z i )
[0106] The position vector iteration is expressed as:
[0107] X i =X i +V i
[0108] Among them, ω represents the inertia weight of PSO, which is between [0,1]. c1 represents the learning factor, c2 represents the learning factor. r1 represents the random probability value between [0,1], and r2 represents the random probability value between [0,1].
[0109] Furthermore, practice has proved that there is no absolutely optimal parameter. Only by selecting appropriate parameters for different problems can better convergence speed and robustness be achieved. In general, c1 is set to 1.4961, and ω is set to an adaptive value method, that is, ω=0.9 at the beginning, which makes PSO have a strong global optimization ability. As the iteration goes deeper, it decreases to ω=0.1, which makes PSO have a strong local optimization ability.
[0110] The standard particle swarm optimization algorithm process is as follows Figure 5 As shown, including:
[0111] Initialize a group of particles with a group size of m, including random positions and velocities.
[0112] The fitness of each particle is evaluated according to the objective function.
[0113] For each particle, its fitness value is compared with its best position P best Compare and if it is better, take it as the current best position P best .
[0114] For each particle, compare its fitness value with the best position G experienced globally best Compare and if it is better, reset G best The index of .
[0115] The velocity and position of the changing particle are expressed as:
[0116]
[0117] Among them, v k id represents the velocity of particle i after the kth iteration in dimension d, v k-1 id represents the velocity of particle i after the k-1th iteration in dimension d, p id represents the best historical position of particle i in dimension d, p gd represents the best historical position of the entire group on dimension d, x k id represents the position information of particle i after the kth iteration in dimension d, x k-1 id Represents the position information of particle i after the k-1th iteration in dimension d.
[0118] If the end condition is not met, the objective function is calculated repeatedly.
[0119] After obtaining K0, K1, and K2, the radiation energy of the actual object and the independent variables T, T a and L temperature compensation formula are written into the MCU.
[0120] The above embodiments also include an infrared detector temperature compensation system based on a particle swarm algorithm, specifically:
[0121] The temperature collection module collects the ambient temperature and heats the black body until the black body temperature rises to the set temperature.
[0122] The distance calculation module uses a binocular ultrasonic ranging sensor to measure the distance and calculate the distance between the object being measured and the infrared detector.
[0123] The compensation module performs compensation calculations on the ambient temperature and distance, and uses the particle swarm algorithm to search for the optimal value to obtain the compensated temperature.
[0124] The computer device may be a server. The computer device includes a processor, a memory, an input / output interface (I / O for short) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data cluster data of a power monitoring system. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method is implemented.
[0125] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0126] Example 2
[0127] An embodiment of the present invention provides a temperature compensation method and system for an infrared detector based on a particle swarm algorithm. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and comparative experiments.
[0128] In order to verify the effectiveness of the temperature compensation system based on particle swarm optimization and variable focal length infrared detector, the following experiment was designed. First, an uncooled infrared detector, an ultrasonic ranging sensor, an ambient temperature sensor, a micro control unit (MCU), and a display device for displaying infrared images were prepared.
[0129] Experimental preparation: Install the infrared detector and two ultrasonic ranging sensors on the same horizontal line, with the infrared detector located at the midpoint of the two ultrasonic ranging sensors. Install the ambient temperature sensor in the laboratory to ensure that it can monitor the ambient temperature in real time. Connect all sensors to the MCU to ensure that the MCU can receive and process data from each sensor.
[0130] Experimental implementation: Calibration before the experiment: Ensure that all sensors are within the normal working range, especially the focus adjustment function of the infrared detector.
[0131] Step 1: Data collection: Stabilize the laboratory temperature at 25°C and use a heating table to heat the blackbody to different temperatures (50°C, 70°C, 90°C). Measure the blackbody temperature with a thermal resistor sensor and record the temperature measured by the infrared detector. Record the distance information between the infrared detector and the blackbody (L1, L2), and calculate the actual distance L by triangulation. Manually adjust the distance between the infrared detector and the blackbody and record multiple measurement results. Repeat the above operation and perform multiple measurements at different blackbody temperatures and ambient temperatures.
[0132] Step 2: Data processing and compensation: Input the collected data into the MCU, and use the particle swarm algorithm to calculate the unknown parameters (K0, K1, K2) of the temperature compensation function. According to the calculated compensation function, the temperature measured by the infrared detector is compensated.
[0133] Step 3: Result display and analysis: The compensated temperature is displayed on a display device and compared with the actual black body temperature to analyze the compensation effect.
[0134]
[0135]
[0136] From the above table data, it can be seen that the temperature measurement accuracy of the infrared detector has been significantly improved by using the particle swarm algorithm for temperature compensation. Compared with the existing technology, there is a large error between the uncompensated infrared temperature measurement result and the actual blackbody temperature, while the compensated temperature is closer to the actual temperature.
[0137] The average error between the uncompensated temperature and the actual temperature is about 5.57°C. The average error between the compensated temperature and the actual temperature is about 0.34°C. This shows that the temperature compensation method effectively reduces the temperature measurement error and improves the measurement accuracy.
[0138] By analyzing the temperature measurement data at different distances and different ambient temperatures, it can be seen that distance and ambient temperature have a great influence on the infrared temperature measurement results. Before compensation, the temperature measurement results are significantly lower as the distance increases. After compensation, the temperature measurement results are relatively stable and are no longer significantly affected by distance and ambient temperature.
[0139] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A temperature compensation method for infrared detectors based on particle swarm algorithm, characterized in that: include: Collect the ambient temperature and heat the black body until the black body temperature rises to the set temperature; Use binocular ultrasonic ranging sensor to measure distance and calculate the distance between the object to be measured and the infrared detector; Compensation calculation is performed on the ambient temperature and distance, and the particle swarm algorithm is used to search for the optimal value to obtain the compensated temperature.
2. The infrared detector temperature compensation method based on particle swarm algorithm as claimed in claim 1, characterized in that: The step of collecting the ambient temperature and heating the black body until the temperature of the black body rises to a set temperature includes obtaining the ambient temperature T at this time by using an ambient temperature sensor. a At this ambient temperature, the black body is heated by a heating platform and the temperature is measured by a thermal resistor sensor until the black body temperature rises to the set temperature and the temperature T0 is maintained.
3. The infrared detector temperature compensation method based on particle swarm algorithm as claimed in claim 2, characterized in that: The method of measuring the distance using a binocular ultrasonic ranging sensor and calculating the distance between the object to be measured and the infrared detector includes: the distances measured by the binocular ultrasonic ranging sensor are L1 and L2, the infrared detector is placed at the midpoint of the line connecting the two distance sensors, the black body temperature remains unchanged, the distance {L(1), L(2), ..., L(i)} between the infrared detector and the object to be measured is artificially changed, and the corresponding temperature information is measured by the infrared detector respectively. The distance calculation formula is expressed as: Wherein, L3 represents the distance between two binocular ultrasonic ranging sensors.
4. The infrared detector temperature compensation method based on particle swarm algorithm as claimed in claim 3, characterized in that: The method of using a binocular ultrasonic distance measuring sensor to measure the distance and calculating the distance between the object to be measured and the infrared detector further includes changing the temperature of the heating platform, and after the black body temperature is stable, repeating the distance calculation operation to obtain infrared temperature measurement results at different black body temperatures {T0(1), T0(2), ..., T0(j)} and different temperature measurement distances; Repeat at different times of the day to obtain different ambient temperatures {T a (1),T a (2),...,T(n)}, infrared temperature measurement results under different blackbody temperatures and different temperature measurement distances.
5. The infrared detector temperature compensation method based on particle swarm algorithm as claimed in claim 4, characterized in that: The compensation calculation for the ambient temperature and distance includes that the obtained temperature measurement result is not compensated and has a large deviation from the actual temperature {T0(1), T0(2), ..., T(i)} of the black body. In order to eliminate the deviation, the ambient temperature T a and distance L; the radiation energy of a black body changes nonlinearly with increasing temperature and is proportional to the fourth power of the temperature, but in reality there is no absolute black body. The radiation energy of an actual object is expressed as: M(T)=e·s·T 4 Among them, σ represents the Stefan-Boltzmann constant, which is approximately 5.67×10-8; ε represents the emissivity of the actual object, 0<ε<1, and only the black body has ε=1; In actual environments, infrared detectors not only receive radiation energy from the object being measured, but also receive radiation energy reflected by the object from high-temperature objects in the surrounding environment and radiation energy from the atmosphere. The total energy received by the infrared detector is expressed as: M s (T)=ε0τM o +trM t +e a M a Among them, M o Indicates the radiation energy of the object under ideal conditions, M t Represents the radiation energy of the surrounding high temperature objects, M a represents the radiation energy of the atmosphere under ideal conditions, ε o Indicates the emissivity of the object being measured, ε a represents the self-emissivity of the atmospheric spectrum, represents the reflectivity of the object being measured, and τ represents the spectral transmittance of the atmosphere; When the object reaches infrared radiation balance, For the atmosphere, ε a =1-τ, then the total energy received by the infrared detector can be changed to: M s (T)=ε0τM o +τ(1-ε0)M t +(1-τ)M a Substituting the radiation energy of the actual object into: Among them, T s Indicates the temperature obtained by the infrared temperature measurement system, T o Indicates the actual temperature of the object being measured, T t Indicates the ambient temperature of the background during measurement, T a represents the atmospheric temperature at this time; When the temperature measurement distance increases, the object being measured cannot fill the entire field of view of the infrared detector, resulting in a decrease in the radiation energy received by the detector; and the absorption effect of the atmosphere on the radiation energy is enhanced, which is mathematically manifested as a decrease in the atmospheric transmittance: τ(L)=e -βL The analytical formula for the actual temperature of the object being measured is derived as follows: The actual temperature is about T, T t , T a and L, where T, T a and L are directly measured experimentally. t Set the constant term in the temperature compensation fitting formula to obtain the independent variables T, T a And L temperature compensation formula: The quantities that are difficult to measure in the experiment are represented by unknown quantities K0, K1, and K2, and the particle swarm algorithm is used to find the values of K0, K1, and K2 within the set range until the required accuracy range is reached.
6. The infrared detector temperature compensation method based on particle swarm algorithm as claimed in claim 5, characterized in that: The optimal value search using the particle swarm algorithm includes generating an initial solution at the beginning of the algorithm, randomly initializing a population Z consisting of m particles in the feasible solution space = {Z1, Z2, ..., Z m }, where the position Z of each particle i ={z i1 ,z i2 ,z i3 }, respectively represent a set of possible values of K0, K1, K2, and calculate whether they meet the requirements based on the objective function. The objective function is expressed as: If the accuracy requirement is not met, the search for a new solution will continue. In each iteration, the particle will track two extreme values to update itself. One is the best solution Pbest found by the particle itself. i , the other is the optimal solution Gbest currently searched by the entire population; Each particle has a velocity V i = {v i1 ,v i2 ,…,v in }, when both optimal solutions are found, each particle is iteratively updated according to the velocity vector and position vector: The velocity vector iteration is expressed as: In i =ωV i +c1r1(Pbest i -Z i )+c2r2(Gbest-Z i ) The position vector iteration is expressed as: X i =X i +V i Among them, ω represents the inertia weight of PSO, which is between [0,1]; c1 represents the learning factor, c2 represents the learning factor; r1 represents the random probability value between [0,1], and r2 represents the random probability value between [0,1].
7. The infrared detector temperature compensation method based on particle swarm algorithm as claimed in claim 6, characterized in that: The optimal value search using the particle swarm algorithm also includes that the standard particle swarm optimization algorithm process includes: Initialize a group of particles with a group size of m, including random positions and velocities; Evaluating the fitness of each particle according to the objective function; For each particle, its fitness value is compared with its best position P best Compare and if it is better, take it as the current best position P best ; For each particle, compare its fitness value with the best position G experienced globally best Compare and if it is better, reset G best The index of The velocity and position of the changing particle are expressed as: Among them, v k id represents the velocity of particle i after the kth iteration in dimension d, v k-1 id represents the velocity of particle i after the k-1th iteration in dimension d, p id represents the best historical position of particle i in dimension d, p gd represents the best historical position of the entire group on dimension d, x k id represents the position information of particle i after the kth iteration in dimension d, x k-1 id Represents the position information of particle i after the k-1th iteration in dimension d; If the end condition is not met, the objective function is calculated repeatedly; After obtaining K0, K1, and K2, the radiation energy of the actual object and the independent variables T, T a and L temperature compensation formula are written into the MCU.
8. A dynamic load capacity management system for oil-immersed power transformers using the method according to any one of claims 1 to 7, characterized in that: The temperature collection module collects the ambient temperature and heats the black body until the temperature of the black body rises to the set temperature; The distance calculation module uses a binocular ultrasonic ranging sensor to measure the distance and calculate the distance between the object being measured and the infrared detector; The compensation module performs compensation calculations on the ambient temperature and distance, and uses the particle swarm algorithm to search for the optimal value to obtain the compensated temperature.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Fast drift compensation method for infrared radiation calibration system
CN120063501A
Infrared temperature measurement value correction method and system based on distance compensation
CN122217482A
