Frequency switching method and device for embedded power terminal

By predicting frequency deviation triggering frequency switching, and combining fuzzy control and enhanced learning algorithms to optimize the transmission power and modulation method, the balance problem of frequency drift compensation and transient interference suppression in frequency synchronization of power terminal nodes is solved, and the reliability and stability of frequency synchronization are improved.

CN119788477AActive Publication Date: 2025-04-08GUANGZHOU KETENG INFORMATION TECH

Patent Information

Application Number
CN202411883135.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-08
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the lightweight soft bus adaptation of power terminals, it is necessary to balance the effects of frequency drift compensation and frequency switching transient interference suppression, and coordinate the operating timing and parameter configuration of both to achieve the best performance and reliability of bus communication.

Method used

Frequency switching is triggered by predicting the frequency deviation and comparing it with the threshold, and a fuzzy control algorithm is used to optimize the transmission power and modulation method during the switching process to suppress transient interference. During the switching execution, the node synchronization status is monitored in real time, and an interrupt mechanism is triggered when an exception occurs. After the switching is completed, the frequency parameters of each node are calibrated and the frequency drift compensation model is updated. Using historical data, the enhanced learning algorithm dynamically optimizes the compensation model and switching strategy, and is updated synchronously to each node.

Benefits of technology

It effectively solves problems such as transient interference, abnormal handling and model optimization in the frequency synchronization process of power terminal nodes, significantly improves the reliability and stability of frequency synchronization of power terminal nodes, and provides strong guarantees for the safe and stable operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788477A_ABST
    Figure CN119788477A_ABST
Patent Text Reader

Abstract

The invention discloses a frequency switching method and device of an embedded power terminal. The method comprises the steps that frequency switching is triggered by predicting frequency deviation and comparing the predicted frequency deviation with a preset frequency synchronization threshold value, and the transmitting power and the modulation mode in the switching process are optimized through a fuzzy control algorithm so as to suppress transient interference. During switching execution, the node synchronization state is monitored in real time, and an interruption mechanism is triggered when abnormity occurs. And after the switching is completed, calibrating the frequency parameter of each node, and updating the frequency drift compensation model. And dynamically optimizing the compensation model and the switching strategy by utilizing historical data and adopting a reinforcement learning algorithm, and synchronously updating the compensation model and the switching strategy to each node. By means of predictive triggering, intelligent parameter optimization, real-time monitoring and the like, the problems of transient interference, exception handling, model optimization and the like in the power terminal node frequency synchronization process are effectively solved. According to the method, the reliability and stability of power terminal node frequency synchronization are remarkably improved, and a powerful guarantee is provided for safe and stable operation of a power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power systems, and in particular to a frequency switching method and device for an embedded power terminal. Background Art

[0002] In the lightweight soft bus adaptation of embedded power terminals, there is a technical contradiction between frequency drift compensation and frequency switching transient interference suppression. When the power terminal works for a long time, due to factors such as ambient temperature changes and component aging, the terminal's operating frequency will drift, resulting in asynchronous communication frequencies between terminals and data transmission errors. When the terminal operating frequency needs to be switched to adapt to different communication modes, the transient interference generated during the frequency switching process will have an impact on the stability and reliability of the bus communication. The frequency drift compensation mechanism maintains synchronization by periodically measuring the frequency deviation between nodes and adjusting the crystal oscillator frequency, but frequent frequency measurement and adjustment will introduce additional transient interference. At the same time, the frequency switching transient interference suppression mechanism controls the transmission power and modulation mode during the switching process to reduce interference, but this will affect the measurement accuracy and adjustment effect of the frequency drift compensation mechanism.

[0003] Therefore, in the actual lightweight soft bus adaptation of power terminals, it is necessary to balance the effects of frequency drift compensation and frequency switching transient interference suppression, and coordinate the working timing and parameter configuration of the two to achieve the best performance and reliability of bus communication. Summary of the invention

[0004] The present invention provides a frequency switching method and device for an embedded power terminal to solve the problem of balancing the effects of frequency drift compensation and frequency switching transient interference suppression, and coordinating the working timing and parameter configuration of the two in actual power terminal lightweight soft bus adaptation.

[0005] According to one aspect of the present invention, a frequency switching method of an embedded power terminal is provided, comprising:

[0006] Obtain a frequency deviation measurement value of a target embedded power terminal node, input the frequency deviation measurement value into a pre-trained frequency drift compensation model, obtain an output of the frequency drift compensation model as a predicted frequency deviation within a preset time period, determine whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determine a frequency switching parameter;

[0007] According to the frequency switching parameters, a fuzzy control algorithm is used to determine the target transmission power and modulation mode in the frequency switching process, and the target transmission power and modulation mode are fed back to the target embedded power terminal node;

[0008] After receiving the target transmission power and modulation mode, the target embedded power terminal node determines whether the preset frequency switching condition is currently met. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization status between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process;

[0009] During the frequency switching process, the current frequency deviation measurement value of each embedded power terminal node is obtained, the current frequency deviation measurement value is identified by a support vector machine algorithm, and whether an abnormal situation occurs during the frequency switching process is determined according to the identification result. If an abnormal situation occurs, the frequency switching interrupt mechanism is triggered and the state is rolled back to the state before the switching;

[0010] After the frequency switching is completed, the crystal oscillator frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the data of this frequency switching process is recorded;

[0011] Based on the recorded historical frequency switching process data, the frequency switching strategy is optimized using a reinforcement learning algorithm;

[0012] The optimized frequency switching strategy is sent to each embedded power terminal node and updated synchronously through a lightweight soft bus.

[0013] According to another aspect of the present invention, a frequency switching device of an embedded power terminal is provided, comprising:

[0014] A frequency switching parameter determination module is used to obtain a frequency deviation measurement value of a target embedded power terminal node, input the frequency deviation measurement value into a pre-trained frequency drift compensation model, obtain the output of the frequency drift compensation model as a predicted frequency deviation within a preset time period, determine whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determine a frequency switching parameter;

[0015] A parameter feedback module, used to determine the target transmission power and modulation mode in the frequency switching process according to the frequency switching parameters by using a fuzzy control algorithm, and to feed back the target transmission power and modulation mode to the target embedded power terminal node;

[0016] A frequency switching module, which is used for the target embedded power terminal node to determine whether the preset frequency switching condition is currently met after receiving the target transmission power and modulation mode. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization state between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process;

[0017] A switching interruption judgment module is used to obtain the current frequency deviation measurement value of each embedded power terminal node during the frequency switching execution process, identify the current frequency deviation measurement value through the support vector machine algorithm, and determine whether an abnormal situation occurs during the frequency switching execution process according to the identification result. If an abnormal situation occurs, the frequency switching interruption mechanism is triggered and the state is rolled back to the state before the switching;

[0018] The data recording module is used to uniformly calibrate and adjust the crystal frequency parameters of each embedded power terminal node after the frequency switching is completed, and record the data of this frequency switching process;

[0019] Parameter optimization module, used to optimize the frequency switching strategy using a reinforcement learning algorithm based on the recorded historical frequency switching process data;

[0020] The parameter synchronization module is used to send the optimized frequency switching strategy to each embedded power terminal node and update it synchronously through a lightweight soft bus.

[0021] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0022] at least one processor; and

[0023] a memory communicatively connected to the at least one processor; wherein,

[0024] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the frequency switching method of the embedded power terminal described in any embodiment of the present invention.

[0025] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the frequency switching method of the embedded power terminal described in any embodiment of the present invention when executed.

[0026] The technical solution of the embodiment of the present invention triggers frequency switching by predicting the frequency deviation and comparing it with the threshold, and uses a fuzzy control algorithm to optimize the transmission power and modulation method during the switching process to suppress transient interference. During the switching execution, the node synchronization status is monitored in real time, and the interruption mechanism is triggered when an abnormality occurs. After the switching is completed, the frequency parameters of each node are calibrated, and the frequency drift compensation model is updated. The present invention also uses historical data to dynamically optimize the compensation model and switching strategy using a reinforcement learning algorithm, and updates them to each node synchronously. Through predictive triggering, intelligent parameter optimization, real-time monitoring and other means, the problems of transient interference, abnormality handling and model optimization in the frequency synchronization process of power terminal nodes are effectively solved. The technical solution of the embodiment of the present invention significantly improves the reliability and stability of the frequency synchronization of power terminal nodes, and provides a strong guarantee for the safe and stable operation of the power system.

[0027] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 is a flow chart of a frequency switching method for an embedded power terminal provided in an embodiment of the present invention;

