Relay control method and device, cooking equipment and storage medium

By monitoring the zero-crossing signal of the AC current, calculating the state switching delay of the relay, and using the rising edge of the zero-crossing signal for delay control, the problem of mechanical relay pulling arcs when it is absorbed or disconnected is solved, and the life of the relay is realized Extension and circuit simplification.

CN118919358APending Publication Date: 2024-11-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411167748.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the prior art, mechanical relays are prone to arcing when they are attracted or disconnected, resulting in damage to the metal diaphragm, affecting service life, and the delay control time for obtaining relays is complex and costly.

Method used

By monitoring the zero-crossing signal of the AC power connected to the relay in real time, determining the zero-crossing voltage value and period value, calculating the state switching delay, and using the rising edge of the zero-crossing signal to perform delay control to ensure that the relay can absorb at the next zero point potential Close or disconnect to avoid pulling the arc.

Benefits of technology

It realizes accurate acquisition of relay status switching delay, reduces circuit complexity and cost, extends the service life of relays, and has a wider range of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118919358A_ABST
    Figure CN118919358A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of equipment control, and discloses a relay control method and device, cooking equipment and a storage medium, and the method comprises the steps: monitoring a zero-crossing signal corresponding to alternating current connected to a relay in real time; determining a zero-crossing point voltage value and a zero-crossing point period value of the alternating current based on a zero-crossing signal monitored when the relay is in an off state; when the opening and closing states of the relay are switched, state switching delay of the relay is determined according to the alternating current and the current monitored level change of the zero-crossing signal; determining delay control time based on the zero crossing point period value and the state switching delay; when it is determined that the rising edge of the zero-crossing signal is triggered based on the alternating current and the zero-crossing point voltage value, the relay is controlled to perform subsequent state switching based on the delay control time, so that the relay does not generate arc discharge, the service life of the relay is greatly prolonged, the requirement for circuit complexity is low, and the application range is wider.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment control, and in particular to a relay control method, a device, a cooking device and a storage medium. Background Art

[0002] The household appliances currently on the market usually use mechanical relays based on application scenarios, cost and other considerations. Mechanical relays are affected by their own delayed closing / opening characteristics, external temperature, driving voltage and mechanical fatigue. They are prone to arcing when closing or opening. Long-term use will damage the metal diaphragm of the relay and affect the service life of the relay.

[0003] When the relay is connected to the mains (AC), when the external mains potential is at zero, if the relay is closed or disconnected at this time, no arcing will occur, which can greatly extend the service life of the relay. However, the relay itself has a delayed closing / opening time, and the delay time of relays of different usage time and different models is inconsistent. How to obtain the delay control time of the relay has become a key problem that needs to be solved.

[0004] Currently, the acquisition of the closing / opening time of the relay can be achieved through two zero-crossing detection circuits. However, this method is relatively complex and costly for the controller circuit, and has a small scope of application. Summary of the invention

[0005] In view of this, the present invention provides a relay control method, device, cooking equipment and storage medium to solve the problem that when a multi-path zero-crossing detection circuit obtains the closing / opening time of a relay, the controller circuit is relatively complex and has a high cost.

[0006] In a first aspect, the present invention provides a relay control method, the method comprising:

[0007] Real-time monitoring of the zero-crossing signal corresponding to the AC power connected to the relay;

[0008] Based on the zero-crossing signal monitored when the relay is in the disconnected state, the zero-crossing voltage value and the zero-crossing period value of the alternating current are determined;

[0009] When the open and closed states of the relay are switched, the relay state switching delay is determined according to the level change of the alternating current and the currently monitored zero-crossing signal;

[0010] Determine the delay control time based on the zero-crossing period value and the state switching delay;

[0011] When it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, the relay is controlled to perform subsequent state switching based on the delay control time.

[0012] Beneficial effect: When the relay switches state, the state switching delay of the relay can be obtained based on the level change moment of the alternating current connected to the relay and its corresponding zero-crossing signal, which is easy to implement. Then, the delay control time is calculated according to the zero-crossing period value of the alternating current and the state switching delay, so that when the rising edge of the zero-crossing signal is triggered, the subsequent closing or opening of the relay can be controlled based on the delay control time, so that the relay will not produce arcing, which greatly extends the service life of the relay, and has lower requirements on circuit complexity and a wider range of applications.

[0013] In an optional implementation, when the open and closed states of the relay are switched, the relay state switching delay is determined according to the level change of the alternating current and the currently monitored zero-crossing signal, including:

[0014] When the relay switches from the open state to the closed state, the closing control time of the relay is obtained according to the triggering time of the first rising edge of the zero-crossing signal currently monitored;

[0015] According to the first falling edge triggering moment corresponding to the high level half cycle of the zero-crossing signal currently monitored, the actual closing moment of the relay is obtained;

[0016] The closing delay of the relay is obtained based on the time difference between the actual closing moment and the closing control moment.

[0017] Beneficial effects: The closing delay time of the relay is determined according to the rising edge triggering moment of the zero-crossing signal and the first falling edge triggering moment corresponding to the high-level half cycle after the zero-crossing signal. The closing delay is calculated based on the level change moment of the zero-crossing signal caused by the circuit characteristics when the relay switches from the open state to the closed state. The circuit has low complexity requirements and is easy to implement.

[0018] In an optional implementation, when the open and closed states of the relay are switched, the relay state switching delay is determined according to the level change of the alternating current and the currently monitored zero-crossing signal, further comprising:

[0019] When the relay switches from the closed state to the open state, the disconnection control time of the relay is obtained according to the time when the alternating current reaches the zero-crossing voltage value;

[0020] According to the triggering moment of the second rising edge of the zero-crossing signal corresponding to the second half cycle of the alternating current, the actual disconnection moment of the relay is obtained;

[0021] The disconnection delay of the relay is obtained according to the time difference between the actual disconnection moment and the disconnection control moment.

[0022] Beneficial effects: The disconnection delay time of the relay is determined according to the moment when the alternating current reaches the zero-crossing voltage value and the second rising edge triggering moment of the zero-crossing signal corresponding to the second half cycle of the alternating current. The disconnection delay is calculated based on the level change moment of the zero-crossing signal caused by the circuit characteristics when the relay switches from a closed state to an open state. The circuit has low complexity requirements and is easy to implement.

