A relay pull-in self-learning method and circuit

By collecting the voltage values ​​at the front and rear ends of the relay conduction path, judging the pull-in conditions and calculating the time offset, the pull-in control signal is dynamically corrected, which solves the problem of unstable relay pull-in under AC power fluctuations, achieves low-voltage pull-in and improves system stability.

CN120497091BActive Publication Date: 2025-09-19SHENZHEN LUXUNTIANXIA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510985819.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-09-19
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

Existing technologies make it difficult to stably achieve low-voltage pickup control under AC fluctuations and mechanical structure changes, resulting in the relay frequently being attracted at high voltage, generating large surge currents, reducing the relay's service life and affecting system stability.

Method used

By collecting the voltage values ​​at the front and back ends of the relay conduction path, generating voltage change information, judging the pull-in conditions, calculating the time offset of the pull-in moment relative to the zero-crossing point of the AC power, and dynamically correcting the time when the pull-in control signal is issued, the relay is ensured to be pulled in closer to the zero-crossing point.

Benefits of technology

It effectively reduces inrush current, prolongs relay life, improves system stability, and improves the alignment accuracy between the closing moment and the AC zero-crossing point through self-learning and adaptive capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120497091B_ABST
    Figure CN120497091B_ABST
Patent Text Reader

Abstract

The present application relates to a relay closure self-learning method and circuit. A relay closure self-learning method includes collecting a front-end voltage value connected to the front end of the relay conduction path and a rear-end voltage value connected to the rear end of the relay conduction path to calculate and generate corresponding voltage change information, and judging whether the voltage change information meets the closure condition for determining that the relay has been closure; if the closure condition is met, the time offset of the current actual closure moment of the relay relative to the zero-crossing point of the alternating current is calculated according to the voltage change information; according to the time offset, the time when the relay's next closure control signal is sent is corrected in advance, so that the time difference between the next actual closure moment of the relay and the zero-crossing point of the alternating current meets the set offset threshold condition, thereby realizing real-time perception of the relay closure state, so that the relay is closure at a time closer to the zero-crossing point of the alternating current, effectively reducing the inrush current and extending the life of the relay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of relay self-learning, and in particular to a relay self-learning method and circuit. Background Art

[0002] At present, in power electronic systems, relays are widely used to switch loads and control the on and off of circuits. When the load controlled by the relay is a capacitive load, the voltage at the moment of its closure will directly determine the amplitude of the surge current. If the voltage across the two ends is high when closure is applied, it is easy to cause a severe charging current shock, which in turn causes premature aging or even damage to the relay contacts. In existing circuits, the relay is connected in series between the AC power supply and the filter capacitor. When the relay is closed, the capacitor begins to charge, and the size of the initial voltage jump determines the current shock intensity. Ideally, the relay should be closure at the zero-crossing point of the AC waveform, so that the capacitor starts charging from approximately 0V, thereby minimizing the shock current and increasing the service life of the relay.

[0003] Traditional solutions often use a preset fixed pull-in time and calculate the time to trigger the control signal in advance based on the AC waveform's zero-crossing point. However, this method relies on the relay having a constant pull-in response time, which is not true in actual applications. Because the relay's pull-in time is affected by factors such as mechanical structure, temperature, power supply voltage, and material aging, its pull-in response is uncertain. Even if the control signal is sent strictly according to the theoretical advance time, the actual pull-in time of the relay may still deviate from expectations, resulting in an inability to ensure that it always pulls in at the voltage zero-crossing point. Therefore, traditional solutions are difficult to effectively overcome the fluctuation problem of the relay's pull-in time, and subsequently cannot stably achieve low-voltage pull-in control, causing the relay to frequently pull in at high voltage, generating a large surge current, reducing the service life of the relay and affecting the stability of the system. Summary of the Invention

[0004] In order to solve the problem that traditional solutions are difficult to effectively overcome and stably achieve low-voltage pull-in control, which in turn leads to a reduction in the service life of electrical appliances, the present application provides a relay pull-in self-learning method and circuit.

[0005] A relay pickup self-learning method, the relay pickup self-learning method comprising:

[0006] When the relay receives the pull-in control signal, based on a preset sampling rule, it collects a front-end voltage value connected to the front end of the relay conduction path and a rear-end voltage value connected to the rear end of the relay conduction path to calculate and generate corresponding voltage change information, wherein the electrical nodes corresponding to the front-end voltage value and the rear-end voltage value are both located in the capacitive load circuit;

[0007] Determining whether the voltage change information meets a closure condition for determining that the relay has been closure;

[0008] If the pull-in condition is met, the time offset of the actual pull-in moment of the relay relative to the zero-crossing point of the AC power is calculated based on the voltage change information;

[0009] According to the time offset, the time when the relay's next closing control signal is sent is corrected in advance so that the time difference between the next actual closing time of the relay and the AC zero crossing point meets the set offset threshold condition.

[0010] By adopting the above technical solution, by collecting the voltage values ​​at both ends of the relay conduction path and combining the sampling rules to generate voltage change information, real-time perception of the relay's energized state is achieved, avoiding the error caused by relying on a fixed energizing time. The control moment can be dynamically calibrated, so that the relay can be energized at a time closer to the zero-crossing point of the AC power, effectively reducing the inrush current and extending the relay's life.

[0011] Preferably, the step of generating the preset sampling rule includes:

[0012] Get the component model of the relay;

[0013] Determine the corresponding rated pull-in time according to the component model;

[0014] Determine the corresponding sampling duration and sampling interval according to the rated pull-in time;

[0015] A preset sampling rule is generated according to the sampling duration and the sampling interval.