[0030] Figure 2 It is a structural schematic diagram of a frequency switching device of an embedded power terminal provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "candidate", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] Figure 1 A flow chart of a frequency switching method for an embedded power terminal is provided for an embodiment of the present invention. This embodiment can be applied to solve the problem of balancing the effects of frequency drift compensation and frequency switching transient interference suppression in actual power terminal lightweight soft bus adaptation, and coordinating the working timing and parameter configuration of the two. The method can be executed by a frequency switching device for an embedded power terminal. The frequency switching device for an embedded power terminal can be implemented in the form of hardware and / or software. Some modules of the frequency switching device for an embedded power terminal can be configured in a server with communication and computing capabilities, and some modules can be configured in an embedded power terminal device. Figure 1 As shown, the method includes:

[0034] S110. Obtain the frequency deviation measurement value of the target embedded power terminal node, input the frequency deviation measurement value into a pre-trained frequency drift compensation model, obtain the output of the frequency drift compensation model as the predicted frequency deviation within a preset time period, determine whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determine the frequency switching parameters.

[0035] In a feasible embodiment, S110 includes:

[0036] The frequency deviation measurement value is obtained according to the real-time frequency detection unit in the target embedded power terminal, and the frequency deviation sequence is recorded by using a shift register, and the frequency deviation change data is obtained by circular buffer storage;

[0037] For the frequency deviation change data, a long short-term memory neural network is used to predict the frequency deviation, and the hourly frequency prediction data is obtained through the frequency sampling timestamp;

[0038] If any point in the hourly frequency prediction data is greater than the preset frequency synchronization threshold and the confidence interval is greater than the preset confidence threshold, the frequency prediction point is obtained by median smoothing filtering;

[0039] For the frequency prediction point, a frequency switching parameter is obtained from the frequency reference library. The frequency switching parameter at least includes a reference frequency source index number and a backup frequency source index number. The reference frequency source is obtained by sorting according to frequency stability.

[0040] Specifically, the current frequency deviation measurement value is obtained according to the real-time frequency detection unit in the embedded power terminal, and the frequency deviation sequence of nearly 8 hours is recorded by a shift register with 10-minute data compression storage, and the frequency deviation change data is obtained by cyclic cache storage with a 1-hour update cycle. For the recorded frequency deviation change data, the long short-term memory neural network is used to predict the frequency deviation of the next 24 hours. The input feature dimension is set to 48 sampling points, and the output dimension is 24 prediction points. The hourly frequency prediction data is generated according to the frequency sampling timestamp, and the prediction confidence interval is obtained by the root mean square error calculation. The predicted data is compared with the frequency synchronization threshold. If any point in the frequency prediction data within 24 hours exceeds the synchronization threshold and the confidence interval is greater than 0.9, the frequency switching condition judgment is triggered, and the frequency prediction point is subjected to median smoothing filtering before the frequency switching is started. According to the frequency switching condition, the frequency switching parameters are obtained from the frequency reference library. The parameters include the reference frequency source index number, the backup frequency source index number, the switching delay and the frequency compensation value. The reference frequency source is selected according to the frequency stability sorting, and the sequential switching timing rule is used to rotate between the backup clock sources. The real-time frequency detection of power terminal equipment continuously generates frequency deviation data during operation. The original frequency sampling interval is 1 second, and 3,600 data points are generated per hour. Only 60 data points are needed to compress and store the 10-minute average value. The 8-hour frequency deviation sequence has a total of 480 data points, and the data compression ratio reaches 60:1. The circular cache updates the latest frequency deviation data every hour to maintain the real-time and continuity of the data. The long short-term memory neural network extracts the law of power frequency changes through features. The input layer uses 48 frequency sampling points corresponding to 8 hours of historical data, the hidden layer contains 128 neurons, and the output layer corresponds to 24 future prediction points. In the test scenario, the frequency deviation of substation A equipment gradually increases from 0.02 Hz to 0.05 Hz during the peak load period in summer. The prediction results show that the frequency deviation will reach 0.08 Hz in the next 4 hours, and the prediction confidence is 0.95. The frequency synchronization threshold is set to 0.1 Hz. When the predicted frequency deviation exceeds the threshold and the confidence is higher than 0.9, the frequency switching judgment is triggered, and the mutation points in the frequency prediction curve are eliminated through 5-point median filtering. The substation B device detects the frequency drift trend and predicts that the frequency deviation will reach 0.12 Hz in 24 hours, exceeding the preset threshold of 0.1 Hz, and the confidence level is 0.93, triggering the frequency switching process. The frequency reference library stores four sets of clock source parameters, including rubidium atomic clock, constant temperature crystal oscillator, GPS timing and Beidou timing. Each set of parameters records the frequency stability index. When the frequency switching conditions are met, the reference source is selected from high to low according to the frequency stability. The stability of the rubidium atomic clock is 10 to the negative 11th power, the constant temperature crystal oscillator is 10 to the negative 9th power, and the GPS timing and Beidou timing are 10 to the negative 8th power. The switching delay is set to 100 milliseconds to ensure a smooth frequency source switching process.In actual operation, frequency drift occurred in a substation, and the reference frequency source was switched from a constant temperature crystal oscillator to a rubidium atomic clock. During the switching process, the maximum frequency deviation did not exceed 0.01 Hz.

[0041] In a feasible embodiment, the method further includes:

[0042] Obtain historical frequency deviation measurement values, and train a frequency drift compensation model according to the historical frequency deviation measurement values;

[0043] The training process of the frequency drift compensation model includes:

[0044] Obtain an ambient temperature data sequence of a sample embedded power terminal node according to a crystal oscillator housing temperature sensor, and calculate a temperature-corrected frequency value using the ambient temperature data sequence and the frequency value at a standard temperature;

[0045] A frequency deviation sequence is obtained by calculating the temperature-corrected frequency value and the reference frequency value, and a noise-reduced frequency deviation sequence is obtained by processing the frequency deviation sequence through a Kalman filter;

[0046] The outlier points are judged according to the principle of three times standard deviation in the noise reduction frequency deviation sequence, and the random forest regressor is used to calculate the outlier points to obtain the predicted frequency deviation value;

[0047] A training sample matrix is ​​constructed for the predicted frequency deviation value, and a frequency drift compensation model is obtained through the convolutional neural network training sample matrix.

[0048] A frequency drift compensation model is constructed through a convolutional neural network algorithm, where the input of the frequency drift compensation model is the frequency deviation measurement value of the embedded power terminal node, and the output is the frequency deviation within a preset time period in the future.

[0049] Specifically, the ambient temperature data sequence is obtained from the shell temperature sensor where the crystal oscillator is located, and the temperature-corrected frequency value is obtained by subtracting the ambient temperature influence value from the measured frequency value at the standard temperature. The frequency deviation sequence is constructed based on the difference between the corrected frequency value and the reference frequency value, and the frequency drift feature vector is extracted from the frequency deviation sequence. The frequency deviation sequence is de-noised by using a Kalman filter, and the sliding time window length is set to 8 hours and the sliding step length is set to 1 hour. The processed frequency deviation sequence is divided into a training data set and a validation data set in a ratio of 4:1. For the training data set, the frequency deviation outliers are judged based on the principle of 3 times the standard deviation, and the frequency deviation prediction value is replaced for the abnormal data points by a random forest regressor. The training sample matrix is ​​constructed by the replaced frequency deviation sequence. For the training sample matrix, a 4-layer convolutional neural network structure is used to model the frequency drift features, the convolution kernel size is set to 3x3, the pooling layer uses the maximum pooling, and the number of nodes in the fully connected layer is 128. The frequency prediction results are verified based on the validation data set, and a 24-hour frequency drift compensation model is output. The frequency deviation of the crystal oscillator is significantly affected by the change of ambient temperature. The crystal oscillator frequency measured at the standard temperature of 25 degrees Celsius is 10 MHz. Every increase of 1 degree Celsius in temperature causes the frequency to decrease by 0.03 Hz, and every decrease of 1 degree Celsius causes the frequency to increase by 0.025 Hz. The influence of ambient temperature on frequency is eliminated by temperature correction. When the power terminal equipment is operated in winter in cold areas, the ambient temperature gradually increases from minus 20 degrees Celsius to minus 5 degrees Celsius, and the frequency deviation gradually decreases from 0.5 Hz to 0.125 Hz. The Kalman filter eliminates the noise of the frequency deviation data by combining the prediction and observation data. The observation noise variance is set to 0.01, and the process noise variance is set to 0.005. The frequency deviation data is smoother after filtering. When operating in the industrial field, the original frequency deviation sequence is disturbed by mechanical vibration and fluctuates violently, with an amplitude of 0.8 Hz. After Kalman filtering, the fluctuation amplitude is reduced to less than 0.2 Hz. The frequency deviation outlier judgment adopts the principle of 3 times standard deviation, calculates the mean and standard deviation of the frequency deviation sequence, and adds or subtracts 3 times the standard deviation to obtain the upper and lower limits of the outlier judgment. The random forest regressor consists of 100 decision trees, which predict and correct the outliers that exceed the judgment range. The mean of the frequency deviation sequence of a certain measurement point is 0.3 Hz, the standard deviation is 0.05 Hz, the upper limit of judgment is 0.45 Hz, and the lower limit is 0.15 Hz. The frequency deviation points that exceed the range are replaced by random forest prediction. The input layer of the convolutional neural network adopts an 8x8 structure, corresponding to the frequency deviation sequence within the 8-hour sampling interval. The first convolution layer contains 16 feature maps, the second convolution layer contains 32 feature maps, and the third convolution layer contains 64 feature maps. The fully connected layer outputs 24 prediction values ​​corresponding to the frequency drift prediction results for the next 24 hours.During the high temperatures of summer, the frequency drift of equipment on site at a substation gradually increased from 0.2 Hz at 6 a.m. to 0.6 Hz at 2 p.m., and the average error between the predicted results and the actual frequency drift was within 0.05 Hz.

