Image recognition-based calibration method and system for jump-type temperature controller
By using an image recognition-based method, the system simultaneously acquires and processes images of reed motion, temperature signals, and contact states, accurately determining the timing and temperature of sudden jumps and rebounds. This solves the problem of inaccurate calibration in existing technologies and achieves efficient and stable temperature controller calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG HUILONG ELECTRIC CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-12
AI Technical Summary
Existing methods for calibrating snap-action temperature controllers suffer from inaccurate timing determination, unreliable correlation between timing and temperature values, and susceptibility to interference from multi-source acquisition signals, resulting in poor stability of calibration results.
An image recognition-based method is used to simultaneously acquire images of reed motion, temperature sequences of standard platinum resistance thermometers, and contact on/off signals. Through subpixel displacement measurement, jitter reduction, event energy extraction, and conflict degree fusion, the timing of sudden jumps and rebounds and their corresponding temperatures are accurately determined. Closed-loop calibration is achieved by adjusting the fine-tuning screw.
It improves the reliability of determining the timing of sudden jumps and rebounds, reduces the risk of false detections and missed detections, enhances calibration accuracy and efficiency, and ensures the consistency of calibration results.
Smart Images

Figure CN122195149A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of thermostat calibration technology, and in particular to a method and system for calibrating a snap-type thermostat based on image recognition. Background Technology
[0002] Snap-on thermostats are widely used in household appliances, industrial control, and temperature protection applications. They achieve contact on / off control through rapid snap-on and snap-back actions caused by bimetallic strips or spring mechanisms during temperature changes. These thermostats typically exhibit significant hysteresis; the snap-on and snap-back temperatures together determine their control accuracy and safety margins. Therefore, during factory testing, maintenance, and consistency control, it is necessary to calibrate and adjust the snap-on and snap-back action temperatures, and to achieve precise adjustment of the action temperature through fine-tuning mechanisms.
[0003] Existing calibration methods typically involve conducting temperature rise and fall tests on the temperature controller in a constant-temperature oil bath or other temperature field device. A standard thermometer or standard platinum resistance thermometer is used to measure the temperature field, and the temperature at the moment the contacts switch on and off is taken as the operating temperature. This temperature is then compared with a set standard value to obtain the error. The fine-tuning mechanism is then adjusted manually or semi-automatically, and the test is repeated until the requirements are met. While this approach has a relatively mature metrological foundation, several problems remain in practical applications. Firstly, sudden-action actions have transient characteristics and a short timescale. If the temperature sampling frequency is limited or the signal synchronization is insufficient, a mismatch between the action time and the temperature reading can easily occur, leading to errors in the operating temperature determination. Secondly, the contact on / off signal may exhibit jitter, bounce, or electrical noise, resulting in unstable extraction of the action time, which in turn affects error calculation and fine-tuning decisions.
[0004] To improve the accuracy of motion timing recognition, non-contact detection approaches based on image recognition have emerged in recent years. For example, high-speed cameras are used to observe the movement of reeds or contact structures, and the displacement over time is obtained through image localization and displacement measurement. The moment of motion is then determined at abrupt changes in the curve. While this approach provides intuitive motion information, it is easily affected by factors such as lighting changes, reflections, occlusion, depth of field, imaging noise, and edge blurring in engineering environments. This can lead to fluctuations in displacement extraction results, especially at sudden jumps where local distortion may occur, potentially resulting in false or missed detections of motion timing. Furthermore, relying solely on the displacement curve does not directly yield temperature values; it must correspond to the temperature acquisition link. If the two are not effectively aligned or a robust value acquisition strategy is lacking, reliable motion temperatures are difficult to obtain.
[0005] Therefore, there is an urgent need for a calibration method and system for snap-action temperature controllers that can accurately determine the timing of snap-action and rebound and their corresponding operating temperatures, so as to complete the calibration more accurately and drive fine-tuning, thereby improving the accuracy of operating temperature determination and the efficiency and consistency of calibration. Summary of the Invention
[0006] To address the problems in existing snap-action temperature controller calibration processes, such as inaccurate determination of the actuation timing, unreliable correlation between actuation timing and temperature values, and poor stability of calibration results due to susceptibility to interference from multi-source acquisition signals, this invention provides a snap-action temperature controller calibration method and system. This method accurately determines the actuation timing of the snap-action and rebound, along with their corresponding actuation temperatures, enabling more accurate calibration and driving fine-tuning. This, in turn, improves the accuracy of actuation temperature determination, calibration efficiency, and consistency.
[0007] To achieve the above objectives, the present invention adopts the following technical solution, providing a method for calibrating a snap-action temperature controller based on image recognition, the method comprising: The temperature controller is triggered in the temperature field, and the reed motion image, standard platinum resistance temperature sequence and contact on / off signal are acquired simultaneously. The displacement curve is obtained by locating the reed area in the image and measuring the subpixel displacement. Candidate displacement moments for sudden jumps and rebounds are then extracted. Debounce on / off signals to extract candidate moments for sudden jumps and bounces in switching signals; Candidate moments for event energy of sudden jumps and rebounds are extracted from the energy sequence of inter-frame changes in images; Calculate the conflict degree between each candidate time step and suppress fusion to obtain the final action time of the jump and the return jump; The temperatures of the sudden jump and rebound actions are obtained by interpolating the temperature sequence at the final action moment. The temperature error is obtained by comparing it with the preset sudden jump standard value and the rebound standard value respectively; When the temperature error exceeds the set temperature threshold, the fine-tuning screw is driven to rotate and enter the next calibration cycle until the temperature error is below the temperature threshold.
[0008] Based on the above technical solution, the following improvements can be further adopted: The extraction process of the candidate displacement times of the sudden jump and the return jump includes: performing learning-based target detection and localization processing on the image features of the reed or its edge to determine the target region containing the reed sudden jump region in the reed motion image; using the target region as the input region for subpixel displacement measurement after preprocessing; performing subpixel displacement measurement in the target region to obtain the displacement curve; and determining the candidate displacement times corresponding to the sudden jump and the return jump based on the time extraction criteria of the displacement curve. The preprocessing includes at least one of cropping or scale normalization; the time extraction criterion includes at least one of change point detection, derivative peak detection, and dual threshold state machine.
[0009] Based on the above technical solution, the following improvements can be further adopted: the extraction process of the candidate moments of the jump and bounce includes: sampling the contact on / off signal to obtain the switch state sequence, performing debouncing processing on the switch state sequence to filter out short-term flips caused by jitter; detecting the flip events of the state from open to closed or from closed to open in the debouncing switch state sequence, and determining the time of the flip event as the candidate moments of the jump and bounce respectively.
[0010] Based on the above technical solution, the following improvements can be further adopted: the extraction process of the event energy candidate moments of the sudden jump and the rebound includes: obtaining the corresponding image sequence based on the reed region, calculating the inter-frame change energy of the image within the reed region to form an event energy sequence, performing peak detection or abrupt change point detection on the event energy sequence to obtain a set of candidate peak moments, using the refractory period screening rule to perform sparsification processing on the set of candidate peak moments, retaining only the earliest candidate peak moment within any refractory period window, and determining the retained candidate peak moments as the event energy candidate moments of the sudden jump and the rebound respectively; The image inter-frame variation energy includes at least one of the following: frame difference energy, gradient variation energy, and optical flow amplitude energy.
[0011] Based on the above technical solution, the following improvements can be further adopted: The process of generating the final action time of the sudden jump and the rebound includes: for the sudden jump and the rebound respectively, obtaining the corresponding displacement candidate time, switch quantity candidate time and event energy candidate time, calculating the conflict degree between the candidate times, when the conflict degree is greater than a preset threshold, determining that the data collected in this round is invalid and triggering re-collection, otherwise, fusing each candidate time according to the preset fusion rule to obtain the final action time corresponding to the sudden jump and the rebound; The conflict degree is the maximum value or weighted time difference between any two candidate time points; The fusion rules include at least setting weights based on the confidence level of the evidence and performing weighted evaluation, or selecting according to the principle of minimum deviation, wherein the confidence level of the evidence is an evaluation value characterizing the reliability of the corresponding candidate time.
[0012] Based on the above technical solution, the following improvements can be further adopted: when the conflict degree is greater than the preset threshold and triggers re-acquisition, the re-acquisition process includes: determining the two types of candidate moments corresponding to the maximum conflict degree, determining the adjustment object based on the source of the two types of candidate moments, adjusting the next round of acquisition strategy accordingly, and re-acquiring the reed motion image, standard platinum resistance temperature sequence and contact on / off signal. The adjustment of the next round of acquisition strategy includes at least one of the following operations: adjusting the heating and cooling rate or the stable holding time of the temperature field, adjusting the image acquisition parameters or the reed target area positioning parameters, adjusting the sampling frequency or de-jitter parameters of the contact on / off signal, and adjusting the calculation window or refractory period window of the event energy sequence.
[0013] Based on the above technical solution, the following improvements can be further adopted: interpolating the temperature sequence at the final action moment to obtain the action temperature of the sudden jump and the rebound includes: for the final action moment of the sudden jump and the rebound respectively, selecting at least two sets of temperature sampling points located before and after the final action moment from the standard platinum resistance temperature sequence as interpolation inputs, determining the interpolation method according to the interpolation inputs and performing interpolation calculations to obtain the action temperature corresponding to the final action moment; The interpolation method includes at least one of linear interpolation and Newton interpolation.
[0014] Based on the above technical solution, the following improvements can be further adopted: the temperature sequence interpolation further includes: when the sensor corresponding to the standard platinum resistance temperature sequence has discrete temperature point correction values, the operating temperature is corrected based on the discrete temperature point correction values. The correction process includes interpolating the correction value to obtain the correction value corresponding to the final action time, and using the correction value to compensate for the action temperature.
[0015] Based on the above technical solution, the following improvements can be further adopted: the strategy for driving the fine-tuning screw to rotate includes: The rotation direction of the fine-tuning screw is determined based on the positive or negative value of the sudden temperature error or the rebound temperature error. The amount of rotation of the fine-tuning screw is determined based on the absolute value of the sudden temperature error or the rebound temperature error. The rotation amount satisfies at least one of the following strategies: setting corresponding rotation amounts in segments according to error amplitude, or estimating the sensitivity coefficient based on the previous rotation amount and temperature error change and updating the next rotation amount accordingly. Set over-adjustment prevention constraints, which include at least one of the following constraints: maximum number of rotations, maximum cumulative rotation amount, reduce rotation amount when the temperature error sign is reversed, and stop rotation and output an abnormal flag when the temperature error decreases below a threshold.
[0016] The present invention also provides a calibration system for a snap-action temperature controller based on image recognition, the system comprising: Temperature field execution unit, used to trigger the temperature controller in the temperature field; The image acquisition unit is used to acquire images of the reed's motion. Temperature acquisition unit, used to acquire standard platinum resistance temperature series; The switch quantity acquisition unit is used to acquire the on / off signals of contacts; The displacement candidate moment extraction unit is used to locate the reed area in the image and perform sub-pixel displacement measurement to obtain the displacement curve, so as to extract the displacement candidate moments of sudden jump and rebound. The candidate timing extraction unit for switching signals is used to debounce the on / off signals in order to extract the candidate timings of sudden jumps and bounces. The event energy candidate moment extraction unit is used to extract event energy candidate moments for sudden jumps and bounces from the inter-frame change energy sequence of the image; The action timing fusion unit is used to calculate the conflict degree between each candidate timing and suppress fusion to obtain the final action timing of the jump and the rebound. The action temperature determination unit is used to interpolate the temperature sequence at the final action moment to obtain the action temperatures of the sudden jump and the rebound. The temperature error calculation unit is used to compare the temperature of the sudden jump and the rebound action with the preset sudden jump standard value and the rebound standard value respectively to obtain the temperature error. The fine-tuning execution unit is used to drive the fine-tuning screw to rotate and trigger the next calibration cycle when the temperature error is greater than the set temperature threshold, until the temperature error is lower than the temperature threshold.
[0017] Compared with the prior art, the calibration method and system provided by the present invention have at least the following beneficial effects: By generating multi-source candidate moments through displacement evidence, switching quantity evidence, and event energy evidence, and performing suppression fusion based on conflict degree, the reliability of determining the timing of sudden jumps and rebounds can be effectively improved, and the risk of false detection or missed detection caused by single signal noise, jitter, or imaging distortion can be reduced. Interpolation is performed on the standard platinum resistance temperature sequence at the final action moment to ensure that the action temperature corresponds strictly to the action moment, reduce the value deviation caused by action transients and discrete sampling, and improve the accuracy of action temperature determination. The calibration process is based on temperature error-driven fine-tuning screw and cyclic retesting, which can shorten the number of repeated adjustments, improve calibration efficiency and consistency, and facilitate automated or semi-automated implementation. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the operation of the image recognition-based snap-action temperature controller calibration method provided by the present invention; Figure 2 This is a schematic diagram of the image recognition-based snap-action temperature controller calibration system provided by the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be understood that the following embodiments are only for explaining the present invention and not for limiting the scope of protection of the present invention. Those skilled in the art can make various equivalent substitutions or modifications to the technical solutions of the present invention without departing from the spirit and substance of the present invention, and all such substitutions or modifications should fall within the scope of protection of the present invention. The order of the steps described in the present invention does not constitute a limitation on the order of implementation; the steps can be adjusted, combined, or split for execution while satisfying the purpose of the present invention. The terms "including" and "comprising" used herein are non-exclusive descriptions, indicating that other elements may be included in addition to the listed elements.
[0020] This invention provides a calibration method for a snap-action temperature controller based on image recognition. It is mainly used to accurately determine the timing and temperature of the snap-action and rebound actions under temperature field test conditions, and to generate a temperature error to drive a fine-tuning mechanism to complete closed-loop calibration. Figure 1 As shown, the calibration method for the snap-action thermostat specifically includes the following implementation process: The temperature controller is triggered in the temperature field, and the reed motion image, standard platinum resistance temperature sequence and contact on / off signal are acquired simultaneously. The displacement curve is obtained by locating the reed area in the image and measuring the subpixel displacement. Candidate displacement moments for sudden jumps and rebounds are then extracted. Debounce on / off signals to extract candidate moments for sudden jumps and bounces in switching signals; Candidate moments for event energy of sudden jumps and rebounds are extracted from the energy sequence of inter-frame changes in images; Calculate the conflict degree between each candidate time step and suppress fusion to obtain the final action time of the jump and the return jump; The temperatures of the sudden jump and rebound actions are obtained by interpolating the temperature sequence at the final action moment. The temperature error is obtained by comparing it with the preset sudden jump standard value and the rebound standard value respectively; When the temperature error exceeds the set temperature threshold, the fine-tuning screw is driven to rotate and enter the next calibration cycle until the temperature error is below the temperature threshold.
[0021] When the temperature controller is triggered in the temperature field, images of the reed motion, a standard platinum resistance temperature sequence, and contact on / off signals are simultaneously acquired. The reed motion image reflects the reed's sudden / rebound motion; the standard platinum resistance temperature sequence provides the data basis for temperature changes over time; and the contact on / off signals characterize the changes in contact state before and after the sudden / rebound action. To facilitate subsequent processing, the data from each acquisition channel is recorded with its sampling sequence and sampling time information, and stored in segments according to the sudden-rebound test cycle, ensuring that the image sequence, temperature sequence, and on / off signals within each cycle correspond to the same round of action.
[0022] The acquired images of the reed's motion are used to locate the reed region, identifying the image area containing the reed's sudden jump motion. Subpixel displacement measurements are performed within this image area to obtain a displacement curve showing the reed's displacement over time. The sudden jump and rebound actions of a snap-action thermostat exhibit obvious abrupt changes in the displacement curve, such as a step change in displacement within a short period or a significant abrupt change in the rate of displacement change. Based on the displacement curve, the moments corresponding to these abrupt changes are extracted as candidate displacement moments for the sudden jump and rebound. These candidate displacement moments provide an initial estimate of the kinematic timing of the reed's action.
[0023] Debouncing is performed on the contact on / off signals to filter out short-term flips caused by contact bounce, rebound, or electrical noise, thereby obtaining a stable sequence of switching states. Subsequently, flip events indicating on / off state transitions are detected in the debouncing sequence, and the times of these flip events are used as candidate times for sudden and rebound switching states, respectively. These candidate times provide an initial estimate of the timing of the action in the electrical state of the contacts.
[0024] To further improve the robustness of action moment extraction, this invention constructs an inter-frame change energy sequence based on the reed region. This change energy characterizes the intensity of change between adjacent image frames. When the reed jumps or bounces back, the image content changes significantly within a short period, resulting in a significant peak or abrupt change in the change energy. Based on this event energy sequence, a set of candidate peak moments corresponding to the peaks or abrupt changes is extracted. This set is then processed using a refractory period filtering rule, retaining only the earliest candidate peak moment within any refractory period window, thus obtaining the event energy candidate moments for jumps and bounces, respectively. These event energy candidate moments provide supplementary evidence of action transients when displacement features are affected by illumination, reflection, or edge blurring.
[0025] This invention addresses sudden jumps and rebounds by acquiring candidate displacement times, switch quantity times, and event energy times, and calculating the conflict degree between these candidate times. The conflict degree characterizes the consistency between candidate times from different sources. When the conflict degree exceeds a preset threshold, the candidate times are considered inconsistent, potentially indicating acquisition interference or unstable feature extraction; therefore, the acquired data for this round is deemed invalid and a re-acquisition is triggered. When the conflict degree is not greater than the preset threshold, the candidate times are fused according to a preset fusion rule to obtain the final action times corresponding to the sudden jumps and rebounds. This conflict degree-based fusion mechanism avoids directly outputting unreliable results when interference or false detections occur from different signal sources, thereby improving the stability and accuracy of the final action times.
[0026] After obtaining the final action times of the jump and rebound, temperature sampling points adjacent to the final action times are obtained from the standard platinum resistance temperature sequence. Interpolation is then performed on the temperature sequence to obtain the corresponding action temperature at the final action time, thus yielding the jump action temperature and rebound action temperature, respectively. Subsequently, the jump action temperature is compared with a preset jump standard value, and the rebound action temperature is compared with a preset rebound standard value, obtaining the jump temperature error and rebound temperature error. Since the action temperature is obtained by interpolation from the temperature sequence at the final action time, the correspondence between action time and temperature value is ensured, thereby reducing the value deviation caused by action transients and discrete sampling.
[0027] When the sudden temperature jump error or rebound temperature error exceeds the set temperature threshold, the fine-tuning screw is driven to rotate to adjust the operating temperature of the thermostat, and the next calibration process is initiated to trigger the action again, collect data, determine the final action time and operating temperature, and generate the temperature error. The fine-tuning screw is used to apply controllable mechanical adjustment to the thermo-mechanical-electric coupling structure of the sudden-action thermostat. Its acting objects are the spring, bimetallic strip assembly, elastic support, contact bracket, or the adjustment seat connected to it. Rotation of the fine-tuning screw causes changes in the relative position, preload, or contact pressure of the acting objects, thereby altering the initial deformation state and equivalent elastic constraint conditions of the spring or bimetallic strip during temperature changes.
[0028] The snap-action and rebound actions of a snap-action thermostat can be understood as a critically unstable reversal process driven by temperature and determined by the thermal deformation of the bimetallic strip and the constraint of the elastic mechanism. When the temperature rises or falls, causing the thermal deformation of the bimetallic strip to accumulate to a certain extent, the system reaches a critical point of energy balance and a rapid snap-action or rebound occurs. The fine-tuning screw, by changing parameters such as preload, support point position, equivalent force arm, or contact gap, essentially alters the triggering conditions of this critical point, causing the critical temperatures corresponding to the snap-action and rebound to shift. Therefore, after the fine-tuning screw rotates, the snap-action temperature and rebound temperature measured after the action is triggered again will change accordingly.
[0029] Because different temperature controller structures and assembly tolerances can lead to nonlinearities and individual differences in the relationship between rotation amount and operating temperature offset, this invention employs an error-driven iterative calibration method. This involves re-triggering the action after each fine-tuning, determining the action time and temperature, generating a temperature error, and continuing fine-tuning based on this error until the temperature error falls below a threshold. Through this error-driven fine-tuning iteration, the calibration process gradually converges and reaches the preset accuracy requirements, thereby improving calibration efficiency and consistency.
[0030] In one embodiment, to generate candidate displacement moments for sudden jumps and rebounds, firstly, learning-based target detection and localization processing is performed on the image features of the reed or its edges to determine a target region containing the reed's sudden jump region in the reed motion image; then, the target region is preprocessed and used as the input region for subpixel displacement measurement, wherein the preprocessing includes at least one of cropping or scale normalization; then, subpixel displacement measurement is performed within the target region to obtain a displacement curve, and the candidate displacement moments corresponding to the sudden jumps and rebounds are determined based on the moment extraction criteria of the displacement curve, wherein the moment extraction criteria include at least one of change point detection, derivative peak detection, and dual threshold state machine.
[0031] Specifically, the learning-based target detection and localization processing can detect significant features of the reed edge, near the contact point, or the reed contour, and output target region position parameters to characterize the reed jump area, thereby limiting subsequent displacement measurement to this target region and reducing the influence of background interference and irrelevant areas on the measurement results. The cropping is used to extract a local image corresponding to the target region from the original image; the scale normalization is used to scale the local image of the target region to a preset scale to ensure consistent input size for different samples or under different acquisition conditions, thereby improving the stability of sub-pixel displacement measurement. The sub-pixel displacement measurement is used to finely estimate the minute displacement of the reed edge or texture within the target region over time, obtaining a displacement curve that changes displacement over time. Based on the time extraction criteria of the displacement curve, candidate moments of action can be determined when the displacement curve shows abrupt changes or a significant change in the rate of change. Specifically, change point detection is used to identify moments when the statistical characteristics of the displacement curve change abruptly, derivative peak detection is used to identify moments when the rate of displacement change reaches its peak, and a dual-threshold state machine is used to switch the displacement state by setting entry and exit thresholds to improve the ability to suppress noise disturbances. This allows us to obtain the candidate displacement times corresponding to the sudden jump and the rebound, providing input for subsequent consistency determination and fusion with other candidate times.
[0032] Furthermore, the learning-based target detection and localization processing can be implemented using a lightweight YOLOv8 model. This lightweight YOLOv8 model takes a reed motion image or its consecutive frames as input, extracts multi-scale features through a backbone network, and outputs the location parameters and corresponding confidence scores of the target region from the detection head. The target region is used to characterize the image range containing the reed jump area. During the inference stage, confidence thresholds and non-maximum suppression can be combined to filter the detection results to obtain a stable target region. To adapt to embedded or production line deployment scenarios, the lightweight YOLOv8 model can reduce computational load by decreasing network width or depth, using lightweight operators, pruning, or quantization, enabling it to meet real-time requirements while maintaining positioning accuracy. The model can be trained or fine-tuned using pre-collected reed motion image samples. The training samples are labeled with reed edges or reed jump areas, allowing the model to learn the mapping relationship between significant features such as the reed contour and structures near the contact point and the target region.
[0033] Furthermore, the subpixel displacement measurement is used to further estimate the subtle displacement of the reed edge or texture between frames based on the pixel resolution. Its implementation may include: extracting the reed edge or feature points within the target area as the measurement object; performing subpixel localization on the edge position or feature point position to obtain continuous coordinates corresponding to each frame; and calculating the position difference between adjacent frames or a reference frame to obtain the displacement amount, thereby forming a displacement curve showing the displacement changing over time. The subpixel localization can be achieved by interpolating the edge gradient distribution, performing local curve fitting on the edge contour, or performing correlation matching on the feature point neighborhood and interpolating and refining near the correlation peak, so that the obtained displacement curve can reflect the transient step changes of sudden jumps and rebounds.
[0034] In one embodiment, to extract candidate moments for jump and bounce, the contact on / off signal is sampled to obtain a switch state sequence. The switch state sequence is then debouncing to filter out short-term flips caused by jitter. In the debouncing switch state sequence, flip events where the state changes from open to closed or from closed to open are detected, and the times when the flip events occur are determined as candidate moments for jump and bounce, respectively.
[0035] Specifically, the contact on / off signal can be output by the voltage / current detection circuit or isolated acquisition module at both ends of the thermostat contact. After sampling, a digital or logical quantity that changes over time is obtained. When the sampled value is high / low, corresponding to the contact being closed / open, the switch state sequence is formed. The debouncing process is used to suppress instantaneous multiple flips caused by contact rebound or electrical noise. It can be implemented by setting a minimum holding time criterion for state changes, that is, only when the state change lasts for more than a preset time window is the state switch confirmed to be valid; or by performing a majority vote on the sampled values within the preset window to output a stable state, thereby obtaining the debouncing switch state sequence. In the debouncing switch state sequence, when a state switch from open to closed or from closed to open is detected, the time of occurrence of the valid switch is recorded as a candidate action time. The switching from open to closed and the switching from closed to open correspond to one of the action state changes, namely, a sudden jump or a rebound, so as to obtain the candidate moments of the switch quantity corresponding to the sudden jump and the rebound, and use them as inputs for consistency determination and fusion with the candidate moments of displacement and the candidate moments of event energy.
[0036] In one embodiment, to extract candidate event energy moments for jumps and bounces, a corresponding image sequence is obtained based on a reed region. The inter-frame variation energy is calculated within the reed region to form an event energy sequence. Peak detection or abrupt change point detection is performed on the event energy sequence to obtain a set of candidate peak moments. A refractory period filtering rule is used to sparsify the set of candidate peak moments, retaining only the earliest candidate peak moment within any refractory period window. These retained candidate peak moments are then determined as candidate event energy moments for jumps and bounces, respectively. The inter-frame variation energy includes at least one of frame difference energy, gradient variation energy, and optical flow amplitude energy.
[0037] Specifically, the reed region is an image region used to reflect the sudden or rebounding motion of the reed, which can be obtained by image localization and remain consistent in consecutive frames or updated with each frame; after obtaining the image sequence corresponding to the reed region, the inter-frame change energy is calculated based on the degree of change in the image content of two or more adjacent frames to obtain the event energy sequence that changes with time.
[0038] In one implementation, the image frame change energy includes frame difference energy. The frame difference energy measures the overall scale of pixel intensity changes between adjacent frames within the reed region. When the reed jumps or bounces back, the reed edge position changes rapidly, causing a large number of pixels to change from the reed to the background or vice versa. Even if the edges are slightly blurred, this will manifest as a significant intensity change, thus significantly increasing the frame difference energy. In this embodiment, the calculation of the frame difference energy includes the following steps: converting the color image of the reed region to grayscale or extracting the luminance channel, and optionally performing slight smoothing to suppress noise; calculating the pixel intensity difference between two adjacent frames and taking the absolute value of the difference; accumulating or averaging the difference within the reed region, and normalizing it according to the number of pixels in the region to obtain the frame difference energy value corresponding to that frame; calculating frame by frame to form an event energy sequence. Further, to improve stability, common engineering processing includes: background suppression, only calculating the difference near the reed edge or within the main movement zone of the reed; luminance drift suppression, normalizing the mean or median for each frame to reduce the impact of overall luminance changes.
[0039] In another implementation, the inter-frame change energy includes gradient change energy. The gradient change energy focuses on whether the edge structure of the reed region undergoes significant changes. If adjacent frames only experience an overall brightening or darkening without changing edge positions, the gradient structure change is usually small; however, sudden jumps or rebounds can cause changes in edge position, shape, and sharpness within a short period, significantly increasing the gradient change. In this embodiment, the calculation of the gradient change energy includes the following steps: smoothing and denoising the reed region to avoid noise being mistaken for edge changes; calculating the gradient magnitude map for each frame; subtracting the gradient magnitude maps of adjacent frames to obtain a gradient change map; accumulating or averaging the gradient change maps within the reed region, and normalizing them to obtain the gradient change energy value corresponding to that frame; and calculating the event energy sequence frame by frame. Additionally, edge bands can be extracted within the reed region, such as a band-shaped region several pixels wide near the edge, and gradient change energy can be calculated only within this edge band, thereby reducing interference from background textures.
[0040] In another implementation, the inter-frame variation energy includes optical flow amplitude energy. The optical flow amplitude energy measures the amplitude of pixel motion vectors within the reed region, essentially answering the question of how strong the overall motion of this frame is relative to the previous frame. Sudden jumps or bounces often have the characteristics of high speed and large displacement in a short time, therefore the optical flow amplitude will suddenly increase near the moment of action. In this embodiment, the calculation of the optical flow amplitude energy includes the following steps: selecting feature points for tracking within the reed region, such as edge corner points, texture points, or directly using dense motion estimation to obtain a pixel-level motion vector field; calculating motion vectors for adjacent frames and obtaining the amplitude of each vector; accumulating or averaging the vector amplitudes within the reed region, and truncating and suppressing abnormally large values if necessary to avoid local mismatches introducing spikes; calculating the optical flow amplitude energy sequence frame by frame. If on-site computing power is limited, sparse feature point tracking can be used to calculate optical flow to reduce the computational burden; if the texture is weak, the number of feature points can be appropriately increased or dense estimation can be used instead.
[0041] Any of the above-mentioned inter-frame change energy can form an event energy sequence arranged in time, so that when the reed undergoes a sudden jump or rebound, the event energy will increase significantly in a short period of time and form a peak or abrupt change.
[0042] After obtaining the event energy sequence, peak detection or abrupt change detection is performed on the event energy sequence to obtain a set of candidate peak times. Peak detection can be performed by comparing the current energy value with the neighboring energy values and combining an amplitude threshold to determine local maxima, thereby outputting candidate peak times. Abrupt change detection can be performed by comparing the difference or rate of change of the energy sequence at adjacent times and combining a change threshold to determine the abrupt change location, thereby outputting candidate peak times. Since a snap-action thermostat may be accompanied by mechanical ringing or rebound after a snap-action or rebound, the event energy sequence may generate multiple secondary peaks after the main peak. If all peaks are directly used as action times, false detections will be introduced. Therefore, this embodiment uses a refractory period screening rule to sparsify the set of candidate peak times.
[0043] The refractory period screening rule processes the candidate peak time set in chronological order. When a candidate peak time is detected, a refractory period window of preset duration is set starting from that candidate peak time. Within this refractory period window, other candidate peak times are ignored, and only the earliest candidate peak time within the window is retained as a valid candidate. Subsequently, after the refractory period window ends, the same processing is performed on the remaining candidate peak times. Through this sparsification process, the time corresponding to the main peak can be distinguished from the secondary peaks caused by ringing, allowing the retained candidate peak times to more stably represent the transient moments of sudden jumps and rebounds, and to serve as candidate event energy times for sudden jumps and rebounds, respectively, providing input for subsequent conflict degree calculation and fusion with displacement candidate times and switch quantity candidate times.
[0044] In one embodiment, to generate the final action moments of the jump and the rebound, corresponding displacement candidate moments, switch quantity candidate moments, and event energy candidate moments are obtained for the jump and the rebound respectively, and the conflict degree between the candidate moments is calculated. When the conflict degree is greater than a preset threshold, the data collected in this round is determined to be invalid and a re-collection is triggered; otherwise, the candidate moments are fused according to a preset fusion rule to obtain the final action moments corresponding to the jump and the rebound. The conflict degree is the maximum value of the time difference between any two types of candidate moments or the weighted time difference. The fusion rule includes at least setting weights according to the confidence level of evidence and performing weighted evaluation, or selecting according to the minimum deviation principle. The confidence level of evidence is an evaluation value that characterizes the reliability of the corresponding candidate moment.
[0045] Specifically, the displacement candidate moment is used to characterize the time position where the reed displacement curve changes abruptly near a sudden jump or rebound action; the switching quantity candidate moment is used to characterize the time position where the contact on / off state effectively reverses; and the event energy candidate moment is used to characterize the time position where the intensity of the image change in the reed region reaches its peak or undergoes a significant abrupt change. Since the above three types of candidate moments originate from kinematic information, electrical state information, and image change information, respectively, they can locate the same action process from different observation angles. However, in the presence of noise interference, imaging distortion, or contact jitter, the three types of candidate moments may deviate or even be inconsistent. Therefore, it is necessary to measure the degree of consistency among the candidate moments and output a stable final action moment based on this.
[0046] The conflict degree is used to quantify the degree of inconsistency between candidate moments. In one implementation, for sudden jumps or bounces, the time differences between each pair of displacement candidate moments, switch quantity candidate moments, and event energy candidate moments are calculated, and the maximum time difference is used as the conflict degree, thus reflecting the degree of deviation caused by the most inconsistent candidate moment. In another implementation, weighting coefficients can be set according to the importance of different candidate moment sources, and the conflict degree is obtained by weighted summation of the pairwise time differences. This allows the conflict degree to reflect both the magnitude of deviation and the impact of source differences on consistency judgment. The preset threshold is used to distinguish between acceptable consistency and unacceptable inconsistency. When the conflict degree is greater than the preset threshold, it indicates that there is a significant conflict between candidate moments in this round, which may be caused by abnormal acquisition or unstable feature extraction. In this case, the data acquired in this round is deemed invalid and re-acquisition is triggered to avoid inputting unreliable results into subsequent temperature interpolation and error calculation stages.
[0047] When the conflict level is not greater than a preset threshold, the candidate moments are fused according to a preset fusion rule to obtain the final action moment. The fusion rule can adopt a weighted fusion method, that is, weights are set according to the evidence confidence level corresponding to each candidate moment, and the candidate moments are weighted and evaluated. The evidence confidence level is an evaluation value characterizing the reliability of the corresponding candidate moment, which can be obtained based on stability or quality indicators during the candidate moment generation process, such as the significance of abrupt changes in the displacement curve, the stable and continuous characteristics of the switch reversal after debouncing, and the significance of the event energy peak, so that candidate moments with higher reliability have a greater weight in the fusion. The fusion rule can also adopt the minimum deviation principle, that is, selecting the candidate moment with the smallest deviation from the other candidate moments in the candidate moment set as the final action moment, thereby further reducing the impact of a single outlier on the output result when the candidate moments already meet the consistency condition. Through the above conflict level determination and fusion mechanism, rejection and re-acquisition can be triggered when there is inconsistency, and a robust final action moment can be output when there is consistency, providing reliable input for subsequent determination of action temperature and closed-loop calibration based on the final action moment.
[0048] In one embodiment, when the calculated conflict degree exceeds a preset threshold and triggers re-acquisition, the re-acquisition process includes: determining two candidate times corresponding to the maximum conflict degree; determining the adjustment object based on the source of the two candidate times; adjusting the next round acquisition strategy accordingly; and re-acquiring the reed motion image, the standard platinum resistance temperature sequence, and the contact on / off signal. The adjustment of the next round acquisition strategy includes at least one of the following operations: adjusting the heating / cooling rate or the stable holding time of the temperature field; adjusting the image acquisition parameters or the reed target area positioning parameters; adjusting the sampling frequency or de-jitter parameters of the contact on / off signal; and adjusting the calculation window or refractory period window of the event energy sequence.
[0049] Specifically, the two types of candidate moments corresponding to the maximum conflict degree refer to the pair of candidate moments that cause the largest time difference among the pairwise time differences of displacement candidate moments, switching quantity candidate moments, and event energy candidate moments. This pair of candidate moments reflects the most significant source of inconsistency in the current round of action moment estimation. By identifying the source of this pair of candidate moments, the conflict can be located in the acquisition link or feature extraction stage that is more likely to become unstable. This allows re-acquisition to be not just a simple repetition of acquisition, but a targeted adjustment of acquisition and processing conditions to reduce the time deviation between candidate moments in the next round and reduce the conflict degree.
[0050] In one implementation, when the two candidate times corresponding to the maximum conflict degree involve displacement candidate times and event energy candidate times, it usually indicates that the reed image link has feature drift caused by imaging quality or motion blur, or that the event energy is sensitive to ringing secondary peaks, resulting in peak shift. In this case, the image link / image processing link can be used as the main adjustment target. Image acquisition parameters can be adjusted to improve the imaging conditions of sudden jumps, such as increasing the frame rate to shorten the inter-frame motion, shortening the exposure time to reduce motion blur, adjusting the gain or illumination intensity to improve the signal-to-noise ratio. At the same time, the reed target area positioning parameters can be adjusted to improve the stability of the target area, or the calculation window and refractory period window of the event energy sequence can be adjusted to suppress secondary peak interference, so that the event energy candidate times are closer to the actual action times.
[0051] The calculation window is used to limit the statistical range and time scale of event energy to balance sensitivity to transient events with the ability to suppress noise disturbances. The refractory period window is used to constrain and sparsify candidate peak times to suppress duplicate detections or time shifts caused by ringing secondary peaks. During the reacquisition phase, the calculation window or refractory period window can be adjusted according to the peak stability and candidate peak density of the event energy sequence to make the candidate event energy times more stable and consistent with other candidate times.
[0052] In another implementation, when the two candidate times corresponding to the maximum conflict degree involve the candidate times of switching quantity and the candidate times of displacement or event energy, it usually indicates that the contact on / off signal has jitter, bounce or electrical noise causing the flip time to drift, or that the dejitter parameter setting is improper, resulting in a delay in the effective flip confirmation. At this time, the switching quantity acquisition link or the dejitter processing link can be used as the main adjustment object. Adjust the sampling frequency of the contact on / off signal to improve the flip capture resolution, and adjust the dejitter parameter so that the effective flip determination can filter out short-term glitches without excessively delaying the flip confirmation, so that the candidate times of switching quantity and the candidate times on the image side tend to be consistent.
[0053] In addition, excessive conflict may also be caused by the temperature field process. For example, excessively high heating and cooling rates may cause instability in the temperature controller's operation, temperature field fluctuations may cause drastic temperature changes near the action, or the lack of a stable holding period may make it difficult to stably identify the state before and after the action. Therefore, when the temperature field is used as an adjustment object, the temperature field changes before and after the action can be made smoother by reducing the heating and cooling rate or increasing the stable holding time. This can improve the stability of the image, switch quantity and temperature acquisition links near the action and indirectly reduce the deviation between candidate moments.
[0054] After completing the above targeted adjustments, the reed motion image, standard platinum resistance temperature sequence and contact on / off signal are reacquired, and the candidate moment extraction, conflict degree calculation and fusion output process are re-executed so that the conflict degree between the next round of candidate moments is suppressed within the preset threshold, thereby obtaining the final action moment that can be used for subsequent temperature interpolation and error calculation.
[0055] In one embodiment, interpolating the temperature sequence at the final action moment to obtain the jump and rebound action temperatures includes: selecting at least two sets of temperature sampling points located before and after the final action moment from the standard platinum resistance temperature sequence as interpolation inputs, respectively, determining the interpolation method based on the interpolation inputs, and performing interpolation calculations to obtain the action temperature corresponding to the final action moment. The interpolation method includes at least one of linear interpolation and Newtonian interpolation.
[0056] Specifically, the standard platinum resistance temperature sequence is temperature data sampled discretely over time. Its sampling time typically does not completely coincide with the final action time, therefore interpolation is needed to obtain the corresponding temperature value at the final action time. To this end, for the final action time that jumps or reverts, the adjacent sampling points in the temperature sequence are searched, and at least two sets of temperature sampling points located before and after the final action time are selected as interpolation inputs. This ensures that the interpolation process forms an envelope around the final action time on the time axis, thereby guaranteeing a clear correspondence between the interpolation result and the action time. At least two sets of temperature sampling points can be understood as including at least the temperature point pair before and after the final action time, and may further include more neighboring sampling points to enhance the robustness and noise resistance of the interpolation.
[0057] The interpolation method is used to reconstruct the temperature change trend on the time axis based on the interpolation input and obtain the temperature value at the final action moment. In one implementation, linear interpolation is used, assuming that the temperature change near the final action moment is approximately linear over a short period. The action temperature is determined based on the time interval and temperature difference between sampling points before and after the final action moment, resulting in a simple and stable interpolation result, suitable for scenarios with relatively stable temperature rise and fall rates and small sampling intervals. In another implementation, Newton interpolation is used, which uses multiple sets of neighboring sampling points to fit the temperature change curve near the final action moment. This allows for obtaining an action temperature that more closely reflects the local change trend even when there is some nonlinearity in the temperature change or a relatively large sampling interval.
[0058] This invention determines the interpolation method based on the interpolation input. The method can be selected according to the temperature change characteristics reflected by the interpolation input. For example, linear interpolation is selected when the temperature change rate between adjacent sampling points is relatively stable, while Newton interpolation is selected when there are significant differences in the change rate between adjacent sampling points or when the temperature sequence exhibits a local nonlinear trend. Through this method, the action temperature corresponding to the final action moment of the sudden jump and the rebound can be obtained respectively, providing a reliable temperature value basis for subsequent comparison with preset standard values to generate temperature errors and drive fine-tuning.
[0059] In one embodiment, the temperature sequence interpolation further includes: when the sensor corresponding to the standard platinum resistance temperature sequence has discrete temperature point correction values, performing a correction process on the action temperature based on the discrete temperature point correction values; the correction process includes performing interpolation on the correction values to obtain the correction value corresponding to the final action time, and using the correction value to compensate for the action temperature.
[0060] Specifically, the standard platinum resistance temperature sequence is typically output by a standard platinum resistance thermometer or its measurement link. Affected by factors such as sensor calibration status, measurement circuitry, lead resistance, and environmental heat transfer conditions, the sensor may exhibit systematic deviations at different temperature points. To improve the accuracy of the operating temperature values, a discrete temperature point correction value table can be pre-established for the sensor. This table describes the measurement deviation or correction amount of the sensor at several temperature reference points. The discrete temperature point correction values can be derived from the sensor's factory calibration data, verification certificate, or calibration results obtained by comparison with a higher-level standard.
[0061] After obtaining the final action moment of a sudden jump or rebound, the action temperature corresponding to this final action moment is first obtained by interpolation based on the temperature sequence. Then, based on the discrete temperature point correction value table, adjacent correction points near this action temperature are determined, and interpolation is performed on these correction values to obtain the correction value corresponding to the final action moment. The process of interpolating the correction value is consistent with the operation of temperature sequence interpolation, that is, the correction amount is reconstructed using correction points near the action temperature, so that the correction value can continuously change within the range of the action temperature; this avoids introducing new errors due to jumps in the correction amount caused by using only the most recent correction point.
[0062] After obtaining the correction value, the operating temperature is compensated using the correction value to obtain the corrected operating temperature. The compensation process can involve adding or subtracting the correction value from the operating temperature to offset the systematic deviation of the sensor near that temperature, making the final jump and rebound operating temperatures used for comparison with preset standard values closer to the true temperature level. By introducing discrete temperature point correction values and interpolating them, the impact of temperature measurement link errors on operating temperature determination can be further reduced, improving the accuracy and consistency of calibration results.
[0063] In one embodiment, the strategy for driving the fine-tuning screw to rotate includes: determining the rotation direction of the fine-tuning screw based on the positive or negative value of the sudden temperature error or the rebound temperature error; determining the rotation amount of the fine-tuning screw based on the absolute value of the sudden temperature error or the rebound temperature error; the rotation amount satisfies at least one of the following strategies: setting corresponding rotation amounts in segments according to the error amplitude, or estimating the sensitivity coefficient based on the previous rotation amount and the change in temperature error and updating the rotation amount for the next round accordingly; setting over-adjustment constraints, the over-adjustment constraints including at least one of the following constraints: maximum number of rotations, maximum cumulative rotation amount, reducing the rotation amount when the sign of the temperature error reverses, and stopping rotation and outputting an abnormality flag when the temperature error decreases below a threshold.
[0064] Specifically, the sudden temperature jump error and the rebound temperature jump error are obtained by comparing the operating temperature with the corresponding preset standard value, and are used to characterize the direction and magnitude of the deviation of the current thermostat's operating temperature from the target standard. The rotation direction is determined based on the positive or negative value of the temperature error, establishing a closed-loop relationship between the error and mechanical adjustment. That is, when the temperature error is positive or negative, the corresponding operating temperature needs to be adjusted in a decreasing or increasing direction, thereby driving the fine-tuning screw to rotate in the preset direction to change the thermostat's equivalent preload, lever arm, or contact gap, etc., so that the operating temperature obtained in the next calibration converges to the target standard. The rotation direction can be determined through a pre-established direction mapping relationship, which can be set according to the thermostat's structural characteristics or the mechanical transmission relationship of the calibration fixture, thereby ensuring that the rotation direction is consistent and repeatable under the same error sign.
[0065] The rotation amount is determined based on the absolute value of the temperature error, used to adjust the fine-tuning intensity according to the deviation amplitude, avoiding slow adjustment when the error is large and overly aggressive adjustment when the error is small. The rotation amount is set segmented according to the error amplitude, dividing the error amplitude into multiple intervals. Different intervals correspond to different rotation step sizes, allowing for a larger step size to improve convergence speed when the error is large, and a smaller step size to improve final accuracy and reduce over-adjustment risk when the error is close to the threshold. Estimating the sensitivity coefficient based on the previous rotation amount and the change in temperature error, and updating the rotation amount accordingly, utilizes historical iteration information to characterize the temperature change trend caused by a unit rotation amount. When the actual error decrease is greater than expected, the rotation amount can be reduced accordingly; when the actual error decrease is insufficient, the rotation amount can be increased accordingly. This allows the rotation amount to adaptively adjust with the iteration process and accelerate stable convergence.
[0066] To prevent over-adjustment or repeated oscillations during mechanical adjustment, the strategy further incorporates over-adjustment constraints. The maximum number of rotations limits the number of iterations in a single calibration task, preventing infinite iterations in abnormal situations. The maximum cumulative rotation limits the cumulative rotation range of the fine-tuning screw, avoiding exceeding the structural allowable stroke or causing irreversible mechanical bias. Reducing the rotation amount when the temperature error sign reverses proactively decreases the step size when an over-adjustment trend emerges, shifting the adjustment process from coarse to fine. Stopping rotation and outputting an anomaly flag when the temperature error decreases below a threshold identifies abnormal situations such as insensitive adjustment or unstable measurement, prompting manual review or triggering re-acquisition and parameter adjustment. Through the coordinated setting of the rotation direction, rotation amount, and over-adjustment constraints, the risk of over-adjustment can be reduced while ensuring gradual convergence of the operating temperature, improving the efficiency and consistency of closed-loop calibration.
[0067] In one embodiment, the present invention also provides an image recognition-based instantaneous temperature controller calibration system. For example... Figure 2 As shown, the system includes: a temperature field execution unit for triggering the temperature controller in a temperature field; an image acquisition unit for acquiring images of the reed's motion; a temperature acquisition unit for acquiring a standard platinum resistance temperature sequence; a switch quantity acquisition unit for acquiring contact on / off signals; a displacement candidate moment extraction unit for locating the reed region in the image and performing sub-pixel displacement measurement to obtain a displacement curve, thereby extracting candidate moments for sudden jumps and bounces; a switch quantity candidate moment extraction unit for de-jittering the on / off signals to extract candidate moments for sudden jumps and bounces; and an event energy candidate moment extraction unit for extracting event energy from the inter-frame variation energy of the image. The system extracts candidate event energy moments for sudden jumps and bounces from the quantity sequence; an action moment fusion unit calculates the conflict degree between each candidate moment and suppresses fusion to obtain the final action moment of the sudden jump and bounce; an action temperature determination unit interpolates the temperature sequence at the final action moment to obtain the action temperature of the sudden jump and bounce; a temperature error calculation unit compares the action temperature of the sudden jump and bounce with the preset sudden jump standard value and bounce standard value respectively to obtain the temperature error; and a fine-tuning execution unit drives the fine-tuning screw to rotate and triggers the next round of calibration when the temperature error is greater than the set temperature threshold, until the temperature error is lower than the temperature threshold.
[0068] Specifically, the temperature field execution unit is a component used to control the heating and cooling process of the temperature controller within a temperature field and trigger its jump and rebound actions. It includes at least a temperature field device and a temperature field control component. The temperature field device can be a constant-temperature oil bath or an equivalent temperature field device, used to provide a controllable thermal environment to the temperature controller. The temperature field control component controls the heating or cooling process of the temperature field device and forms the action triggering conditions. This component includes at least one or more of a heating component, a cooling component, a temperature regulating controller, and a circulating stirring component, so that the temperature controller reaches the trigger temperature range for jump and rebound under a preset heating or cooling curve and performs the action. Further optionally, the temperature field execution unit may also include a clamp or tooling for fixing the temperature controller, limiting the attitude and position of the temperature controller in the temperature field and ensuring that the reed area is within the image acquisition field of view, thereby stably triggering and observing the jump and rebound actions during the temperature change driven by the temperature field.
[0069] The temperature acquisition unit can be implemented using a standard platinum resistance thermometer and a temperature transmission module. The standard platinum resistance thermometer can be placed within the working area of the constant-temperature oil bath, and positioned at the same or similar temperature field location as the part of the temperature controller to be measured, so that the acquired temperature sequence can characterize the actual temperature change near the temperature controller's operation. The temperature transmission module can excite the standard platinum resistance thermometer using a constant current excitation method, and acquire the corresponding voltage / resistance signal through a bridge circuit or high-precision resistance measurement circuit, then output digital temperature data through the acquisition interface. In actual operation, the control platform can issue an acquisition start command before calibration begins. The temperature acquisition unit continuously outputs temperature data according to a preset sampling period, and adds a sampling time or sampling sequence number to each sampling point; acquisition stops when a sudden jump / rebound action is detected or the preset acquisition duration is reached, thereby obtaining the standard platinum resistance temperature sequence corresponding to that round of action.
[0070] To ensure that the temperature sequence is aligned with the image and switch data, the temperature acquisition unit can maintain a unified time base or a unified sampling number with the control platform. For example, the control platform can send acquisition trigger signals to each acquisition unit at the same time, or the temperature acquisition unit can output a timestamp synchronously each time it outputs temperature data, which is convenient for subsequent temperature interpolation at the final action time.
[0071] The switch quantity acquisition unit can be implemented using an isolated acquisition circuit and a digital input module. The temperature controller contacts can be connected to the acquisition circuit via current-limiting resistors and isolation devices. These isolation devices can be optocouplers, isolation amplifiers, or isolated digital input modules to achieve electrical isolation between the contact circuit and the acquisition system, reducing the impact of operating interference on acquisition stability. The acquired contact status signals can be converted into high / low level or on / off logic quantities and output to the control platform.
[0072] In actual operation, the digital input acquisition unit enters sampling mode before calibration begins, continuously reading the contact on / off states at a preset sampling frequency to form a digital state sequence. Near the occurrence of an action, the contacts may experience short-term jitter or rebound, causing the signal to flip rapidly. Therefore, de-jitter processing can be performed on the acquisition or processing side. For example, a minimum hold time criterion can be set for state changes. Only when the new state after the flip lasts for more than a preset time window is the flip confirmed as valid, and the confirmation time is recorded as the corresponding digital candidate time. Thus, the contact on / off signal output by the digital input acquisition unit can reflect both sudden / rebound electrical state changes and remain stable and usable even in the presence of noise and jitter.
[0073] The image acquisition unit can be implemented using a high-speed industrial camera, a fixed-focus or macro lens, and a ring / strip lighting assembly. The high-speed industrial camera can be mounted on a bracket above the constant-temperature oil bath, positioned overhead to target the temperature controller reed's movement area. To ensure clear capture of sudden jumps, the camera can be set with an appropriate frame rate and exposure time before calibration begins, preventing motion blur at the reed's edge during the jump. The lens can be selected with a suitable focal length based on the reed's size and working distance, and the reed's edge can be clearly distinguished on the imaging plane through focusing. The lighting assembly can be positioned around the camera lens or above the side of the oil bath, providing stable illumination to reduce brightness fluctuations caused by ambient light changes, and adjusting the illumination angle and intensity to suppress the impact of oil surface reflections and shadows on reed edge recognition. If necessary, a diffuser or polarizer can be used to reduce reflective interference.
[0074] In actual operation, the control platform triggers the camera to enter continuous acquisition mode and outputs an image frame sequence before or during the initiation of the temperature field execution unit's heating / cooling curve. The image frame sequence can be recorded by frame number or timestamp to establish a correspondence with the temperature sequence and switch quantity sequence. After the action occurs, the image acquisition unit can continue to acquire data for a preset duration to cover the ringing process after the sudden jump / rebound, then stop acquiring data and pass the image sequence to the subsequent processing module for operations such as reed area positioning, subpixel displacement measurement, and event energy sequence construction. Through the above configuration and acquisition process, image data required for the reed displacement change at the moment of sudden jump can be stably acquired in an oil tank environment, providing reliable input for determining the action time and calculating the action temperature.
[0075] To ensure that multi-source data can be used for action moment fusion, the system can be configured with a unified acquisition and control platform to coordinate the start and stop of temperature field execution, camera acquisition, temperature acquisition, and switch quantity acquisition. It also provides unified numbering and associated storage for data from each acquisition channel, ensuring that image sequences, temperature sequences, and on / off signals generated during the same calibration process have a consistent data index relationship. The displacement candidate moment extraction unit, event energy candidate moment extraction unit, action moment fusion unit, and action temperature determination unit can be implemented by an industrial control computer, edge computing device, or embedded controller. They automatically process image and signal data to output the final action moment and action temperature, thus avoiding manual readings and making them suitable for batch calibration scenarios.
[0076] The fine-tuning execution unit may include an actuator for driving the fine-tuning screw to rotate, such as a motor, reducer, and transmission connector, or a matching automatic adjustment fixture. Driven by the control platform, the actuator completes the rotation of the fine-tuning screw and triggers the next calibration cycle after each fine-tuning, achieving closed-loop iterative adjustment until the temperature error meets the threshold requirement. Therefore, this system can form an automatic calibration process of acquisition, identification, calculation, fine-tuning, and retesting in a production line environment, achieving efficient calibration of large batches of temperature controllers with minimal human intervention.
[0077] Furthermore, the system can be configured with a data management module for encrypted storage and uploading of images and calibration data, and for interface with the Manufacturing Execution System (MES) to achieve one-click traceability. Specifically, the data management module can be a software module within an industrial control computer or a separate server interface module. It is used to associate and package data such as the calibration batch number corresponding to each temperature controller, the index of the acquired image sequence, the final action time, the action temperature, the temperature error, and the fine-tuning results, and upload this data to the MES or enterprise database after encryption. This achieves visualization of the calibration process, traceability of results, and a closed-loop quality management system. Through the above hardware and implementation environment configuration, the system of this invention can provide an efficient and visible automatic calibration solution for high-volume, low-management temperature controller production lines.
[0078] The above description is merely an explanation of preferred embodiments of this application and the technical principles upon which they are based, and is not intended to limit this application. Those skilled in the art should understand that the scope of protection of this application is not limited to technical solutions formed by specific combinations of the above-mentioned technical features, but should also cover other technical solutions formed by arbitrary combinations, substitutions, or modifications of the above-mentioned technical features and their equivalent features without departing from the inventive concept of this application. For example, solutions obtained by substituting the above-mentioned features with technical features disclosed in this application that have the same or similar functions.
[0079] It should also be understood that the step numbers in the invention content and embodiments are for illustrative purposes only and do not necessarily limit the execution order. The order of each process should be based on its functional implementation and internal logical relationship. Based on the teachings of this application, those skilled in the art can make various modifications, variations or equivalent substitutions to the implementation methods without departing from the spirit and substance of this application, and all such modifications or substitutions should fall within the protection scope of this application.
Claims
1. A method for calibrating a snap-action temperature controller based on image recognition, characterized in that, The method includes: The temperature controller is triggered in the temperature field, and the reed motion image, standard platinum resistance temperature sequence and contact on / off signal are acquired simultaneously. The displacement curve is obtained by locating the reed area in the image and measuring the subpixel displacement. Candidate displacement moments for sudden jumps and rebounds are then extracted. Debounce on / off signals to extract candidate moments for sudden jumps and bounces in switching signals; Candidate moments for event energy of sudden jumps and rebounds are extracted from the energy sequence of inter-frame changes in images; Calculate the conflict degree between each candidate time step and suppress fusion to obtain the final action time of the jump and the return jump; The temperatures of the sudden jump and rebound actions are obtained by interpolating the temperature sequence at the final action moment. The temperature error is obtained by comparing it with the preset sudden jump standard value and the rebound standard value respectively; When the temperature error exceeds the set temperature threshold, the fine-tuning screw is driven to rotate and enter the next calibration cycle until the temperature error is below the temperature threshold.
2. The image recognition-based instantaneous temperature controller calibration method according to claim 1, characterized in that, The extraction process of candidate displacement moments for sudden jumps and rebounds includes: performing learning-based target detection and localization processing on the image features of the reed or its edges to determine the target region containing the reed sudden jump region in the reed motion image; using the preprocessed target region as the input region for subpixel displacement measurement; performing subpixel displacement measurement within the target region to obtain the displacement curve; and determining the candidate displacement moments corresponding to sudden jumps and rebounds based on the moment extraction criteria of the displacement curve. The preprocessing includes at least one of cropping or scale normalization; the time extraction criterion includes at least one of change point detection, derivative peak detection, and dual threshold state machine.
3. The image recognition-based instantaneous temperature controller calibration method according to claim 1, characterized in that, The extraction process of candidate moments for jump and bounce includes: sampling the contact on / off signal to obtain a switch state sequence; performing debouncing on the switch state sequence to filter out short-term flips caused by jitter; detecting flip events from open to closed or from closed to open in the debouncing switch state sequence, and determining the time of occurrence of the flip events as candidate moments for jump and bounce, respectively.
4. The image recognition-based instantaneous temperature controller calibration method according to claim 1, characterized in that, The process of extracting candidate event energy moments for sudden jumps and bounces includes: obtaining the corresponding image sequence based on the reed region; calculating the inter-frame change energy of the image within the reed region to form an event energy sequence; performing peak detection or abrupt change point detection on the event energy sequence to obtain a set of candidate peak moments; using the refractory period screening rule to sparsify the set of candidate peak moments; retaining only the earliest candidate peak moment within any refractory period window; and determining the retained candidate peak moments as candidate event energy moments for sudden jumps and bounces, respectively. The image inter-frame variation energy includes at least one of the following: frame difference energy, gradient variation energy, and optical flow amplitude energy.
5. The image recognition-based instantaneous temperature controller calibration method according to claim 1, characterized in that, The process of generating the final action time of the sudden jump and the rebound includes: for the sudden jump and the rebound respectively, obtaining the corresponding displacement candidate time, switch quantity candidate time and event energy candidate time, calculating the conflict degree between the candidate times, when the conflict degree is greater than a preset threshold, determining that the data collected in this round is invalid and triggering re-collection, otherwise, fusing each candidate time according to the preset fusion rule to obtain the final action time corresponding to the sudden jump and the rebound. The conflict degree is the maximum value or weighted time difference between any two candidate time points; The fusion rules include at least setting weights based on the confidence level of the evidence and performing weighted evaluation, or selecting according to the principle of minimum deviation, wherein the confidence level of the evidence is an evaluation value characterizing the reliability of the corresponding candidate time.
6. The image recognition-based instantaneous temperature controller calibration method according to claim 5, characterized in that, When the conflict level exceeds a preset threshold and triggers re-acquisition, the re-acquisition process includes: determining the two candidate times corresponding to the maximum conflict level, determining the adjustment object based on the source of the two candidate times, adjusting the next round of acquisition strategy accordingly, and re-acquiring the reed motion image, standard platinum resistance temperature sequence and contact on / off signal. The adjustment of the next round of acquisition strategy includes at least one of the following operations: adjusting the heating and cooling rate or the stable holding time of the temperature field, adjusting the image acquisition parameters or the reed target area positioning parameters, adjusting the sampling frequency or de-jitter parameters of the contact on / off signal, and adjusting the calculation window or refractory period window of the event energy sequence.
7. The image recognition-based instantaneous temperature controller calibration method according to claim 1, characterized in that, The process of interpolating the temperature sequence at the final action moment to obtain the jump and rebound action temperatures includes: selecting at least two sets of temperature sampling points located before and after the final action moment from the standard platinum resistance temperature sequence as interpolation inputs for the final action moment of the jump and rebound, respectively; determining the interpolation method based on the interpolation inputs and performing interpolation calculations to obtain the action temperature corresponding to the final action moment; The interpolation method includes at least one of linear interpolation and Newton interpolation.
8. The image recognition-based instantaneous temperature controller calibration method according to claim 7, characterized in that, The temperature sequence interpolation further includes: when the sensor corresponding to the standard platinum resistance temperature sequence has discrete temperature point correction values, the operating temperature is corrected based on the discrete temperature point correction values. The correction process includes interpolating the correction value to obtain the correction value corresponding to the final action time, and using the correction value to compensate for the action temperature.
9. The image recognition-based instantaneous temperature controller calibration method according to claim 1, characterized in that, The strategy for driving the fine-tuning screw to rotate includes: The rotation direction of the fine-tuning screw is determined based on the positive or negative value of the sudden temperature error or the rebound temperature error. The amount of rotation of the fine-tuning screw is determined based on the absolute value of the sudden temperature error or the rebound temperature error. The rotation amount satisfies at least one of the following strategies: setting corresponding rotation amounts in segments according to error amplitude, or estimating the sensitivity coefficient based on the previous rotation amount and temperature error change and updating the next rotation amount accordingly. Set over-adjustment prevention constraints, which include at least one of the following constraints: maximum number of rotations, maximum cumulative rotation amount, reduce rotation amount when the temperature error sign is reversed, and stop rotation and output an abnormal flag when the temperature error decreases below a threshold.
10. A calibration system for a snap-action temperature controller based on image recognition, characterized in that, The system includes: Temperature field execution unit, used to trigger the temperature controller in the temperature field; The image acquisition unit is used to acquire images of the reed's motion. Temperature acquisition unit, used to acquire standard platinum resistance temperature series; The switch quantity acquisition unit is used to acquire the on / off signals of contacts; The displacement candidate moment extraction unit is used to locate the reed area in the image and perform sub-pixel displacement measurement to obtain the displacement curve, so as to extract the displacement candidate moments of sudden jump and rebound. The candidate timing extraction unit for switching signals is used to debounce the on / off signals in order to extract the candidate timings of sudden jumps and bounces. The event energy candidate moment extraction unit is used to extract event energy candidate moments for sudden jumps and bounces from the inter-frame change energy sequence of the image; The action timing fusion unit is used to calculate the conflict degree between each candidate timing and suppress fusion to obtain the final action timing of the jump and the rebound. The action temperature determination unit is used to interpolate the temperature sequence at the final action moment to obtain the action temperatures of the sudden jump and the rebound. The temperature error calculation unit is used to compare the temperature of the sudden jump and the rebound action with the preset sudden jump standard value and the rebound standard value respectively to obtain the temperature error. The fine-tuning execution unit is used to drive the fine-tuning screw to rotate and trigger the next calibration cycle when the temperature error is greater than the set temperature threshold, until the temperature error is lower than the temperature threshold.