[0023] In an optional implementation, determining that a rising edge of a zero-crossing signal is triggered based on the alternating current and the zero-crossing voltage value includes:

[0024] Sampling the alternating current at a preset time interval to obtain a half-wave sampling voltage;

[0025] When it is detected within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold and the half-wave sampling voltage is not greater than the zero-crossing voltage value, it is determined that the rising edge of the zero-crossing signal is triggered.

[0026] Beneficial effect: Based on the magnitude relationship between the half-wave sampling voltage of the alternating current and the zero-crossing voltage value, it is judged whether the rising edge of the zero-crossing signal is triggered, so as to determine the driving moment of the relay.

[0027] In an optional implementation, determining that a rising edge of a zero-crossing signal is triggered based on the alternating current and the zero-crossing voltage value includes:

[0028] Sampling the alternating current at a preset time interval to obtain a half-wave sampling voltage;

[0029] When it is detected for the first time within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, the timing starts;

[0030] When it is detected again within the preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, the timing is stopped to obtain the timing time;

[0031] If the time difference between the timing time and the zero-crossing period value is not greater than the time difference threshold, it is determined that the rising edge of the zero-crossing signal is triggered.

[0032] Beneficial effect: By repeatedly detecting the magnitude relationship between the half-wave sampling voltage of the alternating current and the zero-crossing voltage value, the accuracy of the trigger judgment of the rising edge of the zero-crossing signal is improved, making it easier to determine the precise driving moment of the relay.

[0033] In an optional implementation, determining the delay control time based on the zero-crossing period value and the state switching delay includes:

[0034] Based on the difference between the zero-crossing period value and the closing delay, the delay control closing time is calculated;

[0035] Based on the difference between the zero-crossing period value and the disconnection delay, the delay control disconnection time is calculated.

[0036] Beneficial effect: The delay control closing / opening time of the relay is calculated by the difference between the zero-crossing cycle value of the AC power and the closing / opening delay of the relay, which facilitates the subsequent delay control of the relay and ensures that the relay is closed / opened at the next zero potential.

[0037] In an optional implementation, based on the delay control time, controlling the relay to perform subsequent state switching includes:

[0038] Based on the delay control closing time, the relay is controlled to close;

[0039] Alternatively, the relay is controlled to be disconnected based on the delay control disconnection time.

[0040] Beneficial effect: After identifying the rising edge of the zero-crossing signal, the relay is driven by delaying the closing / opening time to ensure that the relay is energized / disconnected at the next zero potential, so that the relay will not produce arcing, greatly extending the service life of the relay.

[0041] In an optional implementation, the live wire of the relay is connected to the zero-crossing detection circuit, and the zero-crossing signal corresponding to the alternating current connected to the relay is monitored in real time, including:

[0042] A zero-crossing detection circuit is used to obtain a zero-crossing signal corresponding to the alternating current connected to the relay.

[0043] Beneficial effect: The subsequent delay control time is obtained by detecting the zero-crossing signal through a zero-crossing detection circuit, which is beneficial to simplifying the equipment circuit and saving costs.

[0044] In an optional implementation, determining the zero-crossing voltage value and the zero-crossing period value of the alternating current based on the zero-crossing signal monitored when the relay is in the disconnected state includes:

[0045] When the relay is in the disconnected state, the monitored zero-crossing signal is filtered to obtain a filtered signal;

[0046] According to the third rising edge triggering time of the filter signal, the AC voltage value of the AC power at the third rising edge triggering time is determined to obtain the zero-crossing voltage value of the AC power;

[0047] The zero-crossing period value of the alternating current is obtained according to the time difference between the second falling edge triggering moment and the third rising edge triggering moment of the filtering signal.

[0048] Beneficial effect: By filtering the monitored zero-crossing signal, a filtered signal is obtained to reduce the interference of noise signals, and then based on the rising edge and falling edge of the filtered signal, the zero-crossing voltage value and zero-crossing period value of the AC power are obtained, which facilitates the subsequent determination of the delay control time of the relay.

[0049] In an optional embodiment, the method further includes:

[0050] When it is detected that the relay switches from the closed state to the open state, the zero-crossing voltage value and the zero-crossing period value of the alternating current are updated based on the currently monitored zero-crossing signal.

[0051] Beneficial effect: By monitoring and updating the zero-crossing voltage value and zero-crossing period value of the alternating current, interference caused by voltage and frequency fluctuations can be avoided, thereby improving the accuracy of relay control.

[0052] In a second aspect, the present invention provides a relay control device, the device comprising:

[0053] An acquisition module is used to monitor the zero-crossing signal corresponding to the alternating current connected to the relay in real time;

[0054] A first processing module, for determining a zero-crossing voltage value and a zero-crossing period value of the alternating current based on a zero-crossing signal monitored when the relay is in an off state;

[0055] The second processing module is used to determine the relay state switching delay according to the level change of the alternating current and the currently monitored zero-crossing signal when the open and closed states of the relay are switched;

[0056] A third processing module, used for determining a delay control time based on the zero-crossing period value and the state switching delay;

[0057] The control module is used to control the relay to switch the state based on the delay control time when the rising edge of the zero-crossing signal is triggered based on the alternating current and the zero-crossing voltage value.

[0058] In a third aspect, the present invention provides a cooking device, comprising: a relay and a controller;

[0059] The controller includes a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the relay control method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0060] In an optional embodiment, the cooking device further comprises a zero-crossing detection circuit;

[0061] The zero-crossing detection circuit is connected to the live wire of the relay, and is used to obtain a zero-crossing signal corresponding to the alternating current connected to the relay.

[0062] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the relay control method of the first aspect or any corresponding embodiment thereof.

[0063] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the relay control method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0065] Figure 1 is a structural block diagram of a cooking device according to an embodiment of the present invention;

[0066] Figure 2 is a circuit diagram of a cooking device according to an embodiment of the present invention;

[0067] Figure 3 is a waveform diagram of a detection signal according to an embodiment of the present invention;

[0068] Figure 4 is a flow chart of a relay control method according to an embodiment of the present invention;

[0069] Figure 5 is a flow chart of another relay control method according to an embodiment of the present invention;

[0070] Figure 6 is a flow chart of another relay control method according to an embodiment of the present invention;

[0071] Figure 7 is a flow chart of a method for obtaining a state switching delay according to an embodiment of the present invention;

[0072] Figure 8 is a schematic diagram of a flow chart of a time delay control relay according to an embodiment of the present invention;

