A relay control method, device, and storage medium
Through real-time data acquisition and machine learning algorithms, digital models are constructed, and PWM parameters and control strategies are optimized, which solves the problems of high energy consumption and short relay life in traditional strong-power panel switches, and realizes intelligent management and energy efficiency improvement of relays.
Patent Information
- Application Number
- CN202510162637.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-02-14
AI Technical Summary
Traditional strong-electric panel switches have problems such as excessive energy consumption and short relay life, and mechanical switches and relays are prone to wear contact points due to frequent movements during long-term use.
Through real-time data acquisition and machine learning algorithms, digital models are built, PWM cycle and duty cycle parameters are optimized, combined with intelligent control strategies and minimum action times strategy, dynamically adjust the on-off time and frequency of the relay, reduce frequent operations, extend service life and reduce energy consumption.
Real-time monitoring and refined control of relays are achieved, extending the service life of relays, reducing energy consumption, improving system operation efficiency and reliability, and reducing equipment heating and energy waste.
Smart Images

Figure CN119786307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relay control, and particularly 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 through direct power supply. While such traditional methods are simple to operate and low in cost, they also bring some problems. First, during long-term use, mechanical switches and relays are prone to contact wear due to frequent operation, thus significantly shortening their service life. Second, the power consumption of these switch control systems is relatively large, especially in the case of heavy loads, and they 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 solve the problems of excessive energy consumption and short relay life in traditional high-voltage panel switches, but also improve the intelligence level and operation efficiency of the system.
[0004] The purpose of the present invention can be achieved through the following technical solutions:
[0005] The present application provides a relay control method, including the following steps:
[0006] Obtain the real-time working state data of the high-voltage panel switch, including the on / off state of the relay and the operating parameters of the load device, monitor and analyze it 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;
[0007] Preprocess the collected state data, eliminate outliers and noise data, extract key feature parameters, construct a digital model of the relay working state, and combine the PWM period and duty cycle parameters to control the relay and optimize energy consumption;
[0008] It includes: obtaining the status data of the relay, preprocessing the status data, removing the outliers and noise data therein to obtain the preprocessed status data, and extracting the key characteristic parameters that can characterize the working status of the relay from the preprocessed status data; according to the extracted key characteristic parameters, constructing a digital model that can describe the working status of the relay, and using the support vector machine algorithm to train the digital model to obtain the 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 status 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 excessive energy consumption of the relay, 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-off of the relay through the PWM signal, continuously collecting the status data of the relay, and regularly updating the digital model;
[0009] According to the digital model of the relay working status, the preset intelligent control strategy and optimization goal, using the machine learning algorithm to adaptively optimize the control logic of the relay to obtain the optimized control sequence and parameter combination;
[0010] Sending the optimized control strategy to the control unit of the high-voltage panel switch, and dynamically adjusting the on-off time and frequency of the relay through the software program to intelligently control the load;
[0011] Among them, when the relay is no-load, judging the working status of the load device through the software algorithm and automatically cutting off the power supply of the relay;
[0012] Controlling the on-off times of the relay according to the actual power consumption requirements of the load device through the minimum action times control strategy.
[0013] Furthermore, obtaining the real-time working status data of the high-voltage panel switch, including the on-off status of the relay and the operation parameters of the load device, and real-time monitoring and analysis through the data acquisition module, including:
[0014] 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 operation parameters of the load device;
[0015] Using the machine learning algorithm to analyze the on-off status data of the collected relay to judge whether the working status of the relay is normal, and giving an alarm in time when an abnormality is found;
[0016] According to the operation parameter data of the load device, using the clustering algorithm to classify different types of load devices and determine the normal operation parameter range of each type of device;
[0017] Analyze the relay status and the operating parameters of the load device, and use the decision tree algorithm to evaluate the overall working status of the high-voltage panel switch to determine whether there are potential faults in the high-voltage panel switch.
[0018] Furthermore, use the machine learning algorithm to adaptively optimize the control logic of the relay to obtain the optimized control sequence and parameter combination, specifically including:
[0019] Based on the working status of the relay, the on-off time and frequency parameters of the relay, as the input data of the machine learning algorithm, combined with the preset intelligent control strategy and optimization goal, construct the optimization function and constraint conditions of the machine learning algorithm;
[0020] Adopt the reinforcement learning algorithm, through continuous trial and learning, adaptively optimize the control logic of the relay to obtain the optimal control sequence, and dynamically adjust the parameter combination in the control strategy to make it continuously converge to the optimal solution;
[0021] Convert the optimized control sequence into the control instruction of the relay, and send it to the control unit of the relay through the digital interface to control the relay.
[0022] Furthermore, dynamically adjust the on-off time and frequency of the relay through the software program to intelligently control the load, specifically including:
[0023] Send the generated control instruction to the control unit of the high-voltage panel switch through the communication interface. The control unit receives and parses the instruction, and extracts the on-off time and frequency parameters of the relay; according to the received on-off time and frequency parameters, the control unit controls the on-off state of the relay, changes the on and off time of the relay, and the on and off frequency; then, the software program collects the status signal of the load in real time, and preprocesses the collected signal to obtain the feature vector representing the load status;
[0024] Input the load status feature vector into the pre-trained load status recognition model, and the load status recognition model is a machine learning classification model that outputs the state category of the load;
[0025] When the status of the load changes, it triggers the adjustment of the control strategy. According to the new load status, select the most matching control strategy from the strategy library, generate the updated on-off time and frequency parameters of the relay, and send the updated control parameters to the control unit again. The control unit dynamically adjusts the on-off of the relay according to the new parameters to realize the real-time intelligent control of the load, so that the load always works in the optimal state.
[0026] Further, when the relay is unloaded, the working state of the load device is judged by a software algorithm, and the relay power supply is automatically cut off, which specifically includes: obtaining the real-time working state data of the relay, transmitting the data to the control module, analyzing and processing the obtained relay working state data according to the preset judgment rules for the working state of the load device, judging whether the current load device is in the working state, and when the judgment result is that the load device is in the non-working state, the control module sends a control instruction to the relay to cut off the relay power supply;
[0027] When the judgment result is that the load device is in the 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 enters the non-working state. After cutting off the relay power supply, the control module continuously monitors the working state of the load device. When it is judged that the load device re-enters the working state, the control module sends a control instruction to the relay to turn on the relay power supply.
[0028] Further, according to the actual power consumption requirements 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, determining the target power range in combination with the pre-established mapping table of the power range and the relay opening and closing states, and then discretizing the target power range to obtain the target power range interval set;
[0029] Calculate the correlation for each element in the target power range interval set to obtain the element correlation. Through the element correlation, a relay opening and closing state adjustment model is constructed, in which the relay opening and closing state is used as the dependent variable and the element correlation is used as the independent variable;
[0030] Predict the total power of the load device 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, collect the relay timestamp data and construct a time series prediction model, in which the timestamp is used as the independent variable and the deviation value is used as the dependent variable, and output a deviation correction value, and use the deviation correction value to correct the prediction result.
[0031] Further, after controlling the on-off times of the relay by the minimum action times control strategy, it also includes: continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms, regularly evaluating the sensor data and relay states, and dynamically adjusting the PWM parameters.
[0032] Specifically, it includes: after continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms, it specifically 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, a control instruction is output to the PWM controller. The PWM controller receives the control instruction, dynamically adjusts the PWM parameters, outputs the PWM waveform to the relay, and obtains the actual working state of the relay.
[0033] The present invention also 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.
[0034] The present invention also provides a storage medium, on which computer program instructions are stored. When the computer program instructions are executed by the processor, the above-mentioned relay control method is implemented.
[0035] The beneficial effects of the present invention are as follows:
[0036] By introducing real-time data acquisition and machine learning algorithms, this method realizes the real-time monitoring and analysis of the relay. First, the on-off state of the relay and the operation parameters of the load device are recorded in real time through the data acquisition module. At the same time, the environmental parameters of the electrical equipment are also collected to obtain comprehensive working state data; the machine learning algorithm is used to deeply analyze the working state data of the relay, timely identify the abnormal state of the relay, and give an early warning through the alarm system, which not only improves the accurate judgment ability of the relay state, but also improves the response speed of the system in case of abnormality, thus effectively avoiding the over-frequent operation of the relay, extending the service life of the equipment, and improving the reliability.
[0037] 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, a digital model of the relay working state is established by preprocessing the collected relay state data and combining PWM control parameters. Then, algorithms such as support vector machines are used to train the digital model. According to the model output, it is judged whether the PWM period and duty cycle need to be adjusted. When the model determines that the current PWM parameters will result in excessive energy consumption, these parameters are automatically optimized, solving the problem of high energy consumption caused by the frequent switching and long-time power-on state of the relay in traditional methods, ensuring that the relay works in the optimal state, reducing energy waste. Through this refined control, the energy consumption of the relay is effectively optimized, reducing power loss and equipment heating, and improving the overall energy efficiency;
[0038] This method combines the minimum action times control strategy to extend the service life of the relay by reducing its frequent operations. By analyzing the actual power demand of the load device and combining the on-off state mapping table of the relay, the target power range is determined, and the power interval set is obtained through discretization processing. By calculating the correlation of elements in each power interval, a relay on-off state adjustment model is established to further predict the total power of the load device. When the deviation between the prediction result and the actual value exceeds the preset threshold, deviation correction is performed according to historical data and the time series prediction model, thereby optimizing the on-off state of the relay, reducing unnecessary action times, solving the problem of short service life of the relay in traditional strong electrical panel switches, effectively reducing the mechanical and electrical wear of the relay, not only extending the service life of the relay, but also reducing energy consumption by controlling the action times and improving the overall efficiency. Brief Description of the Drawings
[0039] For better understanding and implementation, the technical solutions of this application will be described in detail below with reference to the drawings.
[0040] Figure 1 It is a schematic flowchart of a relay control method provided by this application;
[0041] Figure 2 It is a schematic flowchart of real-time monitoring and analysis of a relay control method provided by this application;
[0042] Figure 3 It is a schematic flowchart of controlling the relay of a relay control method provided by this application. Detailed Embodiments
[0043] To further illustrate the technical means and effects adopted by the present invention to achieve the intended invention purpose, exemplary embodiments will be described in detail herein, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of methods and systems consistent with some aspects of the present application as detailed in the appended claims.
[0044] The terms used in the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0045] The following will, in conjunction with the accompanying drawings and preferred embodiments, elaborate in detail on the specific embodiments, features, and effects of the present invention.
[0046] Please refer to Figures 1 - 3 , this embodiment provides a relay control method, including the following steps:
[0047] S1. Obtain the real-time working state data of the high-voltage panel switch, including the on / off state of the relay and the operating parameters of the load device, monitor and analyze it 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;
[0048] Further, obtaining the real-time working state data of the high-voltage panel switch, including the on / off state of the relay, the operating parameters of the load device, etc., and monitoring and analyzing it in real time through the data acquisition module, including:
[0049] S11. Obtain the real-time working state data of the high-voltage panel switch through the data acquisition module, including the on / off state of the relay and the operating parameters of the load device;
[0050] S12. Use machine learning algorithms to analyze the collected on / off state data of the relay, judge whether the working state of the relay is normal, and give an alarm in time when an abnormality is found;
[0051] S13. According to the operating parameter data of the load device, use clustering algorithms to classify different types of load devices and determine the normal operating parameter ranges of various devices.
[0052] 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 potential fault in the high-voltage panel switch.
[0053] Specifically, the system achieves comprehensive monitoring and intelligent analysis of high-voltage panel switches. First, the data acquisition module collects the on / off status of relays and the operating parameters of load devices in real time. These data include key indicators such as current and voltage, as well as the operating environment parameters of electrical equipment obtained through environmental parameter sensors. Next, a machine learning algorithm is used to conduct in-depth analysis of the relay status data to determine whether its operating status is normal and to issue timely alarms when an anomaly is detected. In addition, a clustering algorithm is used to classify load devices and determine the parameter range within which they operate normally. Finally, a decision tree algorithm is used to comprehensively evaluate the operating status of the entire high-voltage panel switch, combining the relay status and load device operating parameters, to identify potential fault hazards. This 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.
[0054] S2. Preprocess the collected status data, remove outliers and noise data, extract key characteristic parameters, build a digital model of the relay working state, and control the relay in combination with PWM period and duty cycle parameters to optimize energy consumption;
[0055] Furthermore, a digital model of the relay working state is constructed, and the relay is controlled by combining the PWM period and duty cycle parameters, including:
[0056] 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;
[0057] S22. Construct a digital model capable of describing the working state of the relay based on the extracted key characteristic parameters, and train the digital model using a support vector machine algorithm to obtain a trained digital model;
[0058] S23, then obtain the period and duty cycle parameters in the PWM control parameters, use them as inputs of the digital model, and use the digital model to determine the working state of the relay under the current PWM parameters.
[0059] S24. When the output of the digital model indicates that the current PWM parameters will cause the relay energy consumption to be too high, adjust the PWM period and duty cycle parameters until the output of the digital model indicates that the relay operates in an optimal state;
[0060] S25. Apply the adjusted PWM cycle and duty cycle parameters to the actual control process of the relay. Control the on / 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.
[0061] Specifically, it realizes the refined control of the relay working state and the optimization of energy consumption. By preprocessing the collected relay status data, removing outliers and noise, and extracting key characteristic parameters, then construct a digital model of the relay working state based on these parameters; use the support vector machine algorithm to train the model so that it can accurately describe the working state of the relay; then, combine the PWM cycle and duty cycle parameters, input these parameters 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 result in too high energy consumption, the system will automatically adjust these parameters until the relay reaches the optimal working state; finally, apply the adjusted PWM parameters to the actual control of the relay, and adapt to the changes in the relay status by continuously monitoring and regularly updating the digital model, so as to achieve the goal of reducing energy consumption and improving system efficiency.
[0062] In an actual application example, by introducing the PWM (Pulse Width Modulation) control technology, precise energy consumption management of an 8-channel relay board is achieved. Initially, the relay continuously consumes power in the fully closed state, resulting in a relatively high overall power consumption. The measured current reaches 240 mA. To reduce energy consumption, a PWM control strategy is adopted. The closing time of the relay is set to 40 ms and the opening time is set to 20 ms. In this way, within one cycle, the relay remains closed most of the time to meet the working requirements, but also has a part of the time open, effectively reducing the continuous flow of current; control the relay through the PWM waveform output by the PWM controller, and successfully reduce the measured current of the system to 130 mA, significantly reducing energy consumption. This control method not only reduces energy consumption, but also reduces the heat generation of the device, improving 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, ensuring that the relay always works 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 relay and the operation efficiency of the entire system are improved, bringing significant economic and environmental benefits.
[0063] Among them, the PWM (Pulse Width Modulation) technology finely controls the on-off state of the relay by adjusting the period and duty cycle, thereby managing energy consumption. The period refers to the time length for a PWM signal to complete a full on-off cycle, and the duty cycle refers to the proportion of time during which the relay remains in the on state within this cycle. When the duty cycle is low, it means that the relay is on for a shorter time in each cycle. Correspondingly, the operating time of load devices such as motors or light bulbs is reduced, directly resulting in lower energy consumption. And a shorter period means that the on-off action of the relay is more frequent. Although the energy consumption in a single cycle is reduced, generally the number of operations of the device per unit time increases, enabling it to respond more sensitively to load changes and cut off the power supply in a timely manner to reduce unnecessary energy consumption. Especially in scenarios where the load demand changes rapidly, such frequent adjustments help reduce energy waste and improve energy efficiency. By optimizing these two parameters, PWM control achieves precise management of the energy consumption of the relay and its load devices, meeting the working requirements while achieving energy conservation and emission reduction.
[0064] S3. According to the digital model of the relay working state, the preset intelligent control strategy and optimization goal, use machine learning algorithms to adaptively optimize the control logic of the relay, and obtain the optimized control sequence and parameter combination;
[0065] Furthermore, using machine learning algorithms to adaptively optimize the control logic of the relay and obtain the optimized control sequence and parameter combination specifically includes:
[0066] Based on the working state of the relay, the on-off time and frequency parameters of the relay, as the input data of the machine learning algorithm, combined with the preset intelligent control strategy and optimization goal, construct the optimization function and constraint conditions of the machine learning algorithm;
[0067] Adopt the reinforcement learning algorithm, through continuous trial and learning, adaptively optimize the control logic of the relay, obtain the optimal control sequence, and dynamically adjust the parameter combination in the control strategy to make it continuously converge to the optimal solution;
[0068] Convert the optimized control sequence into the control instruction of the relay, and send it to the control unit of the relay through the digital interface to control the relay to respond to the real-time changing working environment and requirements, thereby improving the overall performance and energy efficiency of the system.
[0069] 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, based on the real-time working state, on-off time, and frequency parameters of the relay, combined with preset control strategies and optimization goals, an optimization function and constraint conditions are constructed. The reinforcement learning algorithm is used to continuously try and learn, automatically adjusting the control logic to obtain the optimal control sequence and parameter combination. This process enables the control strategy of the relay to dynamically adapt to changes in the working environment, achieving more precise energy management. Finally, the optimized control instructions are sent to the control unit of the relay for execution, thereby improving the response speed, stability, and energy efficiency of the entire system, ensuring that the relay meets the working requirements while achieving energy conservation and emission reduction effects.
[0070] More specifically, in step S2, the collected state data is preprocessed and a digital model of the relay's working state is constructed. Then, the relay is controlled in combination with the PWM cycle and duty ratio parameters to optimize energy consumption. Specifically, this involves giving a long-level, such as 60 ms, when the relay operates, and then switching to PWM control, where the closing time is 40 ms and the opening time is 20 ms. Such a control strategy can effectively reduce current and heat generation, achieving an energy-saving effect. In step S3, according to the digital model of the relay's working state and the preset intelligent control strategy, machine learning algorithms are used to adaptively optimize the control logic of the relay to obtain the optimal control sequence and parameter combination; PWM control is used to reduce current and heat generation, thereby achieving an energy-saving effect.
[0071] S4. Send the optimized control strategy to the control unit of the high-voltage panel switch, and dynamically adjust the on-off time and frequency of the relay through a software program to intelligently control the load;
[0072] Among them, when the relay is unloaded, the working state of the load device is judged through a software algorithm, and the relay power supply is automatically cut off to avoid long-term power-on of the relay, reducing energy consumption and heat generation;
[0073] Furthermore, the on-off time and frequency of the relay are dynamically adjusted through a software program to intelligently control the load, specifically including:
[0074] The generated control instructions are sent to the control unit of the high-voltage panel switch through the communication interface. The control unit receives and parses the instructions, extracts the on-off time and frequency parameters of the relay; the control unit controls the on-off state of the relay according to the received on-off time and frequency parameters, changes the conduction and disconnection time of the relay, and the conduction and disconnection frequency; then, the state signals such as the voltage and current of the load are collected in real time through a software program, and the collected signals are preprocessed such as filtering and normalization to obtain the feature vector representing the load state;
[0075] Input the load status feature vector into a pre-trained load status recognition model, which can be a common machine learning classification model such as a support vector machine, decision tree, or neural network. The model outputs the status category of the load.
[0076] When the status of the load changes, it triggers an adjustment of the control strategy. According to the new load status, the most matching control strategy is selected from the strategy library, and the updated relay on-off time and frequency parameters are generated. The updated control parameters are sent to the control unit again, and 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, enabling the load to always operate in the optimal state.
[0077] Furthermore, when the relay is unloaded, the working state of the load device is judged through a software algorithm, and the relay power supply is automatically cut off. Specifically, it 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. According to the preset judgment rules for the working state of the load device, the obtained relay working state data is analyzed and processed to judge whether the current load device is in the working state. When the judgment result is that the load device is in the non-working state, the control module sends a control instruction to the relay to cut off the relay power supply;
[0078] When the judgment result is that the load device is in the 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 enters the non-working state. After cutting off the relay power supply, the control module continuously monitors the working state of the load device. When it is judged that the load device re-enters the working state, the control module sends a control instruction to the relay to turn on the relay power supply;
[0079] Among them, the control module can also establish a prediction model for the working state of the load device through machine learning algorithms based on historical data, predict the working state of the load device in the future for a period of time, and make a decision to cut off or turn on the relay power supply in advance. Automatically cut off the power supply of the relay when it is unloaded, avoiding unnecessary energy consumption and heat generation caused by the relay being powered on for a long time, so as to achieve the purpose of reducing energy consumption and heat generation; at the same time, predicting the working state of the load device through machine learning algorithms can improve the intelligent level of control and make it more accurate and efficient.
[0080] For example, for a high-power motor, the control unit may receive an instruction to power on for 8 seconds and power off for 2 seconds every 10 seconds, with a frequency of 0.1 Hz. The control unit accurately controls the on-off state of the relay accordingly to achieve fine speed regulation of the motor, and then preprocesses by real-time collecting status signals such as voltage and current of the load.
[0081] Taking an air-conditioning system as an example, the current of the compressor is collected as 10 A, the voltage is 220 V, and the power factor is 0.85. After processing such as filtering and normalization, these original data form a feature vector representing the load state. The feature vector is input into a pre-trained load state recognition model, such as a support vector machine model, and it outputs that the air conditioner is currently in the "cooling" state. When the load state changes, it will trigger an adjustment of the control strategy. For example, when the air conditioner switches from "cooling" to the "dehumidification" mode, the most suitable control strategy 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, etc.; the updated control parameters are sent to the control unit to achieve real-time optimization of the operating state of the air conditioner.
[0082] When the relay is unloaded, the working state of the load device is judged through a software algorithm, and the relay power supply is automatically cut off to save energy. For example, for an electric water heater, the real-time current of the relay is obtained as 0.1 A and the voltage is 220 V. According to the preset rules, it is judged that the water heater is currently in the standby state. At this time, the control module sends an instruction to cut off the power supply to the relay to avoid unnecessary energy consumption. The control module continuously monitors the working state of the load device. When it detects that the user opens the hot water faucet and the water flow sensor is activated, the control module immediately sends an instruction to connect the power supply to the relay to ensure timely hot water supply. In addition, by analyzing historical water usage data, a user water usage behavior model is established. For example, it is predicted that the user will have a washing need at about 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 the energy utilization efficiency. This intelligent control method is not only applicable to household appliances but also widely used in industrial production; generally speaking, 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.
[0083] Specifically, the optimized control strategy is sent to the control unit of the high-voltage panel switch, enabling dynamic adjustment of the on-off time and frequency of the relay to intelligently control the load. It can not only collect status signals such as the voltage and current of the load in real time and obtain the feature vectors of the load status through preprocessing, but also input these feature vectors into a pre-trained machine learning model to identify the status category of the load. When the load status changes, the system will automatically select the most suitable 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, it can judge the working state of the load device through software algorithms and automatically cut off the power supply to reduce energy consumption and heat generation. In addition, it can also establish a prediction model using historical data 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 control, and achieve the maximization of energy efficiency.
[0084] S5. According to the actual power consumption requirements of the load device, control the on-off times of the relay through the minimum action times control strategy to extend the service life of the relay.
[0085] Further, according to the actual power consumption requirements of the load device, control the on-off times of the relay through the minimum action times control strategy, which specifically includes: obtaining the total power data of the load device, combining the pre-established mapping table of power range and relay opening / closing state, determining the target power range, and then performing discretization processing on the target power range to obtain the target power range interval set;
[0086] Calculate the correlation for each element in the target power range interval set to obtain the element correlation degree. Through the element correlation degree, construct a relay opening / closing state adjustment model, where the relay opening / closing state in the model is used as the dependent variable and the element correlation degree is used as the independent variable;
[0087] Predict the total power of the load device through the relay opening / 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, collect the relay timestamp data and construct a time series prediction model, where the timestamp in the model is used as the independent variable and the deviation value is used as the dependent variable, and output a deviation correction value to correct the prediction result using the deviation correction value.
[0088] Among them, to establish a mapping table between the power range and the relay opening / closing state, first analyze the operating modes and efficiencies of the load device at different powers, and then define a series of power thresholds based on this data. Each threshold corresponds to a specific relay opening / closing state, and the mapping logic is based on the optimal operating state of the device at a specific power, considering factors such as device performance, energy consumption efficiency, and safe operating range. Next, discretize the target power range, using clustering algorithms such as K-means 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 device to power changes and the required control accuracy. Finally, calculate the correlation and association degree of the elements within each power interval, and use statistical methods such as the Pearson correlation coefficient or machine learning algorithms such as random forest to evaluate the strength of the relationship between different power intervals. This helps to construct an accurate relay opening / closing state adjustment model to predict and adjust the optimal opening / closing timing of the relay.
[0089] Specifically, by implementing the minimum operation times control strategy, the service life of the relay is effectively extended and the energy consumption is optimized. This strategy first obtains the total power data of the load device, and determines the target power range in combination with the mapping table of the preset power range and the relay opening / closing state. By discretizing the target power range, the correlation of the elements within the power range can be calculated, and a relay opening / closing state adjustment model can be constructed. Using this model, the total power of the load device can be predicted and a prediction result can be generated. When the deviation between the prediction result and the actual value exceeds the set threshold, collect the timestamp data of the relay, construct a time series prediction model, output the deviation correction value, and use these correction values to correct the prediction result. Such a control strategy not only reduces the operation times of the relay, but also keeps the system voltage within the allowable deviation range, verifying the effectiveness of the strategy. By this method, the on / off times of the relay are controlled, thereby reducing wear, extending the service life of the device, and at the same time reducing unnecessary energy waste and improving the overall efficiency of the system.
[0090] Furthermore, after controlling the on / off times of the relay through the minimum operation times 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 the sensor data and relay state, and dynamically adjusting the PWM parameters to adapt to environmental changes and device aging.
[0091] Specifically, after continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms, it specifically includes: training the digital model through the random forest algorithm to output 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, a control instruction is output to the PWM controller. The PWM controller receives the control instruction, dynamically adjusts the PWM parameters, outputs the PWM waveform to the relay, and obtains the actual working state of the relay.
[0092] In this embodiment, by combining PWM control and sensor feedback technology, the overall power consumption of the high-voltage panel switch is reduced, and power is supplied to the relay when necessary, avoiding the high power consumption problem of frequent full-time power supply. By dynamically adjusting the relay control, it is ensured that the working state of the relay conforms to the actual requirements, improving the operation efficiency. Using sensor data for judgment and adjustment prevents 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. By realizing the function improvement only through software upgrade, the simplicity of implementation and the low cost are ensured.
[0093] This embodiment also 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.
[0094] This embodiment also provides a storage medium, on which computer program instructions are stored. When the computer program instructions are executed by the processor, the above-mentioned relay control method is implemented.
[0095] The above is only a preferred embodiment of the present invention, and it does not impose any form of limitation on the present invention. Although the present invention has been disclosed above with the preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the above-disclosed technical content to form an equivalent embodiment with equivalent changes, but as long as the technical content of the present invention is not departed from, any brief modifications, equivalent changes, and modifications made to the above embodiments according to the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A relay control method, characterized in that: The steps include: Acquire 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 the data acquisition module to monitor and analyze in real time, and then use the environmental parameter sensor to collect the working environment parameters of different components in the electrical equipment. 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 period 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 inputs 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; Based on the digital model of the relay's operating state, the preset intelligent control strategy and optimization goals, a machine learning algorithm is used to adaptively optimize the relay's control logic 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 perform intelligent control of the load; Among them, when the relay is unloaded, the working status of the load equipment 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. The relay control method according to claim 1, wherein: Obtain 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 it in real time through the data acquisition module, including: The data acquisition module is used to obtain 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's working status is normal, and issue an alarm in time if an abnormality is found; Based on 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 on-off status of the relay and the operating parameters of the load equipment, use the decision tree algorithm to evaluate the overall working status of the high-voltage panel switch, and determine whether the high-voltage panel switch has potential fault hazards.
3. A relay control method according to claim 1, characterized in that: Adopt machine learning algorithms to adaptively optimize the control logic of the relay, and obtain optimized control sequences and parameter combinations, including: Based on the working state of the relay, the on-off time and frequency parameters of the relay, as the input data of the machine learning algorithm, combined with the preset intelligent control strategy and optimization goal, construct the optimization function and constraint conditions of the machine learning algorithm; Adopt the reinforcement learning algorithm, through continuous attempts and learning, adaptively optimize the control logic of the relay, obtain the optimal control sequence, and dynamically adjust the parameter combination in the control strategy to make it continuously converge to the optimal solution; Convert the optimized control sequence into a control instruction for the relay, and send it to the control unit of the relay through a digital interface to control the relay.
4. A relay control method according to claim 1, characterized in that: Dynamically adjust the on-off time and frequency of the relay through a software program to intelligently control the load, specifically including: Send the generated control instruction to the control unit of the high-voltage panel switch through the communication interface. The control unit receives and parses the instruction, and extracts the on-off time and frequency parameters of the relay; according to the received on-off time and frequency parameters, the control unit controls the on-off state of the relay, changes the on and off time of the relay, as well as the on and off frequency; then, the software program real-time collects the state signal of the load, and preprocesses the collected signal to obtain the feature vector representing the load state; Input the load state feature vector into a pre-trained load state recognition model, and 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, it triggers the adjustment of the control strategy. According to the new load state, select a matching control strategy from the strategy library, generate updated on-off time and frequency parameters of the relay, and send the updated control parameters 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.
5. A relay control method according to claim 1, characterized in that: When the relay is unloaded, judge the working state of the load device through a software algorithm and automatically cut off the power supply of the relay, specifically including: obtain the real-time working state data of the relay, and transmit the data to the control module. According to the preset judgment rule for the working state of the load device, analyze and process the obtained relay working state data to judge whether the current load device is in the working state. When the judgment result is that the load device is currently in the 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 the working state, the control module continues to obtain and analyze the real-time working state data of the relay until it judges that the load device enters the non-working state. After cutting off the power supply of the relay, the control module continuously monitors the working state of the load device. When it judges that the load device re-enters 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 consumption demand of the load device, control the on-off times of the relay through the minimum action times control strategy, including: obtaining the total power data of the load device, combining the pre-established mapping table of power range and relay opening / closing state, determining the target power range, and then performing discretization processing on the target power range to obtain the target power range interval set; Calculate the correlation for each element in the target power range interval set to obtain the element correlation degree. Through the element correlation degree, construct a relay opening / closing state adjustment model, where the relay opening / closing state in the model is the dependent variable and the element correlation degree is the independent variable; Predict the total power of the load device through the relay opening / 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, collect the relay timestamp data and construct a time series prediction model. In the model, the timestamp is the independent variable and the deviation value is the dependent variable, and output a deviation correction value to correct the prediction result using the deviation correction value.
7. A relay control method according to claim 1, characterized in that: After controlling the on-off times of the relay through the minimum action times control strategy, it further includes: continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms, and regularly evaluating the sensor data and relay state to dynamically adjust the PWM parameters.
8. A relay control method according to claim 7, characterized in that: Continuously optimizing the digital model and parameters of the relay working state through machine learning algorithms includes: training the digital model through the random forest algorithm to output 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 a prediction value. When the deviation between the prediction 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. According to the output result of the digital model, calculate the PWM parameter adjustment value, output a control command to the PWM controller, and the PWM controller receives the control command to dynamically adjust the PWM parameters and output a PWM waveform to the relay to obtain the actual working state of the relay.
9. A relay control device, characterized in that: It includes a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, it implements a relay control method as described in any one of claims 1-8.
10. A storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, it implements a relay control method as described in any one of claims 1-8.
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