CN106295903A - The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit - Google Patents

The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit Download PDF

Info

Publication number
CN106295903A
CN106295903A CN201610698248.9A CN201610698248A CN106295903A CN 106295903 A CN106295903 A CN 106295903A CN 201610698248 A CN201610698248 A CN 201610698248A CN 106295903 A CN106295903 A CN 106295903A
Authority
CN
China
Prior art keywords
data
compression
algorithm
error
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610698248.9A
Other languages
Chinese (zh)
Other versions
CN106295903B (en
Inventor
刘少强
刘延芳
樊晓平
徐文
闫晓燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Original Assignee
Central South University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Central South University filed Critical Central South University
Priority to CN201610698248.9A priority Critical patent/CN106295903B/en
Publication of CN106295903A publication Critical patent/CN106295903A/en
Application granted granted Critical
Publication of CN106295903B publication Critical patent/CN106295903B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present invention proposes the efficiency Forecasting Methodology of a kind of WSN data Lossy Compression Algorithm based on linear fit, first according to the hardware parameter computing hardware coefficient k of sensing node;Then fitting of a polynomial predicted method is used to determine compression ratio R of specific algorithmCWith the relation of error margin ε of data compression, and by the value of given error margin ε, obtain RcPredictive value;Further according to algorithmic code structure prediction software coefficient s and RCRelation, determine the software coefficient s of algorithm;Finally by k value and s, RcPredictive value bring efficiency calculating formula η intoE=(RcS/k) × 100%, obtain the predictive value of the efficiency of specific algorithm.This Forecasting Methodology is only relevant with hardware coefficient, compression ratio under compression algorithm is error free and error margin, algorithm efficiency under energy on-line prediction assigned error tolerance limit and correction compression ratio predictor formula, calculating is simple for it, it is low to consume energy, and provides foundation for sensing node on-line selection high energy efficiency compression algorithm in WSN.

Description

The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit
Technical field
The technology of the present invention relates to a kind of efficiency on-line prediction method of data compression algorithm, and the method is applicable to wireless sensing Based on linear fit in net damage data compression algorithm, be mainly used in requiring compression algorithm is carried out online according to compression accuracy Select, more efficiently to save electric energy.
Background technology
Along with SOC(system on a chip) (SoC), micro electronic mechanical system (MEMS), embedded system low-power consumption technology and sensor The fast development of technology etc., as wireless sense network (the Wireless Sensor of the comprehensive intelligent information processing platform Networks, WSN) paid close attention to widely, have broad application prospects, be the most active in computerized information area research One of focus, be also one of important technical changing future life.
WSN, using sensing node as elementary cell, is limited by use cost, and these node volumes are little, and it processes, storage Resource is the most limited with calculating, they can perception, measure and collect the relevant information of surrounding, and carry out according to this locality instruction Processing, the mode finally by radio communication is sent to user.Owing to node volume is the least, the calculating speed of node, storage Space and energy supply are the most very limited, and use battery to power, due to the particularity in node perceived region under normal circumstances Big with the quantity of node, change battery and be difficult to or unpractical.Therefore, the most maximized energy utilizing node limited Amount resource becomes the hot issue of WSN research.
The energy of sensing node mainly consume data perception, process and transmit on.Wherein, data be wirelessly transferred ring The energy that joint is consumed is most, thus most of energy of node has been used in being wirelessly transferred of data.There are some researches show: logical Cross wireless device to send the energy needed for 1bit data and be at least needed for an addition instruction execution process 480 times of energy.Cause This, by using suitable compression algorithm, it is possible to reduce energy expenditure required during node-node transmission data, thus extend node Life-span.
Traditional compression algorithm is only with compression ratio as target, it is not necessary to consider power saving.Some compression methods can realize Compression ratio high, but its algorithm complex is the highest.Owing to the execution of algorithm will consumed energy and algorithm complex its consumption the highest Can be the most, if the required energy consumed of compression algorithm self-operating is more than the communication energy saved by compression data, Data compression is so used just not reach energy-conservation purpose.Therefore, the requirement to the compression algorithm of WSN application is different from and answers tradition It is whether evaluating data compression algorithm is suitable for and good and bad master by the requirement of algorithm, energy-saving effect or energy efficiency (abbreviation efficiency) Want factor, and this efficiency is relevant with the power of communications of sensing node.Data compression algorithm for WSN, it is desirable to it passes through The energy that compression data are saved have to be larger than and realizes the energy that compression is consumed, namely compression algorithm must have positive energy Efficiency or positive efficiency.
Data compression method is divided into lossless compress and lossy compression method two class.Lossless compress will not make the data compressed lose Very, namely can completely recover through the data of lossless compress, but the compression ratio of lossless compression algorithm is relatively low, is only applicable to Those require the compression distortionless application scenario of data.Damage data compression, as the term suggests, number will necessarily be made when compressing data According to impaired so that be there is a certain degree of error by the relatively primitive data of the data recovered after data compression, reconstructed The approximation of simply initial data that has of data rather than initial data itself.But, the compression ratio of Lossy Compression Algorithm is high.If Allow the error of data being recovered to obtain by compression data the biggest, the most compressible fall data the most, the compression ratio of algorithm is just The highest, the efficiency of algorithm also will improve accordingly.Therefore, based on damage the energy-saving efficiency of data compression method also with allow to damage The error size that compression exists is relevant, and lossless compress does not the most exist this problem.
The method realizing data lossy compression method is varied, and wherein compression method based on linear fitting of time series is one What class was common is simply applicable to the Lossy Compression Algorithm of WSN, has much research both at home and abroad to this and obtains corresponding achievement.? In this kind of compression algorithm based on linear fitting of time series, typical algorithm has: based on Linear Regression Model in One Unknown empty time number According to compression algorithm, calculate based on the sectional linear fitting algorithm returned and regression model adjustment algorithm combination based on confidence interval Method, DP algorithm improves the optimal curve data compression algorithm of compression accuracy and algorithm complex, utilize piecewise constant to force Nearly sampled data carries out PMC-MR algorithm and PMC-MEAN, the top-down piecewise linear approximation algorithm of linear fit, etc..This A little same or analogous compression algorithms of basic ideas, are not quite similar in specific implementation, and its performance is the most variant, be respectively arranged with side Weight.But, this kind of compression algorithm has such common trait, it may be assumed that when the linear fit expression formula of a corresponding initial data When the difference of value of calculation and this initial data is less than allowable error, this initial data can be substituted by linear fit value of calculation, Namely these data can be compressed out.Therefore, using this kind of Lossy Compression Algorithm, part initial data to be compressed, part is former Beginning data are retained.The data retained are the fewest, then compression ratio is the highest.Obviously, the error of compression algorithm or precision and compression ratio are all Relevant with the compression mechanism of specific algorithm, and compression ratio is also relevant with the compressed error allowed.
Typically, the algorithm that compression ratio is relatively high, its complexity is the most relatively high, but high compression rate does not represent high energy efficiency.? In WSN, compress the energy-conservation energy of a Bit data relevant to the hardware effort parameter of node.If the merit for radio communication Rate is relatively large, then compress the energy that a Bit data saved also the most relatively large, in the case of other conditions are identical, algorithm Efficiency will be high;Otherwise, if the power of radio communication is little, in the case of other conditions are identical, the efficiency of compression algorithm will Low.On the other hand, the wireless communication power of WSN node is determined by communication distance, environmental condition and QoS requirement. So, the efficiency towards the compression algorithm of WSN is not by the single decision of compression ratio, further relates to complexity and the application of algorithm Actual hardware parameter under the node specific works state of compression algorithm.For Lossy Compression Algorithm, then affect algorithm efficiency Factor also includes the size of the compressed error that actual application allowed.
For WSN, just because of above-mentioned many reasons or factor so that how to calculate from multiple applicable compression In method, appropriate selection is a kind of can meet the current logarithmic restriction requirement according to compressed error, can play again having of optimum energy-saving effect Damage compression algorithm highly to study, and there is practical value.Judge whether certain data compression algorithm just has at present The method of efficiency is to perform this algorithm on node and test the energy consumption of its each several part, then judges further according to power consumption values.This Method is cumbersome and time consuming, should not promote.In view of this kind of data Lossy Compression Algorithm based on linear fitting of time series has It is applicable to the feature of WSN, therefore, studies and a kind of can predict the method for Lossy Compression Algorithm efficiency in WSN, and according to this prediction These algorithms of result reasonable selection, save the energy improving WSN node and have highly important meaning.
Summary of the invention
Solved by the invention technical problem is that, for the deficiencies in the prior art, it is provided that a kind of WSN based on linear fit The efficiency Forecasting Methodology of data Lossy Compression Algorithm, can online and be accurately judged to whether used compression algorithm just has The compression algorithm of efficiency or on-line selection more high energy efficiency, so that node can save more energy.
The technical scheme is that
The efficiency Forecasting Methodology of a kind of WSN data Lossy Compression Algorithm based on linear fit, comprises the steps of
Step 1: selected sensing node and wireless sensing network data Lossy Compression Algorithm based on linear fit;
Step 2: according to the actual hardware parameter of sensing node, calculate its hardware coefficient k by formula (1);
k = U R F I R F U m c u I m c u × f m c u R b a u d - - - ( 1 )
Wherein, UmcuAnd ImcuAverage current under the running voltage of the respectively MCU of sensing node and activity pattern, URFWith IRFIt is respectively the average current under the running voltage of wireless communication module of sensing node and activity pattern, fmcuWork for MCU Frequency, RbaudBaud rate for radio communication;
Step 3: according to normalized sensor samples data, to error margin ε and compression ratio RCRelation carry out multinomial Formula matching, shown in polynomial fitting such as formula (2);Factor alpha in digital simulation multinomial12,…,αn, obtain RCPrediction Expression formula;
RC=RC01ε+α2ε23ε3+…+αnεn (2)
Wherein, n is the order of polynomial fitting, RC0It is compression ratio time zero (i.e. without compressed error) for error margin;
Step 4: according to current given or that input (determining according to the required precision of reality application) data lossy compression method Error margin (i.e. allowable error) ε, calculates compression ratio R by polynomial fittingCPredictive value;
Step 5: calculate the software coefficient s of selected compression algorithm by formula (3);
S=aRC+b (3)
Wherein, coefficient a and b meets formula (4):
a = 1 m ( N c y c l e 3 - N c y c l e 4 ) , b = 1 m ( N c y c l e 2 + N c y c l e 4 ) - - - ( 4 )
In formula, Ncycle2For each data need the algorithm steps performed carry out the clock week needed for unit data compression Issue, Ncycle3Be the algorithm steps only data being compressed out just performed carry out needed for unit data compression clock week Issue, Ncycle4It is that the algorithm steps that the data only remained being not compressed just perform carries out unit data compression Required clock periodicity;M represents that each data determined by data type need to account for memory-aided number of bits;
Step 6: by the hardware coefficient k of sensing node calculated in above-mentioned steps, compression ratio RCPredictive value and selected The software coefficient s of compression algorithm, brings the efficiency computing formula (5) of algorithm into, obtains the efficiency predictive value η of algorithmE:
η E = ( R C - s k ) × 100 % - - - ( 5 )
I.e. ηE=-b/k+ (1-a/k) (RC01ε+α2ε2+…+αnεn) (6)
Described step 3 comprises the following steps:
1) initial value of the order n of empirically determined polynomial fitting, n is positive integer;
2) polynomial fitting is set as shown by the following formula:
RC=RC01ε+α2ε23ε3+…+αnεn
3) according to the maximum ε of n and input or given error marginmax, by formula ε1max/ n determines as certainly The reduced scale ε of the i.e. abscissa of the error margin of variable1
4) according to formula εi=i ε1Determine the Along ent ε of error margini(i=1,2 ..., n);
To same distribution characteristics, normalized sensor samples data, by the error margin (allowable error) of corresponding Along ent Value is compressed respectively, obtains Along ent εi(i=1,2 ..., n) corresponding compression ratio RCi(i=1,2 ..., actual value n) and mistake Difference tolerance limit is compression ratio R when zeroC0Actual value;
5) according to the actual value (ε of Along ent and the compression ratio of correspondence thereof1,RC1)、(ε2,RC2) ..., (εn,RCn), use rule Generalized fitting of a polynomial computing formula (7) calculates the polynomial coefficient b that standardizes1,b2,…,bn
b 1 b 2 . . . b n = 1 2 ... 1 2 2 2 ... 2 n . . . . . ... . . . . n n 2 ... n n - 1 R C 1 - R C 0 R C 2 - R C 0 . . . R C n - R C 0 - - - ( 7 )
6) the coefficient b obtained according to formula (7)1,b2,…,bn, by relational expressionCalculate polynomial fitting Factor alpha12,…,αn
7) according to polynomial fitting RC=RC01ε+α2ε23ε3+…+αnεn, calculate Along ent εi(i=1,2 ..., n) right Compression ratio R answeredCi(i=1,2 ..., predictive value n);
8) by compression ratio RCi(i=1,2 ..., predictive value n) and actual value, calculate average fit error;If average fit Error exceedes input or given error margin, and n adds 1, returns the 2nd) step;Until average fit error is less than or equal to input Or given error margin, terminate the Fitting Calculation;By the up-to-date order n obtained and factor alpha12,…,αnMultinomial as matching The order of formula and coefficient, obtain RCPrediction expression.
Described step 1) in, if to error margin ε and compression ratio RCRelation carry out whole section of matching, then the initial value of n takes 4;If to error margin ε and compression ratio RCRelation two sections be fitted, then the initial value of n takes 2.
Described step 8) in, average fit error calculating step is:
For arbitrary RCi(i=1,2 ..., n), calculate its relative error;Relative error is equal to RCiPredictive value and actual value The absolute value of difference divided by this actual value;
Calculate all RCi(i=1,2 ..., average fit error n);Average fit error is equal to all RCi(i=1, 2 ..., the arithmetic mean of instantaneous value of relative error n).
The efficiency Forecasting Methodology of described WSN data Lossy Compression Algorithm based on linear fit, also includes following to compression Rate RCPrediction expression carry out the step of on-line correction:
) the selected algorithm of observation reality given or under the error margin of input, carry out sensing data and compress the pressure obtained The actual value of shrinkage;
) according to step 8) R that obtainsCPrediction expression, be calculated under the actual given or error margin of input, The predictive value of compression ratio;
) according to the actual value of compression ratio and predictive value, calculate the relative error of compression ratio predictive value;
If) this relative error less than or equal to set threshold value, then RCPrediction expression keep constant;Otherwise, should The actual value of sensing data, the actual error margin given or input and corresponding compression ratio that sensing node is the last is made For sample data, and sensing data therein is first done normalized, the most again to error margin ε and compression ratio RCPass System carries out fitting of a polynomial, updates RCPrediction expression;Described setting threshold value is less than the given or error margin of input;
) proceed to step 4.
Described step) described in set that threshold value draws the error margin of fixed or input 90%~95%.
In described step 4, according to compression algorithm program code, by IAR simulation development system platform, carry out following meter Calculate:
1) calculate the algorithm steps being required for performing to each data and carry out the clock periodicity needed for unit data compression Ncycle2
2) calculate the algorithm steps only data being compressed out just performed and carry out the clock needed for unit data compression Periodicity Ncycle3
3) calculate needed for the data being retained when only just need the algorithm steps performed carry out unit data compression Clock periodicity Ncycle4
4) press the value of formula (4) design factor a and b, be calculated software coefficient s by formula (3) the most again.
The technology of the present invention is contemplated that:
Data compression calculation is damaged with being applicable to the based on linear fit of WSN data compression for concrete sensing node Method, according to three parameters contained by the computing formula (5) of algorithm efficiency and wherein the software coefficient s of algorithm and compression ratio RcTwo Relation between person, represents s and R of concrete compression algorithm respectively with explicit expressioncRelation and RcWith data compression error The variation relation of ε, then these expression formulas are brought into formula (5) obtains concrete compression algorithm efficiency ηERelation table with variable ε Reach formula, thus the permissible value and hardware parameter according to compressed error realizes the on-line prediction to algorithm efficiency, based on RcPrediction Method also can be pre-to compression ratio according to the relative error situation of the algorithm realistic compression ratio to sensing data Yu compression ratio predictive value Survey formula carries out on-line amending.
Selected sensor node and WSN data Lossy Compression Algorithm based on linear fit
According to application scenario it needs to be determined that the operating frequency of the hardware parameter of sensor node: MCU, voltage, electric current and The running voltage of Wireless Telecom Equipment, electric current and baud rate.Several concrete WSN data based on linear fit are selected to damage pressure Compression algorithm.
According to the hardware parameter of node, calculate k value by the computing formula (1) of hardware coefficient k
Hardware coefficient, as the term suggests being the coefficient the most relevant with hardware, unrelated with compression algorithm and compressed object.By public affairs Formula (1) is it can be seen that hardware coefficient relates to two platform: MCU and radio communication platform.Algorithm routine is performed by MCU, different MCU when often having different power consumption, different MCU architectural framework and instruction set that identical algorithms also can be made to perform Actual power loss the most different, and then affect compression algorithm run energy consumption.Transmitting power and phase due to different radio frequency chip The performance such as the receiving sensitivity answered is different, and in reality, the Configuration of baud rate of data transmission may be different, inter-node communication distance with And site environment is different or change, these all make the power consumption levels corresponding to unit of transfer's data different or need adjustment to change Become, thus wireless communications environment also has remote-effects as the factor of an aspect to energy-saving efficiency.
Just running voltage U of MCU and Wireless Telecom Equipment can be obtained by the data book of hardware platformmcuAnd URF, and The average current I of its activity patternmcuAnd IRF, MCU operating frequency fmcu, also radio communication baud rate Rbaud.According to formula (1) Just k value can be calculated.
According to RCForecasting Methodology, calculate RCFactor alpha in prediction expression (2)12,…,αn
Compression ratio RCMain relevant with error margin ε set by compressed object and algorithm, and it has been investigated that for clothes From the compressed object of the same regularity of distribution, RCTo present similar non-linear relation between ε.Can for this non-linear relation To use the method for fitting of a polynomial to be determined by curve matching, thus obtain RCPrediction expression, in evaluator system During number, select normalized polynomial match computational methods.Owing to the method is simple, it is easy to programming realization and being easy to has in resource Carry out on the sensor node of limit fitting coefficient in line computation, it is simple to according to the realistic compression ratio of selected algorithm at super setting threshold In the case of value, to RCPrediction expression do on-line amending.
According to the Forecasting Methodology of software coefficient s, calculate coefficient a and b in s prediction expression (3) according to formula (4)
The computing formula of software coefficient s such as formula (7).
s = N c y c l e N u n c m p × m - - - ( 8 )
Wherein NcycleAnd NuncmpBeing respectively algorithm routine and run required clock periodicity and original data volume, m represents original Number of bits shared by data type.Original data volume one timing of compression, as long as calculating NcycleJust can get the value of s.Pin Damaging data compression algorithm to based on linear fit, the Structure and Process of such algorithm is as shown in Figure 1.According to flow process shown in Fig. 2 The common trait analysis of figure and aforementioned this kind of algorithm understands, and the execution process of whole algorithm can be divided into following four parts, That is: part once, part to be performed, the part that only data being compressed out just can be performed, the most right is performed The part that retained data just can perform.The most 8. process in Fig. 1 has only carried out once, and process is the most required Clock periodicity is defined as Ncycle1;3. process is carried out once by each data, and the number of times of execution is then time series data Length Nuncmp, process performs required clock periodicity the most every time and is defined as Ncycle2, total clock periodicity is Ncycle2× Nuncmp;Process the most only set error margin in data be just performed, the most only exist compressible fall data Can perform the two process, the number of times of execution is number N of the data being compressed outcmped, needed for process performs the most every time Clock periodicity is defined as Ncycle3, then altogether required clock periodicity is Ncycle3×Ncmped;The most 6. process only has the most not Data in error margin are just performed, and i.e. only there are the data needing to remain and just can perform these three process, hold Number N that number of times is the data remained of rowsaved, these three process performs required clock periodicity every time and is defined as Ncycle4, then altogether required clock periodicity is Ncycle4×Nsaved.Can be obtained by above-mentioned analysis, algorithm perform needed for time Clock periodicity NcycleSuch as formula (9):
Ncycle=Ncycle1+Ncycle2×Nuncmp+Ncycle3×Ncmped+Ncycle4×Nsaved (9)
Formula (9) is brought into formula (8) arrangement and can obtain formula (10).
s = 1 m ( N c y c l e 1 N u n c m p + N c y c l e 2 + N c y c l e 4 + ( N c y c l e 3 - N c y c l e 4 ) × N c m p e d N u n c m p ) - - - ( 10 )
As m × Nuncmp>>Ncycle1Time, formula (10) becomes formula (11).
s = 1 m ( N c y c l e 3 - N c y c l e 4 ) × R C + 1 m ( N c y c l e 2 + N c y c l e 4 ) - - - ( 11 )
OrderThen
S=aRC+b (12)
For the compression algorithm determined, a, b are constant so that software coefficient s only with compression ratio RCRelevant, and be RC's Linear function.
Due to Ncycle2、Ncycle3And Ncycle4Represent the clock periodicity needed for the instruction execution of algorithm each several part, and work as hardware Platform and selected its value rear of compressed object immobilize, and only require to obtain Ncycle2、Ncycle3And Ncycle4And calculate the value of a, b, just Can be according to compression ratio RCValue computation software coefficient s.
By s, RCBring efficiency computing formula (5) with k respectively into and i.e. obtain algorithm efficiency ηEPrediction expression (6).
The k value obtained above-mentioned, RCThe prediction expression of prediction expression and s substitutes into efficiency computing formula (5) i.e. respectively The prediction expression (6) of algorithm efficiency can be obtained.
According to current given or the hardware coefficient k value damaging data compression error margin value ε, node of input, by formula (6) the efficiency predictive value of selected compression algorithm is calculated.
By by error margin value ε determined by the precision of actual applied compression algorithm or allowable error requirement and according to Node current operation mode calculated hardware coefficient k substitutes into formula (6), can be calculated this compression algorithm of employing and carries out data The efficiency predictive value of compression.
Beneficial effect:
WSN data lossy compression method based on linear fit can be calculated by the on-line prediction method of the algorithm efficiency according to the present invention The efficiency of method has carried out on-line prediction, and the method calculating is simple, it is low to consume energy, and prediction expression coefficient can be implemented in line meter Calculate, it was predicted that result is the most accurate, it is possible to as carrying out the foundation of on-line selection high energy efficiency compression algorithm before compressing the data, from And save the energy of node to greatest extent, extend the life-span of network.
Accompanying drawing explanation
Fig. 1 is flow chart of the present invention
Fig. 2 WSN based on linear fit Lossy Compression Algorithm flow chart
The compression ratio prognostic chart of Fig. 3 PMC-MR compression algorithm Gaussian distributed data
The software coefficient prognostic chart of Fig. 4 PMC-MR algorithm
The prognostic chart of Fig. 5 PMC-MR algorithm efficiency
Detailed description of the invention
Below in conjunction with the drawings and specific embodiments, the present invention is described in more detail.
The invention discloses the efficiency Forecasting Methodology of a kind of WSN data Lossy Compression Algorithm based on linear fit, including Following steps:
Step 1) select sensing node and WSN data Lossy Compression Algorithm based on linear fit
Compression algorithm selects the PMC-MR algorithm in wireless sensing network data Lossy Compression Algorithm based on linear fit, pressure The sample data of contracting object select Gaussian distributed, the microcontroller of sensor node is MSP430F2611, operates in Under 3.0V, 512 μ A, 1MHz;Wireless transport module uses CC2420, operates under 3.0V, 17.4mA, with the baud of 150kpbs Rate carries out data transmission, and as a example by above-mentioned object and running parameter, practices the present invention and is described in further details.
PMC-MR is that a kind of typical WSN based on linear fit damages data compression algorithm, and its principle is: by monitoring The input range of input data, when the input range of data is beyond predetermined threshold value, then by the previous position of these data and Midrange (maximum and the arithmetical average of minima) exports, thus reaches to compress purpose.PMC-MR algorithm false code is as follows.
Step 2) according to the hardware parameter of node, calculate k value by the computing formula (1) of hardware coefficient k
Owing to this example node M CU uses MSP430F2611, operate in running voltage 3.0V, electric current 512 μ A and frequency 1MHz Under the conditions of;Radio transmission apparatus uses CC2420, operates in running voltage 3.0V, under the conditions of electric current 17.4mA, with 150kpbs's Baud rate carries out data transmission, and calculates k value according to formula (1).
k = U R F I R F U m c u I m c u × f m c u R b a u d = 3 × 17.4 × 10 - 3 3 × 512 × 10 - 6 × 10 6 150 ≈ 227
Step 3) according to RCForecasting Methodology, calculate RCFactor alpha in prediction expression (2)12,L,αn
1) for whole segment data matching, take n=4, the most generally use 4 rank fitting of a polynomials, average phase can be met To the error requirement less than 2%;
2) by n=4 and εmax=4 (for ease of calculating, these data can zoom in or out), utilize formula ε1max/ n determines The reduced scale ε of abscissa1=1;
3) according to formula εi=i ε1Determine the Along ent ε of error margin1=1, ε2=2, ε3=3, ε4=4;
4) according to the sample data compression measurement result (ε of corresponding Along enti,Rci): (0,0.0137), (1,0.7246), (2,0.9590), (3,0.9980), (4,0.9980), code requirement fitting of a polynomial computing formula (7) calculates standardization Polynomial coefficient b1,b2,b3,b4, i.e.
b 1 b 2 b 3 b 4 = 1 1 1 1 2 2 2 2 3 2 4 3 3 2 3 3 3 4 4 4 2 4 3 4 4 - 1 0.7109 0.9453 0.9843 0.9843 = 1.0740 - 0.4360 0.0780 - 0.0052
5) according to prediction expression coefficient formulasCalculate factor alpha1=1.0740, α2=-0.4360, α3=0.0780, α4=-0.0052.
Fitting result is as it is shown on figure 3, the maximum relative error of matching is 5.7%, and average relative error is 1.32%.
Step 4) according to the prediction computational methods of software coefficient s, according to the coefficient a in formula (4) calculation expression (3) and b
1) according to PMC-MR false code, algorithm steps (5) and second (11) during the execution of algorithm, time series In each data be required for performing once, the clock periodicity N that they are requiredcycle2=6;
2) algorithm steps (6), (11) and (12) only exist compressible fall data just can perform these three step, these Clock periodicity needed for step performs determines Ncycle3=634;
3) algorithm steps (6), (7), (8) and (9) only existence needs the data remained just can perform these four steps Suddenly, the clock periodicity N needed for these four steps performcycle4=1045.
4) according to formula (4), first calculate coefficient a and b in predictor formula, then obtain the predictor formula of software coefficient s.
a = 1 32 ( 634 - 1045 ) = - 12.84 , b = 1 32 ( 6 + 1046 ) = 32.84
S=-12.84 × RC+32.84
As shown in Figure 4, can find that from figure the predictive value of s is the most close with measured value clearly, maximum relative error It is 0.7%, it was predicted that result is ideal.
Step 5) by s, RCBring efficiency computing formula (5) with k respectively into and i.e. obtain algorithm efficiency ηEPrediction expression (6).
Obtaining k value, RCCarry it into formula (5) after expression formula and s prediction expression respectively and obtain ηEPrediction expression For:
η E = ( R C - s k ) × 100 % = ( R C - 112.84 × R C + 32.84 227 ) × 100 % = ( 1.0566 R C - 0.1447 ) × 100 %
Arrange:
ηE=(-0.1302+1.1348 ε-0.4607 ε2+0.0824ε3-0.0055ε4) × 100%
Step 6) by previous step gained efficiency ηEConcrete prediction expression, by the concrete allowable error value generation of compression algorithm Enter to calculate, draw efficiency ηEPredictive value.
Corresponding compression algorithm allowable error scope is that the efficiency prediction curve of the PMC-MR algorithm of 0~4 is as it is shown in figure 5, institute Having predictive value the most close with measured value, maximum relative error is 5.18%, and average relative error is 0.49%, it was predicted that result Ideal.