[0073] Fig. 9 It is a schematic diagram of a process for updating the zero-crossing point parameters of the mains according to an embodiment of the present invention;

[0074] Fig.10 is a structural block diagram of a relay control device according to an embodiment of the present invention;

[0075] Fig.11 Schematic diagram of the hardware structure of the controller according to the embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0077] Mechanical relays are affected by their own delayed closing / opening characteristics, external temperature, driving voltage and mechanical fatigue, which can easily cause arcing when closing or opening. Long-term use can damage the metal diaphragm of the relay, affecting the service life of the relay.

[0078] When the relay is connected to the mains (AC), when the external mains potential is at zero, if the relay is closed or disconnected at this time, no arcing will occur, which can greatly extend the service life of the relay. However, the relay itself has a delayed closing / opening time, and the delay time of relays of different usage time and different models is inconsistent. How to obtain the delay control time of the relay has become a key problem that needs to be solved.

[0079] Patent CN110459433A discloses a relay zero-crossing control method, based on a first circuit and a second circuit both including a relay and a zero-crossing detection circuit, and realizing the acquisition of the relay's contact / disconnection time through two zero-crossing detection circuits. However, this method is complex for the controller circuit and has a high cost.

[0080] Therefore, the present invention proposes a relay control method. When the relay switches state, the state switching delay of the relay is obtained based on the level change of the zero-crossing signal of the alternating current connected to the relay, and then the delay control time is obtained according to the zero-crossing period value of the alternating current, so that when the rising edge of the zero-crossing signal is triggered, the subsequent closing or opening of the relay is controlled based on the delay control time, and the applicable voltage range is wider.

[0081] According to an embodiment of the present invention, a cooking device is provided, such as Figure 1 As shown, the cooking device includes a controller 101 and a relay 102, wherein the controller 101 is used to:

[0082] Monitor the zero-crossing signal corresponding to the alternating current connected to the relay 102 in real time; determine the zero-crossing voltage value and the zero-crossing period value of the alternating current based on the zero-crossing signal monitored when the relay 102 is in the disconnected state; when the open and closed state of the relay 102 is switched, determine the state switching delay of the relay 102 according to the level change of the alternating current and the currently monitored zero-crossing signal; determine the delay control time based on the zero-crossing period value and the state switching delay; when it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, control the relay 102 to perform subsequent state switching based on the delay control time.

[0083] In some optional embodiments, such as Figure 2 As shown, the cooking device further includes a zero-crossing detection circuit 103, which is connected to the live wire (ACL) of the relay 102, and is used to obtain a zero-crossing signal corresponding to the alternating current connected to the relay. Figure 2 The cooking device further includes a voltage detection circuit 104, which is used to detect the voltage of the alternating current connected to the relay.

[0084] In the embodiment of the present application, the zero-crossing detection circuit 103 is connected to the relay live wire. When the relay is disconnected, the zero-crossing signal is an AC zero-crossing square wave. When the relay is closed, the live wire zero-crossing detection node immediately becomes the detection zero wire. At this time, the level state changes and the zero-crossing signal is at a low level. The voltage detection circuit 104 commonly provided by the cooking equipment is a mains voltage detection circuit. The detected voltage is the mains voltage after half-wave rectification, that is, the cooking equipment can detect the upper half positive cycle of the mains voltage for high and low voltage protection of the circuit.

[0085] For example, Figure 3 As shown, the voltage waveform of the zero-crossing signal detected by the zero-crossing detection circuit 103 is a square wave signal, and the voltage waveform of the half-wave rectified alternating current (mains power) detected by the voltage detection circuit 104 is a sinusoidal signal of the upper half positive cycle. By expanding the application of the voltage detection circuit commonly available in cooking equipment, the zero-crossing point of the alternating current can be accurately obtained based on the voltage change trend of the alternating current after half-wave rectification.

[0086] In some optional embodiments, see again Figure 2 The cooking device may further include a relay driving circuit 105 and a heating plate 106. The controller 101 may drive the relay 102 at the rising edge of the zero-crossing signal through the relay driving circuit 105, and obtain the actual closing / opening time of the relay by the change of the zero-crossing signal of the live wire of the heating plate 106. For details, please refer to the description of the method embodiment below, which will not be repeated here.

[0087] Exemplarily, the cooking device may be an electric rice cooker. This embodiment implements adaptive control of the relay mains zero-crossing potential closure / disconnection in all voltage ranges and frequency ranges by extending the application of the mains voltage detection circuit commonly available in cooking devices.

[0088] According to an embodiment of the present invention, a relay control method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0089] In this embodiment, a relay control method is provided, which can be used for example Figure 1 The controller 101 shown, such as a microcontroller unit (MCU), a single chip microcomputer, etc., Figure 4 is a flow chart of a relay control method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0090] Step S401, real-time monitoring of the zero-crossing signal corresponding to the alternating current connected to the relay.

[0091] Specifically, the live wire of the relay is connected to the zero-crossing detection circuit, and the zero-crossing detection circuit is used to obtain the zero-crossing signal corresponding to the alternating current connected to the relay. The subsequent delay control time is obtained by detecting the zero-crossing signal of the zero-crossing detection circuit, which is conducive to simplifying the equipment circuit and saving costs.

[0092] It should be noted that the alternating current in the present invention is described by taking the mains as an example, but in actual application, it may also be alternating current of other voltages and frequencies, and the present invention is not limited thereto.

[0093] Step S402, determining the zero-crossing voltage value and the zero-crossing period value of the alternating current based on the zero-crossing signal monitored when the relay is in the disconnected state.

[0094] Specifically, when the relay is disconnected, the zero-crossing signal is reflected as a mains zero-crossing square wave, and the detected AC voltage waveform is reflected as the mains voltage after half-wave rectification. Therefore, the zero-crossing voltage value of the AC can be determined according to the half-wave rectified voltage of the AC corresponding to the rising edge of the zero-crossing signal, and the zero-crossing period value of the AC can be determined according to the period of the zero-crossing signal or the period of the half-wave rectified signal.

[0095] Step S403, when the open or closed state of the relay is switched, the relay state switching delay is determined according to the level change of the alternating current and the currently monitored zero-crossing signal.