[0050] S120. According to the frequency switching parameters, a fuzzy control algorithm is used to determine the target transmission power and modulation mode in the frequency switching process, and the target transmission power and modulation mode are fed back to the target embedded power terminal node.

[0051] Based on the obtained frequency switching parameters, a fuzzy control algorithm is used to determine the optimal transmission power and modulation mode during the frequency switching process. By dynamically adjusting the transmission power and modulation mode parameters, transient interference can be suppressed to the maximum extent while ensuring the communication quality. The optimized transmission power and modulation mode parameters are then fed back to the embedded power terminal node.

[0052] In a feasible embodiment, S120 includes:

[0053] According to the carrier frequency value and channel bandwidth in the frequency switching parameter, the signal-to-noise ratio parameter and the bit error rate parameter are collected through the channel detector, and the transmission power gear value is obtained according to the signal-to-noise ratio parameter and the bit error rate parameter;

[0054] According to the transmission power level value, the bit error rate parameters are graded by the fuzzy controller using the triangle membership function, and the target transmission power is obtained by rule base reasoning;

[0055] According to the target transmission power and channel parameters, the modulation mode parameters are obtained from the state space; wherein the state space includes a signal-to-noise ratio parameter, a bit error rate parameter and a transmission power parameter;

[0056] According to the modulation mode parameters and the target transmission power, the configuration command is sent to the target embedded power terminal node through the serial communication interface. If the execution status feedback is not received, the configuration command is resent.

[0057] Specifically, according to the carrier frequency value and channel bandwidth in the frequency switching parameters, the signal-to-noise ratio and bit error rate parameters are collected within a 200 millisecond period through the channel detector, the signal-to-noise ratio sampling interval is 10 milliseconds, and the bit error rate statistical window is 100 milliseconds. The five-level quantizer is used to divide the transmission power into 20 watts, 15 watts, 10 watts, 5 watts, and 3 watts, and the transient interference mutation signal is marked. For the transmission power gear after quantization, the fuzzy control algorithm is used to calculate the power adjustment amount, and the bit error rate is divided into three gears of high, medium and low based on the triangle membership function. The membership value range is 0 to 1. The transmission power adjustment direction and step size are obtained through rule base reasoning, and the transmission power is dynamically adjusted between adjacent gears. The maximum transmission power limit is executed when the transient interference mark signal is triggered. According to the channel parameters after the transmission power is adjusted, deep reinforcement learning is used to select the modulation mode. The state space includes three dimensions of signal-to-noise ratio, bit error rate, and transmission power. The action space includes two modes: binary phase shift keying and fourth-order orthogonal amplitude modulation. The reward function is calculated based on the communication quality score, and the modulation mode parameters are updated once a second. According to the optimized transmission power level and modulation parameters, a 16-byte configuration instruction is sent to the embedded terminal through the serial communication interface. The instruction contains three fields: power value, modulation type, and execution timestamp. If the execution status feedback is not received for more than 50 milliseconds, the configuration instruction is resent. After receiving the feedback, the transmission power and modulation parameters are fine-tuned by ±1 level. The channel detector obtains the signal-to-noise ratio by measuring the ratio of the received signal level to the noise level. In the industrial field environment, the signal-to-noise ratio benchmark value is 15 decibels, and 20 sampling points are obtained by sampling every 10 milliseconds. The bit error rate detection adopts a pseudo-random sequence test, sending 1000 test symbols in a 100 millisecond window, and calculating the ratio of the number of error bits at the receiving end to the total number of bits. The transmission power quantization classification takes into account the heat dissipation capacity of the equipment. The 20-watt level corresponds to the maximum transmission power, the 3-watt level corresponds to the minimum transmission power, and the power difference between adjacent levels does not exceed 5 watts. The fuzzy control algorithm performs fuzzy processing on the bit error rate. A bit error rate less than 0.001 is defined as low, 0.001 to 0.01 is defined as medium, and greater than 0.01 is defined as high. The triangular membership function is used to calculate the membership. The rule base contains 9 inference rules. When the signal-to-noise ratio decreases and the bit error rate increases, the transmission power is increased, and vice versa. The field equipment of a substation detects transient interference, and the bit error rate rises rapidly from 0.0005 to 0.015, triggering the maximum power limit, and the transmission power is adjusted to 20 watts. Deep reinforcement learning guides the selection of modulation mode by setting the communication quality score. The score is obtained by weighting the three indicators of signal-to-noise ratio, bit error rate, and transmission power. Binary phase shift keying modulation has strong anti-interference ability and is used when the channel state is poor. Fourth-order orthogonal amplitude modulation has high spectrum efficiency and is used when the channel state is good. When a certain distribution station equipment is running, the signal-to-noise ratio drops from 18 decibels to 12 decibels, and the modulation mode automatically switches from fourth-order orthogonal amplitude modulation to binary phase shift keying.The parameter configuration command is sent to the terminal device through the serial interface. The power value field occupies 4 bytes, the modulation type field occupies 4 bytes, and the timestamp field occupies 8 bytes in the 16-byte command. After receiving the command, the terminal device executes the parameter switch at the next full second and returns the execution status feedback. At a certain industrial park site, the initial transmission power of the terminal device is 10 watts, using fourth-order orthogonal amplitude modulation. After detecting interference, the configuration command adjusts the power to 15 watts and switches to binary phase shift keying. After execution, the bit error rate is reduced from 0.008 to 0.002.

[0058] S130. After receiving the target transmission power and modulation mode, the target embedded power terminal node determines whether the preset frequency switching condition is currently met. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization status between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process.

[0059] In a feasible embodiment, S130 includes:

[0060] The target embedded power terminal node splits the configuration instruction to obtain the target transmission power, modulation mode and synchronization reference value;

[0061] A neural network evaluator is used to evaluate the target transmission power, modulation mode and synchronization reference value to obtain a parameter combination score value;

[0062] If the parameter combination score exceeds the preset threshold, the frequency switching execution process is initiated, and the target transmission power is incrementally adjusted using a three-stage recursive filter, and the modulation mode conversion is completed through a duplex switch;

[0063] Clock synchronization data is collected from adjacent nodes, and the clock deviation value is calculated through a phase detector. If the clock deviation value exceeds a preset clock threshold, the transmission power compensation value and the modulation parameter compensation value are calculated based on the Pearson correlation coefficient.