Claims (7)

1. the efficiency Forecasting Methodology of a WSN data Lossy Compression Algorithm based on linear fit, it is characterised in that comprise following Step:
Step 1: selected sensing node and wireless sensing network data Lossy Compression Algorithm based on linear fit;
Step 2: according to the actual hardware parameter of sensing node, calculate its hardware coefficient k by formula (1);
k = U R F I R F U m c u I m c u × f m c u R b a u d - - ( 1 )
Wherein, UmcuAnd ImcuAverage current under the running voltage of the respectively MCU of sensing node and activity pattern, URFAnd IRFPoint Not Wei average current under the running voltage of wireless communication module of sensing node and activity pattern, fmcuWork frequency for MCU Rate, RbaudBaud rate for radio communication;
Step 3: according to normalized sensor samples data, to error margin ε and compression ratio RCRelation carry out multinomial plan Close, shown in polynomial fitting such as formula (2);Factor alpha in digital simulation multinomial12,…,αn, obtain RCPrediction express Formula;
RC=RC01ε+α2ε23ε3+…+αnεn (2)
Wherein, n is the order of polynomial fitting, RC0It is compression ratio when zero for error margin;
Step 4: according to the current given or error of that input (determining according to the required precision of reality application) data lossy compression method Tolerance limit (i.e. allowable error) ε, calculates compression ratio R by polynomial fittingCPredictive value;
Step 5: calculate the software coefficient s of selected compression algorithm by formula (3);
S=aRC+b (3)
Wherein, coefficient a and b meets formula (4):
a = 1 m ( N c y c l e 3 - N c y c l e 4 ) , b = 1 m ( N c y c l e 2 + N c y c l e 4 ) - - - ( 4 )
In formula, Ncycle2For each data need the algorithm steps performed carry out the clock periodicity needed for unit data compression, Ncycle3It is that the algorithm steps only just performed the data being compressed out carries out the clock periodicity needed for unit data compression, Ncycle4It is needed for the algorithm steps that the data only remained being not compressed just perform carries out unit data compression Clock periodicity;M represents that each data determined by data type need to account for memory-aided number of bits;
Step 6: by the hardware coefficient k of sensing node calculated in above-mentioned steps, compression ratio RCPredictive value and selected compression calculate The software coefficient s of method, brings the efficiency computing formula (5) of algorithm into, obtains the efficiency predictive value η of algorithmE:
η E = ( R C - s k ) × 100 % - - - ( 5 ) .
The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit, its feature the most according to claim 1 Being, described step 3 comprises the following steps:
1) initial value of the order n of empirically determined polynomial fitting, n is positive integer;
2) polynomial fitting is set as shown by the following formula:
RC=RC01ε+α2ε23ε3+…+αnεn
3) according to the maximum ε of n and input or given error marginmax, by formula ε1max/ n determines as independent variable The reduced scale ε of the i.e. abscissa of error margin1
4) according to formula εi=i ε1Determine the Along ent ε of error margini(i=1,2 ..., n);
To same distribution characteristics, normalized sensor samples data, it is compressed respectively by the error margin value of corresponding Along ent, Obtain Along ent εi(i=1,2 ..., n) corresponding compression ratio RCi(i=1,2 ..., when actual value n) and error margin are zero Compression ratio RC0Actual value;
5) according to the actual value (ε of Along ent and the compression ratio of correspondence thereof1,RC1)、(ε2,RC2) ..., (εn,RCn), code requirement Fitting of a polynomial computing formula (7) calculates the polynomial coefficient b that standardizes1,b2,…,bn
b 1 b 2 . . . b n = 1 1 ... 1 2 2 2 ... 2 n . . . . . ... . . . . n n 2 ... n n - 1 R C 1 - R C 0 R C 2 - R C 0 . . . R C n - R C 0 - - - ( 7 )
6) the coefficient b obtained according to formula (7)1,b2,…,bn, by relational expressionCalculate the coefficient of polynomial fitting α12,…,αn
7) according to polynomial fitting RC=RC01ε+α2ε23ε3+…+αnεn, calculate Along ent εi(i=1,2 ..., n) corresponding Compression ratio RCi(i=1,2 ..., predictive value n);
8) by compression ratio RCi(i=1,2 ..., predictive value n) and actual value, calculate average fit error;If average fit error Exceeding input or given error margin, n adds 1, returns the 2nd) step;Until average fit error less than or equal to input or Given error margin, terminates the Fitting Calculation;By the up-to-date order n obtained and factor alpha12,…,αnAs polynomial fitting Order and coefficient, obtain RCPrediction expression.
The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit, its feature the most according to claim 2 It is, described step 1) in, if to error margin ε and compression ratio RCRelation carry out whole section of matching, then the initial value of n takes 4;If It is to error margin ε and compression ratio RCRelation two sections be fitted, then the initial value of n takes 2.
The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit, its feature the most according to claim 2 It is, described step 8) in, average fit error calculating step is:
For arbitrary RCi(i=1,2 ..., n), calculate its relative error;Relative error is equal to RCiThe difference of predictive value and actual value Absolute value divided by this actual value;
Calculate all RCi(i=1,2 ..., average fit error n);Average fit error is equal to all RCi(i=1,2 ..., n) The arithmetic mean of instantaneous value of relative error.
The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit, its feature the most according to claim 2 It is, also includes following to compression ratio RCPrediction expression carry out the step of on-line correction:
) the selected algorithm of observation reality given or under the error margin of input, carry out sensing data and compress the compression ratio obtained Actual value;
) according to step 8) R that obtainsCPrediction expression, be calculated under the actual given or error margin of input, compression The predictive value of rate;
) according to the actual value of compression ratio and predictive value, calculate the relative error of compression ratio predictive value;
If) this relative error less than or equal to set threshold value, then RCPrediction expression keep constant;Otherwise, by this node The actual value of nearly sensing data, the actual error margin given or input and corresponding compression ratio once is as sample number According to, and sensing data therein is first done normalized, the most again to error margin ε and compression ratio RCRelation carry out many Item formula matching, updates RCPrediction expression;Described setting threshold value is less than the given or error margin of input;
) proceed to step 4.
The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit, its feature the most according to claim 5 Being, described setting threshold value draws the 90%~95% of error margin that is fixed or that input.
The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit the most according to claims 1 to 6, its It is characterised by, in described step 4, according to compression algorithm program code, by IAR simulation development system platform, carries out following meter Calculate:
1) calculate the algorithm steps being required for performing to each data and carry out the clock periodicity needed for unit data compression Ncycle2
2) calculate the algorithm steps only data being compressed out just performed and carry out the clock cycle needed for unit data compression Number Ncycle3
3) calculate only the data being retained when just are needed the algorithm steps of execution carry out needed for unit data compression time Clock periodicity Ncycle4
4) press the value of formula (4) design factor a and b, be calculated software coefficient s by formula (3) the most again.
CN201610698248.9A 2016-08-19 2016-08-19 Energy efficiency prediction method of WSN data lossy compression algorithm based on linear fitting Expired - Fee Related CN106295903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610698248.9A CN106295903B (en) 2016-08-19 2016-08-19 Energy efficiency prediction method of WSN data lossy compression algorithm based on linear fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610698248.9A CN106295903B (en) 2016-08-19 2016-08-19 Energy efficiency prediction method of WSN data lossy compression algorithm based on linear fitting

