Coding method for converting composite power quality disturbance signal into two-dimensional image

By constructing the transfer origin matrix and the transfer distance matrix, calculating the transfer probability matrix and the migration probability matrix within the period, encoding and visualizing the composite power quality perturbation signal, the problem of insufficient signal encoding in the prior art is solved, and classification accuracy and information response capabilities are improved.

CN119520785APending Publication Date: 2025-02-25GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411665237.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively encode composite power quality disturbance signals, especially when ignoring the amplitude dependence and multi-periodic characteristics of the signal, resulting in insufficient coding information and low classification accuracy.

Method used

By counting the distribution range of the global sample, dividing the quantile units, constructing the transfer origin matrix and the transfer distance matrix, calculating the transfer probability matrix and the transfer probability matrix within the period, and finally encoding and visualizing the two-dimensional image.

Benefits of technology

Reliable, efficient and sufficient global encoding of composite power quality disturbance signals is achieved, and the accuracy of signal classification is improved, especially in the case of high downsampling rates, it can still effectively reflect signal information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520785A_ABST
    Figure CN119520785A_ABST
Patent Text Reader

Abstract

The invention discloses a coding method for converting a composite power quality disturbance signal into a two-dimensional image, and the method comprises the steps: S1, carrying out the statistics of the distribution range [Xmin, Xmax] of a global sample, confirming the number Q of quantile units, and setting the number L of input data cycles; s2, determining the length of an input signal, recording the input signal as xt, and dividing the signal into L equal-length signals according to the periodicity; s3, constructing a transfer origin matrix S and a transfer distance matrix D; s4, counting transition probabilities based on the divided L signals with the same length, and carrying out statistical calculation to obtain L transition probability matrixes M; s5, calculating a migration probability matrix R in the L periods; s6, based on the migration probability obtained through calculation, the probability of jumping between energy levels is calculated; and S7, coding and visualizing a calculation result in the step S6 to obtain a two-dimensional image. The two-dimensional image obtained by coding can better reflect the distribution characteristics of the one-dimensional signal, and the signal information can still be well reflected under the condition of very high downsampling rate (1280 * 1280 downsampling to 32 * 32 size).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of composite power quality disturbance signal processing, and in particular relates to a method for encoding a composite power quality disturbance signal into a two-dimensional image. Background Art

[0002] Composite power quality disturbance signals refer to situations where the voltage or current waveform in the power system deviates from the normal sine and cosine characteristics and the specified amplitude fluctuations. This deviation is generally caused by equipment failure, abnormal operating conditions, accidental events, sudden changes in state, etc. in the power system. Therefore, it can be considered that the composite power quality disturbance reflects the current non-ideal working conditions and information; at the same time, the composite power quality disturbance will also affect the operation of other normal equipment or cause irreversible damage, such as affecting the speed of asynchronous motors, the accuracy of measuring equipment, and the life of power electronic equipment. At present, the control plan for composite power quality disturbances is mainly based on the type of disturbance for positive control. Therefore, accurate, reliable and rapid identification of disturbance types is of great significance and positive driving role in the control of composite power quality disturbances.

[0003] At present, one of the most mainstream methods for the management of composite power quality disturbances is to use advanced deep learning models for comprehensive identification. However, the current advanced neural network models are mainly designed for two-dimensional images, that is, if the input is a two-dimensional image, it will be more in line with the structure of the model and achieve better access and adjustment. If the time series is stacked directly, the encoded information will be too small, because the first layer of the advanced neural network model is usually convolution pooling and other operations, it is difficult to effectively use the information; therefore, some scholars choose to design a coding scheme to convert the one-dimensional composite power quality disturbance spread out according to the time series into a two-dimensional image. The current mainstream one-dimensional time signal sequence to two-dimensional image encoding methods include recursive graphs, Gram angle fields, Markov transfer fields, etc., but this encoding method ignores the amplitude dependence characteristics of composite power quality disturbances, and also ignores the multi-periodic characteristics of composite power quality signals, that is, the composite power quality disturbance signal usually used for conversion is not only a signal that needs to pay attention to the amplitude relationship, but also a composite signal with multiple sine and cosine cycles as input. Summary of the invention