[0064] Specifically, according to the received transmission power parameters and modulation mode parameters, the 16-byte configuration instruction is split by the parameter parser. The instruction structure includes a 4-byte transmission power value, a 4-byte modulation type, a 4-byte synchronization reference value, and a 4-byte checksum. The 485 serial communication interface is used to read the parsing result at a baud rate of 9600 and store it in a 32-bit parameter register. For the value written into the parameter register, a neural network evaluator is used to score the parameter combination. The input features include three dimensions: transmission power, modulation mode, and synchronization reference value. The output score range is 0 to 100. The parameter combination score exceeds 80 to trigger frequency switching. The priority sequence is generated according to the score value by the parameter sorter. The parameter priority sequence is read from the frequency switching register, and a three-stage recursive filter is used to adjust the transmission power value increment by 0.5 times the step size. The duplex switcher is used to complete the conversion between phase shift keying modulation and quadrature amplitude modulation modulation within 1 millisecond. After the execution is completed, the status synchronization information is sent to the three adjacent nodes with the closest physical distance. The current value is obtained according to the terminal node clock counter, clock synchronization data is collected from adjacent nodes, and the clock deviation value is calculated through the phase detector. If the deviation exceeds 100 microseconds, compensation correction is started. The transmission power compensation value and modulation parameter compensation value are calculated based on the Pearson correlation coefficient, and the node status is synchronized every 10 milliseconds. The parameter configuration instruction is transmitted in a specific data format. The transmission power value in the 16-byte instruction is represented by a floating point number with a value range of 3 watts to 20 watts. The modulation type uses integers 1 and 2 to represent phase shift keying and orthogonal amplitude modulation respectively. The synchronization reference value records the microsecond timestamp, and the check code uses a cyclic redundancy check. A substation field device receives the configuration instruction, parses the transmission power of 15 watts, the modulation type of 2, and the synchronization reference value of 1234567890, and writes the parameters into a 32-bit register after verification. The neural network evaluator uses a three-layer structure to score the parameter combination. The input layer corresponds to three parameter dimensions, the hidden layer has 64 nodes, and the output layer generates a score value from 0 to 100. The scoring criteria are based on communication quality and resource consumption. High transmit power and phase shift keying modulation get higher anti-interference scores, while low transmit power and orthogonal amplitude modulation modulation get higher resource saving scores. In industrial field applications, the combined parameter transmit power of 10 watts, orthogonal amplitude modulation, and synchronization deviation of 50 microseconds are scored 85, triggering the frequency switching process. The three-stage recursive filter smoothes the transmit power adjustment process through multiple iterations. The output of each filter is used as the input of the next stage, and finally a smooth power adjustment curve is generated. The transmission power of the distribution station equipment is gradually increased from 5 watts to 15 watts, using a 0.5-fold step size. After 6 iterations, it is adjusted to 7.5 watts, 11.25 watts, 13.75 watts, 14.75 watts, and 15 watts respectively. The modulation mode switching is completed at two adjacent full milliseconds, and the transmit power remains unchanged during the switching process. Clock synchronization uses phase comparison to calculate the deviation. The terminal node collects the local clock value within 1 microsecond accuracy every 10 milliseconds and receives the clock values ​​of three adjacent nodes at the same time.The maximum clock deviation between four adjacent nodes at a certain industrial park site reached 150 microseconds. The correlation degree of 0.85 was calculated through the Pearson correlation coefficient. Based on this, the transmission power compensation value was set to 2 watts, and the modulation parameter compensation was switched to phase-shift keying. After compensation, the maximum clock deviation between nodes was reduced to 80 microseconds.

[0065] S140. During the frequency switching process, obtain the current frequency deviation measurement value of each embedded power terminal node, identify the current frequency deviation measurement value through the support vector machine algorithm, and determine whether an abnormal situation occurs during the frequency switching process based on the identification result. If an abnormal situation occurs, trigger the frequency switching interrupt mechanism and roll back to the state before the switch.

[0066] In a feasible embodiment, S140 includes:

[0067] A polling cycle is used to obtain the current frequency deviation measurement value from each embedded power terminal node, and the current frequency deviation measurement value is recorded to the frequency data through a double-ended queue structure;

[0068] A support vector machine classification model is established according to the frequency data, and the support vector machine classification model uses a radial basis function to mark the frequency points in the frequency data that exceed a preset frequency deviation range to obtain a set of marked points;

[0069] The front-end buffer and the back-end buffer are triggered to record the frequency status through the mark point set, and the front-end buffer and the back-end buffer use the sliding window to calculate the average value of the frequency deviation to obtain the data mutation mark;

[0070] The interrupt controller is started for the data mutation mark. If the interrupt controller detects that the data mutation mark count exceeds a preset threshold, the hardware interrupt program is triggered to write back the frequency data from the front-end buffer.

[0071] Specifically, according to the lightweight soft bus communication protocol, a 10 millisecond polling cycle is used to read the frequency deviation value and crystal frequency parameters from the power terminal node. The communication protocol adopts a 256-byte frame length, parity check and 32-bit timestamp format. 256 sets of frequency data are recorded through a double-ended queue structure, and the acquisition results are stored in sequence according to the timestamp. For the frequency data stored in sequence, a support vector machine is used to classify the frequency deviation data. The classification standard is based on the preset normal frequency deviation range of ±0.1 Hz. The kernel width is set to 0.5 and the penalty factor is 5 through the radial basis function kernel function parameters. The frequency deviation points that exceed the normal range are marked, and the frequency data type is determined from the set of marked points. According to the output results of the radial basis function, the front-end buffer is used to store the state before the frequency switching, and the back-end buffer is used to record the state after the switching. The buffer capacity is 32 sets of frequency values. The frequency deviation standard deviation and the frequency mean are calculated through a 32-point sliding window. If the frequency deviation mean of 5 consecutive marked points exceeds 0.2 Hz, the data mutation mark is triggered. The frequency data mutation mark is monitored by the interrupt controller, and the interrupt priority is set to the highest. If the mutation point count exceeds 10 points within 1 second, the hardware interrupt program is triggered. The interrupt response time is set to 100 microseconds. The state rollback pointer with a depth of 8 is used to restore the parameters before the frequency switching, and the frequency data is written back from the front-end buffer. The lightweight soft bus communication uses a fixed frame structure to transmit frequency data. The 256-byte frame contains a 192-byte data area and a 64-byte control area. The data area stores the frequency deviation value and the crystal frequency parameters. The control area contains a 32-bit timestamp and a 32-bit check code. When the substation is running on site, the equipment collects frequency data every 10 milliseconds. The double-ended queue stores 256 groups of data from small to large timestamps. When new data arrives, the earliest data record is automatically deleted to maintain the real-time nature of the data. The support vector machine classifier establishes the discrimination boundary of frequency data through pre-training. The normal frequency deviation range is set to ±0.1 Hz. The selection of kernel function parameters will affect the classification effect. In industrial field applications, the frequency deviation value of a certain power distribution equipment suddenly changes from 0.05 Hz to 0.15 Hz. The support vector machine marks the data points beyond the range of ±0.1 Hz as abnormal. The kernel width of 0.5 can better balance overfitting and underfitting, and the penalty factor of 5 ensures the reasonable width of the classification boundary. The double buffer structure contains two storage units of 32 groups of data. The front-end buffer records the stable state before the frequency switching, and the back-end buffer updates the frequency data during the switching process in real time. In actual operation, the 32-point sliding window moves forward by 1 data point each time, and the standard deviation and mean of the frequency deviation are calculated. During the frequency switching process of a certain substation equipment, the mean of 6 frequency deviation points collected continuously reached 0.25 Hz, exceeding the threshold of 0.2 Hz, triggering the data mutation mark. The interrupt controller uses hardware to achieve fast response, and the interrupt priority is set to the highest level 0 among the 7 levels.When the equipment is running, 12 frequency mutation points are detected within 1 second, exceeding the threshold limit of 10 points, triggering the interrupt handler, and completing the response within 100 microseconds. The state rollback pointer records the last 8 state changes, rolls back from the most recent stable state, and restores the frequency data in the front-end buffer to the state before switching. At a certain industrial park site, when the equipment frequency switching is abnormal, the frequency deviation is restored from 0.3 Hz to 0.08 Hz through state rollback, and the whole process takes no more than 1 millisecond.

[0072] S150: After the frequency switching is completed, the crystal oscillator frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the data of this frequency switching process is recorded.

[0073] After the frequency switching is completed, the lightweight soft bus uniformly calibrates and adjusts the crystal frequency parameters of each node to eliminate the frequency deviation introduced during the switching process, and updates the relevant parameters in the frequency drift compensation model to prepare for the next frequency switching. At the same time, the process data of this frequency switching is recorded in the system log.

[0074] In a feasible embodiment, S150 includes:

[0075] Receive the frequency calibration command sent by the master node, and obtain the crystal oscillator frequency parameters of each node in the polling order from near to far according to the frequency calibration command;

[0076] The deviation value is calculated based on the crystal oscillator frequency parameters of each node and the reference frequency, and the frequency compensation value is calculated based on the deviation value using the gradient descent algorithm, and the crystal oscillator frequency parameters of each node are adjusted through the frequency fine-tuning controller;

[0077] The frequency compensation value is processed by a Kalman filter to obtain a frequency drift sequence, and the temperature compensation coefficient is calculated according to the frequency drift sequence and the ambient temperature curve obtained by the temperature detection unit;

[0078] Run-length encoding is used to compress the frequency compensation value and the temperature compensation coefficient to obtain compressed data, and a binary log file with a timestamp is generated based on the compressed data for recording.

