Universidad Politécnica De Madrid Automated
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSIDAD POLITECNICA´ DE MADRID ESCUELA TECNICA´ SUPERIOR DE INGENIEROS DE TELECOMUNICACION´ AUTOMATED WORDLENGTH OPTIMIZATION FRAMEWORK FOR MULTI-SOURCE STATISTICAL INTERVAL-BASED ANALYSIS OF NONLINEAR SYSTEMS WITH CONTROL-FLOW STRUCTURES Ph.D. THESIS Enrique Sedano Algarabel Ingeniero en Inform´atica M´asteren Investigaci´onen Inform´atica 2016 DEPARTAMENTO DE INGENIER´IA ELECTRONICA´ ESCUELA TECNICA´ SUPERIOR DE INGENIEROS DE TELECOMUNICACION´ UNIVERSIDAD POLITECNICA´ DE MADRID AUTOMATED WORDLENGTH OPTIMIZATION FRAMEWORK FOR MULTI-SOURCE STATISTICAL INTERVAL-BASED ANALYSIS OF NONLINEAR SYSTEMS WITH CONTROL-FLOW STRUCTURES Ph.D. THESIS Author: Enrique Sedano Algarabel Ingeniero en Inform´atica M´asteren Investigaci´onen Inform´atica Advisors: Juan Antonio L´opez Mart´ın Profesor Contratado Doctor del Dpto. de Ingenier´ıaElectr´onica Universidad Polit´ecnicade Madrid Carlos Carreras Vaquer Profesor Titular del Dpto. de Ingenier´ıaElectr´onica Universidad Polit´ecnicade Madrid 2016 PH.D. THESIS: Automated word-length optimization framework for multi-source statistical interval-based analysis of non-linear systems with control-flow structures AUTHOR: Enrique Sedano Algarabel ADVISORS: Juan Antonio L´opez Mart´ın Carlos Carreras Vaquer El tribunal nombrado para juzgar la Tesis arriba indicada, compuesto por los siguien- tes doctores: PRESIDENTE: VOCALES: SECRETARIO: acuerdan otorgarle la calificaci´onde: Madrid, a 7 de marzo de 2016 El Secretario del Tribunal To my family and friends, especially to my three girls. They were magi because they had a tremendous knowledge, so much indeed that quantity had finally been transmuted into quality, and they had come into a different relationship with the world than ordinary people. They worked in an Institute that was dedicated above all to the problems of human happiness and the meaning of human life, and even among them, not one knew exactly what was happiness and what precisely was the meaning of life. So they took it as a working hypothesis that happiness lay in gaining perpetually new insights into the unknown and the meaning of life was to be found in the same process. Boris and Arkady Strugatsky, Monday Begins on Saturday Table of Contents List of Figures . IV List of Tables . VI List of Acronyms . VII Abstract . IX Resumen . XI 1 Introduction . 1 1.1 Motivation . 2 1.2 Thesis contributions . 4 1.3 Book structure . 6 2 Dynamic range and round-off noise estimation . 8 2.1 Dynamic range and fractional precision modelling . 9 2.1.1 Dynamic range estimation . 10 2.1.2 Fractional precision analysis . 11 2.2 Word-length optimization . 14 2.2.1 Search-based optimization techniques . 14 2.2.2 Alternative optimization approaches . 17 2.2.3 Quantization noise metrics . 19 2.2.4 Optimization objectives . 20 2.2.5 Mixed approaches . 21 2.3 Computational scalability . 22 2.4 Fixed-point tools and frameworks . 23 2.5 Conclusions . 26 3 Quantization of systems with control flow structures . 28 3.1 Theoretical background . 29 3.1.1 Affine arithmetic . 30 3.1.2 Modified affine arithmetic . 30 3.1.3 Polynomial chaos expansion . 31 3.1.4 Multi-element generalized polynomial chaos . 34 i TABLE OF CONTENTS 3.2 Dynamic range estimation in systems with control-flow structures . 36 3.2.1 Control-flow structures . 37 3.2.2 Domain partitioning . 40 3.2.3 Propagation of the affine forms . 42 3.2.4 Computation of the system statistics . 43 3.2.5 Example: Absolute value of a multiplication . 44 3.3 Round-off noise modelling in systems with control-flow structures . 46 3.3.1 Modelling of the quantization noise sources . 47 3.3.2 RON coefficients propagation example . 48 3.3.3 Computation of the RON statistics . 50 3.3.4 Example: Quantization of absolute value of a multiplication . 51 3.4 Clustered noise injection . 53 3.4.1 Methodology . 54 3.4.2 Grouping of noise sources and impact on accuracy . 55 3.4.3 Hierarchical partitioning . 57 3.5 Conclusions . 61 4 System modelling case studies . 62 4.1 Initial study: Interferometer . 63 4.2 Choice operators: Teager+ . 64 4.2.1 Teager+: Dynamic range estimation . 64 4.2.2 Teager+: RON modelling . 66 4.3 Loop structures: Accumulator . 70 4.3.1 Accumulator: Dynamic range estimation . 70 4.3.2 Accumulator: RON modelling . 73 4.4 Nested control-flow structures: Selector . 74 4.4.1 Selector: Dynamic range estimation . 74 4.4.2 Selector: RON modelling . 76 4.5 Clustered noise injection: L-Opchain . 77 4.6 Putting it all together: Compounded . 80 4.6.1 Compounded: Dynamic range estimation . 81 4.6.2 Compounded: RON modelling . 82 4.7 Conclusions . 82 5 Word-length optimization . 84 5.1 Definitions . 85 5.2 Interpolative method . 86 5.2.1 Methodology . 86 5.2.2 Minimization of the number of simulations . 89 5.2.3 Interpolative: Case study . 90 5.3 Incremental method . 91 ii Escuela T´ecnicaSuperior de Ingenieros de Telecomunicaci´on(UPM) TABLE OF CONTENTS 5.3.1 Confidence intervals and number of simulations . 92 5.3.2 Methodology . 93 5.3.3 Incremental: Case study . 95 5.4 Combined approach . 96 5.5 Experimental results . 97 5.6 Conclusions . 99 6 The HOPLITE framework . 100 6.1 Work flow . 101 6.2 Implementation . 101 6.2.1 Programming language choice . 103 6.2.2 Configuration files . 104 6.2.3 System graph representation . 105 6.2.4 Modules and interfaces . 106 6.2.5 Calling sequence . 110 6.3 Case study . 111 6.4 Extending HOPLITE . 114 6.4.1 The Phalanx case . 114 6.5 Conclusions . 116 7 Conclusions and future work . 117 7.1 Future work . 119 Appendix A Computation of the C matrix . 122 Appendix B Execution times in HOPLITE . 126 Bibliography . 129 Enrique Sedano Algarabel iii List of Figures 1.1 Fixed-point word-length optimization flow. 3 3.1 Nodes representation of a control-flow structure. 38 3.2 Derivative execution paths from a choice operator. 39 3.3 Derivative execution paths from a loop structure. 39 3.4 Example of a decomposed domain. 41 3.5 Domain decomposition for x > y with different values of Jlim . 41 3.6 Dynamic range of an intermediate variable across an unrolled loop. 44 3.7 Absolute value operation and execution paths corresponding to sub-domains. 45 3.8 Methodology for RON computation in systems with control-flow structures. 47 3.9 Two different ways of introducing AWN sources to an operation. 48 3.10 Fractional word-length to derivative DFGs nodes assignment examples. 49 3.11 Absolute value example paths with noise sources. 51 3.12 Number of terms in a PCE base function of the order and number of RVs. 54 3.13 Iterative noise injection algorithm flow. 55 3.14 Simple system without and with noise sources. 56 3.15 Example of the hierarchical decomposition of a DFG. 59 4.1 Phase measuring stage of the TJ-II interpolation algorithm with quanti- zation inputs. 63 4.2 Basic Blocks diagram and derivative DFGs of the Teager case study. 64 4.3 Partitions per decision output direction in the Teager case study. 65 4.4 Derivarive DFGs from Figure 4.2 including the noise sources. 68 4.5 Basic Blocks diagram of the loop case study. 71 4.6 Partitions per iteration of the loop case study. 72 4.7 Data Flow Graphs generated by the analysis of the loop case study. 72 4.8 Partitions per condition and iteration of the nested conditionals case study. 75 4.9 Data Flow Graphs generated by the analysis of the nested conditionals case study. 76 4.10 L-Opchain case study DFG. 78 4.11 Basic Blocks diagram for the compounded case study. 81 5.1 Interpolative method algorithm flow. 87 5.2 Evolution of normalized error for different values of.