[0016] By adopting the above technical solution and introducing the relay component model as a basis, the matching sampling duration and sampling interval are dynamically generated, so that the sampling rules are matched with the physical response characteristics of the relay, the accuracy and effectiveness of voltage acquisition are improved, thereby enhancing the accuracy of the attraction behavior recognition and the adaptability of the system.

[0017] Preferably, the step of collecting the front-end voltage value connected to the front end of the relay conduction path and the rear-end voltage value connected to the rear end of the relay conduction path based on a preset sampling rule to calculate and generate corresponding voltage change information includes:

[0018] Based on a preset sampling rule, a front-end voltage value connected to the front end of the relay conduction path and a rear-end voltage value connected to the rear end of the relay conduction path are collected;

[0019] Subtract the front-end voltage value and the back-end voltage value at the current moment to generate a corresponding voltage difference, and record the duration of the voltage difference;

[0020] The voltage difference and the duration are subjected to data conversion processing, and are stored in RAM according to a preset storage rule to generate corresponding voltage change information.

[0021] By adopting the above technical solution, the difference between the front-end voltage and the back-end voltage is calculated and the continuity is judged during the sampling process, and it is converted into structured data for storage, making the voltage change process calculable and traceable, and improving the reliability of the basic data for subsequent pull-in judgment and time offset calculation.

[0022] Preferably, the step of determining whether the voltage change information meets the energizing condition for determining that the relay has been energized includes:

[0023] Determining preset pull-in conditions, wherein the pull-in conditions at least include a voltage difference condition and a duration condition;

[0024] determining whether the voltage difference in the voltage change information is less than a difference threshold in the voltage difference condition;

[0025] If the voltage difference is less than the difference threshold in the voltage difference condition, determining whether the duration corresponding to the voltage difference is greater than the duration threshold in the duration condition;

[0026] If it is greater than the duration threshold in the duration condition, it is determined that the voltage change information meets the pull-in condition.

[0027] By adopting the above technical solution, the pull-in judgment logic combines the two conditions of voltage difference threshold and duration threshold to ensure that the pull-in identification has multi-dimensional judgment criteria, which can accurately distinguish transient disturbances from real pull-in behavior, reduce the probability of misjudgment, and improve the stability and robustness of pull-in identification.

[0028] Preferably, if the pull-in condition is met, the step of calculating the time offset of the current actual pull-in moment of the relay relative to the zero-crossing point of the alternating current according to the voltage change information includes:

[0029] If the pull-in condition is met, the front-end voltage value at the current moment is determined as the target voltage value Vx;

[0030] Calculating a corresponding first AC phase angle based on a sinusoidal function relationship between the target voltage value Vx and the periodic characteristics and amplitude of the AC voltage;

[0031] The corresponding time offset tx is calculated according to the time relationship between the first alternating current phase angle and the alternating current zero-crossing point.

[0032] By adopting the above technical solution, after the attraction is completed, the front-end voltage value at the attraction moment is recorded and the phase angle is calculated based on the sinusoidal wave function relationship, and then converted into a time offset from the zero-crossing point, so that the control system has the ability to obtain the actual attraction offset, providing an accurate correction basis for the subsequent attraction control strategy.

[0033] Preferably, the step of correcting in advance the time at which the next closing control signal of the relay is sent out according to the time offset includes:

[0034] Recalling the time offset tx stored in the non-volatile memory;

[0035] Determine the initial time t0 of the relay's pull-in control signal;

[0036] The time offset tx is subtracted from the initial time t0 of the pull-in control signal to calculate the time when the relay sends the next pull-in control signal as t0-tx.

[0037] By adopting the above technical solution, the calculated pull-in time offset is compared and corrected with the next control moment, realizing closed-loop optimization of the pull-in control logic. It is combined with non-volatile memory for persistent storage, so that the system can still maintain the self-learning results of the pull-in strategy after power failure and restart, thereby enhancing the continuity and intelligence of the control strategy.

[0038] Preferably, the step of subtracting the time offset tx from the initial time t0 of the pull-in control signal to calculate the time t0-tx at which the relay sends the next pull-in control signal includes:

[0039] Determining whether the rear-end voltage value is zero;

[0040] If the rear-end voltage value is not zero, the time offset tx is subtracted from the initial time t0 of the pull-in control signal to calculate the time when the relay sends the next pull-in control signal as t0-tx;

[0041] If the rear-end voltage value is zero, the corresponding time correction value ty is calculated based on the rear-end voltage value, and the difference between the initial time t0 of the pull-in control signal and the time offset tx is added to the time correction value ty to calculate the time when the relay sends the next pull-in control signal as t0-tx+ty.

[0042] By adopting the above technical solution, the back-end voltage judgment logic is introduced before the control correction moment to ensure that the control correction is not only based on the front-end offset, but also takes into account the back-end voltage status. If the back-end voltage is not zero, the control output is further corrected by calculating the compensation time to minimize the voltage difference between the two ends of the relay at the moment of closure, thereby further suppressing the inrush current.

[0043] Preferably, the step of calculating the corresponding time correction amount ty according to the rear-end voltage value includes:

[0044] Calculating a corresponding second AC phase angle based on a sinusoidal function relationship between the rear-end voltage value and the periodic characteristics and amplitude of the AC voltage;

[0045] The time correction amount ty is determined according to the time relationship between the second AC phase angle and the AC zero-crossing point.

[0046] By adopting the above technical solution, the corresponding phase angle is calculated based on the relationship between the initial voltage at the back end and the sine wave, and then converted into a time compensation value, so that the control system can quantify the offset time corresponding to the residual voltage at the back end, achieve more accurate matching of the pull-in moment, and improve the control strategy's adaptability to complex initial voltage conditions.