[0004] In order to solve the technical problems existing in the background technology, the present invention aims to provide a coding method for converting a composite power quality disturbance signal into a two-dimensional image, specifically a conversion method from a one-dimensional signal to a two-dimensional image, which can achieve reliable, efficient and sufficient global coding of the composite power quality disturbance signal.

[0005] In order to solve the technical problem, the technical solution of the present invention is:

[0006] A method for encoding a composite power quality disturbance signal into a two-dimensional image, the method comprising:

[0007] S1: Distribution range of statistical global samples [ X min , X max ], confirm the number of quantile units Q, and set the number of input data cycles L;

[0008] S2: Determine the length of the input signal and record it as x t , dividing the signal into L signals of equal length according to the number of cycles;

[0009] S3: construct the transfer origin matrix S and the transfer distance matrix D;

[0010] S4: Based on the divided L signals of equal length, statistically calculate the transition probability and obtain L transition probability matrices M;

[0011] S5: Based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M, calculate the migration probability matrix R within L periods;

[0012] S6: Based on the calculated migration probability, calculate the probability of jumping between energy levels;

[0013] S7: Encode and visualize the calculation result of step S6 to obtain a two-dimensional image.

[0014] Further, the step S1 comprises:

[0015] Global sample distribution statistics: Comprehensively analyze the data of all available samples to obtain the global distribution characteristics of the signal; including calculating the minimum, maximum, mean, and standard deviation statistics of the samples, so as to identify the overall characteristics of the signal under different conditions;

[0016] Confirm the number of quantile units: According to the distribution of global samples, determine the number of quantile units that need to be divided, divide the amplitude range of the signal into multiple units, each unit represents a certain distribution range, and can be set to several commonly used quantiles; when setting the number of quantile units, divide them according to the boundaries of signal changes to ensure that the quantile division boundaries coincide with the distinction boundaries of signal features as much as possible;

[0017] Set the number of input data cycles L: The number of input data cycles L is set according to the actual periodic characteristics of the signal, and is determined by observing the periodic characteristics of the signal and the corresponding spectrum analysis method.

[0018] Further, in step S2: the input signal is divided by its length. If the input signal has M sampling points, it can be divided into L periods. Then the number of sampling points in each period is N sampling points, where the condition M=N×L is satisfied. Then each period isX ={x1,x2,...x t ,...,x N}.

[0019] Further, the step S3 comprises:

[0020] The single periodic signal obtained by the above division is divided into X ={x1,x2,...x t ,...,x N}, so according to the calculation method of formula 1, formula 2, and formula 3, it can be obtained; the specific process is: for any given amplitude distribution [X min ,X max ] of the signal X={x1,x2,...x t ,...,x N}, it can be divided into Q quantile units, and the width of each quantile unit is calculated by formula 1;

[0021] q j =[j-1,j]*(X max -X min ) / Q(Formula 1)

[0022] For any sampling point, as long as the amplitude satisfies x t ∈q j , it is considered to belong to this quantile interval, so according to the interaction relationship of time lapse, the transition probability of any two quantile intervals can be calculated by formula 2;

[0023]

[0024] For a signal divided into Q quantile units, there must be a complete transfer probability matrix M of size Q×Q, even if the formula is as in Formula 3;

[0025]

[0026] The diagonal elements are the self-transition probabilities, which represent the probability that the sampling point in the time signal domain is still in the quantile amplitude interval at the next moment after the current moment. Because the number of cycles is L, L transition probability matrices M are statistically obtained, and the order of the L transition probability matrices M corresponds to the order in which the cycles begin.

[0027] Further, the step S4, constructing the transfer origin matrix S and the transfer distance matrix D comprises:

[0028] Construct the transfer origin matrix S and the transfer distance matrix D according to Formula 4 and Formula 5, so that the transfer information in the above step S3 has a reference;

[0029]

[0030] Where ⊙ is the Hadamard product, which is the multiplication of corresponding matrix elements, and find(M) is the index function, which returns the index matrix of non-zero elements in matrix M.

[0031] Further, the step S5 comprises:

[0032] The transfer origin matrix S, the transfer distance matrix D and the L transfer probability matrices M calculated in the above steps S3 and S4 are used to calculate the intra-cycle migration probability matrix R according to the method of formula 6, wherein the number of the intra-cycle migration probability matrices R calculated is L and corresponds to the order in which the cycles start;

[0033] The purpose of the intra-cycle migration probability matrix R is to solve the problem that only using the transition probability for encoding will ignore the mutual distance relationship between the quantile intervals. The calculation method of the intra-cycle migration probability matrix R is as shown in Formula 6:

[0034] R=S+M⊙D (Formula 6)

[0035] Where ⊙ is the Hadamard product, which is the multiplication of corresponding matrix elements.

[0036] Further, the step S6 comprises:

[0037] Formula 7 is used to calculate the transition probability between different periods. The transition between quantile intervals between different periods is more difficult than the transition and free movement of quantile intervals within the same period. For a signal with L periods, according to the statistical results of migration probability, there must be L transition probability matrices M, transfer origin matrix S, transfer distance matrix D and intra-period migration probability matrix R, where R is L is the intra-cycle migration probability matrix of the Lth cycle, and so on; therefore, it is necessary to calculate the transition probability between quantile intervals between different cycles. First, it is assumed that the distribution within the quantile interval is concentrated, and the distribution within the quantile interval is fluctuating. The average energy distribution of the gth cycle is E g , where g∈[1,L]; and represents the tth sampling point x t The number of quantile intervals where the energy average value of the g-th period is located; the probability calculation formula for the jump of quantile interval distribution of different periods is as follows:

[0038]

[0039] Among them, the lth sampling point x l The amplitude relationship is located at the qth i quantile intervals, and is located in the gth period in terms of time series relationship. The mean of the period energy is the quantile interval in which it is located. The mth sampling point x m The amplitude relationship is located at the qth k quantile intervals, in terms of time series relationship, it is located in the pth period, and the mean of the period energy is the quantile interval in which it is located.

[0040] In terms of encoding relations, if there is a transition to an energy level with a higher mean value of the periodic energy level, the following will occur: Its migration probability will be weakened and its conversion process will be difficult; similarly, it will be easier to jump to energy levels with lower mean energy, which makes the mutual transitions between energy levels closely related to the energy level distance, so that the energy level migration can be further encoded.

[0041] Further, step S7 includes: for L consecutive sampling periods, using a time sequence X={x1, x2, ...x t ,...,x M}, encoded as an M×M matrix, and its encoding rule is as shown in Formula 8; therefore, the final Landau level transition field encoding result is as shown in Formula 9; visualization refers to converting the value distribution into an image with different shades or colors;

[0042]

[0043] A coding system for converting a composite power quality disturbance signal into a two-dimensional image, the system being applied to any of the above methods, the system comprising:

[0044] Global distribution statistics module, used to count the distribution range of global samples [ X min , X max ], confirm the number of quantile units Q, and set the number of input data cycles L;

[0045] The signal division and marking module is used to determine the length of the input signal and record the input signal as x t , dividing the signal into L signals of equal length according to the number of cycles;

[0046] A transfer origin matrix building module is used to construct a transfer origin matrix S and a transfer distance matrix D;

[0047] A transition probability statistics module is used to calculate the transition probability based on the divided L signals of equal length, and obtain L transition probability matrices M by statistical calculation;

[0048] An overall migration probability calculation module, used to calculate a migration probability matrix R within L periods based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M;

[0049] Energy level jump probability analysis module, used to calculate the probability of jumping between energy levels based on the calculated migration probability;

[0050] The data encoding and visualization module is used to encode and visualize the above calculation results to obtain a two-dimensional image.

[0051] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the above-mentioned methods for encoding a composite power quality disturbance signal into a two-dimensional image is implemented.

[0052] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements any one of the above-mentioned methods for encoding a composite power quality disturbance signal into a two-dimensional image.

[0053] Compared with the prior art, the advantages of the present invention are:

[0054] The present invention provides a reliable encoding method, so that the encoded two-dimensional image can better reflect the distribution characteristics of the one-dimensional signal. Even at a very high downsampling rate (1280×1280 downsampled to 32×32 size), the present invention can still well reflect the signal information. While reducing the parameters and size of the neural network model, the accuracy of the classification of the composite power quality disturbance signal is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 , the original waveform diagram to be converted in the present invention (one-dimensional composite power quality disturbance waveform diagram);