[0096] Specifically, the controller needs to drive the relay at the rising edge of the zero-crossing signal (the alternating current is at the zero-crossing voltage value). When the relay switches from the open state to the closed state, or from the closed state to the open state, the zero-crossing signal will undergo a corresponding level change based on the circuit characteristics. Therefore, the relay state switching delay can be calculated based on the moment when the alternating current is at the zero-crossing voltage value (starting to drive the relay) and the moment when the zero-crossing signal level state changes (actually achieving the relay state switching).

[0097] Step S404, determining the delay control time based on the zero-crossing period value and the state switching delay.

[0098] Specifically, if the relay is to be stably closed / opened at the zero potential of the mains, it is first necessary to obtain the delay control time of the relay, and then delay the driving of the relay to be closed / opened based on the delay control time.

[0099] Step S405, when it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, the relay is controlled to perform subsequent state switching based on the delay control time.

[0100] Specifically, when the rising edge of the zero-crossing signal is triggered, the relay needs to be driven. Based on the delay control time and the mains change cycle (zero-crossing cycle value), the relay is driven to close / disconnect at the current zero-point potential delay, so that the relay can be closed / disconnected at the next zero-point potential, so that the relay will not generate arcing, thereby greatly extending the service life of the relay.

[0101] The relay control method provided in this embodiment can obtain the state switching delay of the relay based on the level change moment of the alternating current connected to the relay and its corresponding zero-crossing signal when the relay switches state, which is easy to implement. Then, the delay control time is calculated according to the zero-crossing period value of the alternating current and the state switching delay, so that when the rising edge of the zero-crossing signal is triggered, the subsequent closing or opening of the relay can be controlled based on the delay control time, so that the relay will not generate arcing, thereby greatly extending the service life of the relay, and has low requirements on circuit complexity and a wider range of applications.

[0102] In this embodiment, a relay control method is provided, which can be used for example Figure 1 The controller 101 shown, such as a microcontroller unit (MCU), a single chip microcomputer, etc., Figure 5 is a flow chart of a relay control method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0103] Step S501: monitor the zero-crossing signal corresponding to the AC power connected to the relay in real time. Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.

[0104] Step S502, based on the zero-crossing signal detected when the relay is in the disconnected state, determine the zero-crossing voltage value and the zero-crossing period value of the AC power. Figure 4 Step S402 of the illustrated embodiment will not be described in detail here.

[0105] Step S503, when the open or closed state of the relay is switched, the relay state switching delay is determined according to the level change of the alternating current and the currently monitored zero-crossing signal.

[0106] Specifically, the above step S503 includes:

[0107] Step S5031, when the relay is switched from the open state to the closed state, the closing control time of the relay is obtained according to the first rising edge triggering time of the zero-crossing signal currently monitored.

[0108] Specifically, when the relay is disconnected, the zero-crossing signal is reflected as a zero-crossing square wave of the mains, and the controller drives the relay to close when the rising edge of the zero-crossing signal is triggered. Therefore, the corresponding rising edge triggering moment of the zero-crossing signal can be used as the closing control moment of the driving relay.

[0109] Step S5032, obtaining the actual closing time of the relay according to the first falling edge triggering time corresponding to the high level half cycle of the zero-crossing signal currently monitored.

[0110] Specifically, based on the circuit characteristics, the zero-crossing signal is reflected as a normal low level after the relay is energized, so the falling edge moment occurring within the high-level half cycle of the zero-crossing signal is the actual closing moment of the relay.

[0111] Step S5033, obtaining the closing delay of the relay according to the time difference between the actual closing time and the closing control time.

[0112] Specifically, the time period between the rising edge and the falling edge of the zero-crossing signal is the actual closing time of the relay, that is, the closing delay.

[0113] In an embodiment of the present invention, the closing delay time of the relay is determined according to the rising edge triggering moment of the zero-crossing signal and the first falling edge triggering moment corresponding to the high-level half cycle after the zero-crossing signal, and the closing delay is calculated based on the level change moment of the zero-crossing signal caused by the circuit characteristics when the relay is switched from an open state to a closed state, which has low circuit complexity requirements and is easy to implement.

[0114] Step S5034, when the relay is switched from the closed state to the open state, the opening control time of the relay is obtained according to the time when the alternating current reaches the zero-crossing voltage value.

[0115] Specifically, since the zero-crossing signal is at a normal low level when the relay is closed, the zero-crossing rising edge cannot be directly obtained. However, since the changing trend of the zero-crossing signal is synchronized with the changing trend of the mains, that is, the high / low level half-cycle of the zero-crossing signal changes synchronously with the upper / lower half-cycle of the mains, the relay can be driven to disconnect at the mains voltage point corresponding to the rising edge of the zero-crossing signal, that is, the moment of the zero-crossing voltage value corresponding to the alternating current is the disconnection control moment of the driving relay.

[0116] Step S5035, obtaining the actual disconnection time of the relay according to the second rising edge triggering time of the zero-crossing signal corresponding to the second half cycle of the alternating current.

[0117] Specifically, after the driving relay is disconnected, the rising edge of the zero-crossing signal occurring in the subsequent second half cycle of the mains power is the actual disconnection moment of the relay.

[0118] Step S5036, obtaining the disconnection delay of the relay according to the time difference between the actual disconnection time and the disconnection control time.

[0119] Specifically, the time period between the mains voltage point corresponding to the rising edge of the zero-crossing signal (the moment when the alternating current reaches the zero-crossing voltage value) and the rising edge of the zero-crossing signal is the actual disconnection time of the relay, that is, the disconnection delay.

[0120] In an embodiment of the present invention, the disconnection delay time of the relay is determined according to the moment when the alternating current reaches the zero-crossing voltage value and the second rising edge triggering moment of the zero-crossing signal corresponding to the second half cycle of the alternating current, and the disconnection delay is calculated based on the level change moment of the zero-crossing signal caused by the circuit characteristics when the relay is switched from a closed state to an open state, which has low circuit complexity requirements and is easy to implement.

[0121] In some optional implementations, when the relay is disconnected, after obtaining the zero-crossing cycle value of the mains, the software timing is started to simulate the zero-crossing synchronization signal. When obtaining the relay disconnection delay, when the relay is in the energized state, if the software simulates the zero-crossing synchronization signal at the rising edge, the driving relay is disconnected, then when the actual zero-crossing signal has a rising edge, it is the relay disconnection moment, thereby obtaining the disconnection delay. Similarly, the above steps can be synchronously applied to the delay control relay disconnection.