[0047] A relay pull-in self-learning circuit uses a relay pull-in self-learning method, wherein the relay pull-in self-learning circuit includes an alternating current power supply AC, a first capacitor C1, a second capacitor C4, a relay K1, a resistor R1, a resistor R2, and a main control chip MCU;

[0048] The AC power supply AC, the first capacitor C1 and the second capacitor C4 are connected in parallel to form two capacitive load loops located at the front and rear ends of the relay K1;

[0049] The front end of the relay K1 is connected to the first end of the first capacitor C1, the second end of the first capacitor C1 is grounded, the common node between the front end of the relay K1 and the first end of the first capacitor C1 is connected to the first end of the resistor R1, and the second end of the resistor R1 is connected to the first digital-to-analog conversion signal input terminal of the main control chip MCU;

[0050] The rear end of the relay K1 is connected to the first end of the second capacitor C4, the second end of the second capacitor C4 is grounded, the common node between the rear end of the relay K1 and the first end of the second capacitor C4 is connected to the first end of the resistor R2, and the second end of the resistor R2 is connected to the second digital-to-analog conversion signal input terminal of the main control chip MCU;

[0051] The controlled end of the relay K1 is connected to the enable signal output end of the main control chip MCU.

[0052] By adopting the above technical solution, a complete closed-loop path of voltage acquisition, attraction control and correction processing is established, which can support the implementation of the attraction self-learning method at the hardware level and has good signal acquisition capabilities and control response foundation.

[0053] Preferably, the main control chip includes:

[0054] RAM memory, used to store voltage change information;

[0055] FLASH memory, used to store time offset.

[0056] By adopting the above technical solution, voltage information and offset are partitioned and stored in RAM and FLASH, achieving functional decoupling of temporary operation data and persistent control parameters, which helps to improve data processing efficiency and learning continuity at system startup, and provides reliable storage support for the entire pull-in control.

[0057] In summary, this application includes at least one of the following beneficial technical effects:

[0058] After the relay receives the pull-in control signal, the present application does not simply rely on the set delay time to infer the pull-in moment, but instead uses a preset sampling rule to collect the voltage at the front and back ends of the relay conduction path in real time, and judges whether the relay has actually completed the pull-in based on the voltage change. It can accurately identify the actual pull-in behavior of the relay under different environmental conditions and aging conditions, and further infer the offset of the moment relative to the zero-crossing point of the AC voltage through the voltage data at the moment of pull-in, thereby realizing dynamic correction of the subsequent pull-in control moment; it abandons the problem of fixed lead time and unverifiable pull-in timing in traditional control, and instead obtains the offset through the actual pull-in behavior in reverse, realizing the self-learning and self-adaptive ability of the pull-in control. It improves the alignment accuracy of the relay pull-in moment and the zero-crossing point of the AC voltage, effectively reduces the voltage difference between the two ends at the moment of pull-in, thereby reducing the impact current caused by the capacitive load, delaying the wear of the relay contacts, and improving the system stability and the service life of the relay. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a flow chart of a relay energization self-learning method in one embodiment of the present application.

[0060] Figure 2 This is a partial circuit structure diagram of a relay pull-in self-learning circuit in one embodiment of the present application. DETAILED DESCRIPTION

[0061] The present application is further described in detail below with reference to the accompanying drawings.

[0062] In one embodiment, if Figure 1 As shown, the present application discloses a relay pull-in self-learning method, a relay pull-in self-learning method comprising:

[0063] S10. After receiving the energizing control signal, the relay collects the front-end voltage value connected to the front end of the relay's conductive path and the rear-end voltage value connected to the rear end of the relay's conductive path based on a preset sampling rule to calculate and generate corresponding voltage change information. The electrical nodes corresponding to the front-end voltage value and the rear-end voltage value are both located in the capacitive load circuit. The relay energizing control signal is a control instruction used to drive the relay from the off state to the on state. It is usually issued by the control system according to specific logic to control the energization of the relay coil and thus achieve contact closure. The preset sampling rule is a combination of a sampling duration and a sampling interval set by the control system based on parameters such as the relay model and voltage variation characteristics before collecting voltage data. It is used to guide the voltage sampling operation to obtain voltage data that sufficiently reflects the relay energizing process. The front-end voltage value connected to the front end of the relay's conductive path refers to the voltage value of the part of the relay's input side connected to the power supply before the relay is energized. This value can reflect the AC waveform voltage state of the relay before energizing. The voltage at the rear end of the relay's conduction path refers to the voltage at the connection between the relay's output and the load circuit. It is typically used to determine the initial potential at the load end and whether the voltage difference between the two ends converges after the relay is closed. Voltage variation information is a data set formed by sampling the front-end and rear-end voltage values ​​over time. It reflects the temporal evolution of the voltage difference between the front and rear ends of the relay control circuit and serves as the basis for determining the pull-in state and calculating the offset time.

[0064] S20. Determine whether the voltage change information meets the closure conditions used to confirm that the relay has closed. The closure conditions are the logical rules used to determine whether the relay has actually closed. These typically include criteria such as whether the voltage difference has dropped below a certain threshold and whether this state persists for a certain period of time. This is to prevent instantaneous fluctuations from being mistakenly identified as closure. The actual closure moment refers to the specific time at which the relay contacts physically close, completing the circuit. This moment is determined indirectly by the system through sampled data.

[0065] S30. If the pickup conditions are met, the time offset of the relay's current actual pickup moment relative to the AC zero crossing is calculated based on the voltage change information. The AC zero crossing refers to the point in time when the voltage value of the AC voltage waveform reaches zero during the alternating positive and negative half-cycles. This is the ideal target point for achieving low-voltage pickup and reducing inrush current. The time offset is the time difference between the pickup moment and the most recent AC zero crossing. This value can be used to calibrate the control strategy to ensure that the pickup timing is closer to the zero crossing.

