Relay control method and device and storage medium
Through real-time data acquisition and machine learning algorithms, a digital model of the working state of the relay is constructed and the PWM parameters are optimized, which solves the problems of short life and large energy consumption in traditional relay control, and realizes intelligent control and energy optimization of relays.
Patent Information
- Application Number
- CN202510162637.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-02-14
AI Technical Summary
In traditional strong-electric panel switches, mechanical switches and relays are prone to wear contact points due to frequent movements during long-term use, short service life, and large power consumption of power, resulting in waste of energy.
Through real-time data acquisition and machine learning algorithms, the on-off state of the relay and the operating parameters of the load equipment are monitored, the digital model of the relay working state is constructed, the PWM period and duty cycle parameters are optimized, and the intelligent control of the relay and the optimization of energy consumption are achieved.
It extends the service life of the relay, reduces energy consumption, improves the intelligence level and operating efficiency of the system, avoids unnecessary operations, and reduces the heating and power loss of the equipment.
Smart Images

Figure CN119786307A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relay control, and in particular to a relay control method, device and storage medium. Background Art
[0002] Traditional high-voltage panel switches usually use mechanical switches or basic relay control systems to regulate high-current loads by directly supplying power. While these traditional methods are simple to operate and low-cost, they also bring some problems. First, mechanical switches and relays are prone to frequent contact wear during long-term use, which greatly shortens their service life; second, these switch control systems consume a lot of power, especially under heavy loads, and cannot efficiently convert and manage energy, resulting in energy waste. Summary of the invention
[0003] The purpose of the present invention is to provide a relay control method, device and storage medium, which not only solves the problems of excessive energy consumption and short relay life in traditional high-voltage panel switches, but also improves the intelligence level and operation efficiency of the system.
[0004] The purpose of the present invention can be achieved through the following technical solutions: The present application provides a relay control method, comprising the following steps: Obtain the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment, monitor and analyze in real time through the data acquisition module, and then collect the working environment parameters of different components in the electrical equipment through the environmental parameter sensor; Preprocess the collected status data, remove outliers and noise data, extract key characteristic parameters, build a digital model of the relay working state, and combine the PWM cycle and duty cycle parameters to control the relay and optimize energy consumption; The method includes: obtaining the state data of the relay, preprocessing the state data, eliminating abnormal values and noise data therein, obtaining the preprocessed state data, and extracting key characteristic parameters that can characterize the working state of the relay from the preprocessed state data; constructing a digital model that can describe the working state of the relay based on the extracted key characteristic parameters, and training the digital model using a support vector machine algorithm to obtain a trained digital model; then obtaining the period and duty cycle parameters in the PWM control parameters, using them as the input of the digital model, and judging the working state of the relay under the current PWM parameters through the digital model; when the output of the digital model indicates that the current PWM parameters will cause the energy consumption of the relay to be too high, adjusting the period and duty cycle parameters of the PWM until the output of the digital model indicates that the relay is working in the optimal state; applying the adjusted PWM period and duty cycle parameters to the actual control process of the relay, controlling the on and off of the relay through the PWM signal, continuously collecting the state data of the relay, and regularly updating the digital model; According to the digital model of the relay working state, the preset intelligent control strategy and optimization target, the machine learning algorithm is used to adaptively optimize the control logic of the relay to obtain the optimized control sequence and parameter combination; The optimized control strategy is sent to the control unit of the high-voltage panel switch, and the on-off time and frequency of the relay are dynamically adjusted through the software program to intelligently control the load; Among them, when the relay is unloaded, the working status of the load device is judged by the software algorithm, and the power supply of the relay is automatically cut off; According to the actual power demand of the load equipment, the on-off times of the relay are controlled by the minimum action times control strategy.
[0005] Furthermore, the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment, is obtained, and real-time monitoring and analysis is performed through the data acquisition module, including: The data acquisition module is used to obtain the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment; Use machine learning algorithms to analyze the collected relay on / off status data to determine whether the relay is working normally, and issue an alarm in time when an abnormality is found; According to the operating parameter data of the load equipment, a clustering algorithm is used to classify different types of load equipment and determine the normal operating parameter range of each type of equipment; Analyze the relay status and load equipment operating parameters, use the decision tree algorithm to evaluate the overall working status of the high-voltage panel switch, and determine whether there are hidden dangers of failure in the high-voltage panel switch.
[0006] Furthermore, a machine learning algorithm is used to adaptively optimize the control logic of the relay to obtain an optimized control sequence and parameter combination, including: According to the working state of the relay, the relay on-off time and the frequency parameters, as the input data of the machine learning algorithm, combined with the preset intelligent control strategy and optimization objectives, the optimization function and constraint conditions of the machine learning algorithm are constructed; Adopting reinforcement learning algorithm, through continuous trial and learning, the control logic of the relay is adaptively optimized to obtain the optimal control sequence, and the parameter combination in the control strategy is dynamically adjusted to make it continuously converge to the optimal solution; The optimized control sequence is converted into control instructions of the relay, and sent to the control unit of the relay through the digital interface to control the relay.
[0007] Furthermore, the on-off time and frequency of the relay are dynamically adjusted through the software program to intelligently control the load, including: The generated control instruction is sent to the control unit of the high-voltage panel switch through the communication interface. The control unit receives and analyzes the instruction and extracts the on-off time and frequency parameters of the relay. The control unit controls the on-off state of the relay and changes the on-off time and on-off frequency of the relay according to the received on-off time and frequency parameters. The state signal of the load is then collected in real time through the software program, and the collected signal is preprocessed to obtain a feature vector representing the load state. Inputting the load state feature vector into a pre-trained load state recognition model, wherein the load state recognition model is a machine learning classification model that outputs the state category of the load; When the state of the load changes, the adjustment of the control strategy is triggered. According to the new load state, the most matching control strategy is selected from the strategy library to generate updated relay on-off time and frequency parameters. The updated control parameters are sent to the control unit again. The control unit dynamically adjusts the on-off of the relay according to the new parameters, and performs real-time intelligent control of the load to ensure that the load always works in the optimal state.
[0008] Furthermore, when the relay is unloaded, the working state of the load device is judged by a software algorithm, and the power supply of the relay is automatically cut off, which specifically includes: obtaining the real-time working state data of the relay, and transmitting the data to the control module, analyzing and processing the obtained working state data of the relay according to the preset load device working state judgment rule, and judging whether the current load device is in a working state, when the judgment result is that the load device is currently in a non-working state, the control module sends a control instruction to the relay to cut off the power supply of the relay; When the judgment result is that the load device is currently in a working state, the control module continues to obtain and analyze the real-time working status data of the relay until it is judged that the load device has entered a non-working state. After cutting off the power supply of the relay, the control module continues to monitor the working status of the load device. When it is judged that the load device has re-entered the working state, the control module sends a control instruction to the relay to turn on the power supply of the relay.
[0009] Furthermore, according to the actual power demand of the load device, the on-off times of the relay are controlled by the minimum action times control strategy, which specifically includes: obtaining the total power data of the load device, combining the pre-established power range and relay opening and closing state mapping table, determining the target power range, and then discretizing the target power range to obtain a target power range interval set; The correlation of each element in the target power range interval set is calculated to obtain the correlation between elements. The relay opening and closing state adjustment model is constructed based on the correlation between elements. In the model, the relay opening and closing state is used as the dependent variable, and the correlation between elements is used as the independent variable. The total power of the load equipment is predicted through the relay opening and closing state adjustment model to generate a prediction result. When the deviation between the prediction result and the actual value is greater than the set threshold, the relay timestamp data is collected to build a time series prediction model. In the model, the timestamp is used as the independent variable and the deviation value is used as the dependent variable. The deviation correction value is output and the prediction result is corrected using the deviation correction value.
[0010] Furthermore, after controlling the on-off times of the relay through the minimum action times control strategy, it also includes: continuously optimizing the digital model and parameters of the relay working state through a machine learning algorithm, and regularly evaluating the sensor data and relay state, and dynamically adjusting the PWM parameters.
[0011] Specifically, it includes: after continuously optimizing the digital model and parameters of the relay working state through the machine learning algorithm, it specifically includes: training the digital model through the random forest algorithm, outputting the optimized model parameters, and then obtaining the relay operation information and the environmental data monitored by the sensor and inputting them into the digital model to obtain the predicted value. When the deviation between the predicted value output by the digital model and the actual value is greater than the threshold, it is determined that the model needs to be updated. When the PWM parameter adjustment value is calculated according to the output result of the digital model, the control instruction is output to the PWM controller, the control instruction is received by the PWM controller, the PWM parameters are dynamically adjusted, and the PWM waveform is output to the relay to obtain the actual working state of the relay.
[0012] The present invention also provides a relay control device, comprising a processor, a memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the above-mentioned relay control method is implemented.
[0013] The present invention also provides a storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned relay control method is implemented.
[0014] The beneficial effects of the present invention are: By introducing real-time data acquisition and machine learning algorithms, this method realizes real-time monitoring and analysis of relays. First, the on-off state of the relay and the operating parameters of the load equipment are recorded in real time through the data acquisition module, and the environmental parameters of the electrical equipment are also collected to obtain comprehensive working status data; the working status data of the relay is deeply analyzed by the machine learning algorithm, the abnormal state of the relay is timely identified, and an alarm system is used for early warning, which not only improves the ability to accurately judge the state of the relay, but also improves the response speed of the system under abnormal conditions, thereby effectively avoiding excessive and frequent operation of the relay, extending the service life of the equipment, and improving reliability; This method introduces an optimization strategy based on PWM (pulse width modulation) control to reduce energy consumption by adjusting the on-off cycle and duty cycle of the relay. First, the collected relay state data is preprocessed and combined with the PWM control parameters to establish a digital model of the relay working state. Then, the digital model is trained using algorithms such as support vector machines. According to the model output, it is determined whether the PWM cycle and duty cycle need to be adjusted. When the model determines that the current PWM parameters will lead to excessive energy consumption, these parameters are automatically optimized to solve the problem of high energy consumption caused by the frequent switching of relays and long-term power-on state in traditional methods, ensure that the relay works in the optimal state, and reduce energy waste. Through this refined control, the energy consumption of the relay is effectively optimized, the power loss is reduced, the heating of the equipment is reduced, and the overall energy efficiency is improved. This method combines the minimum number of action control strategies, extends the service life of the relay by reducing the frequent operation of the relay, determines the target power range by analyzing the actual power demand of the load equipment and combining the relay opening and closing state mapping table, and obtains the power interval set through discretization processing. By calculating the correlation of elements in each power interval, a relay opening and closing state adjustment model is established to further predict the total power of the load equipment. When the deviation between the predicted result and the actual value exceeds the preset threshold, the deviation is corrected according to the historical data and the time series prediction model, thereby optimizing the opening and closing state of the relay and reducing the number of unnecessary actions, solving the problem of short relay life in traditional high-voltage panel switches, and effectively reducing the mechanical and electrical wear of the relay. It not only extends the service life of the relay, but also reduces energy consumption by controlling the number of actions, thereby improving the overall efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] For better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.
[0016] Figure 1 A schematic diagram of a flow chart of a relay control method provided in this application; Figure 2 A schematic diagram of a process flow of real-time monitoring and analysis of a relay control method provided in this application; Figure 3 A schematic diagram of a flow chart of a relay control method for controlling a relay provided in the present application. DETAILED DESCRIPTION
[0017] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.
[0018] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0019] The specific implementation methods, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0020] See also Figure 1-Figure 3 , this embodiment provides a relay control method, comprising the following steps: S1. Obtain the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment, monitor and analyze in real time through the data acquisition module, and then collect the working environment parameters of different components in the electrical equipment through the environmental parameter sensor; Furthermore, the real-time working status data of the high-voltage panel switch is obtained, including the on / off status of the relay, the operating parameters of the load equipment, etc., and real-time monitoring and analysis is performed through the data acquisition module, including: S11, obtaining the real-time working status data of the high-voltage panel switch through the data acquisition module, including the on-off status of the relay and the operating parameters of the load equipment; S12, using machine learning algorithms to analyze the collected relay on / off status data to determine whether the relay's working state is normal, and promptly alarming when an abnormality is found; S13. According to the operating parameter data of the load equipment, a clustering algorithm is used to classify different types of load equipment to determine the normal operating parameter range of each type of equipment.
[0021] S14. Analyze the relay status and load equipment operating parameters, use the decision tree algorithm to evaluate the overall working status of the high-voltage panel switch, and determine whether there is a hidden danger of failure in the high-voltage panel switch.
[0022] Specifically, comprehensive monitoring and intelligent analysis of the high-voltage panel switch are realized. First, the on-off status of the relay and the operating parameters of the load equipment are collected in real time through the data acquisition module. These data include key indicators such as current and voltage, as well as the working environment parameters of the electrical equipment obtained through the environmental parameter sensor; then, the machine learning algorithm is used to conduct an in-depth analysis of the relay status data to determine whether its working status is normal, and to issue an alarm in time when an abnormality is detected; in addition, a clustering algorithm is used to classify the load equipment and determine the parameter range for their normal operation; finally, combined with the relay status and load equipment operating parameters, a decision tree algorithm is used to comprehensively evaluate the working status of the entire high-voltage panel switch to identify potential fault hazards, which not only improves the system's monitoring capabilities, but also enhances the response speed to abnormal situations and the accuracy of fault prediction, thereby improving the reliability and safety of the electrical system.
[0023] S2. Preprocess the collected status data, remove abnormal values and noise data, extract key characteristic parameters, build a digital model of the relay working state, and control the relay in combination with PWM cycle and duty cycle parameters to optimize energy consumption; Furthermore, a digital model of the relay working state is constructed, and the relay is controlled in combination with the PWM period and duty cycle parameters, including: S21, obtaining state data of the relay, preprocessing the state data, eliminating abnormal values and noise data therein, obtaining preprocessed state data, and extracting key characteristic parameters that can characterize the working state of the relay from the preprocessed state data; S22, constructing a digital model capable of describing the working state of the relay according to the extracted key characteristic parameters, and training the digital model using a support vector machine algorithm to obtain a trained digital model; S23, obtaining the period and duty cycle parameters in the PWM control parameters, taking them as the input of the digital model, and judging the working state of the relay under the current PWM parameters through the digital model.
[0024] S24, when the output of the digital model indicates that the current PWM parameters will cause the relay energy consumption to be too high, the period and duty cycle parameters of the PWM are adjusted until the output of the digital model indicates that the relay operates in an optimal state; S25. Apply the adjusted PWM period and duty cycle parameters to the actual control process of the relay, control the on and off of the relay through the PWM signal to achieve the purpose of reducing the energy consumption of the relay, continuously collect the status data of the relay, and regularly update the digital model to adapt to the changes in the relay status and ensure the optimality of the control parameters.
[0025] Specifically, the refined control of the relay working state and the optimization of energy consumption are achieved. The collected relay state data is preprocessed, outliers and noise are eliminated, key characteristic parameters are extracted, and then a digital model of the relay working state is constructed based on these parameters; the model is trained using the support vector machine algorithm so that it can accurately describe the working state of the relay; then, combined with the PWM period and duty cycle parameters, these parameters are input into the digital model to evaluate and adjust the PWM parameters to ensure that the relay works in the optimal state with the lowest energy consumption; if the model output shows that the current PWM parameters cause excessive energy consumption, the system will automatically adjust these parameters until the relay reaches the optimal working state; finally, the adjusted PWM parameters are applied to the actual control of the relay, and the digital model is continuously monitored and regularly updated to adapt to changes in the relay state, thereby achieving the goal of reducing energy consumption and improving system efficiency.
[0026] In the example of practical application, by introducing PWM (pulse width modulation) control technology, accurate energy consumption management of 8-way relay boards is achieved. Initially, the relays continued to consume power in the fully energized state, resulting in high overall power consumption, and the measured current reached 240mA. In order to reduce energy consumption, the PWM control strategy was adopted, and the relay's energizing time was set to 40ms and the disconnection time was set to 20ms. In this way, in one cycle, the relays remained in the energized state most of the time to meet the working requirements, but they were also disconnected for some time, effectively reducing the continuous flow of current; the PWM waveform output by the PWM controller controlled the relays, successfully reducing the system's measured current to 130mA, significantly reducing energy consumption. This control method not only reduced energy consumption, but also reduced the heat generated by the equipment, and improved the stability and safety of the system. In addition, the PWM parameters will be continuously optimized according to real-time data and environmental parameters to adapt to different working conditions and load requirements to ensure that the relays always work in the optimal state. Through this intelligent control strategy, not only energy conservation and emission reduction are achieved, but also the service life of the relays and the operating efficiency of the entire system are improved, bringing significant economic and environmental benefits.
[0027] Among them, PWM (pulse width modulation) technology manages energy consumption by finely controlling the on and off state of the relay by adjusting the cycle and duty cycle. The cycle refers to the length of time that the PWM signal completes a complete on-off cycle, and the duty cycle refers to the proportion of time that the relay remains on during the cycle. When the duty cycle is low, it means that the relay is on for a shorter time in each cycle. Correspondingly, the working time of load devices such as motors or light bulbs is reduced, which directly leads to reduced energy consumption; and a shorter cycle means that the relay is on and off more frequently. Although the energy consumption in a single cycle is reduced, the number of times the equipment works per unit time increases overall, and it can respond more sensitively to load changes and cut off the power supply in time to reduce unnecessary energy consumption. Especially in scenarios where load demand changes rapidly, this frequent adjustment helps to reduce energy waste and improve energy efficiency. By optimizing these two parameters, PWM control realizes precise management of the energy consumption of relays and their load devices, which not only meets work needs but also achieves energy conservation and emission reduction.
[0028] S3. According to the digital model of the relay working state, the preset intelligent control strategy and optimization target, the control logic of the relay is adaptively optimized using a machine learning algorithm to obtain an optimized control sequence and parameter combination; Furthermore, a machine learning algorithm is used to adaptively optimize the control logic of the relay to obtain an optimized control sequence and parameter combination, including: According to the working state of the relay, the relay on-off time and the frequency parameters, as the input data of the machine learning algorithm, combined with the preset intelligent control strategy and optimization objectives, the optimization function and constraint conditions of the machine learning algorithm are constructed; Adopting reinforcement learning algorithm, through continuous trial and learning, the control logic of the relay is adaptively optimized to obtain the optimal control sequence, and the parameter combination in the control strategy is dynamically adjusted to make it continuously converge to the optimal solution; The optimized control sequence is converted into control instructions for the relay, which are sent to the control unit of the relay through a digital interface to control the relay in response to real-time changing working environment and demands, thereby improving the overall performance and energy efficiency of the system.
[0029] Specifically, by applying machine learning algorithms to adaptively optimize the control logic of the relay, intelligent management of the relay's working state and energy efficiency improvement are achieved. Specifically, according to the real-time working state of the relay, the on-off time and frequency parameters, combined with the preset control strategy and optimization goals, the optimization function and constraints are constructed, and the reinforcement learning algorithm is used to continuously try and learn, and the control logic is automatically adjusted to obtain the optimal control sequence and parameter combination. This process enables the relay's control strategy to dynamically adapt to changes in the working environment and achieve more accurate energy management. Ultimately, the optimized control instructions are sent to the relay's control unit for execution, thereby improving the response speed, stability and energy efficiency of the entire system, ensuring that the relay achieves energy conservation and emission reduction while meeting work requirements.
[0030] More specifically, in step S2, the collected state data is preprocessed and a digital model of the relay working state is constructed, and then the relay is controlled in combination with the PWM cycle and duty cycle parameters to optimize energy consumption. Specifically, this involves giving a long level, such as 60ms, when the relay is actuated, and then switching to PWM control, where the pull-in time is 40ms and the disconnection time is 20ms. Such a control strategy can effectively reduce current and heat generation and achieve energy saving effects. In step S3, according to the digital model of the relay working state and the preset intelligent control strategy, the control logic of the relay is adaptively optimized using a machine learning algorithm to obtain the optimal control sequence and parameter combination; PWM control is used to reduce current and heat generation, thereby achieving energy saving effects.
[0031] S4, sending the optimized control strategy to the control unit of the high-voltage panel switch, dynamically adjusting the on-off time and frequency of the relay through the software program, and performing intelligent control of the load; When the relay is unloaded, the software algorithm determines the working status of the load device and automatically cuts off the power supply of the relay to avoid the relay being powered on for a long time, thereby reducing energy consumption and heat generation. Furthermore, the on-off time and frequency of the relay are dynamically adjusted through the software program to intelligently control the load, including: The generated control instruction is sent to the control unit of the high-voltage panel switch through the communication interface. The control unit receives and analyzes the instruction and extracts the on-off time and frequency parameters of the relay. The control unit controls the on-off state of the relay and changes the on-off time and on-off frequency of the relay according to the received on-off time and frequency parameters. The software program is then used to collect the voltage, current and other state signals of the load in real time, and the collected signals are pre-processed by filtering, normalizing and other pre-processing to obtain a feature vector representing the load state. Input the load state feature vector into a pre-trained load state recognition model, which can be a common machine learning classification model such as a support vector machine, a decision tree or a neural network, and the model outputs the state category of the load; When the state of the load changes, the adjustment of the control strategy is triggered. According to the new load state, the most matching control strategy is selected from the strategy library to generate updated relay on-off time and frequency parameters. The updated control parameters are sent to the control unit again. The control unit dynamically adjusts the on-off of the relay according to the new parameters to achieve real-time intelligent control of the load, so that the load always works in the optimal state.
[0032] Furthermore, when the relay is unloaded, the working state of the load device is judged by a software algorithm, and the power supply of the relay is automatically cut off, which specifically includes: obtaining the real-time working state data of the relay, including parameters such as current and voltage, and transmitting the data to the control module, and analyzing and processing the obtained relay working state data according to the preset load device working state judgment rule to judge whether the current load device is in a working state, and when the judgment result is that the load device is currently in a non-working state, the control module sends a control instruction to the relay to cut off the power supply of the relay; When the judgment result is that the load device is currently in a working state, the control module continues to obtain and analyze the real-time working state data of the relay until it is judged that the load device has entered a non-working state. After the power supply of the relay is cut off, the control module continues to monitor the working state of the load device. When it is judged that the load device has re-entered the working state, the control module sends a control instruction to the relay to turn on the power supply of the relay; Among them, the control module can also establish a load equipment working state prediction model through machine learning algorithms based on historical data, predict the working state of the load equipment in the future, and make decisions in advance to cut off or connect the power supply of the relay. When the relay is unloaded, its power supply is automatically cut off to avoid unnecessary energy consumption and heat generation caused by the relay being powered on for a long time, thereby achieving the purpose of reducing energy consumption and heat generation; at the same time, by predicting the working state of the load equipment through machine learning algorithms, the intelligent level of control can be improved, making it more accurate and efficient.
[0033] For example, for a high-power motor, the control unit may receive instructions requiring the power to be on for 8 seconds and off for 2 seconds every 10 seconds, with a frequency of 0.1Hz. The control unit accurately controls the switching state of the relay based on this, achieves fine speed regulation of the motor, and then collects the voltage, current and other status signals of the load in real time and performs preprocessing.
[0034] Taking the air-conditioning system as an example, the collected compressor current is 10A, the voltage is 220V, and the power factor is 0.85. After filtering and normalization, these raw data form a feature vector that represents the load state. The feature vector is input into a pre-trained load state recognition model, such as a support vector machine model, and the output shows that the air conditioner is currently in the "cooling" state. When the load state changes, it will trigger the adjustment of the control strategy. For example, when the air conditioner switches from "cooling" to "dehumidification" mode, the control strategy that is most suitable for the dehumidification mode is selected from the strategy library, and new relay on-off parameters are generated, including reducing the operating frequency of the compressor and extending the operating time of the fan. The updated control parameters are sent to the control unit to achieve real-time optimization of the air conditioner operating state.
[0035] When the relay is unloaded, the working state of the load device is judged by the software algorithm, and the power supply of the relay is automatically cut off to save energy. For example, for an electric water heater, the real-time current of the relay is 0.1A and the voltage is 220V. According to the preset rules, it is judged that the water dispenser is currently in standby state. At this time, the control module sends a power-off instruction to the relay to avoid unnecessary energy consumption. The control module continuously monitors the working state of the load device. When it is detected that the user turns on the hot water tap and the water flow sensor is activated, the control module immediately sends a power-on instruction to the relay to ensure timely hot water supply. In addition, by analyzing historical water use data, a user water use behavior model is established. For example, it is predicted that the user will have a need to wash at around 7 o'clock every morning, and the heating can be started half an hour in advance, which not only ensures hot water supply, but also maximizes energy utilization efficiency. This intelligent control method is not only applicable to household appliances, but also widely used in industrial production; in general, this method based on machine learning and intelligent control can adaptively adjust the control strategy according to the real-time state and historical data of the load, which not only improves the working efficiency of the equipment, but also realizes the rational use of energy, bringing significant economic and environmental benefits to industrial production and daily life.
[0036] Specifically, the optimized control strategy is sent to the control unit of the high-voltage panel switch to achieve dynamic adjustment of the relay on-off time and frequency, so as to intelligently control the load. It can not only collect the voltage, current and other state signals of the load in real time, and obtain the characteristic vector of the load state through preprocessing, but also input these characteristic vectors into the pre-trained machine learning model to identify the state category of the load. When the load state changes, the system will automatically select the most appropriate control strategy from the strategy library and update the on-off parameters of the relay to keep the load in the optimal working state. Especially when the relay is unloaded, the working state of the load device can be judged by the software algorithm, and the power supply can be automatically cut off to reduce energy consumption and heat generation. In addition, historical data can be used to establish a prediction model to predict the working state of the load device in advance, so as to make control decisions in advance, improve the intelligence and accuracy of the control, and maximize energy efficiency.
[0037] S5. According to the actual power demand of the load equipment, the on-off times of the relay are controlled through the minimum action times control strategy to extend the service life of the relay.
[0038] Furthermore, according to the actual power demand of the load device, the on-off times of the relay are controlled by the minimum action times control strategy, which specifically includes: obtaining the total power data of the load device, combining the pre-established power range and relay opening and closing state mapping table, determining the target power range, and then discretizing the target power range to obtain a target power range interval set; The correlation of each element in the target power range interval set is calculated to obtain the correlation between elements. The relay opening and closing state adjustment model is constructed based on the correlation between elements. In the model, the relay opening and closing state is used as the dependent variable, and the correlation between elements is used as the independent variable. The total power of the load equipment is predicted through the relay opening and closing state adjustment model to generate a prediction result. When the deviation between the prediction result and the actual value is greater than the set threshold, the relay timestamp data is collected to build a time series prediction model. In the model, the timestamp is used as the independent variable and the deviation value is used as the dependent variable. The deviation correction value is output and the prediction result is corrected using the deviation correction value.
[0039] Among them, a mapping table between power range and relay opening and closing state is established. First, the working mode and efficiency of the load equipment at different powers are analyzed, and then a series of power thresholds are defined based on these data. Each threshold corresponds to a specific relay opening and closing state. The mapping logic is based on the optimal operating state of the equipment at a specific power, and factors considered include equipment performance, energy efficiency, and safe operating range; next, the target power range is discretized, and clustering algorithms such as K-means are used to divide the continuous power data into several intervals. Each interval represents a specific power level, and the granularity of the interval is determined based on the sensitivity of the equipment to power changes and the required control accuracy; finally, the correlation and association of the elements in each power interval are calculated, and statistical methods such as the Pearson correlation coefficient or machine learning algorithms such as random forests are used to evaluate the strength of the relationship between different power intervals, which helps to build an accurate relay opening and closing state adjustment model to predict and adjust the optimal opening and closing time of the relay.
[0040] Specifically, by implementing the minimum number of actions control strategy, the service life of the relay is effectively extended and energy consumption is optimized. This strategy first obtains the total power data of the load device, and determines the target power range by combining the preset power range and the mapping table of the relay opening and closing state. By discretizing the target power range, the correlation of each element in the power range can be calculated, and a relay opening and closing state adjustment model can be constructed. Using this model, the total power of the load device can be predicted and the prediction result can be generated. When the deviation between the predicted result and the actual value exceeds the set threshold, the timestamp data of the relay is collected, the time series prediction model is constructed, the deviation correction value is output, and the prediction result is corrected with these correction values. Such a control strategy not only reduces the number of relay actions, but also keeps the system voltage within the allowable deviation range, verifying the effectiveness of the strategy. In this way, the number of relay on and off times is controlled, thereby reducing wear and extending the service life of the equipment, while also reducing unnecessary energy waste and improving the overall efficiency of the system.
[0041] Furthermore, after controlling the on-and-off times of the relay through the minimum number of actions control strategy, it also includes: continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms, continuously improving the accuracy and efficiency of relay control, and regularly evaluating sensor data and relay status, and dynamically adjusting PWM parameters to adapt to environmental changes and equipment aging.
[0042] Specifically, it includes: after continuously optimizing the digital model and parameters of the relay working state through the machine learning algorithm, it specifically includes: training the digital model through the random forest algorithm, outputting the optimized model parameters, and then obtaining the relay operation information and the environmental data monitored by the sensor and inputting them into the digital model to obtain the predicted value. When the deviation between the predicted value output by the digital model and the actual value is greater than the threshold, it is determined that the model needs to be updated. When the PWM parameter adjustment value is calculated according to the output result of the digital model, the control instruction is output to the PWM controller, the control instruction is received by the PWM controller, the PWM parameters are dynamically adjusted, and the PWM waveform is output to the relay to obtain the actual working state of the relay.
[0043] This embodiment combines PWM control and sensor feedback technology to reduce the overall power consumption of the high-voltage panel switch, and supplies power to the relay when necessary to avoid the high power consumption problem of frequent full-time power supply. By dynamically adjusting the relay control, it is ensured that the relay working state is consistent with the actual needs and improves the operating efficiency. The sensor data is used for judgment and adjustment to prevent unnecessary multiple actions of the relay, which not only extends the service life of the relay and electrical equipment, but also keeps the existing hardware architecture unchanged. The function improvement can be achieved by only software upgrade, which ensures the simplicity of implementation and low cost.
[0044] This embodiment further provides a relay control device, including a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the above-mentioned relay control method is implemented.
[0045] This embodiment further provides a storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned relay control method is implemented.
[0046] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A relay control method, characterized in that: The steps include: Obtain the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment, monitor and analyze in real time through the data acquisition module, and then collect the working environment parameters of different components in the electrical equipment through the environmental parameter sensor; Preprocess the collected status data, remove outliers and noise data, extract key characteristic parameters, build a digital model of the relay working state, and combine the PWM cycle and duty cycle parameters to control the relay and optimize energy consumption; The method includes: obtaining the state data of the relay, preprocessing the state data, eliminating abnormal values and noise data therein, obtaining the preprocessed state data, and extracting key characteristic parameters that can characterize the working state of the relay from the preprocessed state data; constructing a digital model that can describe the working state of the relay based on the extracted key characteristic parameters, and training the digital model using a support vector machine algorithm to obtain a trained digital model; then obtaining the period and duty cycle parameters in the PWM control parameters, using them as the input of the digital model, and judging the working state of the relay under the current PWM parameters through the digital model; when the output of the digital model indicates that the current PWM parameters will cause the energy consumption of the relay to be too high, adjusting the period and duty cycle parameters of the PWM until the output of the digital model indicates that the relay is working in the optimal state; applying the adjusted PWM period and duty cycle parameters to the actual control process of the relay, controlling the on and off of the relay through the PWM signal, continuously collecting the state data of the relay, and regularly updating the digital model; According to the digital model of the relay working state, the preset intelligent control strategy and optimization target, the machine learning algorithm is used to adaptively optimize the control logic of the relay to obtain the optimized control sequence and parameter combination; The optimized control strategy is sent to the control unit of the high-voltage panel switch, and the on-off time and frequency of the relay are dynamically adjusted through the software program to intelligently control the load; Among them, when the relay is unloaded, the working status of the load device is judged by the software algorithm, and the power supply of the relay is automatically cut off; According to the actual power demand of the load equipment, the on-off times of the relay are controlled by the minimum action times control strategy.
2. A relay control method according to claim 1, characterized in that: Obtain the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment, and monitor and analyze in real time through the data acquisition module, including: The data acquisition module is used to obtain the real-time working status data of the high-voltage panel switch, including the on / off status of the relay and the operating parameters of the load equipment; Use machine learning algorithms to analyze the collected relay on / off status data to determine whether the relay is working normally, and issue an alarm in time when an abnormality is found; According to the operating parameter data of the load equipment, a clustering algorithm is used to classify different types of load equipment and determine the normal operating parameter range of each type of equipment; Analyze the relay status and load equipment operating parameters, use the decision tree algorithm to evaluate the overall working status of the high-voltage panel switch, and determine whether there are hidden dangers of failure in the high-voltage panel switch.
3. A relay control method according to claim 1, characterized in that: The machine learning algorithm is used to adaptively optimize the control logic of the relay to obtain the optimized control sequence and parameter combination, including: According to the working state of the relay, the relay on-off time and the frequency parameters, as the input data of the machine learning algorithm, combined with the preset intelligent control strategy and optimization objectives, the optimization function and constraint conditions of the machine learning algorithm are constructed; Adopting reinforcement learning algorithm, through continuous trial and learning, the control logic of the relay is adaptively optimized to obtain the optimal control sequence, and the parameter combination in the control strategy is dynamically adjusted to make it continuously converge to the optimal solution; The optimized control sequence is converted into control instructions of the relay, and sent to the control unit of the relay through the digital interface to control the relay.
4. A relay control method according to claim 1, characterized in that: The software program dynamically adjusts the on-off time and frequency of the relay to intelligently control the load, including: The generated control instruction is sent to the control unit of the high-voltage panel switch through the communication interface. The control unit receives and analyzes the instruction and extracts the on-off time and frequency parameters of the relay. The control unit controls the on-off state of the relay and changes the on-off time and on-off frequency of the relay according to the received on-off time and frequency parameters. The state signal of the load is then collected in real time through the software program, and the collected signal is preprocessed to obtain a feature vector representing the load state. Inputting the load state feature vector into a pre-trained load state recognition model, wherein the load state recognition model is a machine learning classification model that outputs the state category of the load; When the state of the load changes, the adjustment of the control strategy is triggered. According to the new load state, a matching control strategy is selected from the strategy library to generate updated relay on-off time and frequency parameters. The updated control parameters are sent to the control unit again. The control unit dynamically adjusts the on-off of the relay according to the new parameters, and performs real-time intelligent control of the load to ensure that the load always works in the optimal state.
5. A relay control method according to claim 1, characterized in that: When the relay is unloaded, the working state of the load device is judged by the software algorithm, and the power supply of the relay is automatically cut off, which specifically includes: obtaining the real-time working state data of the relay, and transmitting the data to the control module, analyzing and processing the obtained relay working state data according to the preset load device working state judgment rule, and judging whether the current load device is in a working state, when the judgment result is that the load device is currently in a non-working state, the control module sends a control instruction to the relay to cut off the power supply of the relay; When the judgment result is that the load device is currently in a working state, the control module continues to obtain and analyze the real-time working status data of the relay until it is judged that the load device has entered a non-working state. After cutting off the power supply of the relay, the control module continues to monitor the working status of the load device. When it is judged that the load device has re-entered the working state, the control module sends a control instruction to the relay to turn on the power supply of the relay.
6. A relay control method according to claim 1, characterized in that: According to the actual power demand of the load device, the on-off times of the relay are controlled by the minimum action times control strategy, including: obtaining the total power data of the load device, combining the pre-established power range and relay opening and closing state mapping table, determining the target power range, and then discretizing the target power range to obtain a target power range interval set; The correlation of each element in the target power range interval set is calculated to obtain the correlation between elements. The relay opening and closing state adjustment model is constructed based on the correlation between elements. In the model, the relay opening and closing state is used as the dependent variable, and the correlation between elements is used as the independent variable. The total power of the load equipment is predicted through the relay opening and closing state adjustment model to generate a prediction result. When the deviation between the prediction result and the actual value is greater than the set threshold, the relay timestamp data is collected to build a time series prediction model. In the model, the timestamp is used as the independent variable and the deviation value is used as the dependent variable. The deviation correction value is output and the prediction result is corrected using the deviation correction value.
7. A relay control method according to claim 1, characterized in that: After controlling the on-and-off times of the relay through the minimum number of actions control strategy, it also includes: continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms, regularly evaluating sensor data and relay status, and dynamically adjusting PWM parameters.
8. A relay control method according to claim 7, characterized in that: After continuously optimizing the digital model and parameters of the relay working state through the machine learning algorithm, it includes: training the digital model through the random forest algorithm, outputting the optimized model parameters, then obtaining the relay operation information and the environmental data monitored by the sensor and inputting them into the digital model to obtain the predicted value. When the deviation between the predicted value output by the digital model and the actual value is greater than the threshold, it is determined that the model needs to be updated. When the PWM parameter adjustment value is calculated according to the output result of the digital model, the control instruction is output to the PWM controller, the control instruction is received by the PWM controller, the PWM parameters are dynamically adjusted, and the PWM waveform is output to the relay to obtain the actual working state of the relay.
9. A relay control device, characterized in that: The invention comprises a processor, a memory and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, a relay control method as claimed in any one of claims 1 to 8 is implemented.
10. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, a relay control method as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Relay efficiency improvement control method
CN116525356A
Method for estimating on-off state of alternating current contactor in traction transmission system
CN117034111A
Control method and device for output relay of main loop of alternating current charging pile
CN117711878A
Relay energy-saving control method and system
CN118299222A
Ultra-low power consumption monostable relay control method
CN118713640A