[0122] Step S504, determining the delay control time based on the zero-crossing period value and the state switching delay.

[0123] Specifically, the above step S504 includes:

[0124] Step S5041, based on the difference between the zero-crossing period value and the closing delay, calculate the delay control closing time.

[0125] Specifically, when the relay needs to be controlled to be closed, the corresponding delay control closing time = zero-crossing period value - closing delay.

[0126] Step S5042, based on the difference between the zero-crossing period value and the disconnection delay, calculate the delay control disconnection time.

[0127] Specifically, when the relay needs to be controlled to disconnect, the corresponding delay control disconnection time = zero-crossing period value - disconnection delay.

[0128] In an embodiment of the present invention, the delay control closing / opening time of the relay is calculated by the difference between the zero-crossing period value of the alternating current and the closing / opening delay of the relay, which facilitates the subsequent delay control of the relay and ensures that the relay is closed / opened at the next zero potential.

[0129] Step S505, when it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, the relay is controlled to perform subsequent state switching based on the delay control time.

[0130] Specifically, the above step S505 includes:

[0131] Step S5051, when it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, the relay is controlled to close based on the delay control closing time.

[0132] In some optional implementations, whether the rising edge of the zero-crossing signal is triggered may be determined according to steps a1 to a2:

[0133] Step a1, sampling the alternating current at a preset time interval to obtain a half-wave sampling voltage.

[0134] Step a2, when it is detected that the half-wave sampling voltage is not less than the voltage threshold within a preset continuous time, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, it is determined that the rising edge of the zero-crossing signal is triggered.

[0135] Exemplarily, the controller samples the half-wave mains voltage once at a preset time interval (50us~1ms) to obtain a half-wave sampling voltage. If the half-wave sampling voltage is detected to be ≥ the voltage threshold (1V~5V) within a preset continuous time (100us~5ms), and the half-wave sampling voltage is ≤ the zero-crossing voltage value, it can be confirmed that the rising edge of the zero-crossing signal is triggered at this time.

[0136] In the embodiment of the present application, whether the rising edge of the zero-crossing signal is triggered is judged based on the magnitude relationship between the half-wave sampling voltage of the alternating current and the zero-crossing voltage value, so as to determine the driving timing of the relay.

[0137] In some optional implementations, it is also possible to determine whether the rising edge of the zero-crossing signal is triggered according to steps a1 to a2:

[0138] Step b1, sampling the alternating current at a preset time interval to obtain a half-wave sampling voltage.

[0139] Step b2, when it is detected for the first time within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold and the half-wave sampling voltage is not greater than the zero-crossing voltage value, start timing.

[0140] Step b3, when it is detected again within the preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, stop timing and obtain the timing time.

[0141] Step b4: If the time difference between the timing time and the zero-crossing period value is not greater than the time difference threshold, it is determined that the rising edge of the zero-crossing signal is triggered.

[0142] Exemplarily, the controller samples the half-wave mains voltage once at a preset time interval (50us~1ms) to obtain a half-wave sampling voltage. If the half-wave sampling voltage ≥ the voltage threshold (1V~5V) is detected within a preset continuous time (100us~5ms), and the half-wave sampling voltage ≤ the zero-crossing voltage value, the software timing is started until the voltage threshold ≤ the half-wave sampling voltage ≤ the zero-crossing voltage value is judged again by the above method, the software timing is stopped, and the timing time is obtained. If the timing time differs from the zero-crossing period value by no more than 1ms, it is considered that the rising edge of the zero-crossing signal is triggered at this moment, otherwise the judgment process is re-entered.

[0143] In the embodiment of the present application, the relationship between the half-wave sampling voltage of the alternating current and the zero-crossing voltage value is repeatedly detected to improve the accuracy of the trigger judgment of the rising edge of the zero-crossing signal, thereby facilitating the determination of the precise driving moment of the relay.

[0144] Specifically, after the controller recognizes the rising edge of the zero-crossing signal, it drives the relay by delaying the closing time to ensure that the relay is energized at the next zero potential, so that the relay will not produce arcing, thereby greatly extending the service life of the relay.

[0145] Step S5052: when it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, the relay is controlled to be disconnected based on the delay control disconnection time.

[0146] Specifically, after the controller obtains the corresponding rising edge of the zero-crossing signal through the trend of the AC power change, it drives the relay through delay control to disconnect the time, thereby ensuring that the relay is disconnected at the next zero point potential, so that the relay will not produce arcing, thereby greatly extending the service life of the relay.

[0147] The relay control method provided in this embodiment calculates the closing / opening delay based on the level change moment of the zero-crossing signal caused by the circuit characteristics when the relay switches state. The circuit has low complexity requirements and is easy to implement. Then, the delay control closing / opening time is calculated according to the difference between the zero-crossing period value of the alternating current and the closing / opening delay, so that when the rising edge of the zero-crossing signal is triggered, the relay is driven based on the delay control closing / opening time to ensure that the relay is disconnected at the next zero potential, so that the relay will not generate arcing, thereby greatly extending the service life of the relay. In addition, the method has low complexity and a wider range of applications.

[0148] In this embodiment, a relay control method is provided, which can be used for example Figure 1 The controller 101 shown, such as a microcontroller unit (MCU), a single chip microcomputer, etc., Figure 6 is a flow chart of a relay control method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:

[0149] Step S601: Real-time monitoring of the zero-crossing signal corresponding to the AC power connected to the relay. Figure 5 Step S501 of the illustrated embodiment will not be described in detail here.

[0150] Step S602, determining the zero-crossing voltage value and the zero-crossing period value of the alternating current based on the zero-crossing signal monitored when the relay is in the disconnected state.

[0151] Specifically, the above step S602 includes:

[0152] Step S6021, when the relay is in the disconnected state, filtering the monitored zero-crossing signal to obtain a filtered signal.

[0153] Specifically, in the initial state of power-on, the relay is in the disconnected state. At this time, the zero-crossing detection circuit feeds back the zero-crossing signal of the mains, and the zero-crossing signal can be repeatedly obtained several times (without specific limit processing, generally 1 to 5 times) for the purpose of filtering, such as taking the average, removing the maximum and minimum values ​​and taking the average, etc., to obtain the filtered signal.

[0154] Step S6022, determining the AC voltage value of the AC power at the third rising edge triggering moment according to the third rising edge triggering moment of the filtered signal, and obtaining the zero-crossing voltage value of the AC power.