[0079] Specifically, according to the lightweight soft bus communication protocol, the frequency calibration instruction is sent from the master node in a broadcasting manner, and the crystal frequency value is read in a polling order from near to far according to the physical distance of the node. The single node response timeout is set to 50 milliseconds. The deviation value between the node frequency and the reference frequency is calculated by the frequency detection unit, and the deviation value is arranged in ascending order to generate a sequence of nodes to be calibrated. For the sequence of nodes to be calibrated, the gradient descent algorithm is used to calculate the frequency compensation value, the learning rate is set to 0.01, and the compensation step length is calculated based on the difference value of adjacent frequency points. The compensation step length for each level is 0.05 Hz. The node crystal frequency is adjusted within the range of ±1 Hz by the frequency fine-tuning controller until the frequency deviation of adjacent nodes is less than 0.1 Hz. An 8-hour frequency drift sequence is extracted from the frequency compensation data, and the drift sequence is smoothed by a Kalman filter. The window length is set to 1 hour. The ambient temperature curve is obtained by the temperature detection unit, and the temperature compensation coefficient and frequency compensation coefficient are calculated. The frequency drift compensation parameters are updated, and the update cycle is set to 1 hour. According to the frequency switching data, a binary file is generated through the log recorder. The frequency data and parameter values ​​are compressed using run-length encoding. The log contains 16-bit frequency value, 16-bit parameter value, 32-bit timestamp, and 8-bit node number. The log records of the last 24 hours are stored in a circular buffer. The buffer capacity is set to 64 megabytes, and the data verification adopts a 32-bit cyclic redundancy check. During the soft bus communication process, the master node sends calibration instructions by broadcasting, and the node polling adopts the principle of physical distance priority. In the substation field application, the main control device is located in the control room, and the No. 1 distribution cabinet equipment node is polled nearby, and gradually expanded to the No. 2 and No. 3 distribution cabinet equipment, and the farthest polling is to the monitoring equipment outside the station. If a node does not respond within 50 milliseconds, the node is skipped and the timeout mark is recorded, and it will be retrieved after the polling ends. The reference frequency is set to 10 MHz, and the measured frequency of each node is subtracted from the reference frequency to obtain the deviation value. The gradient descent algorithm calculates the optimal frequency compensation value in an iterative manner, and the learning rate of 0.01 avoids oscillation while ensuring the convergence speed. When running on the industrial site, the frequency difference between the two adjacent distribution cabinet equipment nodes is 0.2 Hz, and each iteration is adjusted by 0.05 Hz. After 4 iterations, the frequency difference is reduced to 0.08 Hz, meeting the 0.1 Hz threshold requirement. The frequency fine-tuning controller adopts a subdivision adjustment method to divide the ±1 Hz range into 40 adjustment steps. The frequency drift sequence records the frequency change trend within 8 hours. The frequency of the equipment remains stable when the ambient temperature is 25 degrees Celsius. Every 1 degree increase in temperature causes a frequency drift of 0.02 Hz. The Kalman filter uses a 1-hour sliding window to smooth the drift data to eliminate the impact of short-term fluctuations. The temperature difference between day and night in a substation field equipment reaches 20 degrees Celsius, resulting in a frequency drift of 0.4 Hz. The drift parameters are corrected by the temperature compensation coefficient of 0.02 and the frequency compensation coefficient of 1.2.The log record adopts a streamlined structure design, with a 16-bit frequency value resolution of 0.001 Hz, a 16-bit parameter value containing compensation coefficients and adjustment steps, a 32-bit timestamp accurate to milliseconds, and an 8-bit node number supporting 256 device numbers. At a certain industrial park site, 10 device nodes run for 24 hours to generate 20 million original records, which occupy 32 megabytes of storage space after run-length encoding compression. The log buffer is set to 64 megabytes to meet double redundancy requirements, and data integrity is ensured by a 32-bit cyclic redundancy check, with a check error rate of less than one thousandth.

[0080] S160: Optimize the frequency switching strategy using a reinforcement learning algorithm based on the recorded historical frequency switching process data.

[0081] In a feasible embodiment, S160 includes:

[0082] The frequency drift data, temperature change data and compensation parameter data in the historical frequency switching process data form a data sequence, and the data sequence is processed by a data parser through a sliding window segment to obtain a training sample matrix;

[0083] Based on the training sample matrix, deep reinforcement learning is used to construct a state space mapping relationship, which includes a frequency deviation interval, a temperature interval, and a compensation coefficient interval;

[0084] For the compensation parameter values ​​output by deep reinforcement learning, the least squares method is used to fit the temperature influence curve and the frequency drift curve. The compensation parameter values ​​are weighted according to the temperature change rate and the frequency change rate to obtain the temperature influence factor and the frequency mutation factor.

[0085] According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated by cubic spline interpolation to incrementally adjust the preset frequency synchronization threshold.

[0086] Specifically, according to the system log database, frequency drift data, temperature change data and compensation parameter data are extracted from the frequency switching history records, divided into 8-hour time periods by the data parser, and the data sequence is segmented using a 2-hour sliding window and a 30-minute step size to generate a training sample matrix. For the training sample matrix, deep reinforcement learning is used to construct a mapping relationship. The state space includes a ±1 Hz frequency deviation range, a 0 to 50 degrees Celsius temperature range, and a 0 to 2 times compensation coefficient range. The action space includes 0 to 24 hours of switching time selection and 0.1 to 10 times of compensation parameter adjustment. The reward value is constructed based on the frequency stabilization time and the root mean square of the frequency deviation. According to the compensation parameter values ​​output by deep reinforcement learning, the least squares method is used to fit the temperature influence curve and the frequency drift curve. The compensation parameter values ​​are weighted according to the temperature change rate and the frequency change rate to generate a temperature influence factor and a frequency mutation factor in the range of 0.5 to 1.5 times. According to the temperature influencing factor and the frequency mutation factor, the frequency drift compensation curve is generated by cubic spline interpolation, and the preset frequency synchronization threshold is updated. The preset frequency synchronization threshold interval is set to 0.1 to 0.5 Hz, and the compensation parameter is incrementally adjusted with a step size of 0.05 Hz. The adjustment period is set to 5 minutes. The segmented processing of historical data captures the frequency change characteristics through a fixed time window. The 8-hour time period contains a complete frequency drift cycle, and the 2-hour sliding window can reflect the dynamic change trend of the frequency. At a certain substation site, the equipment starts recording data from 0:00 in the morning, slides the window every 30 minutes, and generates 16 training samples, each of which contains 240 frequency sampling points, 240 temperature sampling points, and 240 compensation parameter values. Deep reinforcement learning obtains the optimal compensation strategy by exploring the environment. The state space reflects the operating conditions of the equipment. The frequency deviation varies within the range of ±1 Hz, and the temperature covers the annual working temperature from 0 to 50 degrees. The compensation coefficient is adjusted within the range of 0 to 2 times. In the field application of the industrial park, when the frequency deviation is 0.3 Hz, the temperature is 35 degrees, and the compensation coefficient is 1.2, the frequency switching is selected to be performed after 4 hours, and the compensation parameter is adjusted to 1.5 times, and a reward value of 0.8 is obtained. The temperature impact curve and the frequency drift curve are fitted by the least squares method to reflect the degree of influence of temperature change on frequency stability. When a distribution station equipment is running in summer, the temperature rises from 25 degrees to 45 degrees, the temperature change rate is 1 degree per hour, and the frequency change rate is 0.02 Hz per hour. The temperature impact factor of 1.2 and the frequency mutation factor of 0.8 are calculated, indicating that temperature change is the main influencing factor. Cubic spline interpolation generates a smooth frequency drift compensation curve to ensure continuous change of compensation parameters. In the operation of the substation field equipment, the frequency switching trigger threshold is initially set to 0.2 Hz. The threshold is updated based on the temperature impact factor of 1.2 to obtain a new trigger threshold of 0.24 Hz. The compensation parameters are updated every 5 minutes, and are gradually adjusted from 1.2 times to 1.35 times in steps of 0.05 Hz to achieve dynamic compensation of frequency drift.Through multiple frequency switching optimizations, the compensation parameters gradually converged to stable values, and the frequency switching success rate increased from 80% to 95%.

[0087] S170: Send the optimized frequency switching strategy to each embedded power terminal node and update it synchronously through a lightweight soft bus.

[0088] The preset frequency synchronization threshold in the optimized frequency drift compensation model and frequency switching strategy is sent to each embedded power terminal node and updated synchronously through a lightweight soft bus to ensure that each node always adopts the latest frequency drift compensation model optimization parameters and frequency switching strategy.

[0089] In a feasible embodiment, S170 includes:

[0090] A soft bus communication protocol is used to generate a parameter sending instruction; wherein the parameter sending instruction includes a compensation parameter in a frequency switching strategy, a version number, a timestamp, and a check code;

[0091] According to the parameters, the command is issued to read the current version number of the node through the version number comparer, and the node execution status feedback is obtained through the serial bus; wherein the execution status feedback includes the version number and the execution result code;