[0066] S40. Based on the time offset, the time at which the relay's next energizing control signal is sent is corrected in advance, so that the time difference between the relay's next actual energizing moment and the AC zero crossing point satisfies the set offset threshold condition. The early correction refers to adjusting the time at which the control signal is sent forward based on the time offset, so that the physical action of the relay energizing is as synchronized as possible with the voltage zero crossing point. The time at which the energizing control signal is sent is the planned time point at which the control system outputs the drive signal and prepares to energize the relay. Adjustment of the time directly affects the time matching accuracy of the actual energizing moment.

[0067] In the present embodiment, in order to achieve the time alignment between the relay closure moment and the AC voltage zero crossing, the system sets an offset threshold condition for judging whether the current closure control strategy meets the control target of zero crossing closure. The offset threshold condition is a preset time tolerance range, which represents the maximum time error allowed between the relay closure moment and the AC voltage zero crossing. Preferably, the offset threshold condition can be set to a symmetrical time window less than half a cycle, such as ±0.5 milliseconds, according to the power frequency cycle characteristics of the alternating current. The specific numerical value can be configured according to the relay closure time fluctuation range, the grid frequency stability and the load characteristics. After calculating the current closure moment offset tx, the system judges whether the offset falls within the range defined by the offset threshold condition. If it meets the requirements, it is considered that the current closure control strategy is effective, and the relay can complete closure at the approximate zero crossing, thereby achieving the technical effect of reducing the inrush current.

[0068] Specifically, for example, during a certain operating cycle, after the system detects that the relay receives a pull-in control signal, it samples and obtains a voltage value V1 at the front end of its conduction path of 50V, a voltage value V4 at the rear end close to 0V, and the voltage difference between the two remains below the set threshold for more than 1ms. The system then determines that the relay has completed pull-in. At this point, the system uses the front end voltage value of 50V at the moment of pull-in as the target voltage value Vx, and calculates the phase angle corresponding to this voltage value based on the functional relationship between the amplitude and phase angle of the AC sine wave. It then calculates the time difference between this phase angle and the voltage zero crossing point based on the power frequency AC cycle, concluding that the pull-in behavior deviates from the zero crossing point by approximately 0.5ms. The system records this offset as tx and stores it in non-volatile memory for subsequent control. The next time the relay is controlled to close, the system will advance the issuance of the closing control signal by 0.5ms, that is, it will perform correction control by subtracting tx from the original planned time t0, so that the moment the relay actually completes closing is closer to the zero-crossing point of the AC voltage, thereby effectively reducing the voltage difference at the closing moment, reducing the inrush current, and improving the service life of the relay and the stability of the system operation.

[0069] In one embodiment, step S10, i.e., the step of generating a preset sampling rule, includes:

[0070] S1011. Obtain the component model of the relay; the component model refers to the model number or type information used to identify the type, structure, performance parameters and other characteristics of the relay product. It is usually defined by the manufacturer and recorded in the relay product label or technical manual. Different models of relays differ in structural design, response speed, and attraction characteristics. This information can be used to identify the expected action behavior of the relay and adapt the control strategy.

[0071] S1012. Determine the corresponding rated pull-in time based on the component model. The rated pull-in time refers to the typical time range required for a relay to receive a drive signal and physically close its contacts under standard operating conditions, as set by the manufacturer for a certain model of relay. It is a nominal reference for the dynamic response speed of the relay and is used to provide a time base for sampling and control logic.

[0072] S1013. Determine the corresponding sampling duration and sampling interval based on the rated pull-in time. The rated pull-in time refers to the typical time range required for a relay to receive a drive signal and physically close its contacts under standard operating conditions, as set by the manufacturer for a certain model of relay. It is a nominal reference for the dynamic response speed of the relay and is used to provide a time base for sampling and control logic.

[0073] S1014: Generate a preset sampling rule according to the sampling duration and sampling interval.

[0074] In one embodiment, in step S10, i.e., based on a preset sampling rule, collecting a front-end voltage value connected to the front end of the relay conduction path and a rear-end voltage value connected to the rear end of the relay conduction path to calculate and generate corresponding voltage change information, the following steps are included:

[0075] S1021. Based on preset sampling rules, collect the front-end voltage value connected to the front end of the relay's conduction path and the back-end voltage value connected to the back end of the relay's conduction path. The voltage difference refers to the instantaneous numerical difference between the voltage values ​​at the front end and the voltage values ​​at the back end of the relay's conduction path. It is used to reflect whether there is a significant potential difference between the two ends of the relay before it is fully closed. This difference is usually large before the relay is closed and approaches zero after it is fully closed. Therefore, it can be used as a basis for determining the physical closed state of the relay. The current moment refers to the specific time point at which each sampling occurs. The system gradually advances the sampling process through sampling intervals. Each sampling point corresponds to a current moment, which is used to form a record of the voltage difference over time in conjunction with the voltage data. The duration refers to the length of time that the voltage difference continuously remains within a certain numerical condition range. This indicator can be used to eliminate instantaneous noise or short-term disturbances, ensuring that the system only determines that the relay has been closed after the voltage difference has steadily decreased to the closing threshold and remained there for a certain period of time.

[0076] S1022. Subtract the front-end voltage value from the back-end voltage value at the current moment to generate the corresponding voltage difference, and record the duration of the voltage difference. The current moment refers to the specific time point at which each sampling occurs. The system gradually advances the sampling process through the sampling interval. Each sampling point corresponds to a current moment, which is used to form a record of the voltage difference over time in conjunction with the voltage data. The duration refers to the length of time that the voltage difference continuously remains within a certain numerical condition. This indicator can be used to eliminate transient noise or short-term disturbances, ensuring that the system only determines that the relay has been closed after the voltage difference has steadily dropped to the closing threshold and remained there for a certain period of time.