[0155] Specifically, the mains voltage value corresponding to the moment is acquired at the rising edge of the filter signal to obtain the zero-crossing voltage value of the alternating current.

[0156] Step S6023, obtaining the zero-crossing period value of the alternating current according to the time difference between the second falling edge triggering moment and the third rising edge triggering moment of the filtered signal.

[0157] Specifically, when the rising edge of the zero-crossing signal is captured, the software starts timing, and ends timing when the falling edge of the zero-crossing signal or the second rising edge of the zero-crossing signal is captured. The half-cycle value or cycle value of the AC power zero crossing can be obtained, thereby obtaining the zero-crossing cycle value of the AC power.

[0158] In an embodiment of the present application, the monitored zero-crossing signal is filtered to obtain a filtered signal, thereby reducing the interference of the noise signal, and then based on the rising edge and falling edge of the filtered signal, the zero-crossing voltage value and zero-crossing period value of the alternating current are obtained, thereby facilitating the subsequent determination of the delay control time of the relay.

[0159] Step S603, when the open or closed state of the relay is switched, the relay state switching delay is determined according to the level change of the alternating current and the zero-crossing signal currently monitored. Figure 5 Step S503 of the illustrated embodiment will not be described in detail here.

[0160] Step S604: Determine the delay control time based on the zero-crossing period value and the state switching delay. Figure 5 Step S504 of the illustrated embodiment will not be described in detail here.

[0161] Step S605: When the rising edge of the zero-crossing signal is determined to be triggered based on the alternating current and the zero-crossing voltage value, the relay is controlled to perform subsequent state switching based on the delay control time. Figure 5 Step S505 of the illustrated embodiment will not be described in detail here.

[0162] Step S606, when it is detected that the relay is switched from the closed state to the open state, the zero-crossing voltage value and the zero-crossing period value of the alternating current are updated based on the currently monitored zero-crossing signal.

[0163] Specifically, because the voltage and frequency of the mains electricity fluctuate during the power supply process, it is necessary to update the judgment threshold of the rising edge of the zero-crossing signal according to the changes in the mains electricity: the zero-crossing voltage value and the zero-crossing period value. When the relay is disconnected, the controller will continue to sample the half-wave mains voltage and continue to time the period value of the zero-crossing signal. After a continuous time (40ms to 500ms), filtering will be performed to re-determine the new zero-crossing voltage value and the new zero-crossing period value. If the previous value differs from the new zero-crossing voltage value and the zero-crossing period value by more than the first update threshold and the second update threshold, it needs to be updated to the new zero-crossing voltage value and the zero-crossing period value. When the subsequent controller judges the rising edge of the zero-crossing signal and the delay control time, it is processed with the updated zero-crossing voltage value and the zero-crossing period value.

[0164] The embodiment of the present application monitors and updates the zero-crossing voltage value and the zero-crossing period value of the alternating current to avoid interference caused by voltage and frequency fluctuations, thereby improving the accuracy of relay control.

[0165] The relay control method provided in this embodiment calculates the closing / opening delay based on the level change moment of the zero-crossing signal caused by the circuit characteristics when the relay switches state, which requires low circuit complexity and is easy to implement. Then, according to the difference between the zero-crossing period value of the alternating current and the closing / opening delay, the delay control closing / opening time is calculated, so that when the rising edge of the zero-crossing signal is triggered, the relay is driven based on the delay control closing / opening time, ensuring that the relay is disconnected at the next zero potential, so that the relay will not produce arcing, greatly extending the service life of the relay, and the complexity is low, and the scope of application is wider. At the same time, by updating the zero-crossing voltage value and the zero-crossing period value of the alternating current, the interference caused by voltage and frequency fluctuations is avoided, and the accuracy of relay control is improved.

[0166] The relay control method of the present invention is described in detail below with reference to a specific application example.

[0167] like Figure 7 As shown, in the initial state of power-on, the relay is in the disconnected state. At this time, the zero-crossing detection circuit feeds back the zero-crossing signal of the mains, and obtains the mains voltage value corresponding to this moment at the rising edge of the zero-crossing signal to obtain the zero-crossing voltage value of the mains. The timing is started to obtain the zero-crossing period value of the mains, and the filtering process is repeated several times (without specific limit processing, generally 1 to 5 times) to finally determine the zero-crossing voltage value and zero-crossing period value of the mains.

[0168] See again Figure 7 After determining the zero-crossing voltage value and zero-crossing period value of the AC power, enter the relay closing / opening delay acquisition.

[0169] 1) Relay closing delay: When the relay is in the disconnected state, the relay is driven to close when the rising edge of the zero-crossing signal is triggered. Based on the circuit characteristics, the zero-crossing signal is at a normal low level after the relay is closed, so the falling edge that occurs within the high-level half cycle of the zero-crossing signal is the actual closing time of the relay. Therefore, the time period consisting of the rising edge of the zero-crossing signal and the falling edge that occurs within the subsequent high-level half cycle is the actual closing time of the relay, that is, the closing delay.

[0170] 2) Relay disconnection delay: Since the zero-crossing signal is at a normal low level when the relay is in the energized state, the zero-crossing rising edge cannot be directly obtained. However, since the trend of the zero-crossing signal is synchronized with the trend of the mains power change, that is, the high / low level half-cycle of the zero-crossing signal changes synchronously with the upper / lower half-cycle of the mains power, if the relay is driven to disconnect at the mains power voltage point corresponding to the rising edge of the zero-crossing signal (the moment when the mains power reaches the zero-crossing voltage value), the corresponding zero-crossing signal rising edge that occurs in the subsequent lower half-cycle of the mains power is the actual disconnection time of the relay. Therefore, the time period between the mains power voltage point corresponding to the rising edge of the zero-crossing signal and the corresponding rising edge of the zero-crossing signal in the lower half-cycle of the mains power is the actual disconnection time of the relay, that is, the disconnection delay.

[0171] This application example requires the software algorithm to determine the rising edge of the zero-crossing signal by judging the trend of the mains change and using the zero-crossing voltage value or the zero-crossing period value. Exemplarily, the software samples the half-wave mains voltage once at a preset time interval (50us~1ms) to obtain a half-wave sampling voltage. If the half-wave sampling voltage is detected to be ≥ the voltage threshold (1V~5V) within the preset continuous time (100us~5ms), and the half-wave sampling voltage is ≤ the zero-crossing voltage value, it can be confirmed that the rising edge of the zero-crossing signal is triggered at this time.