Publications (2)

Publication Number Publication Date
CN106295903A true CN106295903A (en) 2017-01-04
CN106295903B CN106295903B (en) 2020-04-21

Family

ID=57660876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610698248.9A Expired - Fee Related CN106295903B (en) 2016-08-19 2016-08-19 Energy efficiency prediction method of WSN data lossy compression algorithm based on linear fitting

Country Status (1)

Country Link
CN (1) CN106295903B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110067739A (en) * 2019-04-15 2019-07-30 湖南中普新能源科技有限公司 Air compressor machine energy efficiency monitoring method based on big data
CN110838151A (en) * 2019-11-12 2020-02-25 南京甄视智能科技有限公司 Image compression processing method and device based on polynomial fitting, computer system, server and readable storage medium
CN112153659A (en) * 2020-08-21 2020-12-29 中国地质大学(武汉) Efficient and energy-saving construction method of data compression model of satellite-borne wireless sensor network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420740A (en) * 2008-12-05 2009-04-29 清华大学 Compression determination method for lowering power consumption of wireless sensor network
CN101965039A (en) * 2010-10-17 2011-02-02 中南大学 Ultra-low-power design method for wireless sensor network node

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420740A (en) * 2008-12-05 2009-04-29 清华大学 Compression determination method for lowering power consumption of wireless sensor network
CN101965039A (en) * 2010-10-17 2011-02-02 中南大学 Ultra-low-power design method for wireless sensor network node

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈翔: "无线传感器网络高能效数据压缩方法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110067739A (en) * 2019-04-15 2019-07-30 湖南中普新能源科技有限公司 Air compressor machine energy efficiency monitoring method based on big data
CN110838151A (en) * 2019-11-12 2020-02-25 南京甄视智能科技有限公司 Image compression processing method and device based on polynomial fitting, computer system, server and readable storage medium
CN110838151B (en) * 2019-11-12 2020-07-03 南京甄视智能科技有限公司 Picture compression processing method, computer system and readable storage medium
CN112153659A (en) * 2020-08-21 2020-12-29 中国地质大学(武汉) Efficient and energy-saving construction method of data compression model of satellite-borne wireless sensor network

