Method and apparatus for frequency switching of embedded power terminals
By optimizing transmit power through predictive frequency drift compensation and fuzzy control, combined with real-time monitoring and anomaly handling, the contradiction between frequency drift and transient interference suppression in embedded power terminals is resolved, achieving stability and reliability of frequency synchronization and ensuring the safety of the power system.
Patent Information
- Application Number
- CN202411883135.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-12-19
AI Technical Summary
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, which leads to communication frequency asynchrony and data transmission errors. Existing technologies are unable to balance the effects and parameter configurations of the two.
By acquiring frequency deviation measurements, the transmit power and modulation scheme are optimized using a predictive frequency drift compensation model and fuzzy control algorithm. The node synchronization status is monitored in real time, support vector machines are used to identify abnormal situations, and an interrupt mechanism is triggered during frequency switching. After the frequency switching is completed, the frequency switching strategy is calibrated and optimized.
This improved the reliability and stability of frequency synchronization at power terminal nodes, reduced transient interference, and ensured the safe and stable operation of the power system.
Smart Images

Figure CN119788477B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power systems, in particular to a frequency switching method and device of an embedded power terminal. BACKGROUND
[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 the influence of factors such as environmental temperature change and component aging, the working frequency of the terminal will drift, resulting in different synchronization of terminal communication frequency and data transmission error. When the terminal working frequency needs to be switched to adapt to different communication modes, the transient interference generated in the frequency switching process will impact the stability and reliability of bus communication. The frequency drift compensation mechanism maintains synchronization by periodically measuring the frequency deviation between nodes and adjusting the crystal 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
[0004] The present application provides a frequency switching method and device of 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 the actual lightweight soft bus adaptation of power terminals.
[0005] According to an aspect of the present application, a frequency switching method of an embedded power terminal is provided, comprising:
[0006] Obtaining the frequency deviation measurement value of the target embedded power terminal node, inputting the frequency deviation measurement value into the pre-trained frequency drift compensation model, obtaining the output of the frequency drift compensation model as the predicted frequency deviation in the preset time period, judging whether the predicted frequency deviation is greater than the preset frequency synchronization threshold, and if so, determining the frequency switching parameter;
[0007] According to the frequency switching parameter, 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] The target embedded power terminal node receives the target transmission power and modulation mode, judges whether a preset frequency switching condition is met at present, if yes, starts a frequency switching execution process, determines node transmission power and modulation mode based on the target transmission power and modulation mode by using an adaptive dynamic adjustment mode, and monitors synchronization states among all embedded power terminal nodes to determine synchronization among all embedded power terminal nodes of the target embedded power terminal node in the frequency switching execution process.
[0009] In the frequency switching execution process, current frequency deviation measurement values of each embedded power terminal node are acquired, the current frequency deviation measurement values are identified by using a support vector machine algorithm, whether an abnormal situation occurs in the frequency switching execution process is determined according to an identification result, if an abnormal situation occurs, a frequency switching interruption mechanism is triggered, and a state before switching is returned;
[0010] After the frequency switching execution is completed, crystal frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and frequency switching process data of this time is recorded;
[0011] According to recorded historical frequency switching process data, a reinforcement learning algorithm is used to optimize a frequency switching strategy;
[0012] The optimized frequency switching strategy is sent to each embedded power terminal node, and is synchronously updated by using a lightweight software bus.
[0013] According to another aspect of the present application, a frequency switching device of an embedded power terminal is provided, comprising:
[0014] A frequency switching parameter determination module is configured to acquire 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 in a preset time period, judge whether the predicted frequency deviation is greater than a preset frequency synchronization threshold, and determine a frequency switching parameter if yes.
[0015] A parameter feedback module is configured to determine target transmission power and modulation mode in a frequency switching process by using a fuzzy control algorithm according to the frequency switching parameter, and feed back the target transmission power and modulation mode to the target embedded power terminal node.
[0016] a frequency switching module, configured to determine whether a preset frequency switching condition is met after the target embedded power terminal node receives the target transmission power and the modulation mode, and if the preset frequency switching condition is met, start a frequency switching execution process, determine the node transmission power and the modulation mode based on the target transmission power and the modulation mode by using an adaptive dynamic adjustment mode, and monitor the synchronization state among all the embedded power terminal nodes to determine the synchronization among all the embedded power terminal nodes in the frequency switching execution process for the target embedded power terminal node;
[0017] a switching interruption determination module, configured to obtain a current frequency deviation measurement value of each embedded power terminal node in the frequency switching execution process, identify the current frequency deviation measurement value by using a support vector machine algorithm, determine whether an abnormal situation occurs in the frequency switching execution process according to an identification result, and if the abnormal situation occurs, trigger a frequency switching interruption mechanism and return to a state before the switching;
[0018] a data recording module, configured to calibrate and adjust the crystal oscillator frequency parameters of each embedded power terminal node after the frequency switching execution is completed, and record the frequency switching process data of this time;
[0019] a parameter optimization module, configured to optimize the frequency switching strategy by using a reinforcement learning algorithm according to the recorded historical frequency switching process data;
[0020] a parameter synchronization module, configured to distribute the optimized frequency switching strategy to each embedded power terminal node and update the frequency switching strategy by using a lightweight software bus.
[0021] According to another aspect of the present application, an electronic device is provided, which comprises:
[0022] at least one processor; and
[0023] a memory connected to the at least one processor in communication; 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 to enable the at least one processor to execute the frequency switching method of the embedded power terminal according to any one of the embodiments of the present application.
[0025] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to execute the frequency switching method of the embedded power terminal according to any one of the embodiments of the present application when the processor executes the computer instructions.
[0026] The technical scheme of the embodiment of the present application triggers frequency switching by predicting frequency deviation and comparing with a threshold value, adopts a fuzzy control algorithm to optimize transmission power and modulation mode in the switching process, so as to suppress transient interference. In the switching execution, the node synchronization state is monitored in real time, and the 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. The present application also uses historical data to dynamically optimize the compensation model and the switching strategy by using a reinforcement learning algorithm, and synchronously updates to each node. Through the means of predictive triggering, intelligent parameter optimization and real-time monitoring, the problems of transient interference, exception handling and model optimization in the frequency synchronization process of the power terminal node are effectively solved. The technical scheme of the embodiment of the present application significantly improves the reliability and stability of the frequency synchronization of the power terminal node, and provides a strong guarantee for the safe and stable operation of the power system.
[0027] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0029] Figure 1 is a flow chart of a frequency switching method of an embedded power terminal according to the embodiment of the present application;
[0030] Figure 2 is a structural schematic diagram of a frequency switching device of an embedded power terminal according to the embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0032] It is to be understood that the terminology "candidate", "target" and the like in the specification and claims of the application and the above-described drawings are used to distinguish similar objects, and are not necessarily intended to describe a particular sequential or chronological order. It should be understood that the data thus used can be interchanged under appropriate circumstances so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] Figure 1 A flowchart of a frequency switching method of an embedded power terminal is provided for an embodiment of the application. The embodiment can be applied 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 the actual lightweight soft bus adaptation of the power terminal. The method can be executed by a frequency switching device of the embedded power terminal. The frequency switching device of the embedded power terminal can be realized in the form of hardware and / or software. Part of the modules of the frequency switching device of the embedded power terminal can be configured in a server with communication and computing capabilities, and part of the modules can be configured in an embedded power terminal device. As shown in the figure, the method comprises: Figure 1
[0034] S110, 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 to obtain a predicted frequency deviation in a preset time period as an output of the frequency drift compensation model, and determining a frequency switching parameter if the predicted frequency deviation is greater than a preset frequency synchronization threshold.
[0035] In a feasible embodiment, S110 comprises:
[0036] The frequency deviation measurement value is obtained according to a real-time frequency detection unit in the target embedded power terminal, and a shift register is used to record a frequency deviation sequence, and frequency deviation change data is obtained through cyclic buffer storage;
[0037] 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 a frequency sampling timestamp;
[0038] 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 through median smoothing filtering processing;
[0039] The frequency switching parameters are obtained from a frequency reference library for the frequency prediction point, and the frequency switching parameters at least include a reference frequency source index number and a backup frequency source index number, and the reference frequency source is obtained according to the frequency stability sorting.
[0040] Specifically, the current frequency deviation measurement value is obtained by a real-time frequency detection unit in the embedded power terminal, a shift register is used to record the frequency deviation sequence of 8 hours by 10-minute data compression storage, and the frequency deviation change data is obtained by a 1-hour update cycle circular buffer storage. For the recorded frequency deviation change data, a long short-term memory neural network is used to predict the frequency deviation in the next 24 hours, the input feature dimension is set to 48 sampling points, and the output dimension is 24 prediction points. Hour-level frequency prediction data is generated according to the frequency sampling timestamp, and the prediction confidence interval is calculated by the root mean square error. By comparing the prediction data with the frequency synchronization threshold, if any point in the 24-hour frequency prediction data exceeds the synchronization threshold and the confidence interval is greater than 0.9, the frequency switching condition is triggered, and the median smoothing filter is used to process the frequency prediction points before the frequency switching starts. According to the frequency switching condition, the frequency switching parameters are obtained from the frequency reference library, including the reference frequency source index number, the standby frequency source index number, the switching delay and the frequency compensation value. The reference frequency source is selected according to the frequency stability, and the sequential switching timing rules are used to rotate among the standby clock sources. The power terminal device real-time frequency detection continuously generates frequency deviation data during operation, with a raw frequency sampling interval of 1 second, 3600 data points per hour, only 60 data points are needed for 10-minute average compression storage, and 480 data points are needed for 8-hour frequency deviation sequence, with a data compression ratio of 60:1. The circular buffer updates the latest frequency deviation data every 1 hour, maintaining the real-time and continuity of the data. The long short-term memory neural network extracts the power frequency change law through feature extraction, 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 summer peak load period, the prediction result shows 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, and the frequency switching judgment is triggered when the predicted frequency deviation exceeds the threshold and the confidence is higher than 0.9. The 5-point median filter is used to eliminate the mutation points in the frequency prediction curve. Substation B equipment detects the frequency drift trend, predicts that the frequency deviation will reach 0.12 Hz in 24 hours, which exceeds the preset threshold of 0.1 Hz, and the confidence is 0.93, triggering the frequency switching process. The frequency reference library stores 4 sets of clock source parameters, including rubidium atomic clock, constant temperature crystal oscillator, GPS time service and Beidou time service, and each set of parameters records the frequency stability index. When the frequency switching condition is met, the reference source is selected according to the frequency stability from high to low, the stability of the rubidium atomic clock is 10 to the power of -11, the constant temperature crystal oscillator is 10 to the power of -9, and the GPS time service and Beidou time service are 10 to the power of -8. The switching delay is set to 100 milliseconds to ensure the stability of the frequency source switching process.In actual operation, frequency drift occurs in a certain substation, the reference frequency source is switched from a constant temperature crystal oscillator to a rubidium atomic clock, and the maximum frequency deviation during the switching process is not more than 0.01 Hz.
[0041] In one possible embodiment, the method further comprises:
[0042] Obtaining historical frequency deviation measurement values, and training the frequency drift compensation model according to the historical frequency deviation measurement values;
[0043] The training process of the frequency drift compensation model comprises:
[0044] According to the crystal oscillator shell temperature sensor, the environmental temperature data sequence of the sample embedded power terminal node is obtained, and the temperature correction frequency value is calculated by using the environmental temperature data sequence and the frequency value under the standard temperature;
[0045] The frequency deviation sequence is calculated according to the temperature correction frequency value and the reference frequency value, and the noise reduction frequency deviation sequence is obtained by processing the frequency deviation sequence through the Kalman filter;
[0046] According to the three standard deviation principle in the noise reduction frequency deviation sequence, the abnormal value point is calculated, and the predicted frequency deviation value is obtained by using the random forest regressor to calculate the abnormal value point;
[0047] The training sample matrix is constructed according to the predicted frequency deviation value, and the frequency drift compensation model is obtained by training the sample matrix through the convolutional neural network.
[0048] The frequency drift compensation model is constructed by the convolutional neural network algorithm, wherein 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 in the future preset time period.
[0049] Specifically, the ambient temperature data sequence is obtained by the temperature sensor of the shell where the crystal oscillator is located, the temperature correction 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 according to the difference between the correction 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 processed by the Kalman filter to eliminate noise, the sliding time window length is set to 8 hours, the sliding step is 1 hour, and the processed frequency deviation sequence is divided into training data set and verification data set according to the proportion of 4:1. For the training data set, the frequency deviation abnormal value is judged based on the principle of 3 times standard deviation, the random forest regressor is used to replace the frequency deviation prediction value of the abnormal data point, and the training sample matrix is constructed by the replaced frequency deviation sequence. For the training sample matrix, the frequency drift feature is modeled by using a 4-layer convolutional neural network structure, the convolution kernel size is set to 3x3, the pooling layer uses maximum pooling, the number of nodes in the full connection layer is 128, the frequency prediction result is verified according to the verification data set, and the 24-hour frequency drift compensation model is output. The crystal oscillator frequency deviation is significantly affected by the change of ambient temperature, the crystal oscillator frequency measured at the standard temperature of 25 degrees Celsius is 10 megahertz, the frequency decreases by 0.03 hertz per degree Celsius increase, and the frequency increases by 0.025 hertz per degree Celsius decrease, and the influence of ambient temperature on frequency is eliminated by temperature correction. When the power terminal device operates in cold regions in winter, the ambient temperature gradually increases from minus 20 degrees Celsius to minus 5 degrees Celsius, and the frequency deviation gradually decreases from 0.5 hertz to 0.125 hertz. The Kalman filter combines prediction and observation data to eliminate noise from the frequency deviation data, the observation noise variance is set to 0.01, the process noise variance is set to 0.005, and the filtered frequency deviation data is smoother. When operating in an industrial field, the original frequency deviation sequence is disturbed by mechanical vibration and fluctuates sharply, with an amplitude of 0.8 hertz, and the fluctuation amplitude is reduced to within 0.2 hertz after Kalman filtering. The frequency deviation abnormal value is judged by the principle of 3 times standard deviation, the mean and standard deviation of the frequency deviation sequence are calculated, and the upper and lower limits of the abnormal value are obtained by adding and subtracting 3 times the standard deviation. The random forest regressor is composed of 100 decision trees, and the abnormal points exceeding the judgment range are predicted and corrected. The mean of the frequency deviation sequence of a certain measurement point is 0.3 hertz, the standard deviation is 0.05 hertz, the upper limit is 0.45 hertz, and the lower limit is 0.15 hertz. The frequency deviation points exceeding 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 in an 8-hour sampling interval, the first convolutional layer contains 16 feature maps, the second convolutional layer contains 32 feature maps, the third convolutional layer contains 64 feature maps, and the full connection layer outputs 24 prediction values corresponding to the future 24-hour frequency drift prediction result.During the summer high temperature period, the frequency drift of the field equipment of a certain substation gradually increased from 0.2 Hz at 6 am to 0.6 Hz at 2 pm, and the average error between the prediction result and the actual frequency drift was within 0.05 Hz.
[0050] S120, according to the frequency switching parameter, the 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] According to the obtained frequency switching parameter, the fuzzy control algorithm is used to determine the optimal transmission power and modulation mode in the frequency switching process, the transmission power and modulation mode parameters are dynamically adjusted to maximize the suppression of transient interference while ensuring communication quality, and the optimized transmission power and modulation mode parameters are fed back to the embedded power terminal node.
[0052] In one possible embodiment, S120, comprising:
[0053] According to the carrier frequency value and the channel bandwidth in the frequency switching parameter, the signal-to-noise ratio parameter and the bit error rate parameter are collected by the channel detector, and the transmission power level 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 fuzzy controller uses a triangular membership function to classify the bit error rate parameter, and the target transmission power is obtained by reasoning through the rule base;
[0055] According to the target transmission power and the channel parameter, the modulation mode parameter is obtained from the state space; wherein the state space contains the signal-to-noise ratio parameter, the bit error rate parameter and the transmission power parameter;
[0056] According to the modulation mode parameter 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 state feedback is received, the configuration instruction is retransmitted.
[0057] Specifically, according to the carrier frequency value and channel bandwidth in the frequency switching parameter, the signal-to-noise ratio and bit error rate parameters are collected by the channel detector within 200 milliseconds, the signal-to-noise ratio sampling interval is 10 milliseconds, the bit error rate statistical window is 100 milliseconds, the transmitting power is divided into 20 watts, 15 watts, 10 watts, 5 watts and 3 watts by using a five-level quantizer, and the transient interference mutation signal is marked. For the quantized transmitting power level, a fuzzy control algorithm is used to calculate the power adjustment amount, the bit error rate is divided into three levels of high, medium and low based on the triangular membership function, the membership value ranges from 0 to 1, and the transmitting power adjustment direction and step size are obtained by reasoning through the rule base. The transmitting power is dynamically adjusted between adjacent levels, and the maximum transmitting power limit is executed when the transient interference marker signal is triggered. According to the channel parameters after transmitting power adjustment, the modulation mode is selected by using deep reinforcement learning, the state space includes three dimensions of signal-to-noise ratio, bit error rate and transmitting power, the action space includes binary phase shift keying and four-order quadrature amplitude modulation, and the reward function is calculated based on the communication quality score. The modulation mode parameters are updated once every second. According to the optimized transmitting power level and modulation mode parameters, 16-byte configuration instructions are sent to the embedded terminal through the serial communication interface, the instructions include power value, modulation type and execution timestamp, if no execution state feedback is received for more than 50 milliseconds, the configuration instruction is retransmitted, and the transmitting power and modulation parameters are fine-tuned by ±1 level after receiving the feedback. The channel detector obtains the signal-to-noise ratio by measuring the ratio of the received signal level to the noise level, and the signal-to-noise ratio reference value is 15 decibels in the industrial field environment, and 20 sampling points are obtained by sampling every 10 milliseconds. The bit error rate detection uses a pseudo-random sequence test, 1000 test symbols are sent within a 100 millisecond window, and the ratio of the number of error bits to the total number of bits is calculated. The transmitting power quantization level considers the heat dissipation capacity of the device, the 20-watt level corresponds to the maximum transmitting power, and the 3-watt level corresponds to the minimum transmitting power, and the power difference between adjacent levels does not exceed 5 watts. The fuzzy control algorithm fuzzes the bit error rate, the 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, and the triangular membership function is used to calculate the membership. The rule base contains 9 inference rules, the transmitting power is increased when the signal-to-noise ratio decreases and the bit error rate increases, and vice versa. The transient interference is detected by the field equipment of a certain substation, the bit error rate rises rapidly from 0.0005 to 0.015, triggering the maximum power limit, and the transmitting power is adjusted to the 20-watt level. Deep reinforcement learning guides the modulation mode selection by setting the communication quality score, which is obtained by weighting the signal-to-noise ratio, bit error rate and transmitting power. Binary phase shift keying modulation has strong anti-interference ability and is used when the channel state is poor, and four-order quadrature amplitude modulation has high spectral efficiency and is used when the channel state is good. When the equipment of a certain distribution station is running, the signal-to-noise ratio decreases from 18 decibels to 12 decibels, and the modulation mode automatically switches from four-order quadrature amplitude modulation to binary phase shift keying.The parameter configuration instruction is sent to the terminal device through a serial interface, and the 16-byte instruction includes a 4-byte power value field, a 4-byte modulation type field, and an 8-byte timestamp field. After receiving the instruction, the terminal device executes parameter switching at the next whole second and returns an execution state feedback. In a certain industrial park site, the initial transmission power of the terminal device is 10 watts, and the fourth-order quadrature amplitude modulation is used. After detecting interference, the configuration instruction 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] In S130, after the target embedded power terminal node receives the target transmission power and the modulation mode, it determines whether the preset frequency switching condition is met. If the condition is met, the frequency switching execution process is started. The node transmission power and the modulation mode are determined based on the target transmission power and the modulation mode using an adaptive dynamic adjustment method. 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.
[0059] In one possible embodiment, S130 includes:
[0060] The target embedded power terminal node splits the configuration instruction to obtain the target transmission power, the modulation mode, and the synchronization reference value.
[0061] The target transmission power, the modulation mode, and the synchronization reference value are evaluated using a neural network evaluator to obtain a parameter combination score value.
[0062] If the parameter combination score value exceeds a preset threshold value, the frequency switching execution process is started. The target transmission power is incrementally adjusted using a three-level recursive filter, and the modulation mode conversion is completed through a duplex switch.
[0063] Clock synchronization data is collected from adjacent nodes. The clock deviation value is calculated through a phase detector. If the clock deviation value exceeds a preset clock threshold value, 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 parameter and modulation mode parameter, the 16-byte configuration instruction is split by the parameter parser, the instruction structure includes 4-byte transmission power value, 4-byte modulation type, 4-byte synchronization reference value and 4-byte check code, and the 485 serial communication interface is used to read and analyze the result at 9600 baud rate and store it in the 32-bit parameter register. For the value written in the parameter register, the neural network evaluator scores the parameter combination, the input features include transmission power, modulation mode and synchronization reference value, the output score interval is 0 to 100, and the parameter combination score exceeding 80 triggers frequency switching. The parameter priority sequence is read from the frequency switching register, and a three-level recursive filter is used to adjust the transmission power value increment by 0.5 times step, and the shift key modulation and quadrature amplitude modulation mode conversion is completed within 1 millisecond through the duplex switch. After execution, the state synchronization information is sent to the adjacent three nearest physical distance nodes. According to the current value obtained by the terminal node clock counter, the clock synchronization data is collected from the adjacent nodes, the clock deviation value is calculated by the phase detector, and if the deviation exceeds 100 microseconds, the compensation correction is started. The transmission power compensation value and the modulation parameter compensation value are calculated based on the Pearson correlation coefficient, and the node state is synchronized once 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, the value range is 3 to 20 watts, the modulation type is represented by integer 1 and 2 respectively for phase shift keying and quadrature amplitude modulation, the synchronization reference value records the microsecond timestamp, and the check code uses cyclic redundancy check. After receiving the configuration instruction, the field equipment of a certain substation parses the transmission power 15 watts, the modulation type 2, and the synchronization reference value 1234567890, and writes the parameters into the 32-bit register after verification. The neural network evaluator scores the parameter combination using a three-layer structure, the input layer corresponds to three parameter dimensions, the hidden layer has 64 nodes, and the output layer generates a score value of 0 to 100. The scoring standard is based on communication quality and resource consumption, high transmission power and phase shift key modulation obtain higher anti-interference score, and low transmission power and quadrature amplitude modulation obtain higher resource saving score. In industrial field application, the combined parameter transmission power 10 watts, quadrature amplitude modulation, and synchronization deviation 50 microseconds score 85, triggering the frequency switching process. The three-level recursive filter smoothes the transmission power adjustment process through multiple iterations, and the output of each filter is used as the input of the next level, finally generating a smooth power adjustment curve. The power distribution station equipment gradually increases the transmission power from 5 watts to 15 watts with a step of 0.5, and 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 whole millisecond moments, and the transmission power remains unchanged during the switching process. The clock synchronization uses phase comparison method to calculate the deviation, and the terminal node collects the local clock value within 1 microsecond precision every 10 milliseconds, and receives the clock values of the adjacent three nodes.The maximum clock deviation between four adjacent nodes in an industrial park is 150 microseconds, and the correlation coefficient calculated by Pearson correlation coefficient is 0.85. Accordingly, the transmission power compensation value is set to 2 watts, and the modulation parameter compensation is switched to phase shift keying mode. After compensation, the maximum clock deviation between nodes is reduced to 80 microseconds.
[0065] In S140, during the frequency switching execution process, the current frequency deviation measurement value of each embedded power terminal node is obtained, the current frequency deviation measurement value is identified by the support vector machine algorithm, and whether an abnormal situation occurs during the frequency switching execution process is determined according to the identification result. If an abnormal situation occurs, the frequency switching interrupt mechanism is triggered, and the state before switching is returned.
[0066] In one possible embodiment, S140 includes:
[0067] The current frequency deviation measurement value is obtained from each embedded power terminal node by polling cycle, and the current frequency deviation measurement value is recorded to the frequency data by double-ended queue structure;
[0068] The support vector machine classification model is established according to the frequency data, and the support vector machine classification model uses the radial basis function to mark the frequency points exceeding the preset frequency deviation range in the frequency data to obtain a marked point set;
[0069] The front-end buffer and the back-end buffer record the frequency state by the marked point set, and the data mutation mark is obtained by the front-end buffer and the back-end buffer using the sliding window to calculate the frequency deviation mean;
[0070] The interrupt controller is started for the data mutation mark, and if the interrupt controller detects that the data mutation mark count exceeds the 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, the frequency deviation value and the crystal frequency parameter are read from the power terminal node with a 10 ms polling cycle. The communication protocol uses a 256-byte frame length, a parity check, and a 32-bit timestamp format. The 256 sets of frequency data are recorded through a double-ended queue structure and sequentially stored according to the timestamp. For the sequentially stored frequency data, the 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 set to 5 through the radial basis function kernel function parameter. The frequency deviation points that exceed the normal range are marked. The frequency data type is determined from the set of marked points. According to the radial basis function output result, the front-end buffer stores the state before the frequency switching, and the back-end buffer records the state after the switching. The buffer capacity is 32 sets of frequency values. The frequency deviation standard deviation and the frequency mean value are calculated through a 32-point sliding window. If the frequency deviation mean value of 5 consecutive marked points exceeds 0.2 Hz, the data mutation marker is triggered. The frequency data mutation marker is monitored through the interrupt controller. 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. The frequency data is written back from the front-end buffer. The lightweight soft bus communication uses a fixed frame structure to transmit the frequency data. The 256-byte frame includes a 192-byte data area and a 64-byte control area. The data area stores the frequency deviation value and the crystal frequency parameter. The control area includes a 32-bit timestamp and a 32-bit check code. When running in the substation field, the device collects frequency data every 10 ms. The double-ended queue stores 256 sets of data in ascending order of timestamp. When new data arrives, the earliest data record is automatically deleted, maintaining the real-time nature of the data. The support vector machine classifier establishes the discrimination boundary of the frequency data through pre-training. The normal frequency deviation range is set to ±0.1 Hz. The kernel function parameter selection will affect the classification effect. In industrial field applications, the frequency deviation value of a certain distribution equipment suddenly changes from 0.05 Hz to 0.15 Hz. The support vector machine marks the data points that exceed the ±0.1 Hz range as abnormal. The kernel width of 0.5 can better balance overfitting and underfitting. The penalty factor of 5 ensures a reasonable width of the classification boundary. The double-buffer structure includes two 32-group data storage units. The front-end buffer records the stable state before the frequency switching, and the back-end buffer updates the frequency data in real time during the switching process. In actual operation, the 32-point sliding window moves forward by 1 data point each time, and the frequency deviation standard deviation and mean value are calculated. During the frequency switching process of a certain substation equipment, the mean value of 6 consecutive frequency deviation points reaches 0.25 Hz, which exceeds the threshold of 0.2 Hz, triggering the data mutation marker. The interrupt controller uses a hardware method to achieve fast response. The interrupt priority is set to the highest level of 0 among 7 levels.When the field device is running, 12 frequency mutation points are detected within 1 second, exceeding the threshold limit of 10 points, triggering the interrupt handler, and the response is completed within 100 microseconds. The state rollback pointer records the last 8 state changes, and the frequency data in the front-end buffer is restored to the state before switching from the last stable state. In a certain industrial park, when the device frequency switching is abnormal, the state rollback restores the frequency deviation from 0.3 Hz to 0.08 Hz, and the entire process takes no more than 1 millisecond.
[0072] S150, after the frequency switching is completed, the crystal frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the frequency switching process data is recorded.
[0073] After the frequency switching is completed, the lightweight soft bus uniformly calibrates and adjusts the crystal frequency parameters of each node, eliminates the frequency deviation introduced during the switching process, and updates the related parameters in the frequency drift compensation model, preparing for the next frequency switching. At the same time, the process data of this frequency switching is recorded in the system log.
[0074] In one possible embodiment, S150 includes:
[0075] Receiving the frequency calibration instruction sent by the master node, and obtaining the crystal frequency parameters of each node according to the frequency calibration instruction in the polling order from near to far according to the physical distance of the nodes;
[0076] According to the deviation value calculated from the crystal frequency parameters of each node and the reference frequency, the gradient descent algorithm is used to calculate the frequency compensation value, and the frequency trimming controller is used to adjust the crystal frequency parameters of each node;
[0077] The Kalman filter is used to process the frequency compensation value to obtain the frequency drift sequence, and the temperature compensation coefficient is calculated according to the frequency drift sequence and the environmental temperature curve obtained by the temperature detection unit;
[0078] The run-length encoding is used to compress the frequency compensation value and the temperature compensation coefficient to obtain compressed data, and the binary log file with timestamp is generated according to the compressed data for recording.
[0079] Specifically, according to the lightweight soft bus communication protocol, the frequency calibration instruction is issued from the master node in a broadcast manner, the crystal frequency value is read in the 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 of the node frequency and the reference frequency is calculated through the frequency detection unit, and the deviation value is arranged in ascending order to generate a node sequence to be calibrated. For the node sequence to be calibrated, the gradient descent algorithm is used to calculate the frequency compensation value, the learning rate is set to 0.01, the compensation step is calculated based on the difference value of adjacent frequency points, and each level of compensation step is 0.05 Hz. The frequency fine adjustment controller adjusts the node crystal frequency in the range of ±1 Hz until the frequency deviation of adjacent nodes is less than 0.1 Hz. The 8-hour frequency drift sequence is extracted from the frequency compensation data, the Kalman filter is used to smooth the drift sequence, the window length is set to 1 hour, the environmental temperature curve is obtained through the temperature detection unit, the temperature compensation coefficient and the frequency compensation coefficient are calculated, and the frequency drift compensation parameter is updated, and the update period is set to 1 hour. According to the frequency switching data, the binary file is generated through the log recorder, the frequency data and parameter values are compressed by run-length encoding, the log includes 16-bit frequency value, 16-bit parameter value, 32-bit timestamp and 8-bit node number, the last 24-hour log record is stored through the circular buffer, the buffer capacity is set to 64 Mbytes, and the data check adopts 32-bit cyclic redundancy check. In the soft bus communication process, the master node issues the calibration instruction in a broadcast manner, and the node polling adopts the principle of physical distance priority. In the substation field application, the master control device is located in the control room, the 1# power distribution cabinet device node is polled nearby, and then the 2# and 3# power distribution cabinet device nodes are gradually expanded to the farthest polling to the station outside monitoring device. If a node does not respond within 50 milliseconds, the node is skipped and the timeout flag is recorded, and the node is reacquired after the polling is completed. The reference frequency is set to 10 MHz, and the deviation value is obtained by subtracting the reference frequency from the measured frequency of each node. The gradient descent algorithm calculates the optimal frequency compensation value through iteration, and the learning rate 0.01 ensures the convergence speed while avoiding oscillation. In the industrial field operation, the frequency difference between two adjacent power distribution cabinet device nodes is 0.2 Hz, the adjustment is 0.05 Hz each time, and after 4 iterations, the frequency difference is reduced to 0.08 Hz, meeting the 0.1 Hz threshold requirement. The frequency fine adjustment controller adopts the subdivision adjustment method, and divides the ±1 Hz range into 40 adjustment steps. The frequency drift sequence records the frequency change trend within 8 hours, the device frequency remains stable when the environmental temperature is 25 degrees Celsius, and the frequency drift is 0.02 Hz per degree increase in temperature. The Kalman filter smoothes the drift data with a 1-hour sliding window to eliminate the influence of short-term fluctuations. The diurnal temperature difference of the equipment in a certain substation reaches 20 degrees Celsius, resulting in a frequency drift of 0.4 Hz, and the drift parameters are corrected through the temperature compensation coefficient 0.02 and the frequency compensation coefficient 1.2.The log record adopts a compact structure design, 16-bit frequency value resolution reaches 0.001 Hz, 16-bit parameter value contains compensation coefficient and adjustment step, 32-bit timestamp is accurate to millisecond level, and 8-bit node number supports 256 device numbers. In a certain industrial park site, 10 device nodes run for 24 hours to generate 20 million original records, and after run-length encoding compression, the storage space occupies 32 Mbytes. The log buffer is set to 64 Mbytes to meet the double redundancy requirement, and the data integrity is ensured through 32-bit cyclic redundancy check, and the error rate is less than one thousandth.
[0080] S160, according to the recorded historical frequency switching process data, the frequency switching strategy is optimized by using the enhanced learning algorithm.
[0081] In a feasible embodiment, S160, comprising:
[0082] 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 training sample matrix is obtained by sliding window segmentation processing of the data sequence through a data parser;
[0083] According to the training sample matrix, a state space mapping relationship is constructed by using deep reinforcement learning, and the state space mapping relationship contains a frequency deviation interval, a temperature interval and a compensation coefficient interval;
[0084] For the compensation parameter value output by the deep reinforcement learning, a least square method is used to fit a temperature influence curve and a frequency drift curve, and a temperature influence factor and a frequency mutation factor are obtained by weighting the compensation parameter value according to the temperature change rate and the frequency change rate;
[0085] According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated through cubic spline interpolation, and the preset frequency synchronization threshold is incrementally adjusted.
[0086] Specifically, frequency drift data, temperature change data and compensation parameter data are extracted from the frequency switching history record according to the system log database, and the data sequence is segmented by adopting a 2-hour sliding window and a 30-minute step to generate a training sample matrix by data parser in an 8-hour time period. A mapping relationship is constructed by deep reinforcement learning for the training sample matrix, the state space includes a frequency deviation interval of ±1 Hz, a temperature interval of 0 to 50 degrees Celsius, and a compensation coefficient interval of 0 to 2 times, the action space includes a switching time selection of 0 to 24 hours and a compensation parameter adjustment of 0.1 to 10 times, and a reward value is constructed based on the frequency stability time and the frequency deviation root mean square. According to the compensation parameter value output by the deep reinforcement learning, the least square method is used to fit the temperature influence curve and the frequency drift curve, and the compensation parameter value is 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 interval of 0.5 to 1.5 times. According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated by cubic spline interpolation, the preset frequency synchronization threshold is updated, the preset frequency synchronization threshold interval is set to 0.1 to 0.5 Hz, the compensation parameter is incrementally adjusted by a step of 0.05 Hz, and the adjustment period is set to 5 minutes. The historical data segmentation processing captures the frequency change characteristics through a fixed time window, and the 8-hour time period contains a complete frequency drift period, and the 2-hour sliding window can reflect the dynamic change trend of the frequency. In a certain substation, the device records data from 0 o'clock in the morning, and a window is slid every 30 minutes to generate 16 training samples, each sample containing 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 device operating conditions, the frequency deviation changes within ±1 Hz, the temperature covers the annual working temperature from 0 degrees to 50 degrees, and the compensation coefficient is adjusted within 0 to 2 times. In the industrial park field application, the frequency deviation is 0.3 Hz, the temperature is 35 degrees, the compensation coefficient is 1.2, the frequency switching is performed after 4 hours, the compensation parameter is adjusted to 1.5 times, and a reward value of 0.8 is obtained. The temperature influence curve and the frequency drift curve are fitted by the least square method, and the influence degree of temperature change on frequency stability is reflected. When a certain distribution station device operates 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 influence factor 1.2 and the frequency mutation factor 0.8 are calculated, indicating that temperature change is the main influencing factor. The cubic spline interpolation generates a smooth frequency drift compensation curve to ensure continuous change of the compensation parameter. In the operation of the substation device, the frequency switching trigger threshold is initially set to 0.2 Hz, the threshold is updated based on the temperature influence factor 1.2 to obtain a new trigger threshold of 0.24 Hz. The compensation parameter is updated every 5 minutes, and is gradually adjusted from 1.2 times to 1.35 times by a step of 0.05 Hz to realize dynamic compensation of frequency drift.Through multiple frequency switching optimization, the compensation parameters gradually converge to stable values, and the frequency switching success rate is improved from 80% to 95%.
[0087] S170, the optimized frequency switching strategy is issued to each embedded power terminal node, and is updated synchronously through a lightweight soft bus.
[0088] The optimized frequency drift compensation model and the preset frequency synchronization threshold in the frequency switching strategy are issued to each embedded power terminal node, and are updated synchronously through a lightweight soft bus, so that each node always uses the latest frequency drift compensation model optimization parameters and frequency switching strategy.
[0089] In one possible embodiment, S170 includes:
[0090] A parameter issuing instruction is generated using a soft bus communication protocol; wherein the parameter issuing instruction contains compensation parameters in the frequency switching strategy, a version number, a time stamp and a check code;
[0091] The current version number of the node is read by a version number comparator according to the parameter issuing instruction, and the node execution state feedback is obtained using a serial bus; wherein the execution state feedback contains a version number and an execution result code;
[0092] The parameter update progress in the node execution state feedback is recorded using a circular queue, the node version state is recorded using a bitmap, and the node numbers to be updated are obtained from a retransmission queue;
[0093] The update completion flag is obtained through the node state register, the nodes that show check failure for the update completion flag trigger the parameter repair process, and the correct version parameters are selected from the parameter buffer area for updating.
[0094] Specifically, according to the optimized compensation parameters, such as the optimized preset frequency synchronization threshold, a 32-byte parameter issuing instruction is generated using a lightweight soft bus communication protocol, the instruction includes 8-byte compensation parameters, 4-byte version number, 4-byte timestamp, and 16-byte check code, the instruction is issued through a 1 Mbps bandwidth broadcast channel, and if a node response is not received within 100 ms, the transmission rate is reduced to 500 kbps. For the issued parameter update instruction, the current version number of the node is read through a version number comparator, the node execution state feedback is obtained at a 9600 baud rate using a 485 serial bus, the feedback information includes 4-byte version number and 4-byte execution result code, and a retransmission flag is generated for the node with inconsistent version number. According to the node execution state feedback, a 256-length circular queue is used to record the parameter update progress, and a 32-bit bitmap is used to record the version state of each node, 1 in the bitmap indicates consistent version, and 0 indicates inconsistent version, and the node numbers to be updated are 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 state register, a 64-byte sliding window is used to calculate the cyclic redundancy check value, and the parameter repair process is triggered for the node with failed check, the repair instruction includes complete compensation parameters and check information, and the correct version parameters are selected from the parameter buffer area according to the nearest principle for updating. The parameter issuing instruction uses a fixed format structure design, 8-byte compensation parameters in the 32-byte instruction record the frequency correction coefficient and the temperature compensation coefficient, and the 4-byte version number is incremented by 1 each time. In the substation field application, the master station device issues parameter update instructions at a rate of 1 Mbps, and automatically reduces to 500 kbps when communication congestion is detected, ensuring communication reliability. When 20 terminal nodes of a certain distribution station are online at the same time, the average time consumption of parameter issuing is 80 ms. The version number comparison is realized by querying each node through the serial bus, and the state feedback information is transmitted on the 485 bus at a 9600 baud rate. When running in an industrial field, the terminal node receives an update instruction with a version number of 128, compares the current version number of 127, and generates a version inconsistency flag. The execution result code uses 4 bytes to record the update state, 0 indicates success, 1 indicates parameter error, and 2 indicates check failure. After receiving the parameter update, a certain substation device returns the version number 128 and the execution result code 0, indicating that the update is successful. The circular queue uses a 256-length ring buffer to store the node information to be updated, realizing the retransmission mechanism of first-come-first-served. Each bit in the 32-bit bitmap corresponds to a terminal node, and when a certain industrial park is running in the field, the bitmap value is 0xFFFFFFFE, indicating that all nodes except the last node have consistent version numbers. The retransmission queue processes the node numbers to be updated in order, and the parameter retransmission is performed. The parameter integrity check uses a 64-byte sliding window to calculate the cyclic redundancy check value byte by byte.In the field operation process, the parameter check value received by a certain terminal node is 0x12345678, and the calculated check value is 0x12345679. After detecting the check error, the repair process is triggered. The parameter buffer area stores the latest 8 versions of parameter values. When the version number of the node parameter is 129, the correct parameter of version number 128 is read from the buffer area for repair. Through the double protection of cyclic redundancy check and version number, the parameter update success rate reaches 99.9%.
[0095] The technical scheme of the embodiment of the application triggers frequency switching by predicting frequency deviation and comparing it with a threshold value, optimizes the transmission power and modulation mode in the switching process by using a fuzzy control algorithm to suppress transient interference. In the switching execution, the node synchronization state is monitored in real time, and the 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. The application also uses historical data to dynamically optimize the compensation model and the switching strategy by using a reinforcement learning algorithm, and synchronously updates to each node. Through predictive triggering, intelligent parameter optimization and real-time monitoring, etc., the application effectively solves the problems of transient interference, abnormal handling and model optimization in the frequency synchronization process of the power terminal node. The technical scheme of the embodiment of the application significantly improves the reliability and stability of the frequency synchronization of the power terminal node, and provides a strong guarantee for the safe and stable operation of the power system.
[0096] Figure 2 A structural schematic diagram of a frequency switching device of an embedded power terminal is provided for the embodiment of the application. As shown in the figure, Figure 2 The device comprises:
[0097] The frequency switching parameter determination module 210 is configured 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 in the preset time period, and determine the frequency switching parameter if the predicted frequency deviation is greater than the preset frequency synchronization threshold value.
[0098] The parameter feedback module 220 is configured to determine the target transmission power and modulation mode in the frequency switching process by using a fuzzy control algorithm according to the frequency switching parameter, and feed back the target transmission power and modulation mode to the target embedded power terminal node.
[0099] The frequency switching module 230 is configured to, after the target embedded power terminal node receives the target transmission power and the modulation mode, determine whether a preset frequency switching condition is met, and if the preset frequency switching condition is met, start a frequency switching execution process, determine the node transmission power and the modulation mode based on the target transmission power and the modulation mode by using an adaptive dynamic adjustment mode, and monitor the synchronization state among all the embedded power terminal nodes to determine the synchronization of the target embedded power terminal node with all the embedded power terminal nodes in the frequency switching execution process.
[0100] The switching interruption judgment module 240 is configured to, in the frequency switching execution process, acquire the current frequency deviation measurement value of each embedded power terminal node, identify the current frequency deviation measurement value by using a support vector machine algorithm, determine whether an abnormal situation occurs in the frequency switching execution process according to the identification result, and if the abnormal situation occurs, trigger a frequency switching interruption mechanism and return to the state before the switching.
[0101] The data recording module 250 is configured to, after the frequency switching execution is completed, uniformly calibrate and adjust the crystal oscillator frequency parameters of each embedded power terminal node, and record the frequency switching process data of this time.
[0102] The parameter optimization module 260 is configured to, according to the recorded historical frequency switching process data, optimize the frequency switching strategy by using a reinforcement learning algorithm.
[0103] The parameter synchronization module 270 is configured to distribute the optimized frequency switching strategy to each embedded power terminal node and synchronously update the frequency switching strategy by using a lightweight software bus.
[0104] The technical scheme of the embodiment of the application triggers the frequency switching by comparing the predicted frequency deviation with a threshold value, optimizes the transmission power and the modulation mode in the switching process by using a fuzzy control algorithm to suppress the transient interference. In the switching execution, the node synchronization state is monitored in real time, and the interruption mechanism is triggered when an abnormal situation occurs. After the switching is completed, the frequency parameters of each node are calibrated, and the frequency drift compensation model is updated. The application also dynamically optimizes the compensation model and the switching strategy by using a reinforcement learning algorithm based on the historical data, and synchronously updates the compensation model and the switching strategy to each node. By means of the predictive triggering, the intelligent parameter optimization and the real-time monitoring, the problems in the frequency synchronization process of the power terminal node, such as the transient interference, the abnormal processing and the model optimization, are effectively solved. The technical scheme of the embodiment of the application significantly improves the reliability and the stability of the frequency synchronization of the power terminal node, and provides a strong guarantee for the safe and stable operation of the power system.
[0105] Optionally, the apparatus further comprises a model training module configured to:
[0106] acquire historical frequency deviation measurement values, and train the frequency drift compensation model according to the historical frequency deviation measurement values;
[0107] The training process of the frequency drift compensation model comprises:
[0108] According to the environment temperature data sequence of the sample embedded power terminal node obtained by the crystal oscillator shell temperature sensor, the temperature correction frequency value is calculated by using the environment temperature data sequence and the frequency value under the standard temperature;
[0109] The frequency deviation sequence is calculated according to the temperature correction frequency value and the reference frequency value, and the denoised frequency deviation sequence is obtained by processing the frequency deviation sequence through the Kalman filter;
[0110] According to the three standard deviation principle in the denoised frequency deviation sequence, the abnormal value point is calculated by using the random forest regressor to obtain the predicted frequency deviation value;
[0111] The training sample matrix is constructed according to the predicted frequency deviation value, and the frequency drift compensation model is obtained by training the sample matrix through the convolutional neural network.
[0112] Optionally, the frequency switching parameter determination module is specifically configured to:
[0113] According to the real-time frequency detection unit in the target embedded power terminal, the frequency deviation measurement value is obtained, and the frequency deviation sequence is recorded by using the shift register, and the frequency deviation change data is obtained by storing through the circular buffer;
[0114] According to the frequency deviation change data, the frequency deviation is predicted by using the long short-term memory neural network, and the hour-level frequency prediction data is obtained by using the frequency sampling timestamp;
[0115] If any point in the hour-level 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 processing through the median smoothing filter;
[0116] The frequency switching parameter is obtained from the frequency reference library according to the frequency prediction point, and the frequency switching parameter at least includes the reference frequency source index number and the standby frequency source index number, and the reference frequency source is obtained according to the frequency stability sorting.
[0117] Optionally, the parameter feedback module is specifically configured to:
[0118] According to the carrier frequency value and the channel bandwidth in the frequency switching parameter, the signal-to-noise ratio parameter and the bit error rate parameter are collected by using 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 gear value, the bit error rate parameter is classified by using the triangular membership function through the fuzzy controller, and the target transmission power is obtained by reasoning through the rule base;
[0120] Obtaining modulation mode parameters from a state space according to the target transmission power and channel parameters, wherein the state space contains signal-to-noise ratio parameters, bit error rate parameters and transmission power parameters;
[0121] According to the modulation mode parameters and the target transmission power, sending a configuration instruction to the target embedded power terminal node through a serial communication interface, and re-sending the configuration instruction if no execution state feedback is received.
[0122] Optionally, a frequency switching module, specifically 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] Using a neural network evaluator 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 value exceeds a preset threshold, a frequency switching execution process is started, a three-level recursive filter is used to incrementally adjust the target transmission power, and a duplex switch is used to complete modulation mode conversion.
[0126] Clock synchronization data is collected from adjacent nodes, a clock deviation value is calculated by a phase detector, and 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.
[0127] Optionally, a switching interruption judgment module, specifically for:
[0128] A polling cycle is used to obtain current frequency deviation measurement values from each embedded power terminal node, and the current frequency deviation measurement values are recorded to 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 frequency points in the frequency data that exceed a preset frequency deviation range to obtain a marked point set;
[0130] The marked point set triggers a front-end buffer and a back-end buffer to record frequency states, and the front-end buffer and the back-end buffer use a sliding window to calculate frequency deviation mean values to obtain data mutation markers;
[0131] The interruption controller is started for the data mutation markers, and if the interruption controller detects that the data mutation marker count exceeds a preset threshold, a hardware interruption program is triggered to write back the frequency data from the front-end buffer.
[0132] Optionally, a data recording module, specifically for:
[0133] receive the frequency calibration instruction sent by the master node, and obtain the crystal oscillator frequency parameters of each node according to the polling order from near to far according to the physical distance of the nodes according to the frequency calibration instruction;
[0134] Calculate the deviation value according to the crystal oscillator frequency parameters of each node and the reference frequency, calculate the frequency compensation value by using the gradient descent algorithm, and adjust the crystal oscillator frequency parameters of each node by using the frequency trimming controller;
[0135] Process the frequency compensation value by using the Kalman filter to obtain the frequency drift sequence, and calculate the temperature compensation coefficient according to the environmental temperature curve obtained by the temperature detection unit;
[0136] Compress the frequency compensation value and the temperature compensation coefficient by using run-length encoding to obtain compressed data, and generate a binary log file with a timestamp according to the compressed data for recording.
[0137] Optionally, the parameter optimization module is specifically configured to
[0138] 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 the data sequence is processed by the data parser by using sliding window segmentation to obtain a training sample matrix;
[0139] According to the training sample matrix, a state space mapping relationship is constructed by using deep reinforcement learning, and the state space mapping relationship includes a frequency deviation interval, a temperature interval and a compensation coefficient interval;
[0140] For the compensation parameter value output by the deep reinforcement learning, a temperature influence curve and a frequency drift curve are fitted by using the least squares method, and the compensation parameter value is weighted according to the temperature change rate and the frequency change rate to obtain a temperature influence factor and a frequency mutation factor;
[0141] According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated by using cubic spline interpolation, and the preset frequency synchronization threshold is incrementally adjusted.
[0142] Optionally, the parameter synchronization module is specifically configured to
[0143] Generate a parameter issuing instruction by using a soft bus communication protocol; wherein the parameter issuing instruction includes compensation parameters in the frequency switching strategy, a version number, a timestamp and a check code;
[0144] Read the current version number of the node by using the version number comparator according to the parameter issuing instruction, and obtain the node execution state feedback by using a serial bus; wherein the execution state feedback includes a version number and an execution result code;
[0145] The circulating queue records the node execution state feedback parameter update progress, and the node version state is recorded by 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 state register, and the parameter repair process is triggered for the node showing a check failure, and the correct version parameter is selected from the parameter cache area for updating.
[0147] The frequency switching device of the embedded power terminal provided by the embodiment of the application can execute the frequency switching method of the embedded power terminal provided by any embodiment of the application, has the function modules and beneficial effects corresponding to the execution method.
[0148] In the technical scheme of the present application, the acquisition, storage, use, processing and the like of data comply with relevant provisions of national laws and regulations and do not violate public order and good customs.
[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 application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.
[0150] The above specific embodiments do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A frequency switching method for an embedded power terminal, characterized by, The method comprises: Obtaining the frequency deviation measurement value of the target embedded power terminal node, inputting the frequency deviation measurement value into the pre-trained frequency drift compensation model, obtaining the output of the frequency drift compensation model as the predicted frequency deviation in the preset time period, and determining whether the predicted frequency deviation is greater than the preset frequency synchronization threshold, and if so, determining the frequency switching parameter; According to the frequency switching parameter, the 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 the target embedded power terminal node receives the target transmission power and modulation mode, it is determined whether the preset frequency switching condition is met, and if so, the frequency switching execution process is started, the node transmission power and modulation mode are determined based on the target transmission power and modulation mode using the adaptive dynamic adjustment mode, and the synchronization state between all embedded power terminal nodes is monitored to determine the synchronization between all embedded power terminal nodes in the frequency switching execution process of the target embedded power terminal node. During the frequency switching execution process, the current frequency deviation measurement value of each embedded power terminal node is obtained, the current frequency deviation measurement value is identified through the support vector machine algorithm, and it is determined 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 before switching is returned; After the frequency switching execution is completed, the crystal oscillator frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the frequency switching process data of this time is recorded; According to the recorded historical frequency switching process data, the frequency switching strategy is optimized by using the reinforcement learning algorithm; The optimized frequency switching strategy is issued to each embedded power terminal node, and is synchronized and updated through the lightweight software bus.
2. The method of claim 1, wherein, The method further comprises: Obtaining historical frequency deviation measurement values, and training the frequency drift compensation model according to the historical frequency deviation measurement values; The training process of the frequency drift compensation model comprises: Obtaining the environmental temperature data sequence of the sample embedded power terminal node according to the crystal oscillator shell temperature sensor, and calculating the temperature correction frequency value using the environmental temperature data sequence and the frequency value under the standard temperature; A frequency deviation sequence is calculated for the temperature correction frequency value and the reference frequency value, and a denoising frequency deviation sequence is obtained by processing the frequency deviation sequence through a Kalman filter; According to the three standard deviation principle in the denoising frequency deviation sequence, the abnormal value points are calculated, and the predicted frequency deviation value is obtained by using the random forest regressor to calculate the abnormal value points; A training sample matrix is constructed for the predicted frequency deviation value, and the frequency drift compensation model is obtained by training the sample matrix through a convolutional neural network.
3. The method of claim 1, wherein, The frequency deviation measurement value of the target embedded power terminal node is obtained, the frequency deviation measurement value is input into the pre-trained frequency drift compensation model, the output of the frequency drift compensation model is the predicted frequency deviation in the preset time period, it is judged whether the predicted frequency deviation is greater than the preset frequency synchronization threshold, if greater than, the frequency switching parameter is determined, including: According to the real-time frequency detection unit in the target embedded power terminal, the frequency deviation measurement value is obtained, and the shift register is used to record the frequency deviation sequence. The frequency deviation change data is obtained by storing through the circular buffer. For the frequency deviation change data, the 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. 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 through the median smoothing filter processing; The frequency switching parameter is obtained from the frequency reference library according to the frequency prediction point, and the frequency switching parameter at least includes the reference frequency source index number and the standby frequency source index number, and the reference frequency source is obtained according to the frequency stability sorting.
4. The method of claim 1, wherein, According to the frequency switching parameter, the 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, including: According to the carrier frequency value and the 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; According to the transmission power gear value, the bit error rate parameter is classified by the fuzzy controller using the triangular membership function, and the target transmission power is obtained by reasoning the rule base; According to the target transmission power and the channel parameter, the modulation mode parameter is obtained from the state space; wherein the state space includes the signal-to-noise ratio parameter, the bit error rate parameter and the transmission power parameter; According to the modulation mode parameter and the target transmission power, the configuration instruction is sent to the target embedded power terminal node through the serial communication interface, and if no execution state feedback is received, the configuration instruction is retransmitted.
5. The method of claim 4, wherein, After the target embedded power terminal node receives the target transmission power and modulation mode, it is judged whether the current satisfies the preset frequency switching condition, if yes, the frequency switching execution process is started, the node transmission power and modulation mode are determined by using the adaptive dynamic adjustment mode 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 in the frequency switching execution process between all embedded power terminal nodes, including: The target embedded power terminal node splits the configuration instruction to obtain the target transmission power, modulation mode and synchronization reference value; The neural network evaluator is used to evaluate the target transmission power, the modulation mode and the synchronization reference value to obtain the parameter combination score value; If the parameter combination score value exceeds a preset threshold, a frequency switching execution process is started, a three-level recursive filter is used to incrementally adjust the target transmit power, and a modulation mode conversion is completed through a duplex switcher; Clock synchronization data is collected from adjacent nodes, a clock deviation value is calculated through a phase detector, and if the clock deviation value exceeds a preset clock threshold, a transmit power compensation value and a modulation parameter compensation value are calculated based on a Pearson correlation coefficient.
6. The method of claim 1, wherein, In the frequency switching execution process, current frequency deviation measurement values of each embedded power terminal node are obtained, the current frequency deviation measurement values are identified through a support vector machine algorithm, and whether an abnormal situation occurs in the frequency switching execution process is determined according to the identification result. If an abnormal situation occurs, a frequency switching interruption mechanism is triggered, and the state before switching is returned to, including: Current frequency deviation measurement values are obtained from each embedded power terminal node using a polling cycle, and the current frequency deviation measurement values are recorded to frequency data through a double-ended queue structure; A support vector machine classification model is established according to the frequency data, the support vector machine classification model uses a radial basis function to mark frequency points that exceed a preset frequency deviation range in the frequency data to obtain a set of marked points; The set of marked points triggers a front-end buffer and a back-end buffer to record frequency states, and the front-end buffer and the back-end buffer use a sliding window to calculate frequency deviation mean values to obtain data mutation markers; An interrupt controller is started for the data mutation markers, and if the interrupt controller detects that the data mutation marker count exceeds a preset threshold, a hardware interrupt program is triggered to write back frequency data from the front-end buffer.
7. The method of claim 1, wherein, After the frequency switching execution is completed, the crystal frequency parameters of each embedded power terminal node are uniformly calibrated and adjusted, and the frequency switching process data of this time is recorded, including: A frequency calibration instruction sent by a master node is received, and each node crystal frequency parameter is obtained according to the frequency calibration instruction in a polling order from near to far according to node physical distance; A deviation value is calculated according to each node crystal frequency parameter and a reference frequency, a frequency compensation value is calculated for the deviation value using a gradient descent algorithm, and each node crystal frequency parameter is adjusted through a frequency trimming controller; A Kalman filter is used to process the frequency compensation value to obtain a frequency drift sequence, and a temperature compensation coefficient is calculated according to the frequency drift sequence and an environmental temperature curve obtained by a temperature detection unit; 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 according to the compressed data for recording.
8. The method of claim 1, wherein, According to the recorded historical frequency switching process data, an enhanced learning algorithm is used to optimize the frequency switching strategy, including: Frequency drift data, temperature change data, and compensation parameter data in the historical frequency switching process data are used to form a data sequence, and the data sequence is processed through a sliding window segmentation by a data parser to obtain a training sample matrix; The state space mapping relationship is constructed by deep reinforcement learning according to the training sample matrix, and 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, a least square method is used to fit a temperature influence curve and a frequency drift curve, and a temperature influence factor and a frequency mutation factor are obtained by weighting the compensation parameter value according to a temperature change rate and a frequency change rate; According to the temperature influence factor and the frequency mutation factor, a frequency drift compensation curve is generated by cubic spline interpolation, and a preset frequency synchronization threshold is incrementally adjusted.
9. The method of claim 1, wherein, The optimized frequency switching strategy is sent to each embedded power terminal node, and is synchronously updated through a lightweight soft bus, including: A parameter sending instruction is generated by using a soft bus communication protocol, wherein the parameter sending instruction includes compensation parameters in the frequency switching strategy, a version number, a time stamp and a check code; The current version number of the node is read by a version number comparator according to the parameter sending instruction, and a node execution state feedback is obtained by using a serial bus; wherein the execution state feedback includes a version number and an execution result code; The parameter update progress in the node execution state feedback is recorded by using a circular queue, the node version state is recorded by using a bitmap, and a node number to be updated is obtained from a retransmission queue; An update completion flag is obtained by using a node state register, and a parameter repair process is triggered for the node that displays a check failure, and correct version parameters are selected from a parameter buffer area for updating.
10. A frequency switching device for an embedded power terminal, characterized by The device comprises: A frequency switching parameter determination module is configured 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 a predicted frequency deviation in a preset time period as an output of the frequency drift compensation model, and determine a frequency switching parameter if the predicted frequency deviation is greater than a preset frequency synchronization threshold. A parameter feedback module is configured to determine a target transmission power and a modulation mode in a frequency switching process by using a fuzzy control algorithm according to the frequency switching parameter, and feed back the target transmission power and the modulation mode to the target embedded power terminal node. A frequency switching module is configured to determine whether a preset frequency switching condition is met after the target embedded power terminal node receives the target transmission power and the modulation mode, start a frequency switching execution process if the preset frequency switching condition is met, determine a node transmission power and a modulation mode by using an adaptive dynamic adjustment mode based on the target transmission power and the modulation mode, and monitor a synchronization state among all embedded power terminal nodes to determine a synchronization among all embedded power terminal nodes in the frequency switching execution process for the target embedded power terminal node. The switching interruption judgment module is configured to acquire current frequency deviation measurement values of each embedded power terminal node in a frequency switching execution process, identify the current frequency deviation measurement values by using a support vector machine algorithm, determine whether an abnormal situation occurs in the frequency switching execution process according to an identification result, trigger a frequency switching interruption mechanism if the abnormal situation occurs, and return to a state before switching. The data recording module is configured to uniformly calibrate and adjust the crystal frequency parameters of each embedded power terminal node after the frequency switching execution is completed, and record frequency switching process data of this time. The parameter optimization module is configured to optimize the frequency switching strategy by using a reinforcement learning algorithm according to the recorded historical frequency switching process data. The parameter synchronization module is configured to distribute the optimized frequency switching strategy to each embedded power terminal node and synchronously update the frequency switching strategy by using a lightweight software bus.
Citation Information
Patent Citations
Method for performing fuzzy control on frequency of direct-current sending end island system
CN103855705A
Frequency control method and device, equipment and storage medium
CN117254483A