[0092] A circular queue is used to record the parameter update progress in the node execution status feedback, the node version status is recorded through a bitmap, and the node number to be updated is obtained from the retransmission queue;

[0093] The update completion flag is obtained through the node status register, and the parameter repair process is triggered for the node whose update completion flag shows verification failure, and the correct version parameters are selected from the parameter buffer area for update.

[0094] Specifically, according to the optimized compensation parameters, such as the optimized preset frequency synchronization threshold, a lightweight soft bus communication protocol is used to generate a 32-byte parameter sending instruction, which includes an 8-byte compensation parameter, a 4-byte version number, a 4-byte timestamp, and a 16-byte check code. The instruction is sent through a broadcast channel with a bandwidth of 1 megabit per second. If the node response is not received for more than 100 milliseconds, the sending rate is reduced to 500 kilobits per second. For the parameter update instruction sent, the current version number of the node is read through the version number comparator, and the node execution status feedback is obtained at a baud rate of 9600 using a 485 serial bus. The feedback information includes a 4-byte version number and a 4-byte execution result code, and a retransmission mark is generated for nodes with inconsistent version numbers. According to the node execution status feedback, a 256-length circular queue is used to record the parameter update progress, and the version status of each node is recorded through a 32-bit bitmap. In the bitmap, 1 indicates that the version is consistent, and 0 indicates that the version is inconsistent. The node number to be updated is obtained from the retransmission queue according to the first-in-first-out principle for parameter retransmission. The update completion flag is obtained through the node status register, and the cyclic redundancy check value is calculated using a 64-byte sliding window. The parameter repair process is triggered for the node that fails the check. The repair instruction contains complete compensation parameters and verification information. The correct version parameters are selected from the parameter cache according to the principle of proximity for update. The parameter sending instruction adopts a fixed format structure design. The 8-byte compensation parameter in the 32-byte instruction records the frequency correction coefficient and temperature compensation coefficient. The 4-byte version number increases from 1 and increases by 1 each time it is updated. In the substation field application, the master station equipment sends parameter update instructions at a rate of 1 megabit per second. When communication congestion is detected, it is automatically reduced to 500 kilobits per second to ensure communication reliability. When 20 terminal nodes of a distribution station are online at the same time, the average time for parameter sending is 80 milliseconds. The version number comparison is realized through the serial bus to query each node one by one, and the status feedback information is transmitted on the 485 bus at a baud rate of 9600. When running in the industrial field, the terminal node receives an update instruction with a version number of 128, compares the current version number with 127, and generates a version inconsistency mark. The execution result code uses 4 bytes to record the update status, 0 indicates success, 1 indicates parameter error, and 2 indicates verification failure. After receiving the parameter update, a substation device returns version number 128 and execution result code 0, indicating that the update is successful. The circular queue uses a 256-length circular buffer to store the node information to be updated, and implements a first-come-first-served retransmission mechanism. Each bit in the 32-bit bitmap corresponds to a terminal node. When running on-site in an industrial park, the bitmap value is 0xFFFFFFFE, indicating that all node versions except the last node have been updated to the same level. The retransmission queue is processed in the order of node number, and the node identifier to be updated is taken from the queue head to retransmit the parameters. The parameter integrity check uses a 64-byte sliding window to calculate the cyclic redundancy check value byte by byte.During the field operation, the parameter check value received by a terminal node was 0x12345678, while the calculated check value was 0x12345679. After the check error was detected, the repair process was triggered. The parameter buffer area stores the parameter values ​​of the latest 8 versions. When the node parameter with version number 129 is wrong, the correct parameter with version number 128 is read from the buffer area for repair. Through the dual protection of cyclic redundancy check and version number, the parameter update success rate reaches 99.9%.

[0095] The technical solution of the embodiment of the present invention triggers frequency switching by predicting the frequency deviation and comparing it with the threshold, and uses a fuzzy control algorithm to optimize the transmission power and modulation method during the switching process to suppress transient interference. During the switching execution, the node synchronization status is monitored in real time, and the interruption mechanism is triggered when an abnormality occurs. After the switching is completed, the frequency parameters of each node are calibrated, and the frequency drift compensation model is updated. The present invention also uses historical data to dynamically optimize the compensation model and switching strategy using a reinforcement learning algorithm, and updates them to each node synchronously. Through predictive triggering, intelligent parameter optimization, real-time monitoring and other means, the problems of transient interference, abnormality handling and model optimization in the frequency synchronization process of power terminal nodes are effectively solved. The technical solution of the embodiment of the present invention significantly improves the reliability and stability of the frequency synchronization of power terminal nodes, and provides a strong guarantee for the safe and stable operation of the power system.

[0096] Figure 2 The structure diagram of a frequency switching device of an embedded power terminal provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the device comprises:

[0097] The frequency switching parameter determination module 210 is used to obtain the frequency deviation measurement value of the target embedded power terminal node, input the frequency deviation measurement value into the pre-trained frequency drift compensation model, obtain the output of the frequency drift compensation model as the predicted frequency deviation within a preset time period, determine whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determine the frequency switching parameter;

[0098] The parameter feedback module 220 is used to determine the target transmission power and modulation mode in the frequency switching process according to the frequency switching parameters by using a fuzzy control algorithm, and to feed back the target transmission power and modulation mode to the target embedded power terminal node;

[0099] The frequency switching module 230 is used to determine whether the preset frequency switching condition is currently met after the target embedded power terminal node receives the target transmission power and modulation mode. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization state between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process;

[0100] The switching interruption judgment module 240 is used to obtain the current frequency deviation measurement value of each embedded power terminal node during the frequency switching execution process, identify the current frequency deviation measurement value through the support vector machine algorithm, and determine whether an abnormal situation occurs during the frequency switching execution process according to the identification result. If an abnormal situation occurs, the frequency switching interruption mechanism is triggered and the state is rolled back to the state before the switching;

[0101] The data recording module 250 is used to uniformly calibrate and adjust the crystal frequency parameters of each embedded power terminal node after the frequency switching is completed, and record the data of this frequency switching process;

[0102] A parameter optimization module 260 is used to optimize the frequency switching strategy using a reinforcement learning algorithm based on the recorded historical frequency switching process data;

[0103] The parameter synchronization module 270 is used to send the optimized frequency switching strategy to each embedded power terminal node and perform synchronous update through a lightweight soft bus.

[0104] The technical solution of the embodiment of the present invention triggers frequency switching by predicting the frequency deviation and comparing it with the threshold, and uses a fuzzy control algorithm to optimize the transmission power and modulation method during the switching process to suppress transient interference. During the switching execution, the node synchronization status is monitored in real time, and the interruption mechanism is triggered when an abnormality occurs. After the switching is completed, the frequency parameters of each node are calibrated, and the frequency drift compensation model is updated. The present invention also uses historical data to dynamically optimize the compensation model and switching strategy using a reinforcement learning algorithm, and updates them to each node synchronously. Through predictive triggering, intelligent parameter optimization, real-time monitoring and other means, the problems of transient interference, abnormality handling and model optimization in the frequency synchronization process of power terminal nodes are effectively solved. The technical solution of the embodiment of the present invention significantly improves the reliability and stability of the frequency synchronization of power terminal nodes, and provides a strong guarantee for the safe and stable operation of the power system.

[0105] Optionally, the device further includes a model training module, which is used to:

[0106] Obtain historical frequency deviation measurement values, and train a frequency drift compensation model according to the historical frequency deviation measurement values;

[0107] The training process of the frequency drift compensation model includes:

[0108] Obtain an ambient temperature data sequence of a sample embedded power terminal node according to a crystal oscillator housing temperature sensor, and calculate a temperature-corrected frequency value using the ambient temperature data sequence and the frequency value at a standard temperature;

[0109] A frequency deviation sequence is obtained by calculating the temperature-corrected frequency value and the reference frequency value, and a noise-reduced frequency deviation sequence is obtained by processing the frequency deviation sequence through a Kalman filter;

[0110] The outlier points are judged according to the principle of three times standard deviation in the noise reduction frequency deviation sequence, and the random forest regressor is used to calculate the outlier points to obtain the predicted frequency deviation value;

[0111] A training sample matrix is ​​constructed for the predicted frequency deviation value, and a frequency drift compensation model is obtained through the convolutional neural network training sample matrix.

[0112] Optionally, the frequency switching parameter determination module is specifically used to:

[0113] The frequency deviation measurement value is obtained according to the real-time frequency detection unit in the target embedded power terminal, and the frequency deviation sequence is recorded by using a shift register, and the frequency deviation change data is obtained by circular buffer storage;

[0114] For the frequency deviation change data, a long short-term memory neural network is used to predict the frequency deviation, and the hourly frequency prediction data is obtained through the frequency sampling timestamp;