[0172] like Figure 8 As shown in the figure, when the relay needs to be controlled to be closed, the delay control closing time = zero-crossing period value - closing delay. Therefore, after the software algorithm recognizes the rising edge of the zero-crossing signal, it drives the relay after the delay control closing time, which can ensure that the relay is closed at the next zero potential.

[0173] See again Figure 8 When the relay needs to be disconnected, the delay control disconnection time = zero-crossing cycle value - disconnection delay. Therefore, after the software algorithm obtains the corresponding zero-crossing signal rising edge through the mains change trend, it drives the relay after the delay control disconnection time, which can ensure that the relay is disconnected at the next zero potential.

[0174] Because the voltage and frequency fluctuate during the power supply process, the software algorithm needs to update the judgment threshold of the zero-crossing signal rising edge according to the changes in the mains: zero-crossing voltage value 1 and zero-crossing period value 1. Fig. 9As shown, when the relay is disconnected, the software algorithm will continue to sample the half-wave mains voltage and continuously time the period value of the zero-crossing signal. After a continuous time (40ms to 500ms), filtering is performed to determine the zero-crossing voltage value 2 and the zero-crossing period value 2 of the mains. If they differ from the corresponding zero-crossing voltage value 1 and the zero-crossing period value 1 by more than the first update threshold and the second update threshold, the zero-crossing voltage value 2 and the zero-crossing period value 2 are assigned to the zero-crossing voltage value 1 and the zero-crossing period value 1. The subsequent software algorithm determines the rising edge of the zero-crossing signal and the delay control time, and processes it with the updated zero-crossing voltage value 1 and the zero-crossing period value 1.

[0175] The present invention realizes adaptive control of the mains zero-crossing potential connection / disconnection of the relay within all voltage ranges and frequency ranges through the extended application of a zero-crossing detection circuit and a mains voltage detection circuit, thereby increasing the service life of the relay and reducing the selection cost of the relay and the controller circuit cost.

[0176] In this embodiment, a relay control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0177] This embodiment provides a relay control device, such as Fig.10 As shown, including:

[0178] An acquisition module 1001 is used to monitor in real time the zero-crossing signal corresponding to the alternating current connected to the relay;

[0179] The first processing module 1002 is used to determine the zero-crossing voltage value and the zero-crossing period value of the alternating current based on the zero-crossing signal monitored when the relay is in the disconnected state;

[0180] The second processing module 1003 is used to determine the relay state switching delay according to the level change of the alternating current and the currently monitored zero-crossing signal when the open and closed states of the relay are switched;

[0181] The third processing module 1004 is used to determine the delay control time based on the zero-crossing period value and the state switching delay;

[0182] The control module 1005 is used to control the relay to switch the state based on the delay control time when the rising edge of the zero-crossing signal is determined to be triggered based on the alternating current and the zero-crossing voltage value.

[0183] In some optional implementations, the live wire of the relay is connected to the zero-crossing detection circuit, and the acquisition module 1001 is further used to:

[0184] A zero-crossing detection circuit is used to obtain a zero-crossing signal corresponding to the alternating current connected to the relay.

[0185] In some optional implementations, the first processing module 1002 is further configured to:

[0186] When the relay is in the disconnected state, the monitored zero-crossing signal is filtered to obtain a filtered signal;

[0187] According to the third rising edge triggering time of the filter signal, the AC voltage value of the AC power at the third rising edge triggering time is determined to obtain the zero-crossing voltage value of the AC power;

[0188] The zero-crossing period value of the alternating current is obtained according to the time difference between the second falling edge triggering moment and the third rising edge triggering moment of the filtering signal.

[0189] In some optional implementations, the second processing module 1003 is further used to:

[0190] When the relay switches from the open state to the closed state, the closing control time of the relay is obtained according to the triggering time of the first rising edge of the zero-crossing signal currently monitored;

[0191] According to the first falling edge triggering moment corresponding to the high level half cycle of the zero-crossing signal currently monitored, the actual closing moment of the relay is obtained;

[0192] The closing delay of the relay is obtained based on the time difference between the actual closing moment and the closing control moment.

[0193] In some optional implementations, the second processing module 1003 is further used to:

[0194] When the relay switches from the closed state to the open state, the disconnection control time of the relay is obtained according to the time when the alternating current reaches the zero-crossing voltage value;

[0195] According to the triggering moment of the second rising edge of the zero-crossing signal corresponding to the second half cycle of the alternating current, the actual disconnection moment of the relay is obtained;

[0196] The disconnection delay of the relay is obtained according to the time difference between the actual disconnection moment and the disconnection control moment.

[0197] In some optional implementations, the third processing module 1004 is further configured to:

[0198] Based on the difference between the zero-crossing period value and the closing delay, the delay control closing time is calculated;

[0199] Based on the difference between the zero-crossing period value and the disconnection delay, the delay control disconnection time is calculated.

[0200] In some optional implementations, the control module 1005 is further configured to:

[0201] Sampling the alternating current at a preset time interval to obtain a half-wave sampling voltage;

[0202] When it is detected within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold and the half-wave sampling voltage is not greater than the zero-crossing voltage value, it is determined that the rising edge of the zero-crossing signal is triggered.

[0203] In some optional implementations, the control module 1005 is further configured to:

[0204] Sampling the alternating current at a preset time interval to obtain a half-wave sampling voltage;

[0205] When it is detected for the first time within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, the timing starts;

[0206] When it is detected again within the preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, the timing is stopped to obtain the timing time;

[0207] If the time difference between the timing time and the zero-crossing period value is not greater than the time difference threshold, it is determined that the rising edge of the zero-crossing signal is triggered.

[0208] In some optional implementations, the control module 1005 is further configured to:

[0209] Based on the delay control closing time, the relay is controlled to close;

[0210] Alternatively, the relay is controlled to be disconnected based on the delay control disconnection time.

[0211] In some optional embodiments, the device is also used for:

[0212] When it is detected that the relay switches from the closed state to the open state, the zero-crossing voltage value and the zero-crossing period value of the alternating current are updated based on the currently monitored zero-crossing signal.

[0213] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0214] The relay control device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0215] The embodiment of the present invention also provides a controller having the above Fig.10 Relay control device shown.