[0077] S1023. Perform data conversion processing on the voltage difference and duration, and store them in RAM according to the preset storage rules to generate corresponding voltage change information; data conversion processing refers to the system formatting, quantizing, encoding and other processing of the collected original analog signal or preliminary calculation results to make them meet the system's internal operation or storage requirements, and facilitate subsequent logical judgment and timing analysis. The preset storage rules refer to the data writing logic pre-set during the system design phase, including data writing location, storage order, overwriting method, etc., which are used to ensure that continuous voltage differences and their corresponding time can be stored in the memory in an orderly and reliable manner. RAM storage refers to writing the sampled voltage difference and its corresponding time information into the system's random access memory, and saving them as temporary working data for immediate call by the pull-in judgment and time offset calculation modules.

[0078] In one embodiment, in step S20, i.e., the step of determining whether the voltage change information meets the energizing condition for determining that the relay has been energized, the following steps are included:

[0079] S201. Determine the preset pull-in conditions, which include at least voltage difference conditions and duration conditions. The preset pull-in conditions refer to a set of criteria that are pre-set during the system design phase and are used to determine whether the relay has completed the pull-in state. They are usually set in combination with physical response characteristics and electrical change laws, with the purpose of establishing a reliable mapping between the key indicators in the voltage change information and the pull-in state of the relay. The voltage difference condition is one of the pull-in conditions, which means that when the system determines whether to pull in, it needs to pay attention to whether the difference between the front-end and rear-end voltages is lower than the set threshold. This condition is used to exclude situations where the pull-in is not completed or the voltage fluctuation is still significant. The duration condition is another pull-in condition, which requires that the voltage difference must maintain this state for more than a certain minimum time after reaching the set range. This setting is used to prevent the system from misjudging the completion of the pull-in due to transient disturbances or occasional data jumps.

[0080] S202. Determine whether the voltage difference in the voltage change information is less than the difference threshold in the voltage difference condition. The difference threshold is the core parameter in the voltage difference condition, which is used to define the numerical limit below which the voltage difference needs to be lower than. It is usually set according to the characteristics of the relay and the system sensitivity, and is the judgment baseline for the attraction judgment.

[0081] S203. If it is less than the difference threshold in the voltage difference condition, determine whether the duration corresponding to the voltage difference is greater than the duration threshold in the duration condition; the duration threshold is a key parameter in the duration condition, which is used to set the minimum time length for the voltage difference to continuously meet the difference threshold condition. This time value ensures that the system has a certain stability and reliability in judging the attraction state.

[0082] S204: If the voltage change information is greater than the duration threshold in the duration condition, it is determined that the voltage change information meets the pull-in condition.

[0083] Specifically, the pull-in condition is set to a voltage difference of less than 2V and lasting for more than 1ms. During a relay control process, the system detected a gradual decrease in the voltage difference between the front and rear ends from 3V, ultimately reaching 1.2V at a certain sampling point, and then remaining below 1.2V for the next six sampling periods, a total of 1.2ms. Because the voltage difference was below the difference threshold of 2V and lasted longer than the duration threshold of 1ms, the system confirmed that the pull-in condition had been met and further performed offset calculation and control signal correction operations.

[0084] In one embodiment, in step S30, that is, if the pick-up condition is met, the step of calculating the time offset of the actual pick-up moment of the relay relative to the zero-crossing point of the AC power based on the voltage change information includes:

[0085] S301. If the closing conditions are met, the front-end voltage value at the current moment is determined as the target voltage value Vx. The target voltage value Vx refers to the front-end voltage value recorded at the closing moment after the system detects that the relay has completed closing. This value reflects the AC voltage position at the actual closing moment of the relay and is the direct basis for the subsequent calculation of the time offset relative to the AC zero-crossing point.

[0086] S302. Calculate the corresponding first AC phase angle based on the sinusoidal relationship between the target voltage value Vx and the AC voltage's periodic characteristics and amplitude. The AC voltage's periodic characteristics refer to the periodic variation of AC voltage per unit time, typically changing as a sinusoidal waveform at a frequency of 50 Hz or 60 Hz. This periodic characteristic determines the phase position of any voltage value on the waveform and its corresponding time relationship with the zero crossing point. The amplitude refers to the maximum absolute value of the AC voltage waveform, or the peak voltage of the sine wave. It is used to normalize the actual sampled voltage value, thereby converting any voltage value into a ratio within the unit sine function interval, facilitating subsequent calculation of the phase angle using the inverse sine function. The sinusoidal relationship is the mathematical expression of the relationship between voltage and time. Under ideal AC conditions, the change in voltage over time can be expressed as a sinusoidal function. This relationship is the mathematical tool for converting the target voltage value into a phase angle. The first AC phase angle refers to the angular position of the target voltage value within the standard sine wave period, typically expressed in radians or degrees. It describes the position of the voltage point from the waveform's zero crossing point, and the time difference is then converted using the relationship between this angle and frequency.

[0087] S303. Calculate the corresponding time offset tx based on the time relationship between the first AC phase angle and the AC zero-crossing point. After the relay is determined to have completed closure, the system records the front-end voltage value Vx at the moment of closure. Since this voltage value lies on the AC voltage sinusoidal wave cycle curve, it can be mapped to a phase angle θ, i.e., the first AC phase angle, using a sine function. This phase angle represents the position of the current voltage point in the AC cycle and is the angle measured to the right from the starting point of the sine wave (i.e., the voltage zero-crossing point). Assuming the AC voltage is a standard single-phase sinusoidal wave, its mathematical expression is V(t) = Vp × sin(ωt), where Vp is the peak voltage, ω is the angular frequency, equal to 2πf, and f is the AC frequency.