[0115] If any point in the hourly frequency prediction data is greater than the preset frequency synchronization threshold and the confidence interval is greater than the preset confidence threshold, the frequency prediction point is obtained by median smoothing filtering;

[0116] For the frequency prediction point, a frequency switching parameter is obtained from the frequency reference library. The frequency switching parameter at least includes a reference frequency source index number and a backup frequency source index number. The reference frequency source is obtained by sorting according to frequency stability.

[0117] Optional parameter feedback module, specifically used for:

[0118] According to the carrier frequency value and channel bandwidth in the frequency switching parameter, the signal-to-noise ratio parameter and the bit error rate parameter are collected through the channel detector, and the transmission power gear value is obtained according to the signal-to-noise ratio parameter and the bit error rate parameter;

[0119] According to the transmission power level value, the bit error rate parameters are graded by the fuzzy controller using the triangle membership function, and the target transmission power is obtained by rule base reasoning;

[0120] According to the target transmission power and channel parameters, the modulation mode parameters are obtained from the state space; wherein the state space includes a signal-to-noise ratio parameter, a bit error rate parameter and a transmission power parameter;

[0121] According to the modulation mode parameters and the target transmission power, the configuration command is sent to the target embedded power terminal node through the serial communication interface. If the execution status feedback is not received, the configuration command is resent.

[0122] Optional frequency switching module, specifically used for:

[0123] The target embedded power terminal node splits the configuration instruction to obtain the target transmission power, modulation mode and synchronization reference value;

[0124] A neural network evaluator is used to evaluate the target transmission power, modulation mode and synchronization reference value to obtain a parameter combination score value;

[0125] If the parameter combination score exceeds the preset threshold, the frequency switching execution process is initiated, and the target transmission power is incrementally adjusted using a three-stage recursive filter, and the modulation mode conversion is completed through a duplex switch;

[0126] Clock synchronization data is collected from adjacent nodes, and the clock deviation value is calculated through a phase detector. If the clock deviation value exceeds a preset clock threshold, the transmission power compensation value and the modulation parameter compensation value are calculated based on the Pearson correlation coefficient.

[0127] Optionally, the switching interrupt judgment module is specifically used for:

[0128] A polling cycle is used to obtain the current frequency deviation measurement value from each embedded power terminal node, and the current frequency deviation measurement value is recorded to the frequency data through a double-ended queue structure;

[0129] A support vector machine classification model is established according to the frequency data, and the support vector machine classification model uses a radial basis function to mark the frequency points in the frequency data that exceed a preset frequency deviation range to obtain a set of marked points;

[0130] The front-end buffer and the back-end buffer are triggered to record the frequency status through the mark point set, and the front-end buffer and the back-end buffer use the sliding window to calculate the frequency deviation average value to obtain the data mutation mark;

[0131] The interrupt controller is started for the data mutation mark. If the interrupt controller detects that the data mutation mark count exceeds a preset threshold, the hardware interrupt program is triggered to write back the frequency data from the front-end buffer.

[0132] Optional data logging module, specifically used for:

[0133] Receive the frequency calibration command sent by the master node, and obtain the crystal oscillator frequency parameters of each node in the polling order from near to far according to the frequency calibration command;

[0134] The deviation value is calculated based on the crystal oscillator frequency parameters of each node and the reference frequency, and the frequency compensation value is calculated based on the deviation value using the gradient descent algorithm, and the crystal oscillator frequency parameters of each node are adjusted through the frequency fine-tuning controller;

[0135] The frequency compensation value is processed by a Kalman filter to obtain a frequency drift sequence, and the temperature compensation coefficient is calculated according to the frequency drift sequence and the ambient temperature curve obtained by the temperature detection unit;

[0136] Run-length encoding is used to compress the frequency compensation value and the temperature compensation coefficient to obtain compressed data, and a binary log file with a timestamp is generated based on the compressed data for recording.

[0137] Optional, parameter optimization module, specifically used for

[0138] The frequency drift data, temperature change data and compensation parameter data in the historical frequency switching process data form a data sequence, and the data sequence is processed by a data parser through a sliding window segment to obtain a training sample matrix;

[0139] Based on the training sample matrix, deep reinforcement learning is used to construct a state space mapping relationship, which includes a frequency deviation interval, a temperature interval, and a compensation coefficient interval;

[0140] For the compensation parameter values ​​output by deep reinforcement learning, the least squares method is used to fit the temperature influence curve and the frequency drift curve. The compensation parameter values ​​are weighted according to the temperature change rate and the frequency change rate to obtain the temperature influence factor and the frequency mutation factor.

[0141] According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated by cubic spline interpolation to incrementally adjust the preset frequency synchronization threshold.

[0142] Optional, parameter synchronization module, specifically used for

[0143] A soft bus communication protocol is used to generate a parameter sending instruction; wherein the parameter sending instruction includes a compensation parameter in a frequency switching strategy, a version number, a timestamp, and a check code;

[0144] According to the parameters, the command is issued to read the current version number of the node through the version number comparer, and the node execution status feedback is obtained through the serial bus; wherein the execution status feedback includes the version number and the execution result code;

[0145] A circular queue is used to record the parameter update progress in the node execution status feedback, the node version status is recorded through a bitmap, and the node number to be updated is obtained from the retransmission queue;

[0146] The update completion flag is obtained through the node status register, and the parameter repair process is triggered for the node whose update completion flag shows verification failure, and the correct version parameters are selected from the parameter buffer area for update.

[0147] The frequency switching device of the embedded power terminal provided in the embodiment of the present invention can execute the frequency switching method of the embedded power terminal provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0148] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations and do not violate public order and good morals.

[0149] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0150] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A frequency switching method for an embedded power terminal, characterized in that: The method includes: Obtain a frequency deviation measurement value of a target embedded power terminal node, input the frequency deviation measurement value into a pre-trained frequency drift compensation model, obtain an output of the frequency drift compensation model as a predicted frequency deviation within a preset time period, determine whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determine a frequency switching parameter; According to the frequency switching parameters, a fuzzy control algorithm is used to determine the target transmission power and modulation mode in the frequency switching process, and the target transmission power and modulation mode are fed back to the target embedded power terminal node; After receiving the target transmission power and modulation mode, the target embedded power terminal node determines whether the preset frequency switching condition is currently met. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization status between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process; During the frequency switching process, the current frequency deviation measurement value of each embedded power terminal node is obtained, the current frequency deviation measurement value is identified by a support vector machine algorithm, and whether an abnormal situation occurs during the frequency switching process is determined according to the identification result. If an abnormal situation occurs, the frequency switching interrupt mechanism is triggered and the state is rolled back to the state before the switching; After the frequency switching is completed, the crystal oscillator frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the data of this frequency switching process is recorded; Based on the recorded historical frequency switching process data, the frequency switching strategy is optimized using a reinforcement learning algorithm; The optimized frequency switching strategy is sent to each embedded power terminal node and updated synchronously through a lightweight soft bus.

2. The method according to claim 1, characterized in that The method further comprises: Acquire historical frequency deviation measurement values, and train a frequency drift compensation model according to the historical frequency deviation measurement values; The training process of the frequency drift compensation model includes: Acquire an ambient temperature data sequence of a sample embedded power terminal node according to a crystal oscillator housing temperature sensor, and calculate a temperature-corrected frequency value using the ambient temperature data sequence and a frequency value at a standard temperature; A frequency deviation sequence is calculated based on the temperature-corrected frequency value and the reference frequency value, and a noise-reduced frequency deviation sequence is obtained by processing the frequency deviation sequence through a Kalman filter; Determine outlier points according to the triple standard deviation principle in the noise reduction frequency deviation sequence, and use a random forest regressor to calculate the outlier points to obtain a predicted frequency deviation value; A training sample matrix is ​​constructed for the predicted frequency deviation value, and a frequency drift compensation model is obtained by training the sample matrix through a convolutional neural network.

3. The method according to claim 1, characterized in that Obtaining a frequency deviation measurement value of a target embedded power terminal node, inputting the frequency deviation measurement value into a pre-trained frequency drift compensation model, obtaining an output of the frequency drift compensation model as a predicted frequency deviation within a preset time period, and determining whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determining a frequency switching parameter, including: The frequency deviation measurement value is obtained according to the real-time frequency detection unit in the target embedded power terminal, and the frequency deviation sequence is recorded by using a shift register, and the frequency deviation change data is obtained by circular buffer storage; For the frequency deviation change data, a long short-term memory neural network is used to predict the frequency deviation, and hourly frequency prediction data is obtained through the frequency sampling timestamp; If any point in the hourly frequency prediction data is greater than a preset frequency synchronization threshold and the confidence interval is greater than a preset confidence threshold, a frequency prediction point is obtained by median smoothing filtering; A frequency switching parameter is obtained from a frequency reference library for the frequency prediction point, wherein the frequency switching parameter at least includes a reference frequency source index number and a backup frequency source index number, and the reference frequency source is obtained by sorting according to frequency stability.

