MCU-based PRPD/PRPS map data processing method and detection device
1. The utility model provides a PRPD/PRPS atlas data processing method based on MCU, MCU electric connection has AD module and host computer, MCU includes RAM, its characterized in that: the processing method comprises the following steps:
s1, collecting partial discharge signals and power frequency signals;
s2, converting the partial discharge signal and the power frequency signal into a digital discharge signal and a digital power frequency signal, and storing the digital discharge signal and the digital power frequency signal in an RAM;
s3, extracting the digital power frequency signal and calculating the 0-degree position of the signal;
s4, extracting the digital discharge signal, and acquiring the position and amplitude of the pulse signal in the digital discharge signal;
s5, adjusting the position of the pulse signal according to the 0-degree position of the digital power frequency signal;
and S6, transmitting the amplitude of the pulse signal and the position of the adjusted pulse signal to an upper computer for map display.
2. The MCU-based PRPD/PRPS atlas data processing method as recited in claim 1, characterized in that: the specific steps of S2 are:
s201, setting the sampling rate of an AD module to f S/S, setting the sampling bit number to D bit, and setting an empty array MER _ A [ ] and an empty array MER _ B [ ] in an RAM;
s202, the AD module converts the partial discharge signal and the power frequency signal into a digital discharge signal x [ n ] and a digital power frequency signal g [ n ];
s203, storing the digital discharge signal x [ n ] and the digital power frequency signal g [ n ] in an empty array MER _ A [ ], storing the digital discharge signal x [ n ] and the digital power frequency signal g [ n ] in an empty array MER _ B [ ] after the empty array MER _ A [ ] is fully stored, and executing S3 after any one of the empty array MER _ A [ ] and the empty array MER _ B [ ] is fully stored.
3. The MCU-based PRPD/PRPS map data processing method of claim 2, wherein: the specific steps of S3 are:
s301, reading a digital power frequency signal g [ n ], and setting the signal time to be 40 ms;
s302, converting the digital power frequency signal g [ n ]]Are divided into signals ga[n]Sum signal gb[n]Will signal ga[n]Divided into signal segments ga_1[n]Signal segment ga_2[n]Signal segment ga_3[n]Signal segment ga_4[n]The number of sampling points of each signal segment is
S303, calculating orthogonal components p and q:
s304, judging signal ga[n]Middle 0 degree position loca0Quadrant (d):
p and q are both positive, and the quadrant at the 0-degree position is 1; when p is positive and q is negative, the quadrant at the 0-degree position is 2; p is negative, q is positive, and the quadrant at the 0-degree position is 3; when p and q are both negative, the quadrant at the 0 position is 4.
S305, calculating the 0-degree position loca0:
Signal g when quadrant is 1a[n]Position of minimum minusOne sampling point is the 0 degree position loca0(ii) a Quadrant is 2, signal ga[n]Position of minimum minusOne sampling point is the 0 degree position loca0(ii) a Quadrant 3, signal ga[n]The position of the minimum plusOne sampling point is the 0 degree position loca0(ii) a Quadrant 4, signal ga[n]The position of the minimum plusOne sampling point is the 0 degree position loca0。
S306, calculating a signal gb[n]In 0 deg. position locb0:
4. The MCU-based PRPD/PRPS atlas data processing method as recited in claim 3, characterized in that: the specific steps of S4 are:
s401, reading digital discharge signal x [ n ]]Setting a signal threshold xThrAnd signal time, the signal time is 40ms, and an array amp [ 2 ] is established in the RAM]And array loc _ pha];
S402, setting the width of the rectangular data window as L, L as even number, and setting the digital discharge signal x [ n ]]Starting point of (a) is x [ t ]]From x [ t ]]Starting to continuously read L sampling points, and marking the signal segment where the L sampling points are positioned as xL[n]Wherein t is 0 to (n-L);
s403, counting xL[n]Maximum value x of amplitude ofL_maxAnd the position loc:
if xL_max≤xThrIf yes, adding 1 to t, and executing S402, wherein t is the repeated execution times; if xL_max>xThrAnd x isL_maxGreater than the amplitude of the first L/2 sampling points and the second L/2 sampling points of loc, then xL[n]For a pulse signal, the amplitude x of the pulse signal is recordedL_maxAnd a position loc;
s404, search array loc _ pha [ alpha ]]If the position loc has been stored, the amplitude x obtained in S403 is storedL_maxAnd location loc is discarded, otherwise the magnitude xL_maxStored in the array amp [ 2 ]]The position loc is stored in the array loc _ pha [ value ]]And i represents the obtained pulse number index;
s405, self-adds 1 to t, and executes S402 until t is n-L, and the amplitude and position of the pulse signal included in x [ n ] are stored in the array amp [ ] and the array loc _ pha [ ] respectively, and the number of the pulse signals is set to I.
5. The MCU-based PRPD/PRPS atlas data processing method as recited in claim 4, characterized in that: the specific steps of S5 are:
s501, establishing an array A _ seg [ ], an array B _ seg [ ], an array C _ seg [ ] and an array C _ seg _ plus [ ];
s502, extracting the position loc _ pha [ I ], I ═ 0 to (I-1), of the pulse signal stored in the array loc _ pha [ ];
s503, mixing loc _ pha [ i]And loca0And locb0And (3) comparison:
if loc _ pha [ i)]Less than loca0Then calculateAnd (loc)a0-loc_pha[i]) And assigns the difference to loc _ pha [ i [ ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array A _ seg [, ]](ii) a If loc _ pha [ i)]Greater than loca0And is less than locb0Then calculate loc _ pha [ i ]]And loca0A difference value is assigned to loc _ pha [ i]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array B _ seg [, ]](ii) a If loc _ pha [ i)]Greater than locb0Then calculate loc _ pha [ i ]]And locb0Is assigned to loc _ pha [ i ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array C _ seg [, ]];
S504, combining the numerical values in the array A _ seg [ ] and the array C _ seg _ plus [ ] and storing the numerical values in the array A _ seg [ ], and emptying the array C _ seg _ plus [ ];
s505, the array C _ seg [ ] is stored in the array C _ seg _ plus [ ].
6. The MCU-based PRPD/PRPS atlas data processing method as recited in claim 5, characterized in that: the specific method of S6 is as follows: and uploading the positions and amplitudes of the pulse signals stored in the arrays A _ seg [ ] and B _ seg [ ] to an upper computer, emptying the arrays A _ seg [ ] and B _ seg [ ] after uploading is finished, and returning to S2 for repeated execution.
7. A PRPD/PRPS map data detection device based on MCU, which is used in the PRPD/PRPS map data processing method based on MCU of claim 1, characterized in that: the device comprises an MCU, the MCU comprises an RAM and a serial port, the RAM is connected with an AD module through a data bus, and the MCU is connected with an upper computer through the serial port.
Background
When the partial discharge fault occurs in the high-voltage electrical equipment, various signals such as high-frequency, ultrasonic, transient ground electric wave, ultrahigh frequency and the like can be generated, and whether the partial discharge occurs or not can be effectively judged by detecting the signals. The commonly used partial discharge detection devices mainly include a high-frequency partial discharge detector, an ultrasonic partial discharge detector, a transient earth electric wave partial discharge detector and an ultrahigh frequency partial discharge detector. The basic structures of the instruments have the same framework and mainly comprise a partial discharge sensor module, a power frequency signal sensor module, a signal filtering and amplifying conditioning module, a signal acquisition module, a signal analysis module and a result presentation module. The currently mainstream partial discharge analysis method is to process the detected signal, draw a PRPD (phase resolved partial discharge)/PRPS (phase resolved pulse sequence) map related to the power frequency cycle, and perform a basis for partial discharge diagnosis according to the features of the map. The drawing of the partial discharge PRPD/PRPS map requires two key parameters, one is the amplitude of the partial discharge pulse signal, and the other is the phase relation between the pulse signal generation time and the power frequency signal. The signal analysis module in the partial discharge detector completes the function of extracting the two key parameters from the partial discharge signal and the power frequency signal obtained by detection. Because the frequency of partial discharge is high, the frequency range of signals is wide, and the frequency is high, the data volume of original signals obtained by detection is large, and the occurrence of partial discharge is closely related to the power frequency cycle, a large amount of calculation is often needed to obtain the two parameters, a signal analysis module of the traditional detection instrument is usually completed in a computer to obtain a more accurate partial discharge PRPD/PRPS map, and the detection instrument is usually heavy and the field operation is relatively complex. These detecting instruments play a better role in traditional power failure detection, but when carrying out the live-line patrol of substation's total station equipment, have a lot of and carry and operate inconveniently, and the main reason is that data analysis module occupies too much hardware resources.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a PRPD/PRPS atlas data processing method and a detection device based on an MCU (microprogrammed control Unit), the operation of the processing method only comprises an addition and subtraction algorithm, the operation amount is small, the operation difficulty is low, the processing process is carried out on a single chip microcomputer, and compared with the traditional detection instrument, the detection device is more portable and is convenient to carry and operate.
In order to achieve the purpose, the invention provides the following technical scheme: the utility model provides a PRPD/PRPS atlas data processing method based on MCU, MCU electric connection has AD module and host computer, MCU includes RAM, its characterized in that: the processing method comprises the following steps:
s1, collecting partial discharge signals and power frequency signals;
s2, converting the partial discharge signal and the power frequency signal into a digital discharge signal and a digital power frequency signal, and storing the digital discharge signal and the digital power frequency signal in an RAM;
s3, extracting the digital power frequency signal and calculating the 0-degree position of the signal;
s4, extracting the digital discharge signal, and acquiring the position and amplitude of the pulse signal in the digital discharge signal;
s5, adjusting the position of the pulse signal according to the 0-degree position of the digital power frequency signal;
and S6, transmitting the amplitude of the pulse signal and the position of the adjusted pulse signal to an upper computer for map display.
The PRPD/PRPS map data processing method based on the MCU is further optimized as follows: the specific steps of S2 are:
s201, setting the sampling rate of an AD module to f S/S, setting the sampling bit number to D bit, and setting an empty array MER _ A [ ] and an empty array MER _ B [ ] in an RAM;
s202, the AD module converts the partial discharge signal and the power frequency signal into a digital discharge signal x [ n ] and a digital power frequency signal g [ n ];
s203, storing the digital discharge signal x [ n ] and the digital power frequency signal g [ n ] in an empty array MER _ A [ ], storing the digital discharge signal x [ n ] and the digital power frequency signal g [ n ] in an empty array MER _ B [ ] after the empty array MER _ A [ ] is fully stored, and executing S3 after any one of the empty array MER _ A [ ] and the empty array MER _ B [ ] is fully stored.
The PRPD/PRPS map data processing method based on the MCU is further optimized as follows: the specific steps of S3 are:
s301, reading a digital power frequency signal g [ n ], and setting the signal time to be 40 ms;
s302, converting the digital power frequency signal g [ n ]]Are divided into signals ga[n]Sum signal gb[n]Will signal ga[n]Divided into signal segments ga_1[n]Signal segment ga_2[n]Signal segment ga_3[n]Signal segment ga_4[n]The number of sampling points of each signal segment is
S303, calculating orthogonal components p and q:
s304, judging signal ga[n]Middle 0 degree position loca0Quadrant (d):
p and q are both positive, and the quadrant at the 0-degree position is 1; when p is positive and q is negative, the quadrant at the 0-degree position is 2; p is negative, q is positive, and the quadrant at the 0-degree position is 3; when p and q are both negative, the quadrant at the 0 position is 4.
S305, calculating the 0-degree position loca0:
Signal g when quadrant is 1a[n]Position of minimum minusOne sampling point is the 0 degree position loca0(ii) a Quadrant is 2, signal ga[n]Position of minimum minusOne sampling point is the 0 degree position loca0(ii) a Quadrant 3, signal ga[n]The position of the minimum plusOne sampling point is the 0 degree position loca0(ii) a Quadrant 4, signal ga[n]The position of the minimum plusOne sampling point is the 0 degree position loca0。
S306, calculating a signal gb[n]In 0 deg. position locb0:
The PRPD/PRPS map data processing method based on the MCU is further optimized as follows: the specific steps of S4 are:
s401, reading digital discharge signal x [ n ]]Setting a signal threshold xThrAnd signal time, the signal time is 40ms, and an array amp [ 2 ] is established in the RAM]And array loc _ pha];
S402, setting the width of the rectangular data window as L, L as even number, and setting the digital discharge signal x [ n ]]Starting point of (a) is x [ t ]]From x [ t ]]Initiation ofContinuously reading L sampling points, and recording the signal segment where the L sampling points are as xL[n]Wherein t is 0 to (n-L);
s403, counting xL[n]Maximum value x of amplitude ofL_maxAnd the position loc:
if xL_max≤xThrIf yes, adding 1 to t, and executing S402, wherein t is the repeated execution times; if xL_max>xThrAnd x isL_maxGreater than the amplitude of the first L/2 sampling points and the second L/2 sampling points of loc, then xL[n]For a pulse signal, the amplitude x of the pulse signal is recordedL_maxAnd a position loc;
s404, search array loc _ pha [ alpha ]]If the position loc has been stored, the amplitude x obtained in S403 is storedL_maxAnd location loc is discarded, otherwise the magnitude xL_maxStored in the array amp [ 2 ]]The position loc is stored in the array loc _ pha [ value ]]And i represents the obtained pulse number index; s405, adding 1 to t, executing S402 until t is n-L, and obtaining the array amp 2]And array loc _ pha]Therein respectively store x [ n ]]The amplitude and the position of the pulse signals contained in the pulse signal generator set the number of the pulse signals to be I.
The PRPD/PRPS map data processing method based on the MCU is further optimized as follows: the specific steps of S5 are:
s501, establishing an array A _ seg [ ], an array B _ seg [ ], an array C _ seg [ ] and an array C _ seg _ plus [ ];
s502, extracting the position loc _ pha [ I ], I ═ 0 to (I-1), of the pulse signal stored in the array loc _ pha [ ];
s503, mixing loc _ pha [ i]And loca0And locb0And (3) comparison:
if loc _ pha [ i)]Less than loca0Then calculateAnd (loc)a0-loc_pha[i]) And assigns the difference to loc _ pha [ i [ ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array A _ seg [, ]](ii) a If loc _ pha [ i)]Greater than loca0And is less than locb0Then calculate loc _ pha [ i ]]And loca0A difference value is assigned to loc _ pha [ i]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array B _ seg [, ]](ii) a If loc _ pha [ i)]Greater than locb0Then calculate loc _ pha [ i ]]And locb0Is assigned to loc _ pha [ i ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array C _ seg [, ]];
S504, combining the numerical values in the array A _ seg [ ] and the array C _ seg _ plus [ ] and storing the numerical values in the array A _ seg [ ], and emptying the array C _ seg _ plus [ ];
s505, the array C _ seg [ ] is stored in the array C _ seg _ plus [ ].
The PRPD/PRPS map data processing method based on the MCU is further optimized as follows: the specific method of S6 is as follows: and uploading the positions and amplitudes of the pulse signals stored in the arrays A _ seg [ ] and B _ seg [ ] to an upper computer, emptying the arrays A _ seg [ ] and B _ seg [ ] after uploading is finished, and returning to S2 for repeated execution.
The PRPD/PRPS map data detection device comprises an MCU, wherein the MCU comprises an RAM and a serial port, the RAM is connected with an AD module through a data bus, and the MCU is connected with an upper computer through the serial port.
The beneficial effects are that: according to the PRPD/PRPS atlas data processing method and the detection device based on the MCU, only an addition and subtraction algorithm is used for operation of the processing method, the operation amount is small, the processing method can be realized on the MCU with limited resources, and compared with the traditional partial discharge detection equipment, the detection device is lighter, and is convenient to carry and operate; the MCU processes the digital power frequency signal and the digital discharge signal, and uploads the amplitude and the phase of the obtained pulse signal to the upper computer, and the upper computer does not need to carry out a large amount of data operation, so that the upper computer can adopt terminals with lower operation performance such as a PDA or a smart phone, and the complexity of the detection device is further reduced.
Drawings
FIG. 1 is a flow chart of a data processing method of the present invention;
FIG. 2 is a block diagram of the structure of the detecting device of the present invention;
fig. 3 is a graph of sampling points and amplitude values.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 to 3, a method for processing PRPD/PRPS map data based on an MCU, the MCU is electrically connected to an AD module and an upper computer, the MCU includes an RAM, and the method includes: the processing method comprises the following steps:
and S1, collecting partial discharge signals and power frequency signals.
In S1, the collected partial discharge signal and power frequency signal may be a partial discharge device sensor, or an ultrahigh frequency antenna, an ultrasonic sensor, or the like, and the collected partial discharge signal and power frequency signal are conditioned, where the conditioned partial discharge signal is a signal obtained by envelope detection and frequency reduction, and the conditioned power frequency signal is a power frequency signal obtained by band-pass filtering, and the AD module receives the conditioned partial discharge signal and power frequency signal and executes S2.
In order to meet the requirement of a processing method, the sampling rate of an AD module reaches 100kS/s and above, the sampling bit number reaches 12 bits and above, the working frequency of an MCU reaches 80MHz and above, and the MCU has a DMA (direct memory access) function.
And S2, converting the partial discharge signal and the power frequency signal into a digital discharge signal and a digital power frequency signal, and storing the digital discharge signal and the digital power frequency signal in an RAM (internal memory).
The specific steps of S2 are:
s201, setting the sampling rate of the AD module to f S/S, setting the sampling bit number to D bit, and setting an empty array MER _ A [ ] and an empty array MER _ B [ ] in the RAM.
S202, the AD module converts the partial discharge signal and the power frequency signal into a digital discharge signal x [ n ] and a digital power frequency signal g [ n ].
S203, storing the digital discharge signal x [ n ] and the digital power frequency signal g [ n ] in an empty array MER _ A [ ], storing the digital discharge signal x [ n ] and the digital power frequency signal g [ n ] in an empty array MER _ B [ ] after the empty array MER _ A [ ] is fully stored, and executing S3 after any one of the empty array MER _ A [ ] and the empty array MER _ B [ ] is fully stored.
In S2, the empty array MER _ A2]And empty array MER _ B [ ]]All sizes of (A) and (B) areByte (b)Sign a rounding up operation). The AD module converts the partial discharge signal and the power frequency signal into a digital discharge signal x [ n ]]And digital power frequency signal g [ n ]]Then, the DMA function of the MCU is used to sequentially change the blank array MER _ A [ array ]]And empty array MER _ B [ ]]The method is stored as in S203.
And S3, extracting the digital power frequency signal and calculating the 0-degree position of the signal.
The specific steps of S3 are:
s301, reading the digital power frequency signal g [ n ], and setting the signal time to be 40 ms.
S302, converting the digital power frequency signal g [ n ]]Are divided into signals ga[n]Sum signal gb[n]Will signal ga[n]Divided into signal segments ga_1[n]Signal segment ga_2[n]Signal segment ga_3[n]Signal segment ga_4[n]The number of sampling points of each signal segment is
S303, calculating orthogonal components p and q:
s304, judging signal ga[n]Middle 0 degree position loca0Quadrant (d):
p and q are both positive, and the quadrant at the 0-degree position is 1; when p is positive and q is negative, the quadrant at the 0-degree position is 2; p is negative, q is positive, and the quadrant at the 0-degree position is 3; when p and q are both negative, the quadrant at the 0 position is 4.
S305, calculating the 0-degree position loca0:
Signal g when quadrant is 1a[n]Position of minimum minusOne sampling point is the 0 degree position loca0(ii) a Quadrant is 2, signal ga[n]Position of minimum minusOne sampling point is the 0 degree position loca0(ii) a Quadrant 3, signal ga[n]The position of the minimum plusOne sampling point is the 0 degree position loca0(ii) a Quadrant 4, signal ga[n]The position of the minimum plusOne sampling point is the 0 degree position loca0。
S306, calculating a signal gb[n]In 0 deg. position locb0:
And S3, processing the digital power frequency signal g [ n ]:
empty array MER _ A [ solution of ] A]And empty array MER _ B [ ]]After any one is fully stored, reading the digital power frequency signal g [ n ] from the fully stored empty array]Setting the signal time to 40ms, and carrying out digital orthogonal algorithm on the digital power frequency signal g [ n ]]Is estimated at the 0 position. Will digital workerFrequency signal g [ n ]]Are divided into two sections, respectively signal ga[n]Sum signal gb[n]Signal ga[n]Sum signal gb[n]Each containing 20ms of signal. Digital power frequency signal g [ n ]]The 0 ° position calculation is divided into two parts:
for signal ga[n]At 0 deg. position of signal ga[n]Equally dividing the signal into four segments, and recording the four signal segments as signal segments ga_1[n]Signal segment ga_2[n]Signal segment ga_3[n]Signal segment ga_4[n]Calculating the signal g from the four signal segmentsa[n]The quadrature components p and q of (a) are calculated as in S303, and then the 0 ° position is subjected to quadrant judgment as in table 1, and the 0 ° position is calculated from the quadrant judgment as in S305.
For signal gb[n]At 0 deg. position of signal gb[n]Without processing, the 0 ° position can be directly calculated as S306.
Table 1: 0-degree position quadrant judgment meter for digital power frequency signal
p
+
+
-
-
q
+
-
+
-
Quadrant type
1
4
2
3
And S4, extracting the digital discharge signal, and acquiring the position and the amplitude of the pulse signal in the digital discharge signal.
The specific steps of S4 are:
s401, reading digital discharge signal x [ n ]]Setting a signal threshold xThrAnd signal time, the signal time is 40ms, and an array amp [ 2 ] is established in the RAM]And array loc _ pha]。
S402, setting the width of the rectangular data window as L, L as even number, and setting the digital discharge signal x [ n ]]Starting point of (a) is x [ t ]]From x [ t ]]Starting to continuously read L sampling points, and marking the signal segment where the L sampling points are positioned as xL[n]Wherein t is 0 to (n-L).
S403, counting xL[n]Maximum value x of amplitude ofL_maxAnd the position loc:
if xL_max≤xThrIf yes, adding 1 to t, and executing S402, wherein t is the repeated execution times; if xL_max>xThrAnd x isL_maxGreater than the amplitude of the first L/2 sampling points and the second L/2 sampling points of loc, then xL[n]For a pulse signal, the amplitude x of the pulse signal is recordedL_maxAnd a position loc.
S404, search array loc _ pha [ alpha ]]If the position loc has been stored, the amplitude x obtained in S403 is storedL_maxAnd location loc is discarded, otherwise the magnitude xL_maxStored in the array amp [ 2 ]]The position loc is stored in the array loc _ pha [ value ]]And i denotes the obtained pulse number index.
S405, self-adds 1 to t, and executes S402 until t is n-L, and the amplitude and position of the pulse signal included in x [ t ] are stored in the array amp [ ] and the array loc _ pha [ ] respectively, and the number of the pulse signals is set to I.
In S4, the digital discharge signal x [ n ] is processed:
reading digits from a fully stored empty arrayDischarge signal x [ n ]]Setting a signal threshold xThrAnd a signal time, which is also 40ms, while the array amp [ 2 ] is established in the RAM]And array loc _ pha]. Setting a rectangular data window with width L, digital discharge signal x [ n ]]One point in the graph is marked as x [ t ]]With x [ t ]]As a starting point, a data window is used to digitally discharge the signal x [ n ]]Selecting frames, and recording the signal section of the selected frame as xL[n]Statistics of xL[n]Maximum value x of amplitude inL_maxAnd its position loc, if xL_maxIs greater than the signal threshold value xThrAnd the amplitude is larger than the amplitudes of the first L/2 sampling points and the second L/2 sampling points of loc, then xL[n]Is a pulse signal. Search array loc _ pha]If not stored in location loc, then the amplitude xL_maxStored in the array amp [ 2 ]]The position loc is stored in the array loc _ pha [ value ]]. According to this process, from x [ t ]]Starting, digital discharge signal x [ n ] is sequentially processed by data window]And performing frame selection, and moving one sampling point at a time until t is n-L.
And S5, adjusting the position of the pulse signal according to the 0-degree position of the digital power frequency signal.
The specific steps of S5 are:
s501, establishing an array A _ seg [ ], an array B _ seg [ ], an array C _ seg [ ] and an array C _ seg _ plus [ ];
s502 extracts the position loc _ pha [ I ], I ═ 0 to (I-1), of the pulse signal stored in the array loc _ pha [ ].
S503, mixing loc _ pha [ i]And loca0And locb0And (3) comparison:
if loc _ pha [ i)]Less than loca0Then calculateAnd (loc)a0-loc_pha[i]) And assigns the difference to loc _ pha [ i [ ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array A _ seg [, ]](ii) a If loc _ pha [ i)]Greater than loca0And is less than locb0Then calculate loc _ pha [ i ]]And loca0A difference value is assigned to loc _ pha [ i]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array B _ seg [, ]](ii) a If loc _ pha [ i)]Greater than locb0Then calculate loc _ pha [ i ]]And locb0The difference value of (a) to (b),assign the difference to loc _ pha [ i ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array C _ seg [, ]];
S504, combining the numerical values in the array A _ seg [ ] and the array C _ seg _ plus [ ] and storing the numerical values in the array A _ seg [ ], and emptying the array C _ seg _ plus [ ];
s504, combining the numerical values in the array A _ seg [ ] and the array C _ seg _ plus [ ] and storing the numerical values in the array A _ seg [ ], and emptying the array C _ seg _ plus [ ];
s505, the array C _ seg [ ] is stored in the array C _ seg _ plus [ ].
In S5, according to the digital industrial frequency signal g [ n ] obtained in S3]0 deg. position loca0And locb0For the position loc _ pha [ i ] of the pulse signal obtained in S4]And (3) adjusting:
four arrays, respectively array A _ seg [ deg. ], are established]Array B _ seg [ ]]Array C _ seg [ alpha ], [ alpha ] a]And an array C _ seg _ plus [ ]]And four arrays are used for carrying out whole-period segmentation on the pulse signals. Loc _ pha [ i ] obtained in S4 is extracted]Using loc _ pha [ i ]]And loca0And locb0And (3) comparison:
if loc _ pha [ i)]Less than loca0Then calculateAnd (loc)a0-loc_pha[i]) And assigns the difference to loc _ pha [ i [ ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array A _ seg [, ]](ii) a If loc _ pha [ i)]Greater than loca0And is less than locb0Then calculate loc _ pha [ i ]]And loca0A difference value is assigned to loc _ pha [ i]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array B _ seg [, ]](ii) a If loc _ pha [ i)]Greater than locb0Then calculate loc _ pha [ i ]]And locb0Is assigned to loc _ pha [ i ]]Am [ i ]]And assigned loc _ pha [ i [ ]]Sequentially stored in the array C _ seg [, ]]。
After the steps of comparison and assignment are completed, the values in C _ seg _ plus [ ] are merged into A _ seg [ ] and cleared, and the values in C _ seg _ plus [ ] are stored into C _ seg _ plus [ ].
And S6, transmitting the amplitude of the pulse signal and the position of the adjusted pulse signal to an upper computer for map display.
The specific method of S6 is as follows: and uploading the positions and amplitudes of the pulse signals stored in the arrays A _ seg [ ] and B _ seg [ ] to an upper computer, emptying the arrays A _ seg [ ] and B _ seg [ ] after uploading is finished, and returning to S2 for repeated execution.
Because the processing process is carried out on the MCU, the operation is only addition and subtraction, and the upper computer does not need to carry out the operation, the upper computer can adopt a PDA (palm computer) with lower operation performance or a smart phone and other terminals, and the complexity of the required device is reduced.
A PRPD/PRPS map data detection device based on MCU is used for the PRPD/PRPS map data processing method based on MCU, characterized by: the device comprises an MCU, the MCU comprises an RAM and a serial port, the RAM is connected with an AD module through a data bus, and the MCU is connected with an upper computer through the serial port.
The working principle is as follows: the AD module adopts an AD analog-to-digital converter with the model number of AD7606, the sampling rate is 100kS/s, the MCU adopts a singlechip with the model number of STM32F407ZGT6, and the MCU has a DMA function. The AD module receives the conditioned partial discharge signal and the conditioned power frequency signal and converts the partial discharge signal and the power frequency signal into a digital discharge signal and a digital power frequency signal, the MCU reads the digital discharge signal and the digital power frequency signal in the AD module by utilizing the DAM function and processes the digital discharge signal and the digital power frequency signal, the amplitude and the position of the processed pulse signal are transmitted to the upper computer through the serial port, and the upper computer displays a map according to the amplitude and the position of the pulse signal.
The present invention will be described in detail with reference to specific examples.
In order to meet the requirement of a processing method, the AD module adopts an AD analog-to-digital converter with the model number of AD7606, and the MCU adopts a singlechip with the model number of STM32F407ZGT 6.
FIG. 3 shows data stored in an array MER _ A [ ] for a certain partial discharge detection, wherein the sampling rate is 100kS/s, and power frequency signals of 4000 sampling points and partial discharge signals of 4000 sampling points are stored in the array MER _ A [ ].
And (3) processing the digital power frequency signal according to S3:
will signal ga[n]Divided into signal segments ga_1[n]Signal segment ga_2[n]Signal segment ga_3[n]Signal segment ga_4[n]According to S303, the calculated orthogonal component p is 1633.15, the orthogonal component q is-940.17, and the signal g isa[n]Is in quadrant 4, signal ga[n]Is located at the 1334 th sampling point, signal ga[n]0 deg. position loca0Comprises the following steps: loca0=1348+500=1848,
According to S306, the available loc is calculatedb0=3848。
Processing the digital discharge signal according to S4:
setting the width L of the rectangular data window to 10, and setting the signal threshold value xThr0.015V, first extraction of x [ n ]]The first 10 sample points of (1), where the maximum amplitude is 0.009V, less than the signal threshold xThr. Extracting the digital discharge signal until the 623-time extraction, wherein the signal segment x isL[n]Maximum value x inL_maxFirst exceeding of signal threshold xThr. After the digital discharge signal is completely processed, 4 pulse signals are obtained, and the record of the amplitude and the position of the pulse signals is shown in table 2.
Table 2: searching the amplitude and position of the obtained pulse signal
Numbering
1
2
3
4
loc_pha[]
632
2175
2942
3708
amp[]
0.407
0.425
0.819
0.587
Adjusting the position of the pulse signal according to S5:
due to loca0=1848、locb03848, it can be seen that the position and amplitude of the first pulse signal should be stored in the array a _ seg [, ]]In (2), the second, third and fourth pulses are stored in the array B _ seg [ 2 ]]In (1), the array C _ seg [ ]]Is a null array. Because of the array C _ seg _ plus [ ]]Is also empty. Final array A _ seg [ [ alpha ] ]]And B _ seg [ 2 ]]The data stored in (a) are shown in table 3.
Table 3: data stored in A _ seg [ ] and B _ seg [ ]
A_seg[]
632
0.407
B_seg[]
2175
0.425
2942
0.819
3708
0.587
According to S6, the MCU uploads the data stored in the arrays A _ seg [ ] and B _ seg [ ] to the upper computer through the serial port, and the upper computer displays the PRPD/PRPS map.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.