[0088] Divide the actual sampled Vx by Vp to obtain its normalized value on the unit sine wave, that is, sin(θ) = Vx / Vp. The corresponding angle θ is then calculated using the inverse sine function. Next, based on the relationship between angular frequency and angle, this angle θ is converted to the corresponding time, that is, tx = θ / ω, where ω = 2πf. This tx is the time offset of the current relay closure moment relative to the AC voltage zero crossing point. This time difference is used to subsequently correct the timing of the relay control signal to achieve timing alignment between the relay closure behavior and the AC voltage zero crossing point, thereby reducing the closure shock.

[0089] For example, the system detects that Vx = 50V when the relay is closed. Given the AC peak voltage Vp = 311V and the frequency f = 50Hz, the system calculates sin(θ) = 50 / 311 ≈ 0.1608, which corresponds to θ ≈ arcsin(0.1608) ≈ 0.1615 radians. The angular frequency ω = 2π × 50 ≈ 314.16 rad / s, resulting in a time offset tx = θ / ω ≈ 0.1615 / 314.16 ≈ 0.514ms. Ultimately, the system determines that the relay's closing behavior deviates from the zero crossing point by approximately 0.514ms and modifies the control logic accordingly.

[0090] In one embodiment, in step S40, i.e., the step of correcting in advance the time at which the next relay closing control signal is sent according to the time offset, the step includes:

[0091] S401. Recall the time offset tx stored in non-volatile memory. Non-volatile memory, also known as FLASH memory, is a storage medium that retains stored data after a system power outage or reset. Compared to volatile memory, its most significant feature is data persistence, making it suitable for storing long-term control parameters or calibration information. This memory records the time offset during the relay's self-learning process, allowing the system to recall historical closing experience at each power-up without the need for relearning, thereby improving control consistency and response efficiency.

[0092] S402. Determine the initial time t0 of the relay's closing control signal. The initial time t0 of the closing control signal is the original reference time point when the system plans to send a control signal to drive the relay to close. It is usually aligned with the zero crossing point of the AC voltage or has a fixed offset relative to the zero crossing point. It is a reference point in the system control process.

[0093] S403. Subtract the time offset tx from the initial time t0 of the pull-in control signal to calculate the time when the relay sends the next pull-in control signal as t0-tx; the time when the relay sends the next pull-in control signal refers to the control signal output time actually used by the system to trigger the relay after the pull-in control strategy is corrected. This time point is the result of subtracting or adjusting the time offset tx on the basis of the initial time t0. The purpose is to synchronize the actual pull-in behavior of the relay to the zero-crossing point of the AC voltage as much as possible to improve the control accuracy.

[0094] In one embodiment, in step S403, the step of subtracting the time offset tx from the initial time t0 of the pull-in control signal to calculate the time t0-tx at which the relay sends the next pull-in control signal includes:

[0095] S4031, determine whether the rear-end voltage value is zero;

[0096] S4032: If the rear-end voltage value is not zero, subtract the time offset tx from the initial time t0 of the pull-in control signal to calculate the time when the relay sends the next pull-in control signal as t0-tx;

[0097] S4033. If the rear-end voltage value is zero, calculate the corresponding time correction value ty based on the rear-end voltage value, and add the difference between the initial time t0 of the pull-in control signal and the time offset tx to the time correction value ty to calculate the time when the relay sends the next pull-in control signal as t0-tx+ty.

[0098] In one embodiment, step S4033, i.e., the step of calculating the corresponding time correction value ty according to the rear-end voltage value, includes:

[0099] S40331. Calculate a corresponding second AC phase angle based on a sinusoidal function relationship between the rear-end voltage value and the periodic characteristics and amplitude of the AC voltage;

[0100] S40332. Determine a time correction amount ty based on a time relationship between the second AC phase angle and the AC zero-crossing point.

[0101] Specifically, when the initial moment t0 of the relay's pull-in control signal and the calculated time offset tx are known, the system first determines whether the rear-end voltage value obtained by the current sampling is zero. If the rear-end voltage value is not zero, it indicates that there is a certain charge in the capacitor at the rear end of the relay conduction path, that is, it has a certain voltage. At this time, it can be considered that the voltage change at this end will not jump drastically after the relay is pulled in. Therefore, the system directly subtracts tx from t0 to determine the time when the next pull-in control signal is sent in advance as t0-tx. However, if the judgment result is that the rear-end voltage value is zero, it means that the capacitor is in the initial discharge state. After the relay is pulled in, the voltage at this end will quickly rise from 0V to the amplitude corresponding to the front-end voltage, thereby causing a large charging current shock. To avoid this situation, the system needs to further calculate the AC waveform phase of the capacitor at this time based on its electrical characteristics according to the state of the rear-end voltage value being zero.

[0102] Specifically, the system uses a table lookup or formula calculation method to determine the second AC phase angle corresponding to the voltage value based on the relationship between the back-end voltage value and the standard sine wave amplitude in the current AC cycle. This is the angle that the AC voltage passes through from the zero-crossing point to the voltage amplitude, and then converts this angle into a specific amount of time as the time correction value ty. Since the AC power is a standard 50Hz sine wave with a period of 20ms, the system can convert the phase angle proportionally into the corresponding time value. For example, under 50Hz AC conditions, a complete cycle is 360 degrees, corresponding to 20ms. If the back-end voltage value is half of the peak value, the corresponding phase angle is 30 degrees, and the converted ty is approximately 1.67ms. The system adds this ty to the aforementioned t0-tx basic time point, and finally corrects the time when the relay sends the next closure control signal to t0-tx+ty, thereby effectively compensating for the actual closure timing offset problem that may be caused by the initial voltage being zero, ensuring that the relay can be closure closer to the zero-crossing point of the AC power in the next cycle, reducing the inrush current, and improving the safety and stability of the overall system operation.

