Summary of the invention
In order to solve above-mentioned technical problem, it is an object of the invention to provide the variable Rate of a kind of ultrasound wave local discharge signal
Code compression method.
The technical solution adopted in the present invention is: the variable rate coding compression method of a kind of ultrasound wave local discharge signal,
The method includes:
Obtain audio signal;
The audio signal obtained is carried out sub-frame processing, thus obtains multiframe signal;
Extract the feature of every frame signal, then according to the feature extracted, every frame signal is classified;
According to the type belonging to every frame signal, thus use corresponding coded system and code rate that every frame signal is carried out phase
Corresponding compressed encoding.
Further, the described audio signal to obtaining carries out sub-frame processing, thus the step for of obtaining multiframe signal, its tool
Body is:
The audio signal obtained is carried out pretreatment and sub-frame processing successively, thus obtains multiframe signal.
Further, described pretreatment includes that sample quantization processes, preemphasis processes and windowing process.
Further, described feature includes pulse amplitude, short-time average energy, pulse duration and spectrum envelope.
Further, the computing formula of described short-time average energy is as follows:
Wherein, STM represents short-time average energy, x(n) represent audio signal,Be expressed as x(n) absolute value, N table
Show the length of signal.
Further, the feature of the every frame signal of described extraction, then according to the feature extracted, every frame signal is classified this
One step, itself particularly as follows:
The feature of every frame signal is extracted, followed by grader, thus according to every frame after every frame signal being input in grader
The feature of signal judges that every frame signal is belonging to doubtful have this type of Partial discharge signal, determine without this type of Partial discharge signal also
Determine that this type of Partial discharge signal.
Further, the type belonging to the every frame signal of described basis, thus use corresponding coded system and code rate
The step for that every frame signal being carried out corresponding compressed encoding, itself particularly as follows:
When this frame signal belong to doubtful have this type of Partial discharge signal time, use linear predictive coding mode and first coding speed
Rate is compressed coding to this frame signal;
When this frame signal belongs to and determines without this type of Partial discharge signal, use WAVELET PACKET DECOMPOSITION mode and the second code rate
This frame signal is compressed coding;
When this frame signal belong to determine have this type of Partial discharge signal time, use WAVELET PACKET DECOMPOSITION mode and the 3rd code rate
This frame signal is compressed coding;
Wherein, the magnitude relationship between described first code rate, the second code rate and the 3rd code rate is: first compiles
Bit rate > the 3rd code rate > the second code rate.
Further, described linear predictive coding mode is particularly as follows: extract LPC parameter and the prediction residual energy of this frame signal
After, LPC parameter and prediction residual energy to extracting encode.
Further, described WAVELET PACKET DECOMPOSITION mode particularly as follows:
According to default wavelet function and Decomposition order, this frame signal is carried out WAVELET PACKET DECOMPOSITION;
Utilize variance criterion to determine the optimal base of described wavelet function, thus according to the optimal base obtained, obtain after decomposing
Signal carry out key character and energy extraction retain, it is achieved Signal Compression;
After each wavelet coefficient in the optimal base of wavelet function is carried out scalar quantization, by the size of wavelet coefficient from big to small
Carry out the quantization encoding of wavelet coefficient and record its position, until bit number used reaches predetermined coded number.
Further, the step for of the LPC parameter of described this frame signal of extraction, it is particularly as follows: add up every frame signal
Analyze, calculate the dependency of the frame signal adjacent with this frame signal thus obtain optimal predictive coefficient;
The step for of the prediction residual energy of described this frame signal of extraction, it is particularly as follows: carry out fast Flourier to this frame signal
Conversion process, then the mould to the signal obtained after processing carries out a square summation, thus obtains prediction residual energy.
The invention has the beneficial effects as follows: the method for the present invention is by according to the type belonging to every frame signal, thus uses
Different coded systems and code rate are compressed coding, and the coding of conducting frame signal to corresponding frame signal
During compression, for belonging to the doubtful frame signal having this type of Partial discharge signal, high code rate is used to be compressed coding transmission,
Determine the frame signal without this type of Partial discharge signal for belonging to and belong to and determine there is the frame signal of this type of Partial discharge signal, adopting
It is compressed coding transmission by low code rate, the most so can not only save bandwidth required during transmission, also protect simultaneously
Demonstrate,prove the quality of transmission signal, and can also be easy to a large amount of Partial Discharge Datas are collected and stores, both save space
In turn ensure that the reliability of data.
Detailed description of the invention
As it is shown in figure 1, the variable rate coding compression method of a kind of ultrasound wave local discharge signal, the method includes:
Obtain audio signal;
The audio signal obtained is carried out sub-frame processing, thus obtains multiframe signal;
Extract the feature of every frame signal, then according to the feature extracted, every frame signal is classified;
According to the type belonging to every frame signal, thus use corresponding coded system and code rate that every frame signal is carried out phase
Corresponding compressed encoding.
For described audio signal, it is to be carried by the ultrasonic signal collected by ultrasonic sensor
Signal obtained by after ripple frequency modulation.
It addition, for described classification, it includes doubtful having Partial discharge signal, determine without Partial discharge signal and determine have office to put letter
Number these three type;
When this frame signal belong to doubtful have this type of Partial discharge signal time, use the first code rate that this frame signal is pressed
Reduce the staff code;
When this frame signal belongs to and determines without this type of Partial discharge signal, use the second code rate that this frame signal is pressed
Reduce the staff code;
When this frame signal belong to determine have this type of Partial discharge signal time, use the 3rd code rate this frame signal is pressed
Reduce the staff code;
Wherein, described first code rate is higher than the second code rate and the 3rd code rate, i.e. for determining without shelf depreciation
Frame signal and determine the frame signal having shelf depreciation, their code rate is low code rate, and for doubtful have local
The frame signal of electric discharge, its code rate is high code rate.Thus can obtain, the method for the application of the invention, can not only save
About required during transmission bandwidth, also ensure that the quality of transmission signal simultaneously, but also is easy to a large amount of Partial Discharge Data
Collect and storage, both saved space and in turn ensure that the reliability of data.Described Partial discharge signal is local discharge signal.
Being further used as preferred embodiment, the described audio signal to obtaining carries out sub-frame processing, thus obtains many
The step for of frame signal, itself particularly as follows:
The audio signal obtained is carried out pretreatment and sub-frame processing successively, thus obtains multiframe signal.
Being further used as preferred embodiment, described pretreatment includes that sample quantization processes, preemphasis processes and windowing
Process.
It is further used as preferred embodiment, when described feature includes pulse amplitude, short-time average energy, pulse persistance
Between and spectrum envelope.
Being further used as preferred embodiment, the computing formula of described short-time average energy is as follows:
Wherein, STM represents short-time average energy, x(n) represent audio signal,Be expressed as x(n) absolute value, N table
Show the length of signal.
It is further used as preferred embodiment, the feature of the every frame signal of described extraction is then according to the feature extracted, right
The step for that every frame signal being classified, itself particularly as follows:
The feature of every frame signal is extracted, followed by grader, thus according to every frame after every frame signal being input in grader
The feature of signal judges that every frame signal is belonging to doubtful have this type of Partial discharge signal, determine without this type of Partial discharge signal also
Determine that this type of Partial discharge signal.
It is further used as preferred embodiment, the type belonging to the every frame signal of described basis, thus use corresponding
The step for that coded system and code rate carrying out corresponding compressed encoding to every frame signal, itself particularly as follows:
When this frame signal belong to doubtful have this type of Partial discharge signal time, use linear predictive coding mode and first coding speed
Rate is compressed coding to this frame signal;
When this frame signal belongs to and determines without this type of Partial discharge signal, use WAVELET PACKET DECOMPOSITION mode and the second code rate
This frame signal is compressed coding;
When this frame signal belong to determine have this type of Partial discharge signal time, use WAVELET PACKET DECOMPOSITION mode and the 3rd code rate
This frame signal is compressed coding;
Wherein, the magnitude relationship between described first code rate, the second code rate and the 3rd code rate is: first compiles
Bit rate > the 3rd code rate > the second code rate.
Being further used as preferred embodiment, described linear predictive coding mode is particularly as follows: extract the LPC of this frame signal
After parameter and prediction residual energy, LPC parameter and prediction residual energy to extracting encode.
Be further used as preferred embodiment, described WAVELET PACKET DECOMPOSITION mode particularly as follows:
According to default wavelet function and Decomposition order, this frame signal is carried out WAVELET PACKET DECOMPOSITION;
Utilize variance criterion to determine the optimal base of described wavelet function, thus according to the optimal base obtained, obtain after decomposing
Signal carry out key character and energy extraction retain, it is achieved Signal Compression;
After each wavelet coefficient in the optimal base of wavelet function is carried out scalar quantization, by the size of wavelet coefficient from big to small
Carry out the quantization encoding of wavelet coefficient and record its position, until bit number used reaches predetermined coded number.
Be further used as preferred embodiment, the step for of the LPC parameter of described this frame signal of extraction, itself particularly as follows:
Every frame signal is carried out statistical analysis, calculates the dependency of the frame signal adjacent with this frame signal thus obtain optimal prediction system
Number;
The step for of the prediction residual energy of described this frame signal of extraction, it is particularly as follows: carry out fast Flourier to this frame signal
Conversion process, then the mould to the signal obtained after processing carries out a square summation, thus obtains prediction residual energy.
The inventive method one specific embodiment
As in figure 2 it is shown, the variable rate coding compression method of a kind of ultrasound wave local discharge signal, the method step specifically includes
Have:
Step 1: carried out the ultrasonic signal of collection site by ultrasonic sensor.
Step 2: the ultrasonic signal collected is passed through the carrier fm audio section to 20Hz~16kHz, thus obtains
Obtain audio signal.
In this embodiment, the signal of selected collection is the local discharge signal of switch cubicle, and can obtain according to research, opens
The mid frequency of the local discharge signal closing cabinet is about 40kHz, and voice signal is about distributed in 0.3~4kHz interval, therefore originally
The carrier signal using 38.4kHz in embodiment carries out frequency modulation, and the center of the audio signal obtained after frequency modulation processes is frequently
Rate is 1.6kHz, the most then achieve the conversion from ultrasound wave to audio signal.
Step 3: the audio signal obtained is carried out pretreatment and sub-frame processing successively, thus obtains multiframe signal.
In the present embodiment, described pretreatment includes that sample quantization processes, preemphasis processes and windowing process.It addition, by
During the local discharge signal gathered in practice, have the first place in signal time dimension quiet, the most preferably
Ground removes the front end of collected signal and the mute frame of afterbody, thus extracts the effective audio signal of acquisition.
For above-mentioned sub-frame processing, owing to the audio signal obtained by after pretreatment is non-stationary signal, process is compared
Complexity, therefore carries out sub-frame processing by audio signal, and each frame signal after sub-frame processing can regard that an approximation is flat as
Steady signal.In the present embodiment, a series of audio frame that audio signal is divided into frame length be 20 ms, between adjacent two frames
Can there is the lap of 5 ms.
Step 4: extract the feature of every frame signal after every frame signal being input in grader, followed by grader, from
And judge that every frame signal is belonging to doubtful have this type of Partial discharge signal, determine without Partial discharge signal according to the feature of every frame signal
This type has also determined that this type of Partial discharge signal.
In the present embodiment, use use pulse amplitude, the pulse duration, spectrum envelope and short-time average energy this
Four features are as standard;Wherein, short-time average energy (STM) is by the square operation of signal amplitude is represented energy
Change, this method objectively increases the gap between high-low signal, and its specific formula for calculation is:
Wherein, STM represents short-time average energy, x(n) represent audio signal,Be expressed as x(n) absolute value, N table
Show the length of signal.
It addition, for the grader described in above-mentioned steps 4, the step that its training is set up includes:
S41, carried out the ultrasonic signal of collection site by ultrasonic sensor;
S42, the ultrasonic signal collected is carried out successively the process of above-mentioned steps 2 and step 3, thus obtain multiframe signal;
S43, it is 3 classes by every frame signal artificial division, the most doubtful has Partial discharge signal, determine without Partial discharge signal and determine there is office
Discharge signal these three type;
S44, to this 3 class their feature of signal extraction;
In the present embodiment, use pulse amplitude, pulse duration, spectrum envelope and short-time average energy these 4 are used
Feature extracts as standard and from switch cubicle ultrasound wave shelf depreciation audio frame signal;
S45, according to extract features training grader;
In the present embodiment, 3 good for people's work point classes are used 4 features that support vector machine (SVM) extracts all types of middle frame, instruction
Practice grader, thus obtain grader.
Step 5: according to the type belonging to every frame signal, thus use corresponding coded system and code rate to every frame
Signal carries out corresponding compressed encoding.
For above-mentioned step 5, it specifically includes:
When this frame signal belong to doubtful have this type of Partial discharge signal time, use linear predictive coding mode and first coding speed
Rate is compressed coding to this frame signal;
When this frame signal belongs to and determines without this type of Partial discharge signal, use WAVELET PACKET DECOMPOSITION mode and the second code rate
This frame signal is compressed coding;
When this frame signal belong to determine have this type of Partial discharge signal time, use WAVELET PACKET DECOMPOSITION mode and the 3rd code rate
This frame signal is compressed coding;
Wherein, the numerical values recited relation between described first code rate, the second code rate and the 3rd code rate is: the
One code rate > the 3rd code rate > the second code rate.
In the present embodiment, for belonging to the doubtful frame signal having this type of Partial discharge signal, use linear predictive coding side
Formula, so can retain the information of more primary signal;And determine without this type of Partial discharge signal for belonging to and determine have
The frame signal of this type of Partial discharge signal, uses WAVELET PACKET DECOMPOSITION mode to be compressed coding, and preferably makes the 3rd
Code rate is 2 times of the second code rate.
It addition, for above-mentioned linear predictive coding mode, it is particularly as follows: extract LPC parameter and the prediction of this frame signal
After residual energy, LPC parameter and prediction residual energy to extracting carry out coding transmission.And at receiving terminal, then residual with prediction
Difference energy is multiplied by normalized white noise as excitation, by LPC inverse filter composite signal.In the present embodiment, preferably make
Be code rate be the GSM encoder of 8K, the first code rate the most now is 8K.
Wherein, the step for of the LPC parameter of described this frame signal of extraction, it is particularly as follows: carry out statistical to every frame signal
Analysis, calculates the dependency of the frame signal adjacent with this frame signal thus obtains optimal predictive coefficient;
The step for of the prediction residual energy of described this frame signal of extraction, it is particularly as follows: carry out fast Flourier to this frame signal
Conversion process, then the mould to the signal obtained after processing carries out a square summation, thus obtains prediction residual energy.
For above-mentioned WAVELET PACKET DECOMPOSITION mode, itself particularly as follows:
Step 51, according to preset wavelet function and Decomposition order, this frame signal is carried out WAVELET PACKET DECOMPOSITION;
Step 52, utilize variance criterion to determine the optimal base of described wavelet function, thus according to the optimal base obtained, to decomposition
After the signal that obtains carry out the extraction of key character and energy and retain, it is achieved Signal Compression;
Step 53, each wavelet coefficient in the optimal base of wavelet function is carried out scalar quantization after, by the size of wavelet coefficient
Carry out the quantization encoding of wavelet coefficient from big to small and record its position, until bit number used reaches predetermined coded number and is
Only.In the present embodiment, determining there is the frame signal of this type of Partial discharge signal for belonging to, its bit number used is more than belonging to
In the bit number determining that the frame signal without this type of Partial discharge signal is used.In the present embodiment, determine there is office for belonging to
The frame signal of this type of discharge signal, uses the code rate of 4K, and the i.e. the 3rd code rate is 4K;Determine put without office for belonging to
The frame signal of this type of signal, uses the code rate of 2K, and the i.e. second code rate is 2K.
It addition, in the present embodiment, described default wavelet function choice db2 small echo realizes, and Decomposition order is 3,
I.e. above-mentioned steps 51 specially utilizes db2 small echo that this frame signal carries out 3 layers of WAVELET PACKET DECOMPOSITION.
For the optimal base described in above-mentioned steps 52, its computational methods are: first this frame signal carries out the little wavelength-division of db2
Solve, calculate the signal wavelet coefficient in each sub spaces;Then, wavelet decomposition process wavelet packet tree is represented (small echo
The upper layer node of bag seeds is referred to as father node, and lower floor is referred to as child node);Again, from the beginning of root node, if the cost letter of father node
Number is less than the cost function of all wavelet coefficients in two child nodes under father node, then just father node is divided into two son joints
Point, the most no longer divides;Finally, check that all nodes, retained node have just urged wavelet packets tree, i.e. wavelet packet
Optimal base.
Being obtained by above-mentioned, the advantage that the inventive method is comprised has:
1, the method for the present invention is the feature according to every frame signal, thus judges the type belonging to this frame signal, then according to being somebody's turn to do
Type belonging to frame signal thus use corresponding coded system and code rate to process to carry out corresponding compressed encoding,
And for determining the frame signal having shelf depreciation and determining the frame signal without shelf depreciation, it is to use low bit-rate to be compressed
Transmission, and for the doubtful frame signal having shelf depreciation, it uses high code check to be compressed transmission, so can not only save
Bandwidth required during transmission, also ensure that the quality of transmission signal simultaneously, and can also be easy to a large amount of Partial Discharge Datas
It is collected and stores, both having saved space and in turn ensure that the reliability of data;
2, for belonging to the doubtful frame signal having this type of Partial discharge signal, use linear predictive coding mode that it is compiled
Code compression, the most just can retain the information of more primary signal, thus follow-up data analysis and process.
It is above the preferably enforcement of the present invention is illustrated, but the invention is not limited to described enforcement
Example, those of ordinary skill in the art also can make all equivalent variations on the premise of spirit of the present invention or replace
Changing, deformation or the replacement of these equivalents are all contained in the application claim limited range.