[0216] See also Fig.11 , Fig.11 is a schematic diagram of the structure of a controller provided by an optional embodiment of the present invention, such as Fig.11 As shown, the controller includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the controller, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple controllers can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11 A processor 10 is taken as an example.

[0217] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0218] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0219] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the controller, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0220] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0221] The controller further comprises a communication interface 30 for the controller to communicate with other devices or a communication network.

[0222] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0223] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0224] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A relay control method, characterized in that: The method comprises: Real-time monitoring of the zero-crossing signal corresponding to the alternating current connected to the relay; Based on the zero-crossing signal monitored when the relay is in the disconnected state, the zero-crossing voltage value and the zero-crossing period value of the alternating current are determined; When the open or closed state of the relay is switched, determining the state switching delay of the relay according to the level change of the alternating current and the currently monitored zero-crossing signal; Determining a delay control time based on the zero-crossing period value and the state switching delay; When it is determined based on the alternating current and the zero-crossing voltage value that the rising edge of the zero-crossing signal is triggered, the relay is controlled to perform subsequent state switching based on the delay control time.

2. The method according to claim 1, characterized in that When the open or closed state of the relay is switched, determining the state switching delay of the relay according to the level change of the alternating current and the currently monitored zero-crossing signal includes: When the relay is switched from an open state to a closed state, a closing control time of the relay is obtained according to the triggering time of the first rising edge of the zero-crossing signal currently monitored; Obtaining the actual closing time of the relay according to the first falling edge triggering time corresponding to the high level half cycle of the zero-crossing signal currently monitored; The closing delay of the relay is obtained according to the time difference between the actual closing time and the closing control time.

3. The method according to claim 2, characterized in that When the open / closed state of the relay is switched, the state switching delay of the relay is determined according to the level change of the alternating current and the currently monitored zero-crossing signal, and further includes: When the relay is switched from a closed state to an open state, the disconnection control time of the relay is obtained according to the time when the alternating current reaches the zero-crossing voltage value; Obtaining the actual disconnection time of the relay according to the second rising edge triggering time of the zero-crossing signal corresponding to the second half cycle of the alternating current; The disconnection delay of the relay is obtained according to the time difference between the actual disconnection time and the disconnection control time.

4. The method according to claim 1, characterized in that: The step of determining that the rising edge of the zero-crossing signal is triggered based on the alternating current and the zero-crossing voltage value comprises: Sampling the alternating current at preset time intervals to obtain a half-wave sampling voltage; When it is detected within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold and the half-wave sampling voltage is not greater than the zero-crossing voltage value, it is determined that the rising edge of the zero-crossing signal is triggered.

5. The method according to claim 1, characterized in that The step of determining that the rising edge of the zero-crossing signal is triggered based on the alternating current and the zero-crossing voltage value comprises: Sampling the alternating current at preset time intervals to obtain a half-wave sampling voltage; When it is detected for the first time within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, timing is started; When it is detected again within a preset continuous time that the half-wave sampling voltage is not less than the voltage threshold, and the half-wave sampling voltage is not greater than the zero-crossing voltage value, the timing is stopped to obtain the timing time; If the time difference between the timing time and the zero-crossing period value is not greater than the time difference threshold, it is determined that the rising edge of the zero-crossing signal is triggered.

6. The method according to claim 3, characterized in that The step of determining the delay control time based on the zero-crossing period value and the state switching delay includes: Based on the difference between the zero-crossing period value and the closing delay, the delay control closing time is calculated; Based on the difference between the zero-crossing period value and the disconnection delay, the delay-controlled disconnection time is calculated.

7. The method according to claim 6, characterized in that The controlling the relay to perform subsequent state switching based on the delay control time includes: Controlling the relay to close based on the delay control closing time; Alternatively, the relay is controlled to be disconnected based on the delay control disconnection time.

8. The method according to claim 1, characterized in that The live wire of the relay is connected to the zero-crossing detection circuit, and the real-time monitoring of the zero-crossing signal corresponding to the alternating current connected to the relay includes: The zero-crossing detection circuit is used to obtain a zero-crossing signal corresponding to the alternating current connected to the relay.

9. The method according to claim 8, characterized in that The method of determining the zero-crossing voltage value and the zero-crossing period value of the alternating current based on the zero-crossing signal monitored when the relay is in the disconnected state comprises: When the relay is in the disconnected state, the monitored zero-crossing signal is filtered to obtain a filtered signal; According to the third rising edge triggering moment of the filter signal, determining the AC voltage value of the AC power at the third rising edge triggering moment, and obtaining the zero-crossing voltage value of the AC power; The zero-crossing period value of the alternating current is obtained according to the time difference between the second falling edge triggering moment and the third rising edge triggering moment of the filtered signal.

10. The method according to claim 9, characterized in that The method further comprises: When it is detected that the relay switches from the closed state to the open state, the zero-crossing voltage value and the zero-crossing period value of the alternating current are updated based on the currently monitored zero-crossing signal.

11. A relay control device, characterized in that: The device comprises: An acquisition module, used for real-time monitoring of a zero-crossing signal corresponding to the alternating current connected to the relay; A first processing module, for determining a zero-crossing voltage value and a zero-crossing period value of the alternating current based on a zero-crossing signal monitored when the relay is in an off state; A second processing module is used to determine the state switching delay of the relay according to the level change of the alternating current and the currently monitored zero-crossing signal when the open and closed states of the relay are switched; A third processing module, used for determining a delay control time based on the zero-crossing period value and the state switching delay; A control module is used to control the relay to switch its state based on the delay control time when it is determined that the rising edge of the zero-crossing signal is triggered based on the alternating current and the zero-crossing voltage value.

12. A cooking device, characterized in that: include: Relays and controllers; The controller includes a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the relay control method according to any one of claims 1 to 10 by executing the computer instructions.

13. The cooking device according to claim 12, characterized in that The cooking device also includes a zero-crossing detection circuit; The zero-crossing detection circuit is connected to the live wire of the relay, and is used to obtain a zero-crossing signal corresponding to the alternating current connected to the relay.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the relay control method according to any one of claims 1 to 10.

Citation Information

Cited By

  • Reactive compensation method and system, control equipment and storage medium

    CN119906042A

  • Relay control method and system based on different pull-in and holding voltages, and medium

    CN121331707A