[0103] More specifically, the calculation of tx is derived based on the relationship between the front-end voltage value Vx and the AC waveform, assuming an ideal condition where the rear-end voltage value is zero. In actual applications, if there is a capacitive load at the rear end of the relay conduction path, and the initial voltage of this capacitive load is not zero before the relay is closed, this rear-end voltage will offset the voltage difference judgment at the moment of closing, thereby affecting the physical meaning of the recorded Vx. To this end, the system further determines whether the rear-end voltage value is zero based on the above. If the rear-end voltage is not zero, it calculates an additional time compensation value ty based on the corresponding relationship between the initial voltage value and the AC sine wave, and corrects the original control time to t0 - tx + ty, thereby further reducing the voltage difference at the moment of relay closing, improving control accuracy and relay life.

[0104] like Figure 2 As shown, a relay pull-in self-learning circuit uses a relay pull-in self-learning method, and a relay pull-in self-learning circuit includes an AC power supply AC, a first capacitor C1, a second capacitor C4, a relay K1, a resistor R1, a resistor R2 and a main control chip MCU;

[0105] The alternating current power source AC, the first capacitor C1 and the second capacitor C4 are connected in parallel to form two capacitive load loops located at the front and rear ends of the relay K1;

[0106] The front end of the relay K1 is connected to the first end of the first capacitor C1, the second end of the first capacitor C1 is grounded, the common node between the front end of the relay K1 and the first end of the first capacitor C1 is connected to the first end of the resistor R1, and the second end of the resistor R1 is connected to the first digital-to-analog conversion signal input terminal of the main control chip MCU;

[0107] The rear end of the relay K1 is connected to the first end of the second capacitor C4, the second end of the second capacitor C4 is grounded, the common node between the rear end of the relay K1 and the first end of the second capacitor C4 is connected to the first end of the resistor R2, and the second end of the resistor R2 is connected to the second digital-to-analog conversion signal input terminal of the main control chip MCU;

[0108] The controlled end of the relay K1 is connected to the enable signal output end of the main control chip MCU.

[0109] Specifically, the AC power source (AC) provides a standard sinusoidal voltage signal to power the entire capacitive load circuit. A first capacitor (C1) and a second capacitor (C4) are located at the front and rear ends of relay K1, respectively, connected in parallel with the AC power source (AC) to form two capacitive branches. This structure connects the front and rear ends of relay K1's conduction path to their respective capacitive circuits, simulating the actual operating environment of a relay in a capacitive load application.

[0110] The front end of relay K1 is connected to the first end of first capacitor C1, and the second end of first capacitor C1 is directly grounded, forming a basic capacitive branch. The common node between the front end of relay K1 and the first end of first capacitor C1 not only forms the voltage sampling point of the front-end branch, but is also further electrically connected to the first end of resistor R1. After current limiting by resistor R1, its second end is connected to the first digital-to-analog conversion signal input terminal of the main control chip MCU, used to transmit the voltage signal on this front-end branch to the MCU for analog signal acquisition and digital conversion.

[0111] Similarly, the rear end of relay K1 is connected to the first end of second capacitor C4, and the second end of second capacitor C4 is also directly grounded, forming a capacitive branch at the rear end. The common node between the rear end of relay K1 and the first end of second capacitor C4 is connected to the first end of resistor R2. After current limiting by resistor R2, its second end is connected to the second digital-to-analog conversion signal input of the main control chip MCU, thereby achieving synchronous sampling of the rear end voltage signal. This two-terminal voltage acquisition structural design ensures that the MCU can accurately obtain the instantaneous voltage changes at both ends before and after the relay is turned on and off. By calculating the voltage difference and its duration, it can generate voltage change information, providing a basis for subsequent judgment of whether the pull-in is successful and for correcting the pull-in timing.

[0112] Furthermore, the controlled end of relay K1 is connected to the enable signal output of the main control chip MCU via a signal. The MCU can autonomously adjust the timing of the pull-in control signal based on the current sampling and analysis results, implementing closed-loop self-learning logic. The MCU's internal RAM is used to temporarily store real-time voltage change data, while the FLASH is used to long-term record the time offset of the pull-in time relative to the zero-crossing point. By continuously adjusting the timing of the pull-in control signal, the relay can actually close as close to the zero-crossing point of the AC power as possible, reducing inrush current and improving the relay's reliability and service life. The overall circuit structure is compact and the sampling path is clear, fully supporting the dynamic self-learning process of the relay's pull-in timing.

[0113] In one embodiment, the main control chip includes:

[0114] RAM memory, used to store voltage change information;

[0115] FLASH memory, used to store time offset.

[0116] Specifically, by partitioning the voltage information and offset storage in RAM and FLASH, the functional decoupling of temporary operation data and persistent control parameters is achieved, which helps to improve data processing efficiency and learning continuity at system startup, and provides reliable storage support for the entire pull-in control.