Also Published As

Publication number Publication date
CN106295903B (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN113009349B (en) Lithium ion battery health state diagnosis method based on deep learning model
JP6579287B1 (en) Degradation estimation apparatus, computer program, and degradation estimation method
CN109145949A (en) Non-intrusive electrical load monitoring and decomposition method and system based on integrated study
Tang et al. The capacity prediction of Li-ion batteries based on a new feature extraction technique and an improved extreme learning machine algorithm
WO2021208079A1 (en) Method and apparatus for obtaining power battery life data, computer device, and medium
CN111537884B (en) Method and device for acquiring service life data of power battery, computer equipment and medium
CN110658725B (en) Energy supervision and prediction system and method based on artificial intelligence
CN106295903A (en) The efficiency Forecasting Methodology of WSN data Lossy Compression Algorithm based on linear fit
Ding et al. Remaining useful life prediction for lithium-ion batteries based on CS-VMD and GRU
CN114818483A (en) Electromechanical disturbance positioning and propagation prediction method based on graph neural network
CN114707776A (en) Carbon emission double control-based low-carbon energy consumption optimization system and method
CN115308608A (en) All-vanadium redox flow battery voltage prediction method, device and medium
CN114280490B (en) Lithium ion battery state of charge estimation method and system
Pourmirza et al. Data reduction algorithm for correlated data in the smart grid
US20240144004A1 (en) Trained Models for Discovering Target Device Presence
Han et al. A novel deep-learning-based robust data transmission period control framework in iot edge computing system
Yu et al. SOH estimation method for lithium-ion battery based on discharge characteristics
CN113779861B (en) Photovoltaic Power Prediction Method and Terminal Equipment
CN113191740A (en) Measurement asset management system
Yan et al. SOC prediction method of wireless sensor nodes batteries based on Attention-LSTM
CN110556595A (en) method for predicting quality unbalance of lithium iron phosphate battery safety management system for energy storage
CN113341331B (en) Method and device for predicting working life of composite power supply
CN113344435B (en) Platform power supply state evaluation device, electronic equipment and storage medium
CN117517980B (en) Method and system for monitoring health state of lithium battery in real time
US20240054322A1 (en) Targeted Energy Usage Device Presence Detection Using Multiple Trained Machine Learning Models

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200421

Termination date: 20210819

CF01 Termination of patent right due to non-payment of annual fee