[0056] Figure 2 , a two-dimensional image obtained by conversion of the present invention. DETAILED DESCRIPTION

[0057] The specific implementation mode of the present invention is described below in conjunction with embodiments:

[0058] It should be noted that the structures, proportions, sizes, etc. shown in this specification are only used to match the contents disclosed in the specification so that people familiar with this technology can understand and read them, and are not used to limit the conditions under which the present invention can be implemented. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0059] At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" cited in this specification are only for the convenience of description and are not used to limit the scope of implementation of the present invention. Changes or adjustments to their relative relationships should be regarded as the scope of implementation of the present invention without substantially changing the technical content.

[0060] Embodiment 1:

[0061] like Figure 1 The one-dimensional composite power quality disturbance waveform to be converted in the design method of the method of the present invention is shown. The present invention effectively encodes its features so that the two-dimensional image obtained by conversion fully contains the distribution characteristics of the one-dimensional composite power quality disturbance waveform, including the following steps:

[0062] S1: Continuously sample the power quality disturbance signal of 10 cycles of power frequency cycle (cycle is T = 0.02s) at sampling frequency f s = 6400Hz for sampling, then the number of sampling points is X={x1,x2,...x t ,...,x 1280}, and perform standardization so that the normal composite power quality disturbance amplitude is [-1,1]. The distribution range of samples in all cases is [X min ,X max ], because the given composite power quality disturbance signal has been standardized, its distribution range is between [-2,2], which means that the amplitude of the input composite power quality disturbance one-dimensional waveform cannot exceed -2 ​​and 2, where the amplitude of the normal power quality signal waveform is [-1,1], so its distribution range is [X min ,X max ] is [-2,2]. The number of quantile units Q is divided. Since the boundary of the composite power quality disturbance is mainly 1.1pu\1pu\0.9pu\0.1pu, etc., in order to better fit the boundary of the quantile, it is recommended to set Q=50. Set the number of input data cycles L. The number of cycles of the given composite power quality disturbance signal is 10, so L=10. The sampled image is Figure 1 The waveform shown.

[0063] S2: Determine the input signal length to be 1280, and record the input signal as x t , where X={x1,x2,...x t ,...,x 1280}, divide the signal into 10 signals of equal length according to the number of cycles; divide it according to the length of the input signal. The input signal has 1280 sampling points, which can be divided into 10 cycles. Then the number of sampling points in each cycle is 128 sampling points, which satisfies the condition M = N × L, then each cycle is X = {x1, x2, ... x t ,...,x 128}.

[0064] S3: The 10 signals of equal length are divided, and the transition probabilities are statistically calculated to obtain 10 transition probability matrices M; the division is performed using the single periodic signal obtained by the previous division, and the single periodic signal is X = {x1, x2, ...x t ,...,x 128}, so according to the calculation method of formula 1, formula 2, and formula 3, it can be obtained. The specific process is: for any given amplitude distribution [-2,2] signal X={x1,x2,...x t ,...,x 128}, divided into 50 quantile units, the width of each quantile unit is:

[0065] q j =[j-1,j]*(2-(-2)) / 50 (Formula 1)

[0066] For any sampling point, as long as the amplitude satisfies x t ∈q j , it is considered to belong to this quantile interval. Therefore, according to the interaction relationship of time passage, the transition probability of any two quantile intervals can be calculated:

[0067]

[0068] For a signal divided into 50 quantile units, there must be a complete transition probability matrix M of size 50×50:

[0069]

[0070] The diagonal elements are the self-transition probabilities, which represent the probability that the sampling point in the time signal domain is still in the quantile amplitude interval at the next moment of this moment. Because the number of cycles is 10, 10 transition probability matrices M will be statistically obtained, and the order of the 10 transition probability matrices M corresponds to the order in which the cycles start.

[0071] S4: Construct the transfer origin matrix S and the transfer distance matrix D; refers to constructing the transfer origin matrix S and the transfer distance matrix D according to formula 4 and formula 5, and the constructed matrices are as follows:.

[0072]