[0117] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A relay pickup self-learning method, characterized in that: The relay pickup self-learning method comprises: When the relay receives the pull-in control signal, based on a preset sampling rule, it collects a front-end voltage value connected to the front end of the relay conduction path and a rear-end voltage value connected to the rear end of the relay conduction path to calculate and generate corresponding voltage change information, wherein the electrical nodes corresponding to the front-end voltage value and the rear-end voltage value are both located in the capacitive load circuit; Determining whether the voltage change information meets a closure condition for determining that the relay has been closure; If the pull-in condition is met, the time offset of the actual pull-in moment of the relay relative to the zero-crossing point of the AC power is calculated based on the voltage change information; According to the time offset, the time when the relay's next closing control signal is sent is corrected in advance so that the time difference between the next actual closing time of the relay and the AC zero crossing point meets the set offset threshold condition; The step of collecting the front-end voltage value connected to the front end of the relay conduction path and the rear-end voltage value connected to the rear end of the relay conduction path based on a preset sampling rule to calculate and generate corresponding voltage change information includes: Based on a preset sampling rule, a front-end voltage value connected to the front end of the relay conduction path and a rear-end voltage value connected to the rear end of the relay conduction path are collected; Subtract the front-end voltage value and the back-end voltage value at the current moment to generate a corresponding voltage difference, and record the duration of the voltage difference; Performing data conversion processing on the voltage difference and the duration, and storing them in RAM according to a preset storage rule to generate corresponding voltage change information; If the pull-in condition is met, the step of calculating the time offset of the actual pull-in moment of the relay relative to the zero-crossing point of the AC power according to the voltage change information includes: If the pull-in condition is met, the front-end voltage value at the current moment is determined as the target voltage value Vx; Calculating a corresponding first AC phase angle based on a sinusoidal function relationship between the target voltage value Vx and the periodic characteristics and amplitude of the AC voltage; The corresponding time offset tx is calculated according to the time relationship between the first alternating current phase angle and the alternating current zero-crossing point.

2. A relay pickup self-learning method according to claim 1, characterized in that: The step of generating the preset sampling rule includes: Get the component model of the relay; Determine the corresponding rated pull-in time according to the component model; Determine the corresponding sampling duration and sampling interval according to the rated pull-in time; A preset sampling rule is generated according to the sampling duration and the sampling interval.

3. A relay pickup self-learning method according to claim 1, characterized in that: The step of determining whether the voltage change information meets the energizing condition for determining that the relay has been energized includes: Determining preset pull-in conditions, wherein the pull-in conditions at least include a voltage difference condition and a duration condition; determining whether the voltage difference in the voltage change information is less than a difference threshold in the voltage difference condition; If the voltage difference is less than the difference threshold in the voltage difference condition, determining whether the duration corresponding to the voltage difference is greater than the duration threshold in the duration condition; If it is greater than the duration threshold in the duration condition, it is determined that the voltage change information meets the pull-in condition.

4. A relay pickup self-learning method according to claim 1, characterized in that: The step of correcting in advance the time at which the next closing control signal of the relay is sent out according to the time offset includes: Recalling the time offset tx stored in the non-volatile memory; Determine the initial time t0 of the relay's pull-in control signal; The time offset tx is subtracted from the initial time t0 of the pull-in control signal to calculate the time when the relay sends the next pull-in control signal as t0-tx.

5. A relay pickup self-learning method according to claim 4, characterized in that: The step of subtracting the time offset tx from the initial time t0 of the pull-in control signal to calculate the time t0-tx at which the relay sends the next pull-in control signal includes: Determining whether the rear-end voltage value is zero; If the rear-end voltage value is not zero, the time offset tx is subtracted from the initial time t0 of the pull-in control signal to calculate the time when the relay sends the next pull-in control signal as t0-tx; If the rear-end voltage value is zero, the corresponding time correction value ty is calculated based on the rear-end voltage value, and the difference between the initial time t0 of the pull-in control signal and the time offset tx is added to the time correction value ty to calculate the time when the relay sends the next pull-in control signal as t0-tx+ty.

6. A relay pickup self-learning method according to claim 5, characterized in that: The step of calculating the corresponding time correction value ty according to the rear-end voltage value includes: Calculating a corresponding second AC phase angle based on a sinusoidal function relationship between the rear-end voltage value and the periodic characteristics and amplitude of the AC voltage; The time correction amount ty is determined according to the time relationship between the second AC phase angle and the AC zero-crossing point.

7. A relay pull-in self-learning circuit, characterized in that: A relay pull-in self-learning method according to any one of claims 1 to 6 is used, wherein the relay pull-in self-learning circuit includes an alternating current power supply AC, a first capacitor C1, a second capacitor C4, a relay K1, a resistor R1, a resistor R2, and a main control chip MCU; The AC power supply AC, the first capacitor C1 and the second capacitor C4 are connected in parallel to form two capacitive load loops located at the front and rear ends of the relay K1; The front end of the relay K1 is connected to the first end of the first capacitor C1, the second end of the first capacitor C1 is grounded, the common node between the front end of the relay K1 and the first end of the first capacitor C1 is connected to the first end of the resistor R1, and the second end of the resistor R1 is connected to the first digital-to-analog conversion signal input terminal of the main control chip MCU; The rear end of the relay K1 is connected to the first end of the second capacitor C4, the second end of the second capacitor C4 is grounded, the common node between the rear end of the relay K1 and the first end of the second capacitor C4 is connected to the first end of the resistor R2, and the second end of the resistor R2 is connected to the second digital-to-analog conversion signal input terminal of the main control chip MCU; The controlled end of the relay K1 is connected to the enable signal output end of the main control chip MCU.

8. A relay pickup self-learning circuit according to claim 7, characterized in that: The main control chip includes: RAM memory, used to store voltage change information; FLASH memory, used to store time offset.

Citation Information

Patent Citations

  • Method of zero passage switch of electromagnetic relay and circuit

    CN101577192A

  • Intelligent switch and control method thereof

    CN108766835A