4. The method according to claim 1, characterized in that According to the frequency switching parameters, a fuzzy control algorithm is used to determine a target transmission power and a modulation mode in a frequency switching process, and the target transmission power and the modulation mode are fed back to the target embedded power terminal node, including: According to the carrier frequency value and the channel bandwidth in the frequency switching parameter, a signal-to-noise ratio parameter and a bit error rate parameter are collected by a channel detector, and a transmission power gear value is obtained according to the signal-to-noise ratio parameter and the bit error rate parameter; According to the transmission power gear value, the bit error rate parameter is graded by a fuzzy controller using a triangular membership function, and the target transmission power is obtained by reasoning through a rule base; According to the target transmit power and channel parameters, a modulation mode parameter is obtained from a state space; wherein the state space includes a signal-to-noise ratio parameter, a bit error rate parameter and a transmit power parameter; According to the modulation mode parameters and the target transmission power, a configuration instruction is sent to the target embedded power terminal node through a serial communication interface, and if no execution status feedback is received, the configuration instruction is resent.

5. The method according to claim 4, characterized in that After receiving the target transmission power and modulation mode, the target embedded power terminal node determines whether the preset frequency switching condition is currently met. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization state between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process, including: The target embedded power terminal node splits the configuration instruction to obtain the target transmission power, modulation mode and synchronization reference value; Using a neural network evaluator to evaluate the target transmit power, the modulation mode and the synchronization reference value to obtain a parameter combination score value; If the parameter combination score value exceeds a preset threshold, the frequency switching execution process is started, the target transmission power is incrementally adjusted using a three-stage recursive filter, and the modulation mode conversion is completed through a duplex switch; Clock synchronization data is collected from adjacent nodes, and a clock deviation value is calculated through a phase detector. If the clock deviation value exceeds a preset clock threshold, a transmission power compensation value and a modulation parameter compensation value are calculated based on the Pearson correlation coefficient.

6. The method according to claim 1, characterized in that During the frequency switching process, the current frequency deviation measurement value of each embedded power terminal node is obtained, the current frequency deviation measurement value is identified by a support vector machine algorithm, and whether an abnormal situation occurs during the frequency switching process is determined according to the identification result. If an abnormal situation occurs, the frequency switching interrupt mechanism is triggered, and the state before the switching is rolled back, including: Acquire a current frequency deviation measurement value from each embedded power terminal node using a polling cycle, and record the current frequency deviation measurement value into frequency data through a double-ended queue structure; Establishing a support vector machine classification model according to the frequency data, wherein the support vector machine classification model uses a radial basis function to mark frequency points in the frequency data that exceed a preset frequency deviation range to obtain a set of marked points; The front-end buffer and the back-end buffer are triggered to record the frequency state by the mark point set, and the front-end buffer and the back-end buffer use a sliding window to calculate the frequency deviation average value to obtain a data mutation mark; An interrupt controller is started for the data mutation mark. If the interrupt controller detects that the data mutation mark count exceeds a preset threshold, a hardware interrupt program is triggered to write back the frequency data from the front-end buffer.

7. The method according to claim 1, characterized in that After the frequency switching is completed, the crystal oscillator frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the frequency switching process data is recorded, including: Receive a frequency calibration instruction sent by the master node, and obtain the crystal oscillator frequency parameters of each node in a polling order from near to far according to the frequency calibration instruction; Calculate the deviation value based on the crystal oscillator frequency parameter of each node and the reference frequency, use the gradient descent algorithm to calculate the frequency compensation value of the deviation value, and adjust the crystal oscillator frequency parameter of each node through the frequency fine-tuning controller; The frequency compensation value is processed by a Kalman filter to obtain a frequency drift sequence, and a temperature compensation coefficient is calculated according to the frequency drift sequence and an ambient temperature curve obtained by a temperature detection unit; The frequency compensation value and the temperature compensation coefficient are compressed by run-length encoding to obtain compressed data, and a binary log file with a timestamp is generated according to the compressed data for recording.

8. The method according to claim 1, characterized in that: Based on the recorded historical frequency switching process data, the frequency switching strategy is optimized using a reinforcement learning algorithm, including: According to the frequency drift data, temperature change data and compensation parameter data in the historical frequency switching process data, a data sequence is formed, and a data analyzer is used to perform sliding window segmentation processing on the data sequence to obtain a training sample matrix; Constructing a state-space mapping relationship using deep reinforcement learning according to the training sample matrix, wherein the state-space mapping relationship includes a frequency deviation interval, a temperature interval, and a compensation coefficient interval; For the compensation parameter value output by the deep reinforcement learning, the temperature influence curve and the frequency drift curve are fitted by the least square method, and the compensation parameter value is weighted according to the temperature change rate and the frequency change rate to obtain the temperature influence factor and the frequency mutation factor; According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated by cubic spline interpolation, and an incremental adjustment is performed on the preset frequency synchronization threshold.

9. The method according to claim 1, characterized in that: The optimized frequency switching strategy is sent to each embedded power terminal node and updated synchronously through a lightweight soft bus, including: A soft bus communication protocol is used to generate a parameter delivery instruction; wherein the parameter delivery instruction includes a compensation parameter, a version number, a timestamp and a check code in a frequency switching strategy; According to the parameters, the command is issued to read the current version number of the node through the version number comparer, and the node execution status feedback is obtained through the serial bus; wherein the execution status feedback includes the version number and the execution result code; A circular queue is used to record the parameter update progress in the node execution status feedback, a node version status is recorded through a bitmap, and the node number to be updated is obtained from the retransmission queue; The update completion flag is obtained through the node status register, and the parameter repair process is triggered for the node whose update completion flag shows that the verification has failed, and the correct version parameters are selected from the parameter buffer area for updating.

10. A frequency switching device for an embedded power terminal, characterized in that: The device includes: A frequency switching parameter determination module is used to obtain a frequency deviation measurement value of a target embedded power terminal node, input the frequency deviation measurement value into a pre-trained frequency drift compensation model, obtain the output of the frequency drift compensation model as a predicted frequency deviation within a preset time period, determine whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and if so, determine a frequency switching parameter; A parameter feedback module, used to determine the target transmission power and modulation mode in the frequency switching process according to the frequency switching parameters by using a fuzzy control algorithm, and to feed back the target transmission power and modulation mode to the target embedded power terminal node; A frequency switching module, which is used for the target embedded power terminal node to determine whether the preset frequency switching condition is currently met after receiving the target transmission power and modulation mode. If so, the frequency switching execution process is started, and the node transmission power and modulation mode are determined by an adaptive dynamic adjustment method based on the target transmission power and modulation mode, and the synchronization state between all embedded power terminal nodes is monitored to determine the synchronization of the target embedded power terminal node among all embedded power terminal nodes in the frequency switching execution process; A switching interruption judgment module is used to obtain the current frequency deviation measurement value of each embedded power terminal node during the frequency switching execution process, identify the current frequency deviation measurement value through the support vector machine algorithm, and determine whether an abnormal situation occurs during the frequency switching execution process according to the identification result. If an abnormal situation occurs, the frequency switching interruption mechanism is triggered and the state is rolled back to the state before the switching; The data recording module is used to uniformly calibrate and adjust the crystal frequency parameters of each embedded power terminal node after the frequency switching is completed, and record the data of this frequency switching process; Parameter optimization module, used to optimize the frequency switching strategy using a reinforcement learning algorithm based on the recorded historical frequency switching process data; The parameter synchronization module is used to send the optimized frequency switching strategy to each embedded power terminal node and update it synchronously through a lightweight soft bus.

Citation Information

Patent Citations

  • Method for performing fuzzy control on frequency of direct-current sending end island system

    CN103855705A

  • Electric power wireless communication method, device and system for distribution network automation

    CN105337697A

  • Frequency control method and device, equipment and storage medium

    CN117254483A

  • Tertiary frequency modulation method for power system

    US20240313539A1

Cited By

  • Time synchronization drift self-correction method for special transformer acquisition terminal

    CN120378039A

  • A time synchronization drift self-correction method for dedicated transformer acquisition terminals

    CN120378039B

  • Super-long link transmission parameter self-synchronization measurement method based on two-dimensional sliding window

    CN120512194A

  • A two-dimensional sliding window-based super-long link transmission parameter self-synchronization measurement method

    CN120512194B

  • Method and device for deducting frequency drift of hydrogen atomic clock

    CN121276931A