CN102004644A - Optimal evaluation method for embedded software source program structure-level energy consumption - Google Patents
Optimal evaluation method for embedded software source program structure-level energy consumption Download PDFInfo
- Publication number
- CN102004644A CN102004644A CN2010105905613A CN201010590561A CN102004644A CN 102004644 A CN102004644 A CN 102004644A CN 2010105905613 A CN2010105905613 A CN 2010105905613A CN 201010590561 A CN201010590561 A CN 201010590561A CN 102004644 A CN102004644 A CN 102004644A
- Authority
- CN
- China
- Prior art keywords
- evaluation
- grey
- class
- matrix
- estimate
- 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.)
- Pending
Links
Images
Abstract
The invention provides a structure-level hierarchical grey evaluation model of an embedded software source program based on researching the present evaluation method, comprising the following steps of: firstly constructing a judgment matrix; secondly constructing an evaluation sample matrix, determining evaluation grey type, and calculating grey evaluation weight vector and matrix; finally calculating the comprehensive evaluation value. Aiming at five topic C language source programs, which are bubble sort, matrix multiplication, Josephus loop algorithm, Fibonacci number sequence and eight queens algorithm, the source programs are optimized by loop unrolling and loop invariable unswitching method. The experiment results show that the evaluation grey type level of the loop unrolling optimization method is the second, belonging to the better effect; and the evaluation grey type level of the loop invariable unswitching method is the third, belonging to the medium effect. The effect of the loop unrolling optimization method is better than that of the loop invariable unswitching method, and the loop unrolling optimization method can make the system have great energy-saving effect and higher running speed.
Description
Technical field
The present invention relates to embedded software power consumption assessment technique field, especially relate to a kind of evaluation method at source program structure level energy optimization---level grey evaluation model.
Background technology
Advocate under the background of " energy-saving and emission-reduction " in country at present, the energy consumption of embedded system is a hot issue that causes that day by day people pay close attention to, and has been subjected to government agencies at all levels and software/hardware developer's great attention in the industry.
Energy optimization can launch at all levels, and the energy saving space that high more design level is provided is big more, and design efficiency is also high more.The energy optimization of embedded system mainly concentrates on hardware layer in advance, comprises levels such as material level, process level, circuit stages, gate leve, RTL level, algorithm level and microstructure level.Along with the continuous development of microelectric technique, the appearance and the application of the advanced hardware energy optimization of various bottoms technology make the optimised power consumption technology of high layer software aspect progressively become the important means of control system power consumption.At present, the energy optimization technology of software layer can be divided into source program structure level, algorithm level and three levels of software architecture level.Because source program structure level optimization method is the important foundation that software energy consumption is optimized, this paper mainly carries out evaluation study to source program structure level optimization method.
The present invention at first sets up level grey evaluation model, then, adopts the emulation experiment method, and the result before and after the program optimization is compared, and by energy consumption, working time, three indexs of number of instructions, estimates the resultant effect and the affiliated grade of optimization method.Feedback result according to estimating can further instruct and improve corresponding embedded software power consumption optimization method, for the multi-level overall evaluation of embedded software power consumption lays the first stone.
Summary of the invention
The object of the present invention is to provide a kind of embedded software source program structure level energy optimization evaluation method.
It is as follows that the present invention solves the step that level gray model that its technical barrier adopts sets up:
1) structure judgment matrix
At first, according to the structure of the 1-9 scaling law in AHP method judgment matrix, obtain the weight of index objectively as far as possible.Importance to Article characteristic relatively is divided into 5 grades, to conclusion relatively get usually 1,3,5,7,9 and inverse measure the intermediate value of the above-mentioned adjacent judgement of 2,4,6,8 expressions.Relatively set up judgment matrix mutually according to importance between evaluation index:
Wherein,
The ratio of the important property of expression element i and element j.If matrix A is a positive matrices, this moment, necessarily there was unique non-vanishing eigenvalue of maximum in matrix A
, at this moment claim the A matrix to satisfy consistance.Can calculate the proper vector of n rank A matrix by the root method of general linear algebra, at first calculate (1)
, (2)
,
It is proper vector
I component, calculate maximum characteristic root then
, constitute a weight vectors
But in practical problems, because the limitation that affairs complicacy and people judge, when affairs relatively, can not accomplish the crash consistency of judging and have error, this will cause the deviation of eigenwert and proper vector, and the weight that try to achieve this moment is the vector that has deviation.Excessive for fear of error, we have introduced the consistency check of matrix, and when matrix during more near the consistance matrix, eigenwert also approaches the eigenwert of positive matrices more.Have only by check, could illustrate that judgment matrix logically is reasonably, could continue the result is analyzed.The conforming step of test matrix is as follows:
Table 1 mean random consistance table
The matrix exponent number | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
RI | 0 | 0 | 0.52 | 0.89 | 1.12 | 1.26 | 1.36 | 1.41 |
The first step is calculated coincident indicator CI(Consistency Index):
Second step, the mean random coincident indicator RI(Random Index of the 1 definite different rank of tabling look-up).
In the 3rd step, calculate consistance ratio CR(Consistency Ratio) and judge.Wherein
, when CR<0.1, think that the consistance of judgment matrix is an acceptable; When CR 〉=0.1, think that judgment matrix does not meet coherence request, need adjust till the consistance that reaches satisfied.
2) structure is estimated sample matrix and is determined to estimate grey class
For m estimator of structure to n evaluation of indexes collection sample matrix in, the individual different source program of m is represented m estimator, same optimization method changes the variation effect that brings behind the different source programs and can quantize with evaluation score.The present invention replaces expert's scoring to provide evaluation score by adopting experimental data, can avoid too much subjectivity to judge as far as possible, thereby construct the evaluation sample matrix:
Wherein, evaluation of estimate
Represent evaluation score.China issued " remarkable performance appraisal criterion " and " remarkable performance appraisal criterion implementation guide " two national standards in 2004 in succession, for remarkable indicator model provides evaluation criterion and implementation guide.Use for reference its method, in conjunction with the concrete condition of experimental situation, provide the standards of grading of this evaluation method in table 2, be divided into 4 and estimate grey classes, data are in its scope, can be in interval value.
The evaluation criterion of each grade of table 2
The assignment mark | Whether energy-conservation | Instruction number | Performance | Estimate grey class |
3.5-4 | Energy-conservation more than 35% | Reduce more than 30% | Execution time reduces more than 30% | 1 |
2.5-3.4 | Energy-conservation 20%-35% | Reduce 20%-30% | Execution time reduces 20-30% | 2 |
1.5-2.4 | Energy-conservation 10%-20% | Reduce 10%-20% | Execution time reduces 10-20% | 3 |
0-1.4 | Energy-conservation 5%-10% or energy consumption increase on the contrary | Reduce 5-10% or increase on the contrary | Execution time reduces 5-10% or the execution time increases on the contrary | 4 |
For the reflected appraisal object belongs to the degree of certain class, need determine to estimate the number of degrees of grey class and the white function of grey class according to concrete evaluation problem.If estimating grey class sequence number is e=1,2 ..., g is g grey class, as g=3, can think that estimating grey class is divided into " on ", " in ", D score three classes; G=4 and for example, can with estimate grey class be divided into " excellent ", " very ", " in ", " poor " four classes, the albefaction weight function that grey class need determine to estimate grey class is described.Provide three kinds of form albefaction weight functions commonly used below.
3) calculate grey evaluation weight vector and matrix
For the evaluation of estimate of every evaluation index of object to be appraised, estimate grey class e the grey evaluation coefficient of evaluation index be designated as:
Every evaluation index belongs to each total grey evaluation coefficient of estimating grey class for index to be appraised and is designated as:
Every evaluation index of object to be appraised advocates that the grey evaluation power of estimating grey class e is designated as:
Consider that grey class has g, so estimate the grey evaluation weight vector of grey class e is:
With each evaluation index for each estimate the grey evaluation weight vector of grey class comprehensive after, the affiliated index that can construct an object to be appraised for each grey evaluation weight matrix of estimating grey class is:
4) calculate comprehensive evaluation value
In evaluation system, the weight vectors of evaluation index
, calculate
, the expression evaluation object is in the description of each integrated status ash class degree, can determine grey class hierarchy under it by maximum principle.But owing to this judgment principle sometimes drop-out lost efficacy too much, and can not be directly used in quality ordering between evaluation object, therefore, we also need further to handle to make its uniformization, calculate comprehensive evaluation value
According to
Value determines to be commented the grade of object with reference to the quantized value of each grey class opinion rating, perhaps selects excellent by relatively sorting of a plurality of evaluation object comprehensive evaluation values.
Description of drawings
The process of setting up of Fig. 1 level grey evaluation model.
Embodiment
Below at 5 typical C linguistic source programs, be respectively that bubble sort (Bubble), matrix multiplication (Matrix), Joseph encircle algorithm (Josephus), Feibolaqi ordered series of numbers (Fibonacci) and eight queen's algorithms (Queen), use the outer extracting method of loop unrolling and loop invariant that source program is optimized respectively, by
HMSim(a kind of instruction-level high precision embedded software power consumption simulator) draws the relevant data (as shown in Tables 3 and 4) after the optimization.
Table 3 loop unrolling optimization method is to the optimized proportion of source program
Numbering | Energy consumption reduces ratio | Instruction strip number reduces ratio | Reduce ratio working time |
Bubble | 32.3% | 15.2% | 32.6% |
Matrix | 30.3% | 15.3% | 29.3% |
Josephus | 35.8% | 22.6% | 30.8% |
Fibonacci | 22.7% | 12.1% | 26.3% |
Queen | 33.0% | 12.1% | 30.2% |
The outer extracting method of table 4 loop invariant is to the optimized proportion of source program
Numbering | Energy consumption reduces ratio | Instruction strip number reduces ratio | Reduce ratio working time |
Bubble | 14.1% | 9.4% | 13.6% |
Matrix | 10.2% | 5.3% | 10.3% |
Josephus | 9.8% | 5.6% | 10.8% |
Fibonacci | 11.7% | 6.9% | 13.3% |
Queen | 15.0% | 10.1% | 17.2% |
In experimental situation, energy consumption, number of instructions, working time are used respectively
Expression is with they proportion in twos.Because the emphasis that we pay close attention to is energy consumption and working time, energy loss-rate number of instructions is important a little, so get
Generally speaking, linear positive correlation of the energy consumption of embedded software and execution time, both are of equal importance, so get
According to the 1-9 scaling law in the analytical hierarchy process, the consistent judgment matrix of the relation of energy consumption, number of instructions, execution time index is as follows:
Table 5 judgment matrix
Calculate,
=1.4422,
=0.4807,
=1.4422, draw through normalized
Weight vector is respectively
=(0.4286,0.1429,0.4286),
=3.0001, CI=0.0001, table look-up RI=0.58.Because CR<0.1, matrix satisfies coherence request, therefore,
Weight vector can be defined as the weight vector of three indexs in our system.
According to table 3 and table 4 experimental result and standards of grading thereof, can draw the pairing evaluation sample matrix of above-mentioned two kinds of methods:
In system, we establish 4 grey class hierarchies, be respectively " excellent ", " very ", " in ", " poor ", grey class hierarchy value vector is=(4,3,2,1).It is as follows to expand the albefaction weight functions that obtain these four the grey classes of evaluation:
The 3rd grey class (e=3), grey number [0,2,4], its albefaction weight function is:
To estimate sample matrix and white function and calculate, obtain the grey evaluation weight matrix respectively:
Calculating the Grey Comprehensive Evaluation weight vector is respectively:
=(0.3158 0.4031 0.2544 0.02669)
=?(0.188 0.2507 0.3761 0.1852)
According to calculating integrated value, can find out: the evaluation ash class hierarchy of loop unrolling optimization method is 2, belongs to good result; The evaluation ash class hierarchy of the outer extracting method of loop invariant is 3, belongs to medium effect.
, the effect of loop unrolling optimization method is better than the outer extracting method of loop invariant, can make system that bigger energy-conservation and higher travelling speed is arranged.Further, available this kind method is estimated the effect that other optimization method or multiple combined optimization method reach.
Claims (1)
1. embedded software source program structure level energy optimization evaluation method is characterized in that the step of this method is as follows:
1) structure judgment matrix
At first, according to the structure of the 1-9 scaling law in AHP method judgment matrix, obtain the weight of index objectively as far as possible, importance to Article characteristic relatively is divided into 5 grades, to conclusion relatively get usually 1,3,5,7,9 and inverse measure, 2, the intermediate value of the above-mentioned adjacent judgement of 4,6,8 expressions, relatively set up judgment matrix mutually according to importance between evaluation index:
2) structure is estimated sample matrix and is determined to estimate grey class
Be that m estimator of structure is to n evaluation of indexes collection sample matrix, m different source program represented m estimator, same optimization method changes the variation effect that brings behind the different source programs and can quantize with evaluation score, the present invention replaces expert's scoring to provide evaluation score by adopting experimental data, can avoid too much subjectivity to judge as far as possible, thereby construct the evaluation sample matrix:
Use for reference " remarkable performance appraisal criterion " and " remarkable performance appraisal criterion implementation guide " two national standards, in conjunction with the concrete condition of experimental situation, in following table, provide the standards of grading of this evaluation method, be divided into 4 and estimate grey class, data are in its scope, can be in interval value:
For the reflected appraisal object belongs to the degree of certain class, need determine to estimate the number of degrees of grey class and the white function of grey class according to concrete evaluation problem;
3) calculate grey evaluation weight vector and matrix
For the evaluation of estimate of every evaluation index of object to be appraised, estimate grey class e the grey evaluation coefficient of evaluation index be designated as:
Every evaluation index belongs to each total grey evaluation coefficient of estimating grey class for index to be appraised and is designated as:
Every evaluation index of object to be appraised advocates that the grey evaluation power of estimating grey class e is designated as:
Consider that grey class has g, so estimate the grey evaluation weight vector of grey class e is:
With each evaluation index for each estimate the grey evaluation weight vector of grey class comprehensive after, the affiliated index that can construct an object to be appraised for each grey evaluation weight matrix of estimating grey class is:
;
4) calculate comprehensive evaluation value
In evaluation system, the weight vectors of evaluation index
, calculate
The expression evaluation object is in the description of each integrated status ash class degree, can determine grey class hierarchy under it by maximum principle, but owing to this judgment principle sometimes drop-out lost efficacy too much, and the quality that can not be directly used between evaluation object sorts, therefore, we also need further to handle to make its uniformization, calculate comprehensive evaluation value
, according to
Value determines to be commented the grade of object with reference to the quantized value of each grey class opinion rating, perhaps selects excellent by relatively sorting of a plurality of evaluation object comprehensive evaluation values.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105905613A CN102004644A (en) | 2010-12-16 | 2010-12-16 | Optimal evaluation method for embedded software source program structure-level energy consumption |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105905613A CN102004644A (en) | 2010-12-16 | 2010-12-16 | Optimal evaluation method for embedded software source program structure-level energy consumption |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102004644A true CN102004644A (en) | 2011-04-06 |
Family
ID=43812026
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010105905613A Pending CN102004644A (en) | 2010-12-16 | 2010-12-16 | Optimal evaluation method for embedded software source program structure-level energy consumption |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102004644A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102426662A (en) * | 2011-11-08 | 2012-04-25 | 四川大学 | Embedded software system structural level energy consumption modeling method |
CN103606112A (en) * | 2013-11-20 | 2014-02-26 | 广东电网公司电力科学研究院 | Power plant operation performance determination method based on multilevel gray evaluation |
CN113554311A (en) * | 2021-07-23 | 2021-10-26 | 中煤新集能源股份有限公司 | Method for evaluating engineering quality of Ordovician limestone water damage under ground directional hole grouting treatment push-coated body |
-
2010
- 2010-12-16 CN CN2010105905613A patent/CN102004644A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102426662A (en) * | 2011-11-08 | 2012-04-25 | 四川大学 | Embedded software system structural level energy consumption modeling method |
CN102426662B (en) * | 2011-11-08 | 2014-02-26 | 四川大学 | Embedded software system structural level energy consumption modeling method |
CN103606112A (en) * | 2013-11-20 | 2014-02-26 | 广东电网公司电力科学研究院 | Power plant operation performance determination method based on multilevel gray evaluation |
CN113554311A (en) * | 2021-07-23 | 2021-10-26 | 中煤新集能源股份有限公司 | Method for evaluating engineering quality of Ordovician limestone water damage under ground directional hole grouting treatment push-coated body |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108510006A (en) | A kind of analysis of business electrical amount and prediction technique based on data mining | |
CN108763810B (en) | Load arrangement and adjustment method for bridge static load test | |
CN110111024A (en) | Scientific and technological achievement market valuation method based on AHP model of fuzzy synthetic evaluation | |
CN104318482A (en) | Comprehensive assessment system and method of smart distribution network | |
CN106709625A (en) | Electricity market demand response planning evaluation method | |
CN103971175B (en) | Short-term load prediction method of multistage substations | |
Guiraud et al. | A non-central version of the Birnbaum-Saunders distribution for reliability analysis | |
CN103530706A (en) | Analysis method for comprehensive energy-saving potential of power distribution network | |
CN104299067A (en) | Quantifiable enterprise development situation evaluation model | |
CN107092751B (en) | Variable weight model combination forecasting method based on Bootstrap | |
Meng et al. | Rank reversal issues in DEA models for China’s regional energy efficiency assessment | |
CN106548413A (en) | A kind of power system energy storage fitness-for-service assessment method and system | |
CN108984830A (en) | A kind of building efficiency evaluation method and device based on FUZZY NETWORK analysis | |
CN109325298B (en) | Tire pattern design system based on three-dimensional design platform | |
CN102004644A (en) | Optimal evaluation method for embedded software source program structure-level energy consumption | |
CN105224577A (en) | Multi-label text classification method and system | |
CN108182511A (en) | It is a kind of based on Demand Side Response reserve value assessment method of the sum of ranks than method | |
CN102509299A (en) | Image salient area detection method based on visual attention mechanism | |
CN103117823A (en) | Short wave channel model building method | |
CN104915485B (en) | It is a kind of based on the product demand of effect to structure mapping method | |
CN103366090A (en) | Index weight assessment method based on section rating of experts | |
CN101604340A (en) | A kind of method of the timeliness n that obtains to inquire about | |
CN106528507A (en) | Chinese text similarity detection method and device | |
CN105354737A (en) | Computing method suitable for big data value evaluation | |
CN108268982B (en) | Large-scale active power distribution network decomposition strategy evaluation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110406 |