[0073] Where ⊙ is the Hadamard product, which is the multiplication of corresponding matrix elements, and find(M) is the index function, which returns the index matrix of non-zero elements in matrix M.

[0074] S5: Use the transfer origin matrix S, transfer distance matrix D and 10 transfer probability matrices M calculated by S3 and S4 to calculate the intra-cycle migration probability matrix R according to formula 6, where the number of intra-cycle migration probability matrices R calculated is 10, and corresponds to the order of the start of the cycle.

[0075] R=S+M⊙D (Formula 6)

[0076] Where ⊙ is the Hadamard product, which is the multiplication of the corresponding elements of the matrix. This step calculates the migration probability matrix R within 10 cycles;

[0077] S6: Use formula 7 to calculate the transition probability between different periods. It is more difficult to change between quantile intervals between different periods than to change and move freely between quantile intervals within the same period. For a signal with L periods, according to the statistical results of migration probability, there must be L transition probability matrices M, transfer origin matrix S, transfer distance matrix D and intra-period migration probability matrix R, where R is L is the intra-cycle migration probability matrix of the Lth cycle, and so on. Therefore, it is necessary to calculate the transition probability between quantile intervals in different cycles. First, it is assumed that the distribution within the quantile interval is concentrated, and the distribution within the quantile interval is fluctuating. In this way, the average energy distribution of the gth cycle is E g , where g∈[1,L]; and represents the tth sampling point x t The number of quantile intervals where the energy average value of the gth period is located. The probability calculation formula for the jump of quantile interval distribution of different periods is as follows:

[0078]

[0079] The lth sampling point x l The amplitude relationship is located at the qth i quantile intervals, in terms of time series, it is located in the gth period, and the mean of the period energy is the quantile interval in which it is located. The mth sampling point x m The amplitude relationship is located at the qth k quantile intervals, in terms of time series relationship, it is located in the pth period, and the mean of the period energy is the quantile interval in which it is located.

[0080] S7: Encoding and visualization to obtain a two-dimensional image; it means that for 10 consecutive sampling periods, a time series X = {x1, x2, ... x t ,...,x 1280}, can be encoded into a 1280×1280 matrix, and its encoding rule is as shown in formula 8. Therefore, the final Landau level transition field encoding result is as shown in formula 9. Visualization refers to converting the value distribution into an image with different shades or colors. The converted image is as follows Figure 2 .

[0081]

[0082] Embodiment 2:

[0083] The present invention provides a coding system for converting a composite power quality disturbance signal into a two-dimensional image. The system can be used to implement the above-mentioned coding method for converting a composite power quality disturbance signal into a two-dimensional image, specifically, comprising:

[0084] Global distribution statistics module, used to count the distribution range of global samples [X min ,X max ], confirm the number of quantile units Q, and set the number of input data cycles L;

[0085] The signal division and marking module is used to determine the length of the input signal and record the input signal as x t , dividing the signal into L signals of equal length according to the number of cycles;

[0086] A transfer origin matrix building module is used to construct a transfer origin matrix S and a transfer distance matrix D;

[0087] A transition probability statistics module is used to calculate the transition probability based on the divided L signals of equal length, and obtain L transition probability matrices M by statistical calculation;

[0088] An overall migration probability calculation module, used to calculate a migration probability matrix R within L periods based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M;

[0089] Energy level jump probability analysis module, used to calculate the probability of jumping between energy levels based on the calculated migration probability;

[0090] The data encoding and visualization module is used to encode and visualize the above calculation results to obtain a two-dimensional image.

[0091] Embodiment 3:

[0092] This embodiment provides a terminal device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of a method for encoding a composite power quality disturbance signal into a two-dimensional image, including the following steps:

[0093] S1: Distribution range of statistical global samples [X min , X max ], confirm the number of quantile units Q, and set the number of input data cycles L;

[0094] S2: Determine the length of the input signal and record it as x t , dividing the signal into L signals of equal length according to the number of cycles;

[0095] S3: construct the transfer origin matrix S and the transfer distance matrix D;

[0096] S4: Based on the divided L signals of equal length, statistically calculate the transition probability and obtain L transition probability matrices M;

[0097] S5: Based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M, calculate the migration probability matrix R within L periods;

[0098] S6: Based on the calculated migration probability, calculate the probability of jumping between energy levels;

[0099] S7: Encode and visualize the calculation result of step S6 to obtain a two-dimensional image.

[0100] Embodiment 4:

[0101] This embodiment provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.

[0102] One or more instructions stored in a computer-readable storage medium may be loaded and executed by a processor to implement the corresponding steps of a method for encoding a composite power quality disturbance signal into a two-dimensional image in the above embodiment; one or more instructions in the computer-readable storage medium are loaded and executed by a processor as follows:

[0103] S1: Distribution range of statistical global samples [X min , X max ], confirm the number of quantile units Q, and set the number of input data cycles L;

[0104] S2: Determine the length of the input signal and record it as x t , dividing the signal into L signals of equal length according to the number of cycles;

[0105] S3: construct the transfer origin matrix S and the transfer distance matrix D;

[0106] S4: Based on the divided L signals of equal length, statistically calculate the transition probability and obtain L transition probability matrices M;

[0107] S5: Based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M, calculate the migration probability matrix R within L periods;

[0108] S6: Based on the calculated migration probability, calculate the probability of jumping between energy levels;

[0109] S7: Encode and visualize the calculation result of step S6 to obtain a two-dimensional image.

[0110] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0114] The preferred embodiments of the present invention are described in detail above, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

[0115] Many other changes and modifications may be made without departing from the concept and scope of the present invention.It should be understood that the present invention is not limited to the specific embodiments, and the scope of the present invention is defined by the appended claims.

Claims

1. A method for encoding a composite power quality disturbance signal into a two-dimensional image, characterized in that: The method comprises: S1: Distribution range of statistical global samples [ X min , X max ], confirm the number of quantile units Q, and set the number of input data cycles L; S2: Determine the length of the input signal and record it as x t , dividing the signal into L signals of equal length according to the number of cycles; S3: construct the transfer origin matrix S and the transfer distance matrix D; S4: Based on the divided L signals of equal length, statistically calculate the transition probability and obtain L transition probability matrices M; S5: Based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M, calculate the migration probability matrix R within L periods; S6: Based on the calculated migration probability, calculate the probability of jumping between energy levels; S7: Encode and visualize the calculation result of step S6 to obtain a two-dimensional image.

2. The method for encoding a composite power quality disturbance signal into a two-dimensional image according to claim 1, characterized in that: In step S2: the length of the input signal is used for division. If the input signal has M sampling points, it can be divided into L periods. Then the number of sampling points in each period is N sampling points, where the condition M=N×L is satisfied. Then each period is X ={x1,x2,...x t ,...,x N }.

3. The method for encoding a composite power quality disturbance signal into a two-dimensional image according to claim 1, characterized in that: The step S3 comprises: The single periodic signal obtained by the above division is divided into X ={x1,x2,...x t ,...,x N }, so according to the calculation method of formula 1, formula 2, and formula 3, it can be obtained; the specific process is: for any given amplitude distribution [X min , X max ] X ={x1,x2,...x t ,...,x N }, it can be divided into Q quantile units, and the width of each quantile unit is calculated by formula 1; q j =[j-1,j]*(X max -X min ) / Q(Formula 1) For any sampling point, as long as the amplitude satisfies x t ∈q j , it is considered to belong to this quantile interval, so according to the interaction relationship of time lapse, the transition probability of any two quantile intervals can be calculated by formula 2; For a signal divided into Q quantile units, there must be a complete transition probability matrix M of size Q×Q, as shown in Formula 3; The diagonal elements are the self-transition probabilities, which represent the probability that the sampling point in the time signal domain is still in the quantile amplitude interval at the next moment after the current moment. Because the number of cycles is L, L transition probability matrices M are statistically obtained, and the order of the L transition probability matrices M corresponds to the order in which the cycles begin.

4. The method for encoding a composite power quality disturbance signal into a two-dimensional image according to claim 1, characterized in that: The step S4, constructing the transfer origin matrix S and the transfer distance matrix D, comprises: Construct the transfer origin matrix S and the transfer distance matrix D according to Formula 4 and Formula 5, so that the transfer information in the above step S3 has a reference; Where ⊙ is the Hadamard product, which is the multiplication of corresponding matrix elements, and find(M) is the index function, which returns the index matrix of non-zero elements in matrix M.

5. The method for encoding a composite power quality disturbance signal into a two-dimensional image according to claim 1, characterized in that: The step S5 comprises: The transfer origin matrix S, the transfer distance matrix D and the L transfer probability matrices M calculated in the above steps S3 and S4 are used to calculate the intra-cycle migration probability matrix R according to the method of formula 6, wherein the number of the intra-cycle migration probability matrices R calculated is L and corresponds to the order in which the cycles start; The purpose of the intra-cycle migration probability matrix R is to solve the problem that only using the transition probability for encoding will ignore the mutual distance relationship between the quantile intervals. The calculation method of the intra-cycle migration probability matrix R is as shown in Formula 6: R=S+M⊙D (Formula 6) Where ⊙ is the Hadamard product, which is the multiplication of corresponding matrix elements.

6. The method for encoding a composite power quality disturbance signal into a two-dimensional image according to claim 1, characterized in that: The step S6 comprises: Formula 7 is used to calculate the transition probability between different periods. The transition between quantile intervals between different periods is more difficult than the transition and free movement of quantile intervals within the same period. For a signal with L periods, according to the statistical results of migration probability, there must be L transition probability matrices M, transfer origin matrix S, transfer distance matrix D and intra-period migration probability matrix R, where R is L is the intra-cycle migration probability matrix of the Lth cycle, and so on; therefore, it is necessary to calculate the transition probability between quantile intervals between different cycles. First, it is assumed that the distribution within the quantile interval is concentrated, and the distribution within the quantile interval is fluctuating. The average energy distribution of the gth cycle is E g , where g∈[1,L]; and represents the tth sampling point x t The number of quantile intervals where the energy average value of the g-th period is located; the probability calculation formula for the jump of quantile interval distribution of different periods is as follows: Among them, the lth sampling point x l The amplitude relationship is located at the qth i quantile intervals, in terms of time series, it is located in the gth period, and the mean of the period energy is the quantile interval in which it is located. The mth sampling point x m The amplitude relationship is located at the qth k quantile intervals, in terms of time series relationship, it is located in the pth period, and the mean of the period energy is the quantile interval in which it is located. In terms of encoding relations, if there is a transition to an energy level with a higher mean value of the periodic energy level, the following will occur: Its migration probability will be weakened and its conversion process will be difficult; similarly, it will be easier to jump to energy levels with lower mean energy, which makes the mutual transitions between energy levels closely related to the energy level distance, so that the energy level migration can be further encoded.

7. The method for encoding a composite power quality disturbance signal into a two-dimensional image according to claim 1, characterized in that: The step S7 comprises: for L consecutive sampling periods, using a time sequence X={x1, x2, ...x t ,...,x M }, encoded as an M×M matrix, and its encoding rule is as shown in Formula 8; therefore, the final Landau level transition field encoding result is as shown in Formula 9; visualization refers to converting the value distribution into an image with different shades or colors; 8. A coding system for converting a composite power quality disturbance signal into a two-dimensional image, the system being applied to the method according to any one of claims 1 to 7, the system comprising: Global distribution statistics module, used to count the distribution range of global samples [X min , X max ], confirm the number of quantile units Q, and set the number of input data cycles L; The signal division and marking module is used to determine the length of the input signal and record the input signal as x t , dividing the signal into L signals of equal length according to the number of cycles; A transfer origin matrix building module is used to construct a transfer origin matrix S and a transfer distance matrix D; A transition probability statistics module is used to calculate the transition probability based on the divided L signals of equal length, and obtain L transition probability matrices M by statistical calculation; An overall migration probability calculation module, used to calculate a migration probability matrix R within L periods based on the transfer origin matrix S, the transfer distance matrix D and the transfer probability matrix M; Energy level jump probability analysis module, used to calculate the probability of jumping between energy levels based on the calculated migration probability; The data encoding and visualization module is used to encode and visualize the above calculation results to obtain a two-dimensional image.

9. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for encoding a composite power quality disturbance signal into a two-dimensional image as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for encoding a composite power quality disturbance signal into a two-dimensional image according to any one of claims 1 to 7.