University of Southampton Research Repository ePrints Soton

2 downloads 0 Views 2MB Size Report
this issue. The ultimate aim for this research is to create a system-level simulator that has the ... 3.6 Others numerical methods to solve the PDEs models .
University of Southampton Research Repository ePrints Soton

Copyright © and Moral Rights for this thesis are retained by the author and/or other copyright owners. A copy can be downloaded for personal non-commercial research or study, without prior permission or charge. This thesis cannot be reproduced or quoted extensively from without first obtaining permission in writing from the copyright holder/s. The content must not be changed in any way or sold commercially in any format or medium without the formal permission of the copyright holders.

When referring to this work, full bibliographic details including the author, title, awarding institution and date of the thesis must be given e.g. AUTHOR (year of submission) "Full thesis title", University of Southampton, name of the University School or Department, PhD Thesis, pagination

http://eprints.soton.ac.uk

UNIVERSITY OF SOUTHAMPTON

Modelling of Mixed Physical-domain System

by Abu Bakar Abd Rahman

A thesis submitted in partial fulfillment for the degree of Master of Philosophy

in the Faculty of Engineering, Science and Mathematics School of Electronics and Computer Science

September 2010

UNIVERSITY OF SOUTHAMPTON ABSTRACT FACULTY OF ENGINEERING, SCIENCE AND MATHEMATICS SCHOOL OF ELECTRONICS AND COMPUTER SCIENCE Master of Philosophy by Abu Bakar Abd Rahman

The next generation of System-on-Chip (SoC) design is emerging into new dimension with embedded mixed-signal(i.e digital and analogue) and multiple natures (i.e electrical and non-electrical) are being packed onto very single chip. It is becoming more ubiquitous and can be seen with diversely in many applications nowadays such as engineering, medicine, biology etc. Obviously, large portion in today’s SoC predominantly are consists of analogue parts. Although various tools namely as Analogue-Mixed-Signal (AMS) has been around for almost a decade, the full descriptive modelling language for multi-domain to support more accurate physical modelling such as partial differential equation is still not present. Thus, in this research work, it will be tailored towards this issue. The ultimate aim for this research is to create a system-level simulator that has the capability to describe and simulate the more accurate physical model based on partial differential equation. The effort has been set to provide a new extension for SystemC-A simulator to enable the task of modelling and simulation of multi-physical system which includes the partial differential equation models. As an improvement to the existing approach which describes the distributed system with the lumped-model, the MEMS variable capacitive fingers is proposed to be modelled in distributed form through introduction of partial differential equation. The MEMS variable capacitor design presented in this thesis is focuses for micro-energy harvester application. Furthermore, the autonomous performance optimisation is also proposed to be integrated in the SystemC-A environment. Hence, the combination of both techniques will provides an holistic approach for new system-level modelling and performance optimisation of mixed-signal and mixed-domain design.

Contents Acknowledgements

vii

1 Introduction 1.1 Challenges in Current Design Methodologies . . . . . . . . . . . . . . . . . 1.2 Motivation and Research Contributions . . . . . . . . . . . . . . . . . . . 1.3 Thesis Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 State-of-the-art Analogue Mixed Signal (AMS) Tools 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 VHDL-AMS . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 VHDL-AMS versus Verilog-AMS . . . . . . . . . . . . . 2.4 Open SystemC-AMS . . . . . . . . . . . . . . . . . . . . 2.5 SystemC-A . . . . . . . . . . . . . . . . . . . . . . . . . 2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

3 Partial Differential Equation (PDE) in Hardware Description guage (HDL) 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Partial Differential Equations using C/C++ . . . . . . . . . . . . . . 3.3 Object-Oriented Language for Partial Differential Equation . . . . . 3.4 Partial Differential Equations extension for VHDL-AMS . . . . . . . 3.5 Simplified approximation for solving Partial Differential Equation . . 3.5.1 Equivalent circuit . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 Reduced order macromodels (ROM) . . . . . . . . . . . . . . 3.5.3 Black box approach . . . . . . . . . . . . . . . . . . . . . . . 3.6 Others numerical methods to solve the PDEs models . . . . . . . . . 3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Multi-domain Mixed-signal Design : Simulation Techniques 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Mixed-Signal Mixed-Domain Network Classification . . . . . . 4.2.1 Linear Algebraic Equations systems . . . . . . . . . . . 4.2.1.1 Gaussian Elimination(GE) . . . . . . . . . . . 4.2.1.2 LU Factorisation (LUFAC) . . . . . . . . . . . 4.2.2 Linear Differential-Algebraic Equations systems . . . . . 4.2.2.1 Forward Euler’s . . . . . . . . . . . . . . . . . 4.2.2.2 Backward Euler’s (Gear 1) . . . . . . . . . . . 4.2.2.3 Trapezoidal Rules . . . . . . . . . . . . . . . . ii

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

1 1 3 4 5 5 7 12 15 24 30

Lan. . . . . . . . . .

. . . . . . . . .

. . . . . . . . . .

. . . . . . . . .

. . . . . . . . . .

31 31 33 34 36 39 39 41 42 42 43

. . . . . . . . .

45 45 47 48 49 50 51 52 52 53

CONTENTS 4.2.2.4 Gear 2 . . . . . . . . . . . . . . . . . . . Non-linear Algebraic Equations system . . . . . . . 4.2.3.1 Newton-Raphson (NR) Method . . . . . 4.2.3.2 The Slope Method . . . . . . . . . . . . . 4.2.3.3 Piecewise Linear Evaluation . . . . . . . 4.2.4 Non-linear Differential-Algebraic Equation system 4.2.4.1 Predictors and Correctors . . . . . . . . . Mixed-Signal Mixed-Domain Network Formulation . . . . 4.3.1 MNA formulation for nonlinear element . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .

iii . . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

53 55 55 57 58 58 59 60 64 67

5 PDE extension in SystemC-A : Mixed-physical domain design 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Partial Differential Equation(PDE) extension in SystemC-A . . . . . 5.2.0.1 Partial Quantity . . . . . . . . . . . . . . . . . . . . 5.2.0.2 PDE Description . . . . . . . . . . . . . . . . . . . . 5.2.0.3 PDE Mesh . . . . . . . . . . . . . . . . . . . . . . . 5.2.0.4 PDE Initial Condition . . . . . . . . . . . . . . . . . 5.2.0.5 PDE Boundary Condition . . . . . . . . . . . . . . . 5.2.0.6 PDE Build . . . . . . . . . . . . . . . . . . . . . . . 5.2.0.7 PDE discretisation . . . . . . . . . . . . . . . . . . . 5.3 Main Case Study : Electrostatic Micro-generator . . . . . . . . . . . 5.4 Conditioning Circuit for Electrostatic Micro-generator . . . . . . . . 5.5 Equivalent Circuit Model of Electrostatic Micro-generator . . . . . . 5.6 Analytical Model of Electrostatic Micro-generator . . . . . . . . . . . 5.7 Distributed-Model of Electrostatic Variable Capacitor . . . . . . . . 5.8 SystemC-A modelling of Distributed-Model Electrostatic Generator 5.9 PDE components library . . . . . . . . . . . . . . . . . . . . . . . . . 5.9.0.8 MEMS switch . . . . . . . . . . . . . . . . . . . . . 5.9.0.9 Transmission Line . . . . . . . . . . . . . . . . . . . 5.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

68 68 69 73 74 74 74 75 75 75 80 83 84 85 89 91 101 101 106 112

. . . . . . .

113 . 113 . 114 . 114 . 114 . 114 . 115 . 115

4.2.3

4.3 4.4

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

6 Conclusion and Future Work 6.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 PDE general extension for SystemC-A . . . . . . . . . . . . . . 6.2.2 Component library of PDE models for SystemC-A . . . . . . . 6.2.3 Electrostatic micro-generator for energy harvesters application 6.2.4 Failure mode analysis in mechanical dynamic AMS simulation 6.2.5 Design and Performance Optimisation in SystemC-A . . . . . . Bibliography

117

List of Figures 1.1

Energy Harvesting to Enable Remote and Wireless Sensing [4, 95] . . . .

2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14

New features in the VHDL-AMS (IEEE std 1076.1-1999)[3] . . . . . . . one-dimensional spring model . . . . . . . . . . . . . . . . . . . . . . . . Permanent Magnet DC motor model . . . . . . . . . . . . . . . . . . . . Typical design flow in proposed SystemC-AMS [30] . . . . . . . . . . . . Layered approach for analogue mixed signal extension for SystemC [24] Dataflow cluster with continuous-time blocks [24] . . . . . . . . . . . . . SystemC-AMS layer on top of SystemC [34] . . . . . . . . . . . . . . . . SystemC-AMS Simulation Cycle [34] . . . . . . . . . . . . . . . . . . . . SystemC-AMS Extension Language Structure[30] . . . . . . . . . . . . . Analogue system variable classes in SystemC-A [7] . . . . . . . . . . . . Abstract Component Class in SystemC-A [7] . . . . . . . . . . . . . . . The proposed simulation cycle of a SystemC-A [7] . . . . . . . . . . . . Abstraction level coverage for the SystemC-A proposed extension [7] . . Newton Raphson Cycle in SystemC-A [7] . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . .

7 8 12 16 16 17 18 19 22 25 25 26 26 29

3.1 3.2 3.3 3.4 3.5

Initial and boundary values problem in PDE . . . . . . . . Framework for describing PDE models [51] . . . . . . . . . MWorks PDEs implementation flowchart [51] . . . . . . . . Transmission line modelled as wave second-order PDE [67] . Sensing element in MEMS [94] . . . . . . . . . . . . . . . .

. . . . .

. . . . .

33 35 35 36 38

4.1

Time-domain simulation flow for non-linear differential-algebraic systems [21] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Equation functions generation at each time step [21] . . . . . . . . . . . Equation function generations [21] . . . . . . . . . . . . . . . . . . . . . Linear algebraic network example [21] . . . . . . . . . . . . . . . . . . . Steps to solve the linear algebraic network . . . . . . . . . . . . . . . . . IRC network [21] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linear differential-algebraic network example [21] . . . . . . . . . . . . . Steps to solve linear differential-algebraic network . . . . . . . . . . . . . Nonlinear algebraic network example [21] . . . . . . . . . . . . . . . . . Graphical representation of NR [21] . . . . . . . . . . . . . . . . . . . . Equation generation and its solution at each time step [21] . . . . . . . Jacobian matrix element [21] . . . . . . . . . . . . . . . . . . . . . . . . Graphical view of the slope method [21] . . . . . . . . . . . . . . . . . . Graphical view of piecewise linear evaluation [21] . . . . . . . . . . . . .

. . . . . . . . . . . . . .

46 47 47 48 48 51 54 54 55 56 56 57 57 58

4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14

iv

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

2

LIST OF FIGURES

v

4.15 4.16 4.17 4.18 4.19 4.20 4.21 4.22

Nonlinear differential-algebraic network example [21] . Steps to solve non-linear differential-algebraic network Graphical view of predictor/corrector algorithm [21] . Example of resistive circuit . . . . . . . . . . . . . . . The voltage and resistor network . . . . . . . . . . . . Flowchart MNA matrix formulation . . . . . . . . . . MNA matrix for one resistor . . . . . . . . . . . . . . MNA matrix for two resistors . . . . . . . . . . . . . .

5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 5.18 5.19 5.20 5.21 5.22

Numerical approach to solve PDE in SystemC-A . . . . . . . . . . 1-Dimension space grids in SystemC-A . . . . . . . . . . . . . . . . Nonlinear PDE solving in SystemC-A environment . . . . . . . . . Class Hierarchy for Extending the SystemC-A into PDE solving . . Partial Quantity as Analogue Variable in SystemC-A . . . . . . . . Three Dimension view result for mixed PDE Equation 5.1 . . . . . Block Diagram of Electrostatic Micro-generator [60] . . . . . . . . Energy Conversion Cycle of Electrostatic Micro-generator [60] . . . Modified Energy Conversion Cycle of Electrostatic Micro-generator Timing waveform for electrostatic micro-generator[60] . . . . . . . Equivalent Circuit of Electrostatic Micro-generator [79] . . . . . . Mechanical Schematic of Electrostatic Micro-generator [79] . . . . Layout of MEMS In-plane Gap Closing Variable Capacitor [79] . . Minimum Capacitance Output of MEMS Variable Capacitor[19] . Maximum Capacitance Output of MEMS Variable Capacitor[19] . Distributed effect of MEMS Variable Capacitor . . . . . . . . . . . Discretisation of the MEMS Variable Capacitor . . . . . . . . . . . Distributed deflection of capacitor fingers . . . . . . . . . . . . . . Total variable capacitance . . . . . . . . . . . . . . . . . . . . . . . Discretise of the MEMS switch . . . . . . . . . . . . . . . . . . . . Discretise of the lossy transmission line . . . . . . . . . . . . . . . . Discretise of the lossless transmission line . . . . . . . . . . . . . .

6.1

Failure Mode in Dynamic System-level Simulation of MEMS Variable Capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Unified design and performance optimisation in SystemC-A . . . . . . . . 116

6.2

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

58 59 59 61 62 63 63 64

. . . . . . . . . . . . . . . . . . . . . . . . [60] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

69 70 71 73 74 79 80 81 82 84 84 86 87 87 88 90 91 100 101 102 106 109

List of Tables 2.1 2.2

Key features comparison of VHDL-AMS and Verilog-AMS(a) [70] . . . . . 13 Key features comparison of VHDL-AMS and Verilog-AMS(b) [70] . . . . . 14

vi

Acknowledgements Alhamdulillah, my highest praise to Allah for every single thing that he granted me in this life. My precious gratitude dedicated to my supervisors, Dr Tom J.Kazmierski and Prof. Bashir Al-Hashimi for their valuable guidance and inspiration throughout my study. I would like to express my special appreciation to my sponsor bodies, Ministry of Higher Education of Malaysia and Universiti Malaysia Sabah for providing the funding for my study. I would also like to thank all my colleagues and friends: Noohul, Sawal, Arash, Biswajit, Dirk, Mansour, Ahmad, Gunawan, Wang, and others for sharing their ideas and knowledge with me. The most importantly, to my beloved wife, Suzana, many thanks for your motivation, sacrifices, support and also for taking care of my kids Fateen Zawana and Faez Zakwan. Last but not least, to my parent, thanks for everything and I am please to be your son.

vii

Chapter 1

Introduction 1.1

Challenges in Current Design Methodologies

The upcoming generation of system-on-chip (SoC) design is emerging into new concept of holistic approach with unified modelling language. The newer generation of SoC design comprises of highly complex heterogenous system with integration of multi-domain technologies(i.e electrical and non-electrical) and mixed-signal(i.e digital and analogue). For the last few years, SoC design becoming more diverse due to high demand of heterogeneous models in a system level design. It can be seen in various applications for example engineering, medicine, biology, etc. One of the examples on highly heterogeneous system level design is the design of multiple sources energy harvesting for enabling wireless network sensor as shown in Figure 1.1. It is assumed that all of the components hook in the system are very low-power type [4, 12, 60, 72]. There are many advantages of such system for example eliminating batteries, low maintenance and self sustain autonomous systems. However, the task of modelling and simulation of such systems increasingly complicated due to the presence of multi-physical between the subsystems such as found in the electromechanical energy scavenging modules. Traditionally, each of the components of such system was designed and simulated separately based on their physical domain [65]. In order to increase the efficiency of mixed-signal mixed-domain design flow, it is highly required all of the components simulated with the same tool. Thus, the need for new generation of multi-domain mixed-signal tools is vital. In principle, it will require one unified simulation environment that covers multiple signals and domains. Multi-domain designs were done through various approaches [64, 74]. However, it is still not to be considered handy tools because not in purely single and fully integrated simulation platform for mixed-domain system-level design [7, 93]. Recently, researchers are trying to push the limits of the well-establish programming languages such as VHDLAMS and Verilog-AMS to cope with the rapid evolution in multi-domain modelling 1

Chapter 1 Introduction

2

Radio Frequencies

ADC

µP

DAC

Memory & Storage

DSP

Sensor Nodes

Communication

Processing element

Sensing element

Power Management

Energy Scavenging

Piezo

Electromechanical

Electrostatic

Figure 1.1: Energy Harvesting to Enable Remote and Wireless Sensing [4, 95]

[42, 66]. Although it is possible to extend the standard language, the limitation of standardised syntax and semantics has created obstacle to the expansion. One of the potential ways can be made by pushing the abstraction level of modelling to higher levels as reported by Roth, Arnout and Liao [9, 52, 71]. They had proposed to fully utilise the power of the universal C/C++ language [85]. The terms of high-level is defined as a level above RTL which includes both of hardware and software design[69]. Eventually, a new generation of hardware description language namely SystemC has been developed in the year of 1999 by Open SystemC Initiative working group(OSCI) in collaboration with various Electronics Design Automation (EDA) companies [1]. The SystemC language has been revised few times before it accepted as IEEE 1666-2005 standards in December 2005. It has open a window for researcher to extend this language into software embedded mixed-signal multi-domain modelling. The initial proposal of the extension version was unofficially known as SystemC-AMS. In fact, the creation of this language is not mean to obsolete the standard language such as VHDL-AMS and Verilog-AMS. Instead, it will become as one of the option in order to find the best possible approach to cater the complexities inherit in embedded multi-domain mixedsignal design. To date, several works have been carried out to enhance the language as reported in [7, 8, 15, 23, 87]. However, the level of simulation coverage especially for the physical-based model with partial differential equation is still very limited. Thus, the support for the partial differential equation in mixed signal mixed domain system design is in demand. The partial differential equation modelling is highly required

Chapter 1 Introduction

3

in order to enable the accurate description of distributed effect such as found in the electromechanical multiple energy module.

1.2

Motivation and Research Contributions

The main aim in this research is to develop a new system-level modelling technique and simulation platform that focuses to enable the mixed-physical with distributed system design. It is a hope it will aid system level designer to have more diverse simulation coverage, more efficient and more accurate result. Although, huge advancement has been done to improve the system level simulation tools, based on state-of-the art in the existing tools the direct support of partial differential equation model still not present. Therefore, a SystemC language extension namely SystemC-A has been chosen for the implementation of the idea. The main case study for this research is engaging with the distributed design of MEMS variable capacitor for electrostatic energy harvester application. Typically, the MEMS variable capacitor structure which consists of hundreds capacitive fingers is to be modelled as spring-mass-damper model. However, the mechanical deflection along the capacitive fingers is actually in non-uniform movement. Thus, in order to accurately model the actual condition of the capacitive fingers the distributed equation should be used. In line with this issue, the aim of this project is set to integrate a method in SystemC-A for enabling the partial differential equation description and to be solved under SystemC environment. In addition to that, as the mixed-signal mixed-domain design has been known for its numerical complexity and very time consuming in simulation level[8], an automated performance optimisation approach is proposed to be integrated in SystemC-A in order to enhance the efficiency of mixed-signal mixed-domain system-level design performance exploration. Therefore, realisation of this idea will be very useful in order to have a more robust mixed-physical simulation tools. With the hope in the near future a system as described in Figure 1.1 can be simulated in holistic way so, the concept of virtual prototyping can be realised. The ultimate aims for this research project are: • To develop Analogue Mixed Signal (AMS) system-level simulator with partial differential equation extension • To develop a unified design and performance optimisation for AMS simulator The objectives of this report are: • To find a method to integrate the partial differential equation solving in SystemCA language/simulator

Chapter 1 Introduction

4

• To study and redevelop the SystemC-A language/simulator • To study the state-of-the art of mixed-signal mixed-domain simulator • To identify the importance of partial differential equation in system-level design • To model the distributed deflection in MEMS variable capacitor for micro-generator application

1.3

Thesis Structure

This section explains briefly the main points in each of the chapter in this thesis. The first chapter presents a brief explanation on the current issues and the challenges in the area of design methodologies for heterogeneous system-on-chip. The motivation and research contributions also laid out in this first chapter. The second chapter presents an overview of state-of-the-art of Analogue Mixed Signal(AMS) tools. In addition to two powerful AMS languages VHDL-AMS and VerilogAMS, the newly develop AMS tools based on C++ language namely SystemC-AMS and SystemC-A are also discussed. The third chapter presents a survey on the applications of partial differential equation(PDE) modelling in the area of microelectromechanical system(MEMS) design. The aim is to identify the significance of PDE solving integration into system level simulator. The fourth chapter presents a study on the simulation techniques that used in the area of mixed-domain and mixed-signal design. Few simulator core elements such as Modified Nodal Analysis(MNA), Jacobian matrix, Newton-Raphson, Quasi-Newton methods are presented. The fifth chapter presents an approach on the new implementation of partial differential equation solving in SystemC-A. The implementation proposed here is aimed to solve the nonlinear partial equation. A few mixed-physical systems have been chosen as a proof of concept. The second-order wave mixed-partial equation and the complex fourthorder bernoulli equation for modelling the distributed capacitor fingers movement are demonstrated in details. The final chapter presents an overall conclusion and contributions of the thesis. The potential future works are also suggested to be carried out in order to fully realise the heterogeneous and holistic approach for system level modelling and simulation.

Chapter 2

State-of-the-art Analogue Mixed Signal (AMS) Tools 2.1

Introduction

With the advancements in electronic system design tools such as logic synthesis, semicustom layout and high-level simulation had facilitates design of more complex digital integrated chips. This was a massive de facto in many digital system designs. However, in real world, the systems are more presented in analogue quantities which beyond representation of 0s and 1s. This limitation has led to exploration of new mixed-signal design concept [64]. Since then, the new generation of integrated chip is evolving enormously and the trend has shifted from purely digital to more heterogeneous system [16]. In fact, the implementation of the non-electrical in integrated electrical system design is growing extensively. This is due to high demand of new System-On-Chip(SoC) design to achieve higher levels of integration to realise a mixed-signal system as completely in one single chip. Because the combination of analogue and digital signals inherits complex behaviour, it had slowing down the advancement of the simulation tool development. Amongst the problems that are posed by the design of mixed-signal integrated systems are: i)design methodologies and flows, ii)simulation and modelling, iii)Mixed-signal design verification and, iv)design productivity (synthesis, yield) [28]. The potential solution is to create simulation environment that allows newer generations of system design which composed of both continuous and discrete to be evaluated simultaneously. Previous approaches have resorted to the use of special purpose simulators for analysis for each of the circuit types in separate. Although some success efforts have been reported, their limitations for simulation across mixed-signal and frequencyresponse analysis still remain in uncertainties [74]. 5

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

6

Basically, to resolve the issue rose in mixed-signal design is to provide a tool that capable of describing all of the components (i.e electrical and non-electrical) with respect to their natures or domains. The simulation engine required to handle the complexity signals interaction and time synchronisation between different domains in the simulation process to produce accurate output responses. The mixed-signal simulator was first established in the early 1990’s. At first, the approach was to add a mixed-signal kernel to established circuit simulator as found in Saber [91] and XSpice [38]. It is relatively simple and low-level mechanism to support event-driven simulation. Because they are incompatible with standard simulator of the day such as Verilog-XL [11] had made them left behind. The low acceptance has led to the creation of new approach which simply gluing the SPICE and Verilog-XL such as found in Spectra/Verilog-XL from Cadence. Although it was quite acceptable, it has problem of difficulties to use due to operating two simulators with very different models together and poor performance because of overhead exist in the communication between the two simulators [49]. The Analogue-Mixed-Signal(AMS) were introduced to enhance the capabilities of traditional Hardware Description Language(HDL) such as VerilogHDL and VHDL. The terms of AMS for both Verilog- and VHDL- implies the capabilities of the language to support the description of mixed-signal mixed-domain components in one single design [49]. The purposed AMS extension is to provide a single design flow that naturally supports analogue, digital and mixed-signal components that led to design task become more simpler. In order to facilitate this, the simulator combines few different methods in the process of simulation. For digital, the event-driven simulation is used as in logic simulator; while for the analogue, the continuous-time simulation as in the circuit simulator will be used accordingly. In fact, the way the commercial available AMS tools are virtually the same as old simulator. For example, Cadence’s AMS Designer integrates tightly their Spectra with NC-SIM simulator, whereas Mentor’s ADvance MS using glued AMS simulator. Apart from that, there are various issues that still exist in current AMS modelling tools [81].

• Lack of libraries to support designers • Lack of modelling tools -AMS designers do not want to write languages • Poor simulation design environments • Little support for checking of models between levels (signal flow, conservative, behavior, device) • Methodology still under development • Compelling driver missing (not used in synthesis)

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

2.2

7

VHDL-AMS

VHDL-AMS is a strict superset to the VHDL (IEEE std 1076-1993) and described in the IEEE standard 1076.1-1999. It means any model described in VHDL must be valid in the VHDL-AMS. The recent revision to the standard has been made in November 2007 (IEEE std 1076.1-2007)[82]. Basically, it provides both continuous-time and event-driven modelling semantics to suit the analogue, digital, and mixed analogue/digital circuits. The VHDL-AMS objective is to provide a language that capture and simulate variety of physical domains with complex system such as mechanical, chemical, automotive, mechatronics, MEMS and etc [7, 10, 97]. It also has the capabilities of allowing designer to abstract their designs in different levels from component level to analytical level. Amongst the important features that added to the original digital VHDL are simulation equation, quantity, terminal, nature and tolerance [10, 37]. The extension features from the original VHDL is depicted as in Figure 2.1. IEEE 1076.1 Std VHDL-AMS

NEW Simulation Cycle

NEW Objects and Data Types

IEEE 1076 Std VHDL

Simulation cycle

Objects

Structure

Behaviour

NEW Interface Declarations

NEW Statements Environment

NEW Attributes

Figure 2.1: New features in the VHDL-AMS (IEEE std 1076.1-1999)[3]

For the purpose of supporting the continuous behaviour for mixed-signal design, the VHDL-AMS includes the differential algebraic equations (DAEs) description. However, the standard does not define any solution method for solving the analogue model. It depends on EDA companies to find the dedicated solver and integrate it into their tools. Therefore, the same design will not necessarily gives exactly the same simulation result since every tools have different approach finding the solution. The example to demonstrate the VHDL-AMS is shown by one-dimensional spring model as in Figure 2.2.

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

8

f m1

m2

x1

xs

x2

Figure 2.2: one-dimensional spring model

The mathematical model for the forces at both masses can be derived as:

m1 x ¨1 = −f (x1 − x2 ) m2 x ¨2 = −f (x2 − x1 )

(2.1)

The unknowns of DAE system is to be declared by the new object in VHDL-AMS namely quantity. It is actually represents a continuous-time waveform signal. architecture behav of vibration is ... quantity x1 , x2 : displacement ; ...

One of the key features in the VHDL-AMS is the derivative operator. The single derivative declared as quantity’dot and for double quantity’dot’dot, and so forth. The derivative of any quantity in VHDL-AMS is to be referred as with respect to time. By taking the one-dimensional spring as an example in Figure 2.2, the acceleration of x1 and x2 can be modelled as: architecture behav of vibration is ... quantity x1 , x2 : displacement ; ... begin x1 ’ dot ’ dot == -f *( x1 - x2 ) / m1 ; ...

The derivative operator is called implicit quantity attributes. There are several types such as quantity’integ for the time integral, quantity’delayed to delay the time, quantity’Ltf for Laplace transform, etc is also included in the VHDL-AMS. The new class of statement to support the simultaneous equation is introduced in the new VHDL-AMS language. The equations may includes quantities, constant, literals, signals and user-defined functions.

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

9

... begin x1 ’ dot ’ dot == -f *( x1 - x2 ) / m1 ; x2 ’ dot ’ dot == -f *( x2 - x1 ) / m2 ; ...

Since the nature of numerical analysis, the analogue solver only can find the approximation of the exact solution. The tolerance are used to specify the accuracy of the solution must be. For example the tolerance group for both of the quantities x1 and x2 are defined by displacement subtype definition. package type is subtype displacement is REAL tolerance " d e f a u l t _ d i s p l a c e m e n t "; ... end package types ;

The terminal object in the VHDL-AMS is introduced to support the conservative laws such as Kirchoff Current Law’s(KCL) and Newton Law’s. The terminal declaration is normally followed by its nature definition which preceded by : sign. ... entity Diode is ... port ( terminal anode , cathode : electrical ); end entity Diode ;

For the purpose of clarification of distinction between the multiple energy domain, the nature declaration is used. The nature explicitly defines what type of terminal is used in the model. It defines two types of quantities normally exist in real physical nature. The two quantities are potential and flow which defined by across and through keywords respectively. Despite of pre-defined nature type as listed in the VHDL-AMS standard, modelled is also allowed to customise their own nature. The following example shows the details of nature definition of the electrical package in the VHDL-AMS [18]. package E L E C T R I C A L _ S Y S T E M S is subtype VOLTAGE is REAL subtype CURRENT is REAL nature ELECTRICAL is VOLTAGE across CURRENT through ELECT RICAL_R EF reference end package E L E C T R I C A L _ S Y S T E M S

The electrical nature is defined in a package as electrical system, across quantity as the voltage across between two terminals(nodes) and through quantity for the current passes

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

10

through the terminals. The proposed standard of VHDL 1076.1.1 has been adopted in order to standardise the most frequently used packages for multiple energy domain support. There are six systems included in the standardised package : i)energy systems, ii)electrical systems, iii)mechanical systems, iv)radiant systems, v)thermal systems and vi)fluidic systems[98]. Two type of constants (fundamental and material) also defined in the extended package. Few selected examples are presented as follows [3, 98]: Example of Mechanical Domain: package M E C H A N I C A L _ S Y S T E M S is subtype DISPLACEMENT is REAL subtype FORCE is REAL nature TRANSLATIONAL is DISPLACEMENT across FORCE through T R A N S L A T I O N A L _ R E F reference end package M E C H A N I C A L _ S Y S T E M S

Example of Thermal Domain: package TH ER M AL _S YS T EM S is subtype TEMPERATURE is REAL subtype HEAT_FLOW is REAL nature THERMAL is TEMPERATURE across HEAT_FLOW through THERMAL_REF reference end package T HE RM A L_ SY ST E MS

With various types of quantities exist in the heterogenous systems, three types of analogue object namely quantities are included in the VHDL-AMS. 1. Free quantity - used to declare the non-conservative analogue values. It also used to describe signal-flow (block diagram) models. quantity pwr : real;

2. Branch quantity - used to declare the conservative systems. For electrical systems, it is used to access either the voltage/current or both of a terminal port. quantity v across i through anode to cathode;

3. Source quantity - used to declare the source for frequency analysis and noise modelling. It is used only in sources when frequency domain analysis is to be performed. quantity spectral src real spectrum mag, phase;

The interface of mixed-signal systems such as analogue-to-digital converter(ADC) can be modelled through ’above attribute in the VHDL-AMS. The ’above attribute well suit the conversion of continuous analogue signal into discrete digital signal by threshold detection. The example of ADC model is listed as in the following:

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

11

... architecture behav of a2d is quantity vin across alg_inp to electrica_ref ; begin process ( vin ’ above ( vthreshold )) is begin if vin ’ above ( vthreshold ) then dig_out ; ... // - - constant current source sca_iconst vconst1 (" iconst1 " , < value >); sca_iconst vconst1 (" iconst1 "); iconst1 . p ( w1 ); iconst1 . n ( w2 );

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

22

iconst1 . value = < value >;

In 2008 the SystemC-AMS working group release a new revise proposal on the concept of SystemC-AMS as included in OSCI AMS LRM Draft1 Standard [33]. This proposal put under public review and the OSCI SystemC AMS 1.0 standard has been released later on in 2010 [83]. The language implementation of SystemC-AMS based on the LRM Draft1 is depicted as in Figure 2.9. The extension is focusing on to support signal flow, data flow and electrical networks. AMS methodology-specific elements Elements for AMS design refinement. etc SystemC methodologyspecific elements Transactio n Level Modeling Cycle/bit accurate Modeling (etc)

Electrical Linear Network(ELN) modules terminals nodes

Linear Signal Flow(LSF) modules ports signals

Linear Solver

Time Data Flow(TDF) modules ports signals

Scheduler

User defined AMS extension modules ports Signals (e.g. additional solvers/ simulators)

Synchronisation layer

SystemC Language

Figure 2.9: SystemC-AMS Extension Language Structure[30]

The linear DAE solver will be used to solve the restricted linear electrical network and linear signal flow components. The SDF replaced by TDF ”timed” dataflow to simulate the data flow model. The simulation use the static scheduling and will be activated in discrete time steps. The new language construct used three namespaces to represent MoCs in SystemC-AMS: i)sca tdf for time data flow model, ii)sca eln for electrical network model and iii)sca lsf for linear signal flow model. Port converter in built in SystemC-AMS to create connections between different models. The signal conversion is synchronised by SystemC kernel. The following paragraph explains the modelling description for each type of models based on SystemC-AMS Draft1.

1. Linear Signal Flow(LSF) models -Used to instantiate signal flow primitives such as adders, integrators, differentiator, or transfer function. The primitives are connected using class signal defined as sca lsf :: sca signal. SC_MODULE ( filter ) {

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

23

sca_tdf :: sc_in < double > in ; // TDF input sca_tdf :: sc_out < double > out ; // TDF output sca_lsf :: sca_sub * sub1 ; // subtractor sca_lsf :: sca_sub * dot1 ; // d ifferent iator sca_lsf :: sca _tdf_sou rce * tdf2lsf1 // TDF - > LSF sca_lsf :: sca _tdf_sou rce * lsf2tdf1 // LSF - > TDF sca_lsf :: sca_signal in_lsf , sig , out_lsf ; // LSF signals lp_filter_lsf ( sc_module_name , double fc =1.0 e3 ) // constructor { tdf2lsf1 = new sca_lsf :: sca_tdf _source (" tdf2lsf1 "); // TDF - > LSF converter tdf2lsf1 - > inp ( in ); tdf2lsf1 - > y ( in_lsf ); dot1 = new sca_lsf :: sca_dot (" dot " ,1.0/(2.0* M_PI * fc )); ... lsf2tdf1 = new sca_lsf :: sca_tdf_sink (" lsf2tdf1 "); // LSF - > TDF converter lsf2tdf1 - > x ( out_lsf ); lsf2tdf1 - > outp ( out ); } };

2. Time Data Flow(TDF) models -Used normally for signal processing and control system models. TDF is a time variant of Synchronous Data Flow model. TDF simulation uses pre-simulation static scheduling and the scheduler is activated in discrete time steps. The behaviour of TDF module can be control by three overloading methods: (a) set attributes() method -Specify attributes such as rates, delays or time-steps of TDF ports and modules (b) initialize() method -Specify initial conditions which to be executed once when simulation starts (c) processing() method -Describes time-domain behaviour of the module which will be executed at each activation of TDF module

SC_TDF_MODULE ( mixer ) { sca_tdf :: sc_in < double > rf_in , lo_in ; sca_tdf :: sc_out < double > if_out ;

// TDF input ports // TDF output ports

void set_attr ibutes () { set_time step (1.0 , SC_US ); // time between activations } void processing () // executed at each activation { if_out . write ( rf_in . read () * lo_in . read ());

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

24

} SCA_CTOR ( mixer ){} };

3. Electrical linear network(ELN) models -Used to instantiate electrical network primitives such as resistor, capacitors, etc. The value of voltages and currents will be converted to double-precision point as accessed in time data flow or discrete event model. SC_MODULE ( filter ) { sca_tdf :: sc_in < double > in ; // TDF input sca_tdf :: sc_out < double > out ; // TDF output sca_eln :: sca_node n_in , n_out ; // nodes sca_eln :: sca_node_ref gnd ; // reference sca_eln :: sc a_ td f _v so ur c e * v_in ; // converter TDF -> voltage sca_eln :: sca_tdf_vsink * v_out ; // converter voltage -> TDF sca_eln :: sca_r * r1 ; // resistor sca_eln :: sca_c * c1 ; // capacitor SC_CTOR ( filter ){ v_in = new sca_eln :: sc a _t df _v s ou rc e (" v_in " , 1.0); v_in - > inp ( in ); // TDF input converted to voltage v_in - > p ( n_in ); v_n - > n ( gnd ); r1 = new sca_eln :: sca_r (" r1 " ,10 e3 ); r1 - > p ( n_in ); r1 - > n ( n_out ); ... v_out = new sca_eln :: sca_tdf_vsink (" v_out " ,1.0); v_out - > p ( n_out ); // filter output as voltage v_out - > n ( gnd ); v_out - > outp ( out ); // output TDF signal };

2.5

SystemC-A

Al-Junaid and Kazmierski had presented their approach for the analogue mixed signal extension of SystemC in [5, 8]. The proposed extension has demonstrate the capability of solving the non-linear models using Newton Raphson as the linearisation method[6]. A new SystemC-A language syntax and construct have been developed and integrated with the SystemC in order to enable the mixed-signal mixed-domain modelling. Objectoriented programming approach has been used to implement the extension. An abstract class namely system variable has been constructed to define various types of analogue variables as in Figure 2.10. Three different type of variables (node, flow

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

25

SystemC A System variable

node

flow

free variable

extendable

extendable

Figure 2.10: Analogue system variable classes in SystemC-A [7]

and free variable) are included in SystemC-A. The free variable is used to represent the unknowns in solving the DAEs model. The components class is also made abstract which make the derivation of the analogue components the same way as other element in SystemC-A as in Figure 2.11. The build method is included in all components and will be executed by kernel to build the matrix. The matrix is then solved by the LU factorisation method. Abstract Base Class component

Derived Class User-defined components

Derived Class Circuit components

Voltage source

DC

AC

resistor

Square

Capacitor

Phase

PLL

Filter

VCO

Divider

Figure 2.11: Abstract Component Class in SystemC-A [7]

A separate analogue kernel has been built for solving the analogue parts in SystemC-A design. It is linked with the SystemC simulation engine through calls from the digital kernel. The analogue kernel in SystemC-A and digital kernel in SystemC are synchronised using the lock-step method to eliminate the zero time step problem. The simulation cycle of SystemC-A can be illustrated as in Figure 2.12. The analogue kernel of SystemCA will run the analogue solution then followed by the digital kernel in SystemC. The process will be cycle until time simulation reach the maximum time as specified by the user.

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

26

START

INITIALISATION

ANALOGUE KERNEL PROCESS

PROCESS 1

PROCESS 2

PROCESS n

DIGITAL KERNEL PROCESS

STOP

ALL PROCESSES SUSPENDED

Figure 2.12: The proposed simulation cycle of a SystemC-A [7]

The comparative view of simulation coverage for this SystemC-A extension is shown in Figure 2.13.

Language Primitives

VERILOG & VHDL

SYSTEMC

VERILOG-A Processes

SYSTEM-VERILOG PROPOSED SYSTEMC-A

VHDL-AMS Equations

SIMULINK

VERILOG-AMS

Algorithmic

Transaction

RTL

Gates

SPICE

Analogue Systems

Pre-defined Components

Figure 2.13: Abstraction level coverage for the SystemC-A proposed extension [7]

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

27

The example on the model description of analogue circuit design in SystemC-A is illustrated as in the following listing. The nodes are used for connectivity and the parameter each of the components assigned in the input argument of the components class. // circuit . h SC_MODULE ( circuit ){ void system (); Node * n0 ,* n1 ,* n2 ; SC_CTOR ( circuit ){ system ();} }; // circuit . cpp void circuit :: system (){ n0 = new Node ("0"); n1 = new Node (" n1 "); n2 = new Node (" n2 "); voltageS_sin * v1 = new voltageS_sin (" Vs " , n1 , n0 ,50 ,0 ,1 ,0 ,0); resistor * r1 = new resistor (" r1 " , n1 , n2 ,1 e3 ); capacitor * c1 = new capacitor (" c1 " , n2 , n0 ,1 e -3); }

In order to model the non-electrical parts, the free variable will be used. The following example illustrate the model of mechanical parts in the automotive seating system. seating :: seating ( char nameC [5] , Sys temVaria ble * node_a , sc_signal < double >* deltaP1 , sc_signal < double >* Vrel1 , sc_signal < double >* as1 ): component ( nameC , node_a , 0 ,0){ ... xcQ xsQ ysQ ycQ

= = = =

new new new new

free_variable (" xcQ "); free_variable (" xsQ "); free_variable (" ysQ "); free_variable (" ycQ ");

... void seating :: build (){ // plant parameters Mc = 1.46 e +03; // mass of vehicle chassis ( kg ) Ms = 1.0 e +02; // mass of passenger seat ( kg ) Kc = 7.492 e +04; // chassis spring stiffness ( N / m ) ... xd = X ( a ); xc = X ( xcQ ); ... dxcdt = Xdot ( xcQ ); dxsdt = Xdot ( xsQ ); ... // method1 - user supply the matrix stamp

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

28

BuildM ( ysQ , ysQ , S + Cs / Ms ); BuildM ( ysQ , xsQ , Ks / Ms ); BuildM ( ysQ , ycQ , - Cs / Ms ); BuildM ( ysQ , xcQ , - Ks / Ms ); BuildRhs ( ysQ , - dysdt -( Cs / Ms )*( ys - yc ) -( Ks / Ms )*( xs - xc ) -( Ap / Ms )* deltaP ); ... // method2 - no matrix stamp provided Equation ( ysQ , - dysdt -( Cs / Ms )*( ys - yc ) -( Ks / Ms )*( xs - xc ) -( Ap / Ms )* deltaP ); ...

In SystemC-A two options type of system design description are provided. The first method is the pure Newton method which uses the exact Jacobian entries. The BuildM is a function that used to specify the entries for the Jacobian matrix. Jacobian matrix is basically partial derivatives of a function. 

∂f 1 ∂x1 ∂f 2 ∂x1

∂f 1 ∂x2 ∂f 2 ∂x2

...

..

...

∂f n ∂x1

∂f n ∂x2

...

  J =  .. 

...

∂f 1 ∂xn ∂f 2 ∂xn



   ..  

∂f n ∂xn

The second method is the Quasi Newton method. The Equation function is used to automate the Jacobian matrix entries using Quasi-Newton method. The approximation is done by using the secant method. In the secant method, the next entries can be approximated by finite difference method as given in the equation 2.8.

Jij =

fi (xj + ∆xj ) − fi (xj ) ∂fi = ∂xj ∆xj

(2.8)

Where J is the Jacobian matrix, i is the row number, xj is the number of variable, f is the function and δx is the step size (10e-6 to 10e-3). The core engine in kernel of SystemC-A simulator is the solver for the non-linear dynamic equations based on Newton Raphson method. The mixed-signal simulation started from the SystemC by using sc start() as invoked by user from the testbench. The simulation cycle starts with Newton Raphson iteration initialised to zero. The system matrix is build through Modified Nodal Analysis (MNA) method. The system matrix is then solved by LU Factorisation method. The system solution will be updated on each Newton’s iteration. The cycle will be repeated until the stopping criteria is satisfied. There are two stopping criteria included in the SystemC-A. The convergence and the maximum allowable iteration. The convergence test similar to SPICE has been used in SystemC-A as the stopping criteria [92]. Tolerance value of system variables,(x) is defined as T ol = relT ol∗max(xn , xn−1 )+absT ol. The iteration will stop when condition of xn − xn−1 ≤ T ol or the maximum iteration is met. In SystemC-A the maximum

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

29

allowable iteration is set to 20 iterations. The linearisation method in SystemC-A can be illustrated as in Figure 2.14. START

Initialisation

SystemC Simulation Start sc_start()

Initialise Newton Raphson

Analogue Processes

Build Matrix Equation MNA method

Solve Matrix Equation LU method

Update Solution Xn = Xn-1 + ∆Xn

Convergence? Xn – Xn-1 ≤ Tolerance

SystemC-A

Digital Processes

SystemC

Figure 2.14: Newton Raphson Cycle in SystemC-A [7]

One of the important features in SystemC-A simulator is the mechanism for solving the Differential Algebraic Equation(DAE). The Trapezoidal method has been implemented in the simulator to solve the derivative operation in time-domain simulation. Before, Trapezoidal integration rule can be performed, the value of derivative in the previous time must be present. Thus, the basic method which is Backward Euler is used when simulator at initial stage with time equal to zero [53].

1 xn dot = ( )(xn − xn−1 ) h 2 xn dot = ( )(xn − xn−1 ) − xn−1 dot h

at simulation time = 0, at simulation time 6= 0,

where xn , xn−1 , h, xn dot and xn−1 dot are current time solution, previous time solution, time step size, current time variable derivative over time and previous time variable derivative over time respectively.

Chapter 2 State-of-the-art Analogue Mixed Signal (AMS) Tools

30

Only first order of DAE can be solved directly by the analogue solver in SystemC-A as described by xn dot. However, a high order DAE still can be solved through reduced order method. The output of reduced order method will be a series of first order DAEs.

2.6

Summary

This chapter has presented a review on few important existing AMS tools which have been used widely in the area of mixed-signal and mixed-domain design. Based on the current literature, although the powerful AMS languages such as VHDL-AMS/VerilogAMS have been proved capable to describe the heterogeneous design, it is impossible to simulate the hardware/software co-design. Therefore, the new generation of hardware description language namely SystemC has been developed to cater the needs. The SystemC language has a merit towards hardware/software co-simulation since the language itself is constructed as C++ libraries. Therefore, any software that built based on C/C++ can be easily integrated in the simulation framework. Furthermore, recent development by OSCI SystemC-AMS Working Group by proposing the language extension namely SystemC-AMS will include the analogue mixed-domain into SystemC. Although the new extension on SystemC-AMS on their way to become as an OSCI standard, there is still significant lacks in the language. The proposed extension is only limited to linear DAE systems solution. Another version of SystemC extension namely SystemC-A has proved to be able to handle the non-linear DAE model. Thus, it is a good merit to extend the language into solving more complex multi-physical domain such as found in MEMS designs.

Chapter 3

Partial Differential Equation (PDE) in Hardware Description Language (HDL) 3.1

Introduction

Strong demand on the integration of microelectromechanical system (MEMS) in hardware description language has given a rise on the needs of more powerful simulation methods and tools[27, 55, 57, 63]. Describing of MEMS system is beyond the normal approach through lumped modelling technique [25]. For example, elastic bending motion in a MEMS is a real complex for time-discrete and time-continuous tools since it is not sufficient to use the ordinary differential equation (ODE) [63]. The solution is to describe the multi-physical systems in a distributed models form. Thus, it makes the accuracy of the models higher and narrowing down the discrepancies with the actual physical behaviour. For example, the distributed motion of thin mechanical structure needs to be defined in terms of space-continuous models. Thus, the actual motion is described precisely with different behaviour at the particular point in the space. The space-continuous model can be described through a branch of numerical approach namely partial differential equations (PDE)[62]. The traditional approach to design such systems is by using multiple tools and run the co-simulation which led to various problems such as convergence in coupling, interoperability, poor design performances, etc. [25]. Due to that reason, researchers have been proposing to create a unified description language so that any physical models (i.e lumped- and/or distributed-) will be presented in the same way. Therefore, the multi-physical modelling accuracy problems will be reduced due to consistency of the models. Furthermore, concurrent simulation of multi-physic also needs to be realised. However, until today, a direct description to express the PDEs system in modern hardware description language (HDLs) tools is still not present[63]. 31

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

32

Example of the general form of partial differential equation with two independent variables can be described as: First-order: F (x, t, u, ux , ut ) = 0

(3.1)

F (x, t, u, uxx , uxt , utt ) = 0

(3.2)

F (x, t, u, uxxx , uxxt , uxtt , uttt ) = 0

(3.3)

Second-order:

Third-order:

Typically, general solution of PDEs normally will have time and one or more spatial dimensions, u(x, t). Thus, the solution of partial differential equation is expressed as dependent variables as a function of the independent variables (e.g time, spatial quantities). The classification of PDE is typically expressed in the second-order form which broadly classified into three categories, hyperbolic, parabolic and elliptic as based on the curve propagation characteristics [75, 90].

A

∂2u ∂2u ∂2u ∂u ∂u +B +C 2 +D +E =F 2 ∂t ∂t∂x ∂x ∂t ∂x

(3.4)

where A,B,C,D and E are assumed to be constant and the right-hand side possibly depends on the x, t and u. The independent variable x is a space coordinate and t can be time or space. The following definition can deduced to categorise the PDEs. • hyperbolic if B 2 - 4AC > 0 • parabolic if B 2 - 4AC = 0 • elliptic if B 2 - 4AC < 0

The typical example of hyperbolic equation is the one-dimensional wave equation: ∂2u ∂2u − v = 0(f or v > 0) ∂t2 ∂x2

(3.5)

Where v is the constant represent the velocity of wave propagation. The typical example for parabolic equation is the diffusion equation: ∂u ∂u ∂ (D ) − =0 ∂x ∂x ∂t

(3.6)

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

33

where D is the diffusion coefficient. The typical example for elliptic equation is the Poisson equation: ∂2u ∂2u + 2 = ρ(x, y) ∂x2 ∂y

(3.7)

if the term ρ is equal to zero, then the equation is belong to Laplace’s equation. In computational view, there are two types of problem classification of PDE system. The PDE equation with time information and relates to finding the solutions as the time propagates is known as initial value problem(IVP)[47]. Usually, the initial value for some information will be given at time equal to zero. The other type is known as boundary value problem(BVP)[47]. The solution of BVP will be static functions which satisfies the equation within the region of interest. In modelling the mixed-domain system both can be exist as an input for the solver to find the partial solutions over time and space as in Figure 3.1. Boundary values

Solution, Un(xn,tn)

t

x Initial values

Figure 3.1: Initial and boundary values problem in PDE

The next paragraph presents a number of approaches that have been carried out with the interest of extending the capabilities of hardware description language into Partial Differential Equation models.

3.2

Partial Differential Equations using C/C++

Mrcarica et al [63], presents a new hardware description language namely as AleC++ and Alecsis behavioural simulator has been developed. The C++ programming language has been exploited to implement the partial differential equation solver together with other lumped models. The description of PDEs is transformed into its corresponding series of ODEs and solved by the Newton Raphson method. Based on the approach, to enable the description of PDEs and their automated transformation into ODEs, the HDL must satisfy two conditions. The conditions derivation shown by solving the membrane MEMS which has the following equation:

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

D

∂4w ∂4w ∂4w ∂w ∂2w + 2D 2 2 + D 4 = P − k − ρd 2 4 ∂x ∂x ∂y ∂y ∂t ∂t

34

(3.8)

Firstly, to enable the discretisation of equation as in 3.8, the HDL must be capable of declaring of array of nodes (signal) of variable size. For case as in equation 3.8, the displacement w is represented as 2D array of local displacement of mesh nodes. Secondly, the language should capable creating array for the sub-model as well. As a result, a discretised equation defined and copied into array of equation over the mesh nodes. Size of an array dynamically should be changing based on the model parameter. To solve the PDEs system such as in equation 3.8 the boundary conditions needs to be provided. As for example, if the membrane edge x=L built into a rigid rim, the boundary condition is given by:

(w)x=L = 0 ∂w ( )x=L = 0 ∂x

(3.9)

Once the space-continuous model has been defined, it will be stored in the library. When it is used in the system design, it will be invoked the same way as other device model (e.g transistor, resistor, etc). The simulation of force sensing system has been presented. In the simulation the various signals such as value of the force, the coordinates of the point where the force is acting, the values of the piezoresistance, two nodes on the Wheatstone bridge that is composed of those piezoresistors, and the value of the bridge output voltage. The authors claim the correctness of the design concept by the observation of the simulation result. It says that, the output voltage is depend on the measure of the applied force intensity and not affected by the force coordinates.

3.3

Object-Oriented Language for Partial Differential Equation

Li et al [51] presents a work on extending the capabilities of a multi-domain language namely Modelica. Modelica is an object-oriented language which resembles C++ and java. Although the language is convenient to be used for the differential-algebraicequations (DAEs), it also lack for PDEs support. Li et al has proposed a framework to enable the PDEs models in Modelica such in Figure 3.2. It includes three specifications for describing the PDEs models: 1)domain and boundary definitions, 2)boundary conditions, and 3)actual equations.

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

2 points

Line2D

f functions

Composite

Boundary

35

g functions

Curve2D

Parabolic

Domain

Elliptic

Hyperbolic

Robin

Neumann

Dirichlet

Boundary Conditions

Equations

PDEs models in Modelica

Figure 3.2: Framework for describing PDE models [51] PDEs in Modelica

USER INPUT

Parser

Domain Analyser

PDE Analyser External Translator

Domain Information

PDE - I.Conditions - B.Conditions

Grid Generator

Finite-Difference Method External Translator

DAEs Model

Mworks Solver

MATLAB plot

Figure 3.3: MWorks PDEs implementation flowchart [51]

They have developed MWorks which is a Modelica-based platform for modelling and simulation of multi-domain physical system. The implementation of the extension is actually through co-simulation approach. The flowchart is shown as in Figure 3.3. Before the PDE model simulated in MWorks, there two external mechanisms have to be called out first, the translator and the processor. Both implemented in C++ language as stand-alone program. Only simple first-order PDE that is heat conduction is tested rather than a complete multi-domain system simulation.

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

3.4

36

Partial Differential Equations extension for VHDLAMS

Nikitin et al [67], had proposed a new extension to support the partial differential equations in the standard VHDL-AMS language. Although VHDL-AMS language is one of the most powerful language that capable of modelling various mixed-signal and multiphysical systems, language support for the PDEs systems was intentionally left out [80] due to its complexity. The proposed approach is to discretise the PDEs by spatial discretisation technique and leave the time derivative to be handled by VHDL-AMS standard simulator. The central difference formula has been used to perform the discretisation. This paper also discusses the associated problem with the discretisation, example shown by the current and voltage discretisation, where they are not defined at the same point in the space so it will causes reflections problem on the transmission line. The second-order PDE wave equation in loseless transmission line modelling has been discussed as in Figure 3.4. The transmission line is modelled as lossless with the form of:



∂2V ∂2V − β2 2 2 ∂z ∂t

=0 (3.10)

or with Telegraphers’s equation:

Z Vin

Vout

ZS Iin

Iin

VS

Z0 ZL Transmission line

circuit

I1

V0

V1

I2

IN

VN

Spatial discretise grid

in V0

V2

circuit

L I1

V1

C

L I2

V2

out L IN

C

IN+1

VN

C

IN+1

Equivalent LC-ladder

Figure 3.4: Transmission line modelled as wave second-order PDE [67]

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

∂V ∂z ∂I − ∂z



37

= l ∂I ∂t = c ∂V ∂t

Where, V is the voltage, I is the current, β =



(3.11)

lc is the propagation constant, l and c

are the inductance and the capacitance per unit length. The Boundary condition that describe the circuit interface is given by:

Vin = Vs − Iin Zs Vout

= Iout ZL

(3.12)

The central difference discretisation of partial quantities(i.e voltage and current) with respect to z is given by: Vn − Vn−1 ∆z In+1 − In − ∆z



= lI˙n , n = 1, ..., N = cV˙ n , n = 1, ..., N

(3.13)

Where, ∆z is the spatial step, d is the length of transmission line, and N = d/∆z is the number of points along the transmission line. The discretise equation of V and I on the transmission line can be see as equivalent to N-section LC-ladder circuit network. Where, L = l∆z and C = c∆z are the inductance and the capacitance of each segment of the transmission line. The work presented here is considered as initial work since it only covers the discretisation scheme for the simple PDEs system. The interesting part of this work is on the discretisation method, where instead of separate discretisation scheme, it is done through VHDL-AMS language environment itself. The author proposed language oper0

ator dot(x) operator as an extension for VHDL-AMS to describe the spatial variable, x. It can be considered as the initial work for standardisation of partial differential equation in the VHDL-AMS language. Wang et al [94], presents a new proposal of VHDL-AMSP language to support the general partial differential equation in VHDL-AMS. The translator is also developed to convert the VHDL-AMSP codes into VHDL-AMS. This work is can be considered as improvement to the work as presented in [67]. Through this approach, the PDEs system is converted automatically into a series of differential algebraic equation (DAEs) that has been discretised with finite difference method. The series of DAEs with respect to time

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

38

Figure 3.5: Sensing element in MEMS [94]

is then solved by standard VHDL-AMS by using the ’dot operator. This paper presented modelling of sensing element 3.5 in the MEMS accelerometer sigma-delta control (SDC) loop with fifth-order. It shows, the typical modelling technique through lumped-model, the cantilever beam is to be modelled as spring-mass system. However, the actual deformation of the beam is needed to be described as distributed model through PDEs. The distributed deflection of the MEMS sensing element is given by:

EI

∂ 5 y(x, t) ∂ 2 y(x, t) ∂ 4 y(x, t) +C + ρS = F (x, t) 4 4 ∂x ∂x ∂t ∂t2

(3.14)

where y(x,t) is the relative displacement, E is the Young’s modulus, I is the moment inertia, C is the damping factor, ρ is the material’s density, S is the cross sectional area and F(x,t) is the electrostatic force. The boundary condition at clamped-end: y(x, t) = z(t) ∂y(0, t) θ= =0 ∂x

(3.15)

The boundary condition at free-end: ∂ 2 y(L, t) =0 ∂x2 ∂ 3 y(L, t) =0 Q = −EI ∂x3

M = −EI

(3.16)

where θ, M, Q are the slope angle, the bending moment and the shear force respectively. L is the length of the beam. The initial condition is given by: y(x, 0) = 0

(3.17)

In the VHDL-AMSP language proposal, there are five new elements has been introduced.

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

39

1. Partial quantities - used to define the spatial variable. Example of declaration: partial quantity q :

real;

2. Spatial co-ordinates - used to define the range in space and the discretisation step size. Example of declaration: coordinate x :

real range 0.0 to 10.0 step 0.1;

3. Partial derivatives - used to describe the partial derivatives over the space quantities. Example of declaration: q’dot(x) 4. Simultaneous partial derivatives - used to describe the simultaneous partial differential equation. Example of declaration for

∂q ∂x

= A∗

∂q ∂t

: qdot(x) == A *

qdot; 5. Boundary condition - used to defined the spatial boundary condition. Example of declaration: boundary x at 0.0 is begin q == 0.0; q’dot(x) == 0.0; end boundary;

3.5

Simplified approximation for solving Partial Differential Equation

3.5.1

Equivalent circuit

Civalleri and Gilli [20], has proved the capability of the electrical equivalent circuit to represent the approximation of continuous system by artificial lumped physical structure. The major advantage of the technique, the approximation of lumped networks is locally connected and it can perform as cellular neural network which considered as analogue processors describing the systems. The authors illustrated the example of discretisation scheme with physical properties of the structures are preserved and some measure to the quality of approximation also discussed. By presenting three different circuit configurations, numerical schemes such as Trapezoidal rule, Euler’s implicit rule and Euler’s explicit rule for both first- and second-order is achievable. The wave equation has been presented for implementing the Trapezoidal Rule in a twoport gyrator circuit. The equation can be written in either one of the equivalent forms. ∂u ∂f (u) + =0 ∂t ∂x

(3.18)

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

∂g(v) ∂v + =0 ∂t ∂x

40

(3.19)

where f and g are monotonic functions satisfying g = f −1

(3.20)

u is a charge density and f (u) is a current density. The same applies to g(v) and v. both equation can be rewritten as ∂u ∂u 0 + f (u) =0 ∂t ∂x

(3.21)

∂v ∂v + =0 ∂t ∂x

(3.22)

0

g (v)

It is shown that, a cascade of N identical two-ports gyrator which terminated on a unit resistor is a discrete approximation for a system, of physical length l which described by 3.18 or 3.19. By denoting qc the electric charge per unit length, the charge stored in each cell is qc l/N . The quantity of l/N is proportional to integration step h. The cell inserted between ports n-1 and n can be described by equations:

vn−1 = −in + vc,n vn = −in−1 + vc,n h dqc,n in−1 − in = 2 dt

(3.23)

The final derivation of the solution for the equation 3.18 or 3.19 can be written as in the following which confirm the Trapezoidal rule.

d qc,n + qc,n−1 f (qc,n ) − f (qc,n−1 ) + =0 dt 2 h d g(vc,n ) + g(vc,n−1 ) vc,n − vc,n−1 + =0 dt 2 h

(3.24)

In order to describe the Euler’s implicit rule, a resistor is placed in between n-1 port and n. The corresponding equation between two ports described as:

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

in−1 = vn−1 dqn −in = vn − 2vn−1 + 2h dt

41

(3.25)

Where h is the integration step, the proportionality factor is 2, thus, one integration step becomes twice in a cell. The final equation for such system can be described as:

dqn f (qn ) − f (qn−1 ) + =0 dt h dg(vn ) vn − vn−1 + =0 dt h

(3.26)

Which follows the Euler’s implicit rule. The third example showing the approximation for Euler’s explicit rule. It can be achieved by adding the capacitor across the n-1 port. With the same derivation, the third circuit can be described as:

dqn−1 dt in = −vn

in−1 = 2vn − vn−1 + 2h

(3.27)

and, the final equation of the solution can be described as:

dqn−1 f (qn ) − f (qn−1 ) + =0 dt h dg(vn−1 ) vn − vn−1 + =0 dt h

(3.28)

Thus, it shows the discretisation of the Euler’s explicit rule. Further discussion about the derivation of second-order implicit scheme can be referred on the paper.

3.5.2

Reduced order macromodels (ROM)

Schlegel et al [77], presents the improve version of reduced order macromodels (ROM) technique at system level using VHDL-AMS. The shape function method has been used to derive the ROM model which covers modelling of the non-linear systems. Through simulation result, it is shown that, the new enhancement strategies capable of simulating the certain classes of non-linear ROMs with less than 1% of error rate as compared to the finite-element (FE) method. The authors also claim with their approach the

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

42

simulation run time is shorter than the lumped-model and rigid bodies. Although it shows possibilities of ROM implementation in VHDL-AMS, the serious problem arises due to lack support of the VHDL-AMS simulator. However, ROM method require pure sequential for non-linear function which is not available. The work presented here is one of the ways to improve the weaknesses of ROM approach as presented in paper [25]. Rumi et al [100] have made a claim that various approaches for solving PDE system as in MEMS such as finite-element methods (FEMs), finite-difference (or finite-volume) methods, boundary methods, lumped-parameter techniques will requires high computational complexity. They have developed a passive reduced-order macro-modelling based on congruent transformations for second-order dynamics system in linear MEMS devices. The original FEMs equations are converted to state-space forms that follow the passive Krylov methods. The new modified matrix equation is proposed for second-order MEMS dynamics to guarantee its passivity. Several design examples have been presented in order to prove the validity and efficiency of the proposed reduction algorithm. Based on the simulation results, it is shown that, the rate of error of the proposed method mostly below 0.1% with a very significant reduction in total simulation run time.

3.5.3

Black box approach

The black box modelling can be used to derive the lumped-models from the measured characteristics. The major problem with this approach is the models transparency [63]. The parameters for the model do not represent physical quantities that can be estimated from measurement or theory calculation. Furthermore, the extrapolation outside the region that valid for model derivation will lead to errors in the results.

3.6

Others numerical methods to solve the PDEs models

The numerical methods of solving PDEs can be done through one of the following approaches [44]: • Finite difference method (FDM) The finite difference are the simplest method to use for solving problems such as regular geometries, a rectangular domain in two space dimensions, and a cubic in three space dimensions. It solves the partial differential equation by replacing the derivatives in the equation by difference equations. The difference equation can be derived by one of the following methods: 1. Forward difference : 2. Backward difference

∂yn ∂x = (yn+1 − yn )/4x n : ∂y ∂x = (yn − yn−1 )/4x

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL) 3. Central difference :

∂yn ∂x

43

= (yn+1 − yn−1 )/24x

• Finite elements method (FEM) This method mainly found in mechanical engineering applications such as automotive, aerospace, biomechanical, sensors, etc . It uses either elimination of differential equation to steady state problems or rendering it into an approximation of ordinary differential equations which solved using standard techniques such as Euler’s method, Runge-kutta, etc. • Finite volume method (FVL) This method is mainly used in mechanical fluid dynamics. It represents the partial differential equation as an algebraic equation. Each node point on a mesh assumed having a small volume on its surrounding. The divergence theorem used to convert the volume integrals to surface integrals. It also allow the unstructured meshes to be formulated in finite volume method. • Method of lines (MOL) It solves the partial differential equations by discretisation of the spatial quantities. Basically, the PDE problem is solved by transformed into a set of ordinary differential equations (ODEs) with respect to time. The differential algebraic equation (DAEs) is then solved by the integration methods. The discretisation in MOL is done by the difference equation such as finite difference method. Advantages: • Easily can be integrates with well establish methods and tools for DAEs • Solve most of the equation that can not handle by analytical methods such as higher-order PDEs Disadvantages: • General DAEs solvers have difficulties to control and estimate the impact of discretisation errors on the numerical scheme, especially when the coarse spatial grids have to be used

3.7

Summary

This chapter has presented the importance of PDE in the area of mixed-signal mixeddomain design. Various potential approaches for solving the partial differential equation models have been discussed. Based on the review, the object oriented language such as C/C++ and Modelica have the flexibility for creating the language extension to

Chapter 3 Partial Differential Equation (PDE) in Hardware Description Language (HDL)

44

cater the integration of PDE model in mixed-physical domain design. The commercial standardised language such as VHDL-AMS also can be extended by introducing a syntax converter. Obviously, the method of lines combined with finite difference approximation is one of the easiest way to be utilised in the PDE solving implementation. The difference method has a merit of less complicated for implementation and the run time for the overall process much faster compared to the other methods. However, for a system with complex and solid physical geometries, the more advance methods such as finite element method should be utilised.

Chapter 4

Multi-domain Mixed-signal Design : Simulation Techniques 4.1

Introduction

The important factor in extending the mixed-signal mixed-domain design is to understand the underlying solvers. The concept of simulator for mixed-signal system modelling presented here is based on time-domain simulation. The discussion will be mainly on the analogue solver for continuous system which described by the combination of differential algebraic equations (DAEs). Most of the material here is referred from [17, 21, 50, 54]. The typical flowchart to describe the steps that performed by the mixed-signal simulator in time-domain simulation is depicted as in Figure 4.1. In mixed-signal simulator environment, the time is broken down into incremental values called as time step, h. The simulator will solve the system of equation at each of these time step as shown in Figure 4.2. The steps for simulator to perform the equation functions generation incrementally shown in Figure 4.3:

Equations construct :

The equations in algebraic functions describing the function

are generated from combination of system models and their interconnections. After equation has been solved, the new equation will be constructed for the next time step. Equation solve :

Every node in the network are to be solve by using Kirchoff Current

Law (KCL) and for non-electrical systems will be described in equivalent version of KCL. The node solution is obtained at point where it crosses the x-axis (i.e y = 0).

Both of the processes will be repeated until the simulation time reach the end-time. 45

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

Network equations formulation

Analogue processing

Initial guess of next timestep, h

Numerical Integration

Linearise the system of equations

Solving the linear system

Does solution converge?

NO

YES Does error within limits?

NO Reduce timestep

YES Digital event processing

Does simulation time = tend?

NO time = time + h

YES Write results

Figure 4.1: Time-domain simulation flow for non-linear differential-algebraic systems [21]

46

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

y

47

y=f(xn ,tn) y

y=f(xn+1 ,tn+1) y

y=f(xn+2 ,tn+2)

tn

x xn tn+1

x xn+1 tn+2

x xn+2

Figure 4.2: Equation functions generation at each time step [21] At 1st timestep, tn Simulator construct and solve the function y=f(xn, tn)

At next timestep, tn+1 Simulator construct and solve the next function y=f(xn+1, tn+1)

At next timestep, tn+2 Simulator construct and solve the next function y=f(xn+2, tn+2)

Figure 4.3: Equation function generations [21]

In time-domain or transient simulation the various nodes elements values are typically plotted as function of time that represented as timing waveforms. Although it can be viewed as smooth waveforms, it is actually discrete points that plotted at intervals which equal to the step-size used by simulator.

4.2

Mixed-Signal Mixed-Domain Network Classification

In mixed-signal mixed-domain system design which form few network topologies can be broadly categorised as:

1. Linear Algebraic Equations

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

48

2. Linear Differential-Algebraic Equation 3. Non-linear Algebraic Equations 4. Non-linear Differential-Algebraic Equations

4.2.1

Linear Algebraic Equations systems

The basic configuration of linear algebraic network can be illustrated as in Figure 4.4 R2

v1

Isrc

R1

v2

R3

Figure 4.4: Linear algebraic network example [21]

The general step to solve this type of network is detailed as in Figure 4.5: Create KCL for each node Node equations: Σ incoming current = Σ outgoing current Generate the conductance, voltage and current source matrix

− G 2   v1  isource  G1 + G 2  G2  v 2  =  0  − ( 2 + 3 ) G G      Solve the unknown (i.e Node voltage) v1= ? v2 = ?

Figure 4.5: Steps to solve the linear algebraic network

There are few linear matrix solver can be used to solve the linear system. The two most common method that extensively used in many simulator are Gaussian Elimination and LU Factorisation [17, 50].

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques 4.2.1.1

49

Gaussian Elimination(GE)

The Gaussian Elimination technique is the simplest yet often effective method for solving the linear system equation. For n unknowns, it will requires n3 /3 total operation. The linear system represented as matrix system which consists of n linear equations with n unknowns.



a11 a12 a13   a21 a22 a23   .. .. ..  an1 an2 an3

... a1n





x1





b1



      x2   b2      ... a2n   ×  x3  =  b3       ... ..      .. ..     ... ann bn xn

or, in compact form can be written as

A.x = b

(4.1)

Where, A and b are the input data and x is the solution to be determined. In GE method, there are two steps involve in solving the linear matrices. Firstly, the forward elimination will be performed to create zero lower triangular matrix. Secondly, the solution of the matrix will be starts from nth equation with back substitution method. The overall procedure can be summarised as in the pseudocode.

1.Forward Elimination: .. for k = 1 to n-1 do for i = k+1 to n do for j = m+1 to n do aij := aij – (aik.akj)/akk xi := xi - (aik.xk)/akk



a11 a12 a13   0 a21 a22   .. .. ..  0 0 0

b1



     x2   b2    ... a2n   ×  x3  =  b3     ... ..      ..   .. ... ann bn xn

      

... a1n





x1





Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

50

2.Backward Subtitution: .. for k = n to 1 do xk := bk for j = k+1 to n do xk := xk – akj.xkj xk := xk/akk

The final solution of each unknown xi can be found by recursive formula

xi =

n X 1 (bi − aij .xj ) aii

(i = n − 1, n − 2, .., 1)

(4.2)

j=i+1

4.2.1.2

LU Factorisation (LUFAC)

In LU factorisation technique, only Left-Hand-Side(LHS) of the matrix system will be operated. While the Right-Hand-Side(RHS) vector is not considered. Thus, it has advantage of the factorised LHS can be reused for different set of RHS vectors. To solve the linear matrix with n X n size, the LHS will be factorised into a product of two matrices, lower triangular and upper triangular.

Ax = b A = LU

Where, L is the lower triangular matrix 

... 0



  l21 1 0 ... 0   .. .. .. ... ..  ln1 ln2 ln3 ... 1

    

1

0

0

and, U is the upper triangular matrix 

u11 u12 u13 ... u1n

  0   ..  0



 u22 u23 ... u2n   .. .. ... ..   0 0 ... unn

Then, solve for zi by solving Lz = b as obtained by

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

51

1. Forward Substitution: .. Z1 := b1 for i = 2 to ni −do 1 zi := bi lijzj

∑ j =1

Finally, the unknowns xi can be determined by solving the U x = z matrix as described by 2. Bakward Substitution: .. xn := xn/unn for i = n-1 to 1n do xi := (zi uijxj)/ uii



j = i +1

Several pivoting techniques are usually performed when the linear solver fail to solve the equation. Amongst them, zero diagonal element which causes the singular matrix problem, and small pivot condition which lead to accuracy problem. The pivoting method will perform permutation to the system matrix with row/coloumn swapping in order to rearrange the matrix so that the highest values will be in the diagonal position. This also can prevent the small pivot located in the diagonal which raise the errors in the result.

4.2.2

Linear Differential-Algebraic Equations systems

The very basic configuration of linear differential-algebraic network can be illustrated as in Figure 4.6: v

Isrc

R

C

Figure 4.6: IRC network [21]

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

52

To solve this type of network, the differential equations need to transforms into discrete quantities. For example, the current through the capacitor is to be translated as:

C

dv vnew − vold ≈ C( ) dt stepsize dv vn+1 − vn ≈C C dt h

(3.0)

where C is the capacitance value, vnew and vold are represent the voltage across the capacitor at the current and the previous time step. The result of the transformation will becomes as finite difference algebraic form as given below:

C

vn+1 − vn vn+1 + = isrcn+1 h R

(4.3)

Where vn+1 and vn represent the new and the previous voltage when discretised. The isrcn+1 is the corresponding new current. It is called as numerical integration process. There are various approaches to solve the numerical integration in simulator engine. The following techniques are the commonly used one.

4.2.2.1

Forward Euler’s

The discretisation formula for the backward Euler method is given by:

Y (tn+1 ) = Y (tn ) + h.

d Y (tn ) dt

(4.4)

Where Y (tn ) and Y (tn+1 ) represent the values of the function at the current and the next time step. It estimates the value of a function at the next step, tn+1 . The advantage of Forward Euler’s method is the value of the function for next time step, Y (tn+1 ), depends only on the information from the current steps, Y (tn ).

4.2.2.2

Backward Euler’s (Gear 1)

The discretisation formula for backward euler’s is given by:

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

Y (tn+1 ) = Y (tn ) + h.

d Y (tn+1 ) dt

53

(4.5)

The difficulties for this method arise when one have to know the derivative of the function at the next step. However, it is not yet happen, so, it needs to be estimated. It will require another technique called prediction and correction method.

4.2.2.3

Trapezoidal Rules

The discretisation formula for Trapezoidal rules is given by:

Y (tn+1 ) = Y (tn ) +

d h d .[ Y (tn+1 + Y (tn )] 2 dt dt

(4.6)

It has better result because it uses average of the forward euler that tends to −ve errors and, the backward euler tends to +ve errors. So it will be balanced out. It also has the Backward Euler’s limitation, and for some cases it may cause ringing effect on the circuit being simulated.

4.2.2.4

Gear 2

The discretisation formula for Gear 2 is given by: 4 1 2 d Y (tn+1 ) = ( )Y (tn ) − ( )Y (tn−1 ) + h.[ Y (tn+1 ]) 3 3 3 dt

(4.7)

It has much better prediction of next solution for the next time step since it takes the weighted average of the next, current and previous solutions. It has merit of having higher accuracy as Trapezoidal rules and on top of that, it is more stable. So, the oscillation effect can be eliminated.

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques The simple linear differential-algebraic network can be illustrated as in Figure 4.7. C2

R2

v1

Isrc

R1

C1

v2

R3

Figure 4.7: Linear differential-algebraic network example [21]

The general step to solve this type of network is detailed as in Figure 4.8: Generate the KCL for the DAEs equations Node equations: Σ incoming current = Σ outgoing current

Create conductance and capacitance matrices Cv’ + Gv = i v’: differential terms

Isolate differential terms v’ = C (i = Gv)

Replace differential terms using numerical integration

 v1,n +1 − v1,n    dtd v1  h   d  = v  dt v 2  2,n +1 − v2,n    h

Solve the new algebraic equations using standard matrix techniques

Figure 4.8: Steps to solve linear differential-algebraic network

54

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

4.2.3

55

Non-linear Algebraic Equations system

The basic configuration of nonlinear algebraic network can be illustrated as in Figure 4.9 R2

v1

Isrc

v2

R3

R1

i=v2

Figure 4.9: Nonlinear algebraic network example [21]

In real problems, often, the system design will include the non-linear parts. The most common approach employed by the simulator is the linearising techniques. After the system of equation has been linearised about the solution point, the standard linear method will be performed as usual. There are several linearisation methods to solve the non-linear equations. The four of them are presented in here.

4.2.3.1

Newton-Raphson (NR) Method

It uses successive approximations of the real roots. It is derived from Taylor’s series as given by:

f (x) = f (a) +

f 0 (a) f ”(a) f (n) (a) (x − a) + (x − a)2 + ... + (x − a)n 1! 2! n!

(4.8)

Where f (x) is the arbitrary polynomial function. The NR is only considered the first-degree polynomial formula. Then, by setting the f (x) equal to zero, the NR formula can be restated as [103]:

f (x) = f (a) + f 0 (a)(x − a)x(1) = x(0) −

x(1) = x(0) −

f (x(0) ) f 0 (x(0) )

f (x(0) ) f 0 (x(0) )

(4.9)

(4.10)

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

56

Where x(n) is the root or solutions of the polynomial function. The second equation represents the iteration formula of NR which ultimately, can be used to solve most of the mixed-signal designs. y y=f(x)

x(2)

x(1)

x(0)

x

Figure 4.10: Graphical representation of NR [21]

The initial value of the solution guessed first at x(0) , then, f (x) is evaluated and a tangent is drawn towards new solution point x(1) as in Figure 4.10. The process is repeated several times until the solution close enough. The final solution is retrieved at the point where the iteration has stopped. The actual time step will happen after the iteration completed. y y=f(xn ,tn) y

y=f(xn+1 ,tn+1) y y=f(xn+2 ,tn+2)

tn xn(n) tn+1

x

xn(0) xn+1(n)

x

xn+1(0)

x

tn+2 xn+2(n)

xn+2(0)

Figure 4.11: Equation generation and its solution at each time step [21]

(n)

For the solution notation of xn ,the superscripts represents the number of iteration and the subscripts represents the time step as in Figure 4.11. The notation of y = f (xn , tn ) represents the given function that is dependent on the independent variable, x and, time, t.

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

57

If multiple variables occur in the given function, the simulator will employs different method. The different matrices system will be used to express the system of equation as given by:

∆x = −J −1 f (x)

(4.11)

Where, J is the Jacobian matrix that consists of the partial derivatives of all terms in the function and given by:  ∂ ( f1 ) K   ∂x1 K  ∂( f 2 )  ∂x 1   ...   K  ∂( f n )  ∂x1

∂( f1 ) K ∂x 2 ∂( f 2 ) K ∂x 2 ... ∂( f n ) K ∂x 2

∂( f1 ) K ∂x n ∂( f 2 ) K ... ∂x n

      ... ...   ∂( f n ) K  ... ∂x n 

...

Figure 4.12: Jacobian matrix element [21]

Basically, the Jacobian matrix as in Figure 4.12 represents an array of linearised function for each nodes in the system network. Few methods also has been used for linearising the non-linear systems as presented in the following section.

4.2.3.2

The Slope Method Vout

Vout

Vin

V

Figure 4.13: Graphical view of the slope method [21]

The independent variable V0 , will be used to generate the slope of the function as illustrated in Figure 4.13. The simulator will repeat the procedure until convergence parameters satisfied. It is simple method, but it requires continuous derivatives (slope) which tend to be very difficult if the function have different slope at different region.

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques 4.2.3.3

58

Piecewise Linear Evaluation Vout

Vin

V1

V2

V3 V0

Figure 4.14: Graphical view of piecewise linear evaluation [21]

This technique uses a set of sample points (i.e v1,v2 and v3) for the independent variables as illustrated in Figure 4.14. The simulator will use these few points to find the piecewise linear approximations of the nonlinear equations. The advantage is the freedom of simulation style. For high speed simulation the number of points must be less and conversely for higher in accuracy.

4.2.4

Non-linear Differential-Algebraic Equation system

The nonlinear DAEs is the combination of all types of available network. The basic configuration of nonlinear differential-algebraic network can be illustrated as in Figure 4.15 C2

R2

v1

Isrc

R1

C1

v2

R3

i=v2

Figure 4.15: Nonlinear differential-algebraic network example [21]

The general step to solve the non-linear DAEs is illustrated in Figure 4.16:

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

59

Create KCL for each node Node equations: Σ incoming current = Σ outgoing current

Isolate the derivatives Cv’ = Gv + w w : v2 term v’ = C-1 (Gv + w)

Calculate the predictive value for next timestep vP = v0 + hv’0

Convert differential terms into discrete-time algebraic terms

 v1,n +1 − v1,n    −1  v h− v  = c (Gv + w)  2,n +1 2,n  h  

Run Newton-Raphson to iterate to a solution point ∆v = -J-1f(v)

Figure 4.16: Steps to solve non-linear differential-algebraic network

4.2.4.1

Predictors and Correctors

The Forward Euler’s is used as the predictor in order to guess at what derivative of the function at tn+1 will be. Then, this value will be used as starting point for a corrector algorithm. The concept can be illustrated as in Figure 4.17. x ictor

xn+1 (0) xn+1 (1) xn+1 (2)

corrector

pred

xn

xn+1 (0) xn-1

x NR Iterations h

tn-1

tn

tn+1

t

Figure 4.17: Graphical view of predictor/corrector algorithm [21]

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

60

Starting from tn (current time) , a prediction is made to find the solution at tn+1 (next (0)

time step). The first solution is denoted as xn+1 and a time step is taken. The NR is performed until a solution is reached, then, the new time step is taken and process repeated. The time step size will be reduced if the difference between predicted and corrected values is very large, and, increased if conversely happen.

4.3

Mixed-Signal Mixed-Domain Network Formulation

In analogue mixed-signal simulator a system has to be presented in numerical way so it can be solved by computational method. In the past many ways have been proposed, of them, the tableau and the modified nodal formulation widely accepted because it had proven to be general, simple and computationally efficient. The tableau equations have disadvantage of having a large and sparse matrix even for a small network. Thus, it requires additional sparse matrix solvers to solve the small network. In contrast, the modified nodal formulation technique eliminates some variables from large and sparse matrix and reduces the size of matrix in a simple way. The modified nodal formulation is highly adopted by many simulator since it can be utilised to cover various network elements including electrical and non-electrical. The principle of Modified Nodal Analysis (MNA) is explained in the following paragraph [35, 54]. The generalisation of the MNA method can be deduced by the following equation [35, 54]:

Yr

B

C

D

! ×

V I

! =

J

!

F

The details explanation on each member of the matrix elements in MNA formulation can be described as below: • Yr is the reduced nodal matrix excluding voltage sources, current controlling elements, etc. • B contains partial derivatives of the Kirchoff current equation with respect to the additional current variables with ± 1’s for the elements whose branch are introduced. • C and D represents the differentiation of branch constitutive relations with respect to the unknown vector. • J and F are the excitations vector.

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

61

The following example illustrates the application of Nodal Analysis(NA) method in electrical network formulation: G1

A J1

iAB

B iB

G2

Figure 4.18: Example of resistive circuit

Each element in the network as in Figure 4.18 is represented by specific matrix stamp as shown below: The stamp for the resistor R1 VA

VB

RHS

A

G1

−G1

B

−G1

G1

The stamp for the resistor R2 VA

VB

RHS

A B

G2

The stamp for the independent current source J1 VA

VB

RHS

A

J1

B Combining all stamps will form a complete system matrix that represent the circuit in Figure 4.18. VA

VB

RHS

A

G1

−G1

J1

B

−G1

G1 +G2

Where the G and J represents the conductance and current respectively. Although classical Nodal Analysis capable to formulate the electrical network, it has severe limitation in expressing the voltage source and the current-dependant circuit elements. Thus, another version namely Modified Nodal Analysis(MNA) is proposed

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

62

in paper [35]. In order to process the voltage source or current dependant, the branch relations is introduced which produce additional current as new output variables. The approach proven more efficient than few approaches such as Norton equivalent, Gyrator and small or negative resistance. The MNA solution handle the mentioned issue while preserving the advantages of nodal approach. This can be proven by the following example:

R

A EA

B

IE

Figure 4.19: The voltage and resistor network

The classical nodal formulation will not able to process the voltage source since the current relation of that branch does not exist. Through modified nodal approach it can be solved by introducing a new branch current,(IE ) as an additional output variables. Thus, the circuit in Figure 4.19 can be formulated as: The stamp for the resistor R VA

VB

A

G

−G

B

−G

G

RHS

The stamp for the voltage source EA VA

VB

A

IE

RHS

1

B IE

1

EA

The complete MNA formulation for the electrical network as in Figure 4.19 can be described as: VA

VB

IE

A

G

−G

1

B

−G

G

IE

1

RHS

EA

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

63

The method on how the formulation of matrix system based on MNA stamping can be illustrated as in Figure 4.20. START

Scan component

Read MNA stamps

Allocate Equation Matrix array

Assign Colomn & Row

Fill the array with MNA stamps

YES Next Component?

NO STOP

Figure 4.20: Flowchart MNA matrix formulation Node2

Node1

G Col1

Col2

Row1

G

-G

Row2

-G

G

Figure 4.21: MNA matrix for one resistor

The four elements in the resistor MNA stamp can be declared as follows: ResistorStamp(node1,node1,G1); ResistorStamp(node1,node2,-G1); ResistorStamp(node2,node1,-G1); ResistorStamp(node2,node2,G1);

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

64

The matrix function will allocate the size of the matrix array based on number of nodes in the component. In the case of resistor, the matrix size will be [2 by 2] because it has two rows and two columns. The next function will fill the matrix system with the stamps based on the column and row allocation. Row[1] Col[1]= G; Row[1] Col[2]=-G; Row[2] Col[1]=-G; Row[2]Col[2]=G;

Node2

Node1

G1

Node2

G2

Node3

Col1

Col2

Row1

G1

-G1

Row2

-G1

G1+G2

-G2

-G2

G2

Row3

Col3

Figure 4.22: MNA matrix for two resistors

The second resistor as in Figure 4.22 is added in the circuit to show the automatic matrix formulation for a network. The nodes for the second resistor will start from the connection point from previous resistor. The total number of nodes becomes three and as a result the system matrix size becomes [3 by 3]. ResistorStamp(node2,node2,G); ResistorStamp(node2,node3,-G); ResistorStamp(node3,node2,-G); ResistorStamp(node3,node3,G);

Row[1]Col[1]= G1; Row[1]Col[2]= -G1; Row[1]Col[3]= 0; Row[2]Col[1]= -G; Row[2]Col[2]= G1+G2; Row[2]Col[3]= -G2; Row[3]Col[1]= 0; Row[3]Col[2]= -G2; Row[3]Col[3]= G2;

4.3.1

MNA formulation for nonlinear element

For nonlinear analysis the equation formulation can be made in similar manner to that used in the linear case [7, 58, 73]. The general form of the network equation can be written as differential algebraic form:

˙ t) = 0, F (x(t), x(t),

t ≥ 0,

x(0) = x0

(4.12)

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

65

where x(t) vector contains node and branch voltages, branch current, inductor fluxes ˙ is a vector of unknown derivatives with respect to time, t is and capacitor voltages, x(t) time, x(0) is the initial value of the solution vector. The Equation 4.12 can be transformed to an algebraic set by replacing the time derivatives at each time point tn , (n=1,2,..). This can be done by applying the discrete linear differentiation formula:

hn .xn =

p X

αi xn−i + hn

i=0

p X

βi xn−i

(4.13)

i=0

where, hn = tn − tn−1 is the current time step, and αi , βi are the coefficients whose values depend on hn ,hn−1 ,... The formula in Equation 4.13 is referred as to be of order r when,

LT E = hn kx˙ n (tn ) − x˙ n k = O(hr+1 )

(4.14)

where LTE is the Local Truncation Error which introduced due to the discretisation process. The Equation 4.13 can be solved by various methods. Four of them as presented in the following paragraph:

1. Fixed-step method

First-order Backward Euler method: hn x˙ n = xn − xn−1

(4.15)

Second-order Trapezoidal method: hn

2. Variable-step method

x˙ n − x˙ n−1 = xn − xn−1 2

(4.16)

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

66

Second-order Shichman method: hn x˙ n =

2hn + hn−1 hn + hn−1 h2n xn − xn−1 + xn−2 hn + hn−1 hn−1 hn−1 (hn + hn−1 )

(4.17)

Variable-order Backward Differentiation Formula: hn x˙ n =

p X

βi xn−i

(4.18)

i=0

The Trapezoidal method is the popular choice for the circuit simulator such as SPICE. The BDF method is very desirable in circuit simulation due to their greater numerical efficiency and excellent stability properties in the case of stiff systems. In order to distinguish between the unknown present values of primary circuit variables xn and the past values xn−1 (i=1,2,..,p), Equation 4.13 can be rewrite as [46]:

hn x˙n = α0 xn + Xx,n

(4.19)

and the second term can be expressed as:

Xx,n =

p X (αi xn−i + hn βi xn−i )

(4.20)

i=0

which contains only past information and

α0 hn

is referred as the time discretisation op-

erator(S). As an example, in SystemC-A, the discretisation operator S and Xn defined as:

at time = 0, S = else S =

1 , Xn = Svn−1 hn

2 , Xn = Svn−1 − vn−1 ˙ hn

By applying the discretisation Equation 4.19 to the original Equation 4.12 yields a system of algebraic nonlinear equations for every discrete time point tn , (n=0,1,2,..) as described by:

˜ n) = 0 f (x

(4.21)

Chapter 4 Multi-domain Mixed-signal Design : Simulation Techniques

67

The non-linear formulation for transient simulation can be illustrated by the non-linear element such as capacitor. The excitation current through capacitor between terminal i and j is given by:

iij = C

dVij dt

where, iij is the capacitor current, C is the capacitance value,

(4.22) dVij dt

is the value of

capacitor voltage with respect to time. Following the formulation scheme in Equation 4.19,4.20, the discretise current can be expressed as:

iij = C(Svij,n + Xij,n (vij,n−1 , vij,n−1 ˙ , ..))

(4.23)

Thus, the MNA matrix stamp for nonlinear capacitor can be derived as: vi

vj

RHS

i

SC

-SC

−SCvi − CXa + SCvj + CXj

j

-SC

SC

SCvi + CXa − SCvj − CXj

vi

vj

RHS

i

SC

-SC

−C v˙ij

j

-SC

SC

C v˙ij

4.4

Summary

The methods discussed here will be very useful for creating an analogue simulator for extending a high potential digital simulator such as SystemC. Basically, the core engine in mixed-signal mixed-domain simulator is the solver which can handle four types of networks (linear algebraic equation, linear differential algebraic equation, non-linear algebraic equation and,non-linear differential algebraic equation). In general, all networks will be transformed into linear system by linearisation techniques such as Newton Raphson, Piecewise and Predictor-corrector. Then it will be solved by linear method such as Gaussian, LU factorisation, etc. The linearisation technique is the key factor in solving the complexities in non-linear system through approximation. The most widely network formulation technique that used to describe a system in analogue mixed-signal mixed-domain design also discussed. The technique is namely as Modified Nodal Analysis(MNA). The MNA formulation is not only limited to electrical components. In fact, the same method is combined with the formulation of the nonelectrical components. Thus, all of the components in mixed domain system can be put in the same matrix and solved simultaneously by using one common solver.

Chapter 5

PDE extension in SystemC-A : Mixed-physical domain design

5.1

Introduction

The highly complex mixed-signal mixed-domain such as found in micro-electromechanical system(MEMS) nowadays is still looking for further advancement in the area of design automation tools. Although various approaches such as equivalent circuit and reduced order model have been used extensively, the accuracy of the model still can be improved further by describing the system as close as possible to the actual physical behaviour[48, 77, 86]. Few previous works have also shown a potential achievement in extending the powerful language such as VHDL-AMS, however, the language standardised syntax barrier stills a huge obstacle[67, 94]. Recently, a new generation of hardware description language namely SystemC has created a great potential to be further extended because of the inheritance of flexibility in C++ language[32, 39]. Thus, it makes the simulation language extension work becoming more feasible. Moreover, the CAD tools based on the C++ language will provides the missing link between software and hardware simulation in the unified simulation framework. Hence, the analogue extension of SystemC language such as SystemC-A can be further exploited with integration of more advanced solution methods to enable the distributed physical models which precisely presented in the form of partial differential equations(PDE). Therefore, realisation of such design methodologies will provide a better quality-of-result in the area of mixed-signal mixed-domain design simulation. Also, the discrepancy between the simulated model and the actual physical behaviour can be reduced. The following paragraph presents a new approach on extending the SystemC-A language into PDE modelling. The highly-complex mixed-physical design such as MEMS electrostatic micro-generator 68

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

69

with gap closing variable capacitor is chosen to emphasize the importance of the PDE extension.

5.2

Partial Differential Equation(PDE) extension in SystemCA

In order to enable the PDE model solving in mixed-domain transient simulator such as SystemC-A, the PDE needs to be transformed into series of first-order space and firstorder time dependent ODEs. This is due to the fact that, the integration method in the simulator solver is design specifically for handling the first-order ODEs. The trapezoidal method in SystemC-A will be utilised to solve the first-order ODEs model. The higher order of PDE models will be processes in two stage of transformations before it can be fed into SystemC-A simulator. In the first stage, a new method to discretise the PDEs over space has to be introduced. Secondly, for higher order time dependant variables has to be converted into series of first-order time dependent equations as presented in Figure 5.1.

Space Discretisation Model Input

PDE

Reduce Order Time

First-order Space Higher-order time ODE

Numerical Integration

First-order space and time ODE

Numerical Solution

Figure 5.1: Numerical approach to solve PDE in SystemC-A

The aim of PDE extension integration is focuses to capture the distributed effect governed by the partial equations in mixed-signal mixed-physical design in SystemC-A. The space quantities will be sliced into uniform grid and the solutions has to be found for each of the points on the specified grid. Unlike closed form solution, the time slicing in SystemC-A simulation will be handled by the simulator. The total grid for the time quantity is determined by time-step size and the total run time simulation. The solutions in time domain are represented as an unknown array in the global matrix and have to be updated forwardly for each time-step. The grid representation of SystemC-A simulation for solving the partial differential equation illustrated as in Figure 5.2.

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

Solution, U(x,t)

Bo

un

r da

on yC

i on dit

Bo

U(0,n) U(0,4)

U(1,n)

U(0,3) U(0,2)

U(1,3)

U(0,1)

U(1,2) U(1,1)

U(2,4) U(2,3)

U(2,2) U(2,1)

r

U(n,4) U(n,3)

U(3,3)

nd

itio

n

Time,t

U(3,n) U(3,4)

U(3,2) U(3,1)

da

U(n,n)

U(2,n)

U(1,4)

un

o yC

70

t=tn

t=t3

t=t2

U(n,2) t=t1

U(n,1) t=t0

U(0,0) x=x0

U(1,0) x=x1

U(2,0) x=x2

U(3,0)

U(n,0)

x=x3

x=xn

Initial Condition

Space, x

Figure 5.2: 1-Dimension space grids in SystemC-A

The overview of the possible implementation for the extension in SystemC-A language to enable the modelling of non-linear PDE system can be illustrated by the flowchart as in Figure 5.3. The attempt is made to generalise the extension so that the solver is not restricted to specific form of partial differential equation.

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

71

PDE Model

PDE Equation Description - SystemC-A syntax User Input Initial Condition, Boundary Condition, No. of mesh points, Spatial step size

Spatial Discretisation Function discretise the spatial quantity by Finite Difference method time derivative handled by Taylor method in SystemC-A

Simultaneous Ordinary Differential Equation

Build PDE Matrix Build Matrix method

Nonlinear Equation Solving Newton Raphson method

Linear Equation Solving Solve Linear Matrix

Update Solution

NO Convergence? YES Final Solution

Figure 5.3: Nonlinear PDE solving in SystemC-A environment

In PDE model description the user needs to define inputs which include the mathematical equation, geometrical and temporal properties. The specified inputs which represent data of the PDE model will be consists of initial condition, boundary condition, number of mesh/grid points, spatial step size, spatial domain and PDE parameters.

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

72

The total number of mesh/grid points and spatial step size is used to discretise the spatial domain quantities. As a result, the lumped structure will be sliced into few segments and the equation will be solved in distributed way for each of the grids. The PDE solving needs the spatial discretisation handler to transforms the high order partial differential equation into a series of ordinary differential equation(ODE). The discretisation will eliminates all the higher order space derivatives. Both of the initial values and the boundary values need to be substituted into descriptive equation for obtaining the complete form of transformed equation. The output from the discretisation process will be used to create the sequence of equation and will be mapped on to discretised grids. The similar virtual build method in component class of SystemC-A is used in order to create the system matrix of the PDE model. For the case of mixed-physical design, the matrix stamp from the other components will be appended in the same matrix as PDE model. The solution methods in SystemC-A which is Newton-Raphson iteration and LU matrix solving will be performed as the standard integration method in the SystemC-A solver. The hierarchy for the object-oriented classes for the PDE extension in SystemC-A can be viewed as in Figure 5.4.

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

Abstract class Partial Differential Eqn

SystemC-A Abstract base class Component

Derived class Circuit-level

73

Derived class Non-electrical

PDE equation Initial Condition Time = 0 y(0,x) y’(0,x) Boundary Condition Left edge Right edge Top edge Bottom edge Spatial Descritizer No. of mesh points/ coordinate Spatial Step Size Higher order ODEs wrt time Reduce Order Series of first ODEs wrt time

PDE Matrix Build Jacobian Matrix entry

Derived class Cantilever beam ρS

∂2z + CI ∂t 2

∂4w ∂5z + EI =F ∂x 4 ∂x 4 ∂x

Derived class Membrane ∂ 4w ∂ 4w ∂ 4w +2 D +D = ∂x 4 ∂x 4 ∂x 4 dw d 2w p − k − ρh dt dt 2

D

Derived class Transmission line −

∂V ∂I = L ∂z ∂t



∂I dV = C ∂z dt

Derived class User define

Figure 5.4: Class Hierarchy for Extending the SystemC-A into PDE solving

A new abstract base class namely PDE will be derived from the component base class in SystemC-A. The PDE base class will contains few virtual methods for specifying the initial condition, the boundary condition and the PDE build method. The PDE specific related functions which consists of spatial discretisation and reduce order implemented in the PDE base class and will be called in the derived PDE components. There are few new elements and new functions will be implemented in order to describe the partial differential equation model in SystemC-A as discussed in the following paragraph.

5.2.0.1

Partial Quantity

The new dependent variable in a partial differential equation can be introduced by derivation of a new analogue system variable from sc a system variable abstract base class in the SystemC-A as in Figure 5.5.

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

74

SystemC A System variable

Node

Flow

Free Quantity

Partial Quantity

Figure 5.5: Partial Quantity as Analogue Variable in SystemC-A

Since the partial quantity is inherit from the SystemC-A variable class, the link-list method in SystemC-A will recognise the partial quantity as system variable and will be inserted in the global link-list. The variables in the global list will be used by analogue solver in SystemC-A to form the system matrix and the size of the matrix will be determined by number of unknowns exist in the global link-list.

5.2.0.2

PDE Description

The partial derivatives in PDE can be described as P DE(”U ”, x, n) which will represent the partial derivative of partial quantity U with respect to x and the n input represent the order of the derivative. For example P DE(”U ”, x, 2) will represent

∂2u . ∂x2

For case of

more than one spatial quantities the description can be expressed as P DE(”U ”, x, 2, y, 3) which represent

5.2.0.3

∂5u . ∂x2 ∂y 3

PDE Mesh

The meshing has to be defined in order to find the solution with respect to their mesh grid location. For one-dimensional space case, the input to the PDE mesh function will be the to number of grid and the length of the space quantity. The function will calculate the spatial step size based on the two inputs. The function of P DEmesh(”U ”, N, L) will be used to specify the user input. The U represents the partial quantity, N is the total number of discretise nodes, and L is the length of the model. For example, P DEmesh(”U ”, 100.0, 1.0) will represents the partial quantity U will be distributed about 100 points along 1 unit length with the step size of 0.01.

5.2.0.4

PDE Initial Condition

The initial condition can be specified as P DEInitC(”U ”, i, value). The P DEInitC function will be scan by the analogue solver in the initial stage before the simulation starts. It can be referred as simulation time equal to zero. For example, P DEInitC(”U ”, 0, 10.0) will assign a value of 10 to the the solution at zero node. For the case of initial condition with derivatives, it can be described as P DEInitD(”U ”, x, n, i, value), similar to

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

75

declaration in the derivatives function. For example, P DEInitD(”U ”, t, 1, 0, 0.0) will represents

5.2.0.5

∂u ∂t

= 0.0.

PDE Boundary Condition

The declaration of the boundary condition is similar to the initial condition function. The solver will not scan the boundary condition. Instead, the boundary condition will be used by the discretise function to determine the solution values at specified boundary.The declaration of boundary condition can be specified as P DEBndy(”U ”, i, value). For example, P DEBndy(”U ”, 10.0, 0.0) will assign zero value to the dependent unknown variable at node number 10. For boundary with derivatives, it can be described as P DEBndyD(”U ”, x, 1, 10.0, 0.0), which represents

5.2.0.6

∂u ∂x

= 0.0 at node 10.

PDE Build

The P DEqn(N, −C ∗ P DE(”U ”, x, 2) − D ∗ P DE(”U ”, x, 2, y, 2) + E) function is used to build the system matrix. This function will call the build methods from abstract component class. The function will pass the PDE equation to the RHS in buildB methods. The RHS input will be used to approximate the Jacobian matrix entries using Newton-Quasi Newton method. The Newton-Quasi Newton method uses secant difference method to approximate the Jacobian matrix entries. This technique will help the user by automating the matrix entries. The transformation of PDE into ODE will create a large number of unknown arrays. Thus, the cumbersome will be eliminated using automated approximation with the cost of less in accuracy. Once the matrix formulation has been completed, the Newton-Raphson iteration will be activated. The matrix will be reformulated in each iteration until Newton-Raphson converge and the PDE solution values will be taken at the point where iteration stops.

5.2.0.7

PDE discretisation

The discretisation of PDE can be achieved by using coefficient matrix technique. Through the finite difference method scheme, the stamp of the coefficient matrix can be derived as in the following paragraph. The first(n=0) and the last node(n=N) of the PDE model are given by the boundary conditions. The coefficient matrix covers the interior nodes of the discretised segments. The A, B, C, D and E represents the stamp for the coefficient matrix. For the first-order: ∂y ∂x

=

yn −yn−1 ∆x

B.yn + A.yn−1

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design Node number

B

A

1

−1/∆x

0

2

1/∆x

−1/∆x

.

.

.

N-2

1/∆x

−1/∆x

N-1

1/∆x

−1/∆x

76

For the second-order: ∂2y ∂x2

=

yn+1 −2yn +yn−1 ∆x2

C.yn+1 + B.yn + A.yn−1

Node number

C

B

A

1

1/∆x2

−2/∆x2

0

2

1/∆x2

−1/∆x2

1/∆x2

.

.

.

.

N-2

1/∆x2

−2/∆x2

1/∆x2

N-1

0

−2/∆x2

1/∆x2

For the third-order: ∂3y ∂x3

=

yn+1 −3yn +3yn−1 +yn−2 ∆x3

D.yn+1 + C.yn + B.yn−1 + A.yn−2

Node number

D

C

B

A

1

−3/∆x3

1/∆x3

0

0

2

3/∆x3

−3/∆x3

1/∆x3

0

.

.

.

.

.

N-2

1/∆x3

3/∆x3

−3/∆x3

1/∆x3

N-1

0

3/∆x3

−3/∆x3

1/∆x3

For the fourth-order: ∂4y ∂x4

=

yn+2 −4yn+1 +6yn −4yn−1 +yn−2 ∆x4

E.yn+2 + D.yn+1 + C.yn + B.yn−1 + A.yn−2

Node number

E

D

C

B

A

1

6/∆x4

−4/∆x4

1/∆x4

0

0

2

−4/∆x4

6/∆x4

−4/∆x4

1/∆x4

0

.

.

.

.

.

.

N-2

0

1/∆x4

−4/∆x4

6/∆x4

−4/∆x4

N-1

0

0

1/∆x4

−4/∆x4

6/∆x4

The example of generated coefficient matrix for the fourth-order of PDE with 10 segmentation and spatial step size of 0.1 and can be shown as below:

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

77

60000 −40000 10000 0 0 0 0 0 0 0 0 0 0 0 −40000 60000 −40000 10000 10000 −40000 60000 −40000 10000 0 0 0 0 0 10000 −40000 60000 −40000 10000 0 0 0 0 0 10000 −40000 60000 −40000 10000 0 0 0 0 0 10000 −40000 60000 −40000 10000 0 0 0 0 0 10000 −40000 60000 −40000 10000 0 0 0 0 0 10000 −40000 60000 −40000 0 0 0 0 0 0 10000 −40000 60000 One of the possible approaches of solving the partial differential equation under SystemCA is through explicit approach. The steps for the explicit method can be illustrated by solving the mixed PDE as in Equation 5.1. ∂y(x, t) ∂3y = − 2 + y(x, t) ∂t ∂x ∂t

(5.1)

where y is the dependant variable, x is the spatial independent variable and t is the time independent variable. 2

∂ y The first step is to discretise the second-order spatial quantity, ∂x 2 into first-order or-

dinary differential equation. Following the finite difference scheme, the mixed partial derivative in Equation 5.1 can be transformed as: dyn (x, t) 1 dyn+1 (x, t) dyn (x, t) dyn−1 (x, t) =− ( −2 + ) + y(x, t) 2 dt ∆x dt dt dt

(5.2)

hysical length where ∆x (= NPo.of discretised ) is the spatial discretised step size and n is the node number

along the space. The implementation for solving the partial differential equation in Equation 5.2 can be realised in SystemC-A as shown in the listing below. ..... ..... # define PI 3.14159265 ..... mixPDE :: mixPDE ( char nameC [5]): component ( nameC ,0 ,0 ,0){ y0q y1q y2q y3q y4q y5q }

= = = = = =

new new new new new new

Quantity (" y0q "); Quantity (" y1q "); Quantity (" y2q "); Quantity (" y3q "); Quantity (" y4q "); Quantity (" y5q ");

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

mixPDE ::~ mixPDE (){} void mixPDE :: show (){ cout * Z1 , sc_signal < double >* Z2 , sc_signal < double >* Z3 , sc_signal < double >* Z4 , sc_signal < double >* Z5 , double E , double I , double T , double W , double L , double segment ): PDE_component ( nameC , node_a , node_b ,0){ Z0q = new P ar ti al Q ua nt it y (" Z0q "); // node0 Z1q = new P ar ti al Q ua nt it y (" Z1q "); // node1 Z2q = new P ar ti al Q ua nt it y (" Z2q "); // node2 Z3q = new P ar ti al Q ua nt it y (" Z3q "); // node3 .... .... Ue1q = new Pa r ti al Qu a nt it y (" Ue1q "); // node0 Ue2q = new Pa r ti al Qu a nt it y (" Ue2q "); // node1 Ue3q = new Pa r ti al Qu a nt it y (" Ue3q "); // node2 Ue4q = new Pa r ti al Qu a nt it y (" Ue4q "); // node3 } MEMSSWITCH ::~ MEMSSWITCH (){} void MEMSSWITCH :: show (){ cout write ( Z1 ); Z2_sig -> write ( Z2 ); Z3_sig -> write ( Z3 ); .... .... Z7_sig -> write ( Z7 ); Z8_sig -> write ( Z8 ); Z9_sig -> write ( Z9 ); Z10_sig -> write ( Z10 ); }

The user can create the MEMS switch using the following instantiation. MEMSSWITCH *MEMSSW1 = new MEMSSWITCH("MEMSSW1",node_a,node_b,&Z0,&Z1,&Z2,&Z3,&Z4,&Z5);

5.9.0.9

Transmission Line

The distribution of voltage and current or electric and magnetic field in the transmission line can be modelled as distributed system governed by the Telegrapher’s equation. For the lossy transmission line model, the mathematical discretisation of partial differential equation can be derived as [43, 45]: V0

R G

L I1

V1 C

R G

L I2

V2 C

R G

L IN

VN

C

IN+1

Lossy RLGC-ladder

Figure 5.21: Discretise of the lossy transmission line

∂V (x, t) ∂I(x, t) +L∗ = −R ∗ I(x, t) ∂x ∂t ∂I(x, t) ∂V (x, t) +C ∗ = −G ∗ V (x, t) ∂x ∂t

(5.59)

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

107

For the case of N = 5 segmentation (n =0,1,2,3,4) The set of initial condition is given by: I(x, 0) = I0 (x) V (x, 0) = V0 (x)

and, the boundary condition is given by: I(0, t) = I0 (x) V (0, t) = V0 (x) Vin = Vs − Iin Zs Vout = Iout ZL

V1 − Vin ∂Iin )=L∗ + R ∗ Iin ∆x ∂t I2 − I1 ∂V1 −( )=C∗ + G ∗ V1 ∆x ∂t ∂I2 V2 − V1 )=L∗ + R ∗ I2 −( ∆x ∂t I3 − I2 ∂V2 −( )=C∗ + G ∗ V2 ∆x ∂t ∂I3 V3 − V2 )=L∗ + R ∗ I3 −( ∆x ∂t I4 − I3 ∂V3 −( )=C∗ + G ∗ V3 ∆x ∂t ∂I4 V4 − V3 −( )=L∗ + R ∗ I4 ∆x ∂t I5 − I4 ∂V4 −( )=C∗ + G ∗ V4 ∆x ∂t ∂I5 Vout − V4 −( )=L∗ + R ∗ I5 ∆x ∂t ∂Vout Iout − I5 −( )=C∗ + G ∗ Vout ∆x ∂t −(

The class library model for the lossy transmission line can be implemented as in the following listing. ... ... TLossy :: TLossy ( char nameC [5] , SystemV ariable * node_a , System Variabl e * node_b , sc_signal < double >* Vsupply1 , sc_signal < double >* Vout1 , sc_signal < double >* Iout1 , double Zs , double ZL , double lenght , double segment , double L , double C , double R , double G ): PDE_component ( nameC , node_a , node_b ,0){

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

Vsup_sig = Vsupply1 ; Vout_sig = Vout1 ; Iout_sig = Iout1 ; V0q = new P ar ti al Q ua nt it y (" V0q "); V1q = new P ar ti al Q ua nt it y (" V1q "); V2q = new P ar ti al Q ua nt it y (" V2q "); .... .... Vinq = new Pa r ti al Qu a nt it y (" Vinq "); Voutq = new Pa rt ia l Qu an ti t y (" Voutq "); I1q = new P ar ti al Q ua nt it y (" I1q "); I2q = new P ar ti al Q ua nt it y (" I2q "); I3q = new P ar ti al Q ua nt it y (" I3q "); .... .... Iinq = new Pa r ti al Qu a nt it y (" Iinq "); Ioutq = new Pa rt ia l Qu an ti t y (" Ioutq "); } TLOSSY ::~ TLOSSY (){} void TLOSSY :: show (){ cout write ( Vout ); Iout_sig -> write ( Iout ) }

The user can create the lossy component using the following instantiation. TLossy *TL1 = new TLossy("TL1",node_a,node_b,&Vsupply1,&Vout1,&Iout1,Zs,ZL,length,segment,L,C,R,G);

For the lossless transmission line, the value of resistance and conductance in the discretise transmission line are equal to zero. V0

L I2

V1

C

L I2

V2

L IN

C

VN

C

IN+1

Lossless LC-ladder

Figure 5.22: Discretise of the lossless transmission line

The same set of initial condition and boundary condition applies as in the lossy case, and for the same 5 segmentations the similar mathematical difference equation can be derived:

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

110

∂Iin V1 − Vin )=L∗ ∆x ∂t I2 − I1 ∂V1 −( )=C∗ ∆x ∂t V2 − V1 ∂I2 −( )=L∗ ∆x ∂t I3 − I2 ∂V2 −( )=C∗ ∆x ∂t ∂I3 V3 − V2 )=L∗ −( ∆x ∂t I4 − I3 ∂V3 −( )=C∗ ∆x ∂t V4 − V3 ∂I4 −( )=L∗ ∆x ∂t I5 − I4 ∂V4 −( )=C∗ ∆x ∂t Vout − V4 ∂I5 −( )=L∗ ∆x ∂t Iout − I5 ∂Vout −( )=C∗ ∆x ∂t −(

The implementation of lossless transmission line PDE component library similar to the lossy with R and G terms omitted from the equations. ... ... TLossless :: TLossless ( char nameC [5] , S ystemVar iable * node_a , SystemV ariable * node_b , sc_signal < double >* Vsupply1 , sc_signal < double >* Vout1 , sc_signal < double >* Iout1 , double Zs , double ZL , double lenght , double segment , double L , double C ) : PDE_component ( nameC , node_a , node_b ,0){ Vsup_sig = Vsupply1 ; Vout_sig = Vout1 ; Iout_sig = Iout1 ; V0q = new P ar ti al Q ua nt it y (" V0q "); V1q = new P ar ti al Q ua nt it y (" V1q "); V2q = new P ar ti al Q ua nt it y (" V2q "); .... .... Vinq = new Pa r ti al Qu a nt it y (" Vinq "); Voutq = new Pa rt ia l Qu an ti t y (" Voutq "); I1q = new P ar ti al Q ua nt it y (" I1q "); I2q = new P ar ti al Q ua nt it y (" I2q "); I3q = new P ar ti al Q ua nt it y (" I3q "); .... .... Iinq = new Pa r ti al Qu a nt it y (" Iinq "); Ioutq = new Pa rt ia l Qu an ti t y (" Ioutq ");

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

111

} TLOSSLESS ::~ TLOSSLESS (){} void TLOSSLESS :: show (){ cout write ( Vout ); Iout_sig -> write ( Iout ) }

The user can create the lossless transmission line component using the following instantiation.

Chapter 5 PDE extension in SystemC-A : Mixed-physical domain design

112

TLossless *TL2 = new TLossless("TL2",node_a,node_b,&Vsupply1,&Vout1,&Iout1,Zs,ZL,lenght,segment,L,C);

5.10

Summary

In this chapter, a method to integrate the partial differential equation extension for SystemC-A language is demonstrated. New classes and extension elements are introduced in order to enable the support for the partial differential equation solving. A technique namely method-of-line has been used to transform the partial differential equation into ordinary differential equation. The transformed equation is then solved by trapezoidal method in SystemC-A. The main case study is aimed to describe the distributed deflection of MEMS variable capacitor fingers with highly-complex fourthorder euler-bernoulli equation. The novelty of the idea is to capture the failures due to distributed bending exist in nature of MEMS capacitive fingers structure. The proposed approach is in line with the idea of improving the existing method which mainly approximates the distributed system by lumped model as discussed in Chapter 3. By applying the partial differential equation to govern the motion of the capacitive fingers, it is shown that the non-uniform deflection of the structure can be captured well in SystemC-A simulation. This will be very helpful to aid more accurate physical design such as mechanical stopper to prevent fatal failures in the micropower supply system such as stiction and short circuit condition. The concept of creating dedicated classes for generic PDE components library also proposed as an alternative approach to implement the PDE support in SystemC-A. The library is intended to ease the PDE modelling by providing basic PDE models. Hence, a large PDE system can be constructed by instantiation from basic PDE model in the library.

Chapter 6

Conclusion and Future Work 6.1

Conclusion

In this thesis the recent state-of-art in system-level mixed-signal mixed-domain modelling and simulation technique have been explored. The review is devoted to explore the significant lack in the existing analogue hardware design tools. It was revealed that, the upcoming SoC is becoming more highly heterogeneous and requires a support for more accurate mixed-physical modelling. It was discovered, in order to achieve more precise physical-based modelling, the distributed phenomenon needs to be governed by the partial differential equation. However, the support for the unified partial differential equation in existing hardware simulation tools still in very limited. Hence, the main contribution is set to find a method for solving the physical-based model in analogue mixed-physical mixed-domain simulation. A new proposal for developing a new hardware description language extension to support the partial differential equation models in SystemC-A language has been outlined in details in Chapter 5. The time response simulation result of second-order mixed PDE time-dependant wave model and the highly-complex distributed model of the MEMS variable capacitor fingers deflection has been demonstrated. It has been shown by utilising the partial differential equation, the distributed phenomenon can be captured in SystemC-A which can be used as an improvement to the existing lumped-model approach. The concept of PDE library has been also introduced into SystemC-A as an alternative approach in order to support the component based PDE modelling.

113

Chapter 6 Conclusion and Future Work

6.2 6.2.1

114

Future Work PDE general extension for SystemC-A

For supporting PDE modelling in more natural way, an interpreter needs to be integrated in the SystemC-A solver. The interpreter not only used to interpret the text in PDE model input it also need to be combined with the numerical parts such discretisation rule and boundary conditions handler. Thus, the support for direct PDE modelling technique in SystemC-A can be realised. In line with the motivation of extendible simulator, an alternative numerical solution such as different integration methods can be included as an option in solving various type of partial differential equations. In order to support modelling of more complex geometrical components, various type of domains and mesh generator needs to be implemented.

6.2.2

Component library of PDE models for SystemC-A

The generic PDE models that being used widely in the area of analogue mixed-physical domain design can be modelled as PDE components. The new PDE library in SystemCA can be created to save the basic PDE models. These basic components will have their own PDE class derived from the PDE abstract class. The user can instantiate these generic PDE components directly from the library. Furthermore, mixed-physical PDE system design can be constructed from these basic components. The user only needs to create the interconnections between the components in the top level module. The required PDE parameters can be assigned to the instantiated model. Example of the PDE generic model that can be included in the library consists of cantilever beam, suspended beam, transmission line and rectangular plates, etc.

6.2.3

Electrostatic micro-generator for energy harvesters application

The variable capacitance produced by the gap closing capacitive fingers model can be used to simulate the generation of the electrical power from the mechanical vibration input. The power processing circuit block to harvest the energy generated by the variable capacitance mechanism needs to be included in the design. The technique to harvest the electrical energy from the electrostatic generator can be accomplished by the chargepump harvesters model. Diodes circuits will be used as switching for forwarding the charge from variable capacitor to storage capacitor. Various enhanced method of power processing circuit model such as single gate clocking with inductive flyback circuit should be utilised in the overall design of the electrostatic micro energy harvesters.

Chapter 6 Conclusion and Future Work

6.2.4

115

Failure mode analysis in mechanical dynamic AMS simulation

With the integration of PDE solving, failure mode analysis in mechanical dynamic simulation for multi-domain design such in MEMS electrostatic micro-generator can be performed. The thin capacitive fingers structure which highly prone to multi failures for several resonance frequencies can be investigated. The major failure in the system is short-circuit condition due to large deflection that occurs at several frequencies. The predicted of failure modes types for the MEMS capacitive with subject to the vibration condition can be illustrated as in Figure 6.1 [84]. Capacitive plates lenght z0

Discretised Sections z1 z2 z3

z4

Failure Mode-1

Proof Mass

Fixed-plates

Failure Mode-2

Proof Mass

Fixed-plates

Proof Mass

Fixed-plates

Proof Mass

Fixed-plates

Failure Mode-3

Failure Mode-4

Figure 6.1: Failure Mode in Dynamic System-level Simulation of MEMS Variable Capacitor

6.2.5

Design and Performance Optimisation in SystemC-A

The advantages of the simulator based on C++ language is the flexibility in the simulation framework. The unified design and optimisation tasks are the key factor for finding the optimal performance with respect to given constraints. There are many type of automated agent can be employed to find the best objective functions. Amongst them, genetic-algorithm, neural-network, fuzzy-logic, simulated-annealing, tabulation method, monte carlo variation, etc. One of the potentials optimisation framework in SystemC-A can be illustrated as in Figure 6.2.

Chapter 6 Conclusion and Future Work

116 Start

New AMS Model

Simulation

Evaluate Performance

Select new Parameter

Select new component from the Library

Y

Need for Optimization ?

N

Y

Further Optimization ?

N End

Figure 6.2: Unified design and performance optimisation in SystemC-A

There are two stages of performance optimisation can be implemented as illustrated in the flowchart. In the first optimisation loop, the genetic algorithm(GA) approach can be utilised as the optimiser block. This is due to the reason, nature of GA with self generating the random probability of possible design parameters makes it well suit the automation work for the optimisation. In the second optimisation loop, further optimisation method can be performed by selection of different components type available from the created library. Thus, the creation of generic PDE model library in the SystemC-A can be fully exploited for this type of performance flow.

Bibliography [1] Open systemc initiative(osci). www.systemc.org. [2] IEEE 1666-2005 Standard SystemC Language Reference Manual (LRM), 2005. [3] IEEE standard VHDL analog and Mixed-Signal Extensions-Packages for multiple energy domain support, 2005. [4] Energy harvesting technologies to enable remote and wireless sensing. Technical report, The Sensors and Instrumentation Knowledge Transfer Network, June 2008. [5] H. Al-Junaid and T Kazmierski. An extension to systemc to allow modelling of analogue and mixed signal systems at different abstraction levels. In SoC Design,Test and Technology Seminar, 2004. [6] H. Al-Junaid and T. Kazmierski. Analogue and mixed-signal extension to systemc. IEE Proceedings Circuits, Devices and Systems, pages 682–690, 2005. ISSN 13502409. [7] Hessa Jassim Al-Junaid. SystemC-A: Analogue and Mixed-Signal Language For High Level System Design. PhD thesis, Faculty of Engineering, Science and Mathematics. School of Electronics and Computer Science, 2006. [8] H. Aljunaid and T.J. Kazmierski. Seams - a systemc environment with analog and mixed-signal extensions. In Proc. International Symposium on Circuits and Systems ISCAS ’04, volume 5, pages V–281–V–284 Vol.5, 2004. [9] G. Arnout. C for system level design. Proceedings Design, Automation and Test in Europe Conference and Exhibition 1999, pages 384–386, 1999. [10] Peter J. Ashenden, Gregory D. Peterson, and Darrell A. Teegarden. The system designer’s guide to VHDL-AMS: analog, mixed-signal, and mixed-technology modeling. Morgan Kaufmann, 2003. ISBN 9781558607491. [11] D. Becker, R. K. Singh, and S. G. Tell. An engineering environment for hardware/software co-simulation. Design Automation Conference, 1992. Proceedings., 29th ACM/IEEE, pages 129–134, 1992.

117

BIBLIOGRAPHY

118

[12] S. P. Beeby, M. J. Tudor, and N. M. White. Energy harvesting vibration sources for microsystems applications. Meas. Sci. Technol, 17:175–195, 2006. [13] J. Bhasker. A SystemC Primer, Second Edition. Star Galaxy Publishing, 2nd edition, January 2004. ISBN 0965039129. [14] D. C. Black and J. Donovan. SystemC: From the Ground Up. Springer, 2004. [15] T. E. Bonnerud, B. Hernes, and T. Ytterdal. A mixed-signal, functional level simulation framework based onsystemc for system-on-a-chip applications. Custom Integrated Circuits, 2001, IEEE Conference on., pages 541–544, 2001. [16] F. Bouchhima, G. Nicolescu, M. Aboulhamid, and M. Abid. Discrete-Continuous simulation model for accurate validation in Component-Based heterogeneous SoC design. In Rapid System Prototyping, IEEE International Workshop on, volume 0, pages 181–187, Los Alamitos, CA, USA, 2005. IEEE Computer Society. [17] Calahan. Computer Aided Network Design. MC-Graw Hill, 1972. [18] J.J. Charlot, H. Levy, N. Milet-Lewis, and T. Zimmer. Vhdl-ams for mixed technology and mixed signal, an overview. In MED’01, 9th IEEE Mediterranean Conference on Control and Automation, Dubrovnik, Croatie, 2001. [19] Yu Shan Chu, Chiung Ting Kuo, and Yi Chu. A mems electrostatic vibrationto-electricity energy converter. The Fifth International Workshop on Micro and Nanotechnology for Power Generation and Energy Conversion Applications, pages 49–52, 2005. [20] P.P. Civalleri and M. Gilli. Circuit models for linear and nonlinear waves. Circuits and Systems I: Fundamental Theory and Applications, IEEE Transactions on, 42 (10):578–582, 1995. ISSN 1057-7122. [21] R. Scott Cooper. The Designer’s Guide to Analog & Mixed-Signal Modeling Illustrated with VHDL-AMS and MAST. Number ISBN 0-9705953-0-1. Avant! Corp., 2001. [22] I. CynApps. Cynlib: A c++ library for hardware description reference manual. Santa Clara, CA, USA, 1999. [23] K. Einwich, C. Grimm, P. Schwarz, and K. Waldschmidt. Mixed-signal extensions for systemc. Extended Papers: Best of FDL, 2. [24] K. Einwich, C. Grimm, A. Vachoux, N. Martinez-Madrid, F. R. Moreno, and C. Meise. Analog mixed signal extensions for systemc. White paper and proposal for the foundation of an OSCI Working Group (SystemC-AMS working group), June, 2002.

BIBLIOGRAPHY

119

[25] G.K. Fedder. Issues in MEMS macromodeling. In Behavioral Modeling and Simulation, 2003. BMAS 2003. Proceedings of the 2003 International Workshop on, pages 64–69, 2003. [26] A. Gerstlauer and D. Gajski. Spec-c language reference manual. 2002. [27] Dennis Gibson, Hal Carter, and Carla Purdy. The use of hardware description languages in the development of microelectromechanical systems. Analog Integrated Circuits and Signal Processing, 28(2):173–180, 2001. [28] G.G.E. Gielen. Cad tools for embedded analogue circuits in mixed-signal integrated systems on chip. IEE Proceedings -Computers and Digital Techniques, 152 (3):317–332, 2005. ISSN 1350-2387. [29] C. Grimm and K. E. A. Vachoux. Systemc-ams requirements, design objectives and rationale,. DATE, Munich, 2003. [30] Christoph Grimm, Martin Barnasconi, Alain Vachoux, and Karsten Einwich. An introduction to modeling embedded analog/mixed-signal systems using systemc ams extensions. OSCI White paper and proposal for the foundation of an OSCI Working Group (SystemC-AMS working group), June 2008. [31] J. P. Grossman. An efficient c++ framework for cycle-based simulation. 2002. [32] T. Grotker. System Design with SystemC. Kluwer Academic Publishers Norwell, MA, USA, 2002. [33] OSCI SystemC-AMS Working Group. Systemc-ams lrm draft 1. 2008. [34] SystemC-AMS Working Group. Systemc-ams release candidate documentation version 0.15. Technical report, Fraunhofer IIS, Division EAS Dresden, 2006. [35] Chung-Wen Ho, A. Ruehli, and P. Brennan. The modified nodal approach to network analysis. Circuits and Systems, IEEE Transactions on, 22(6):504–509, 1975. ISSN 0098-4094. [36] Elmer S. Hung and Stephen D. Senturia. Generating efficient dynamical models for microelectromechanical systems from a few finite-element simulation runs. IEEE JOURNAL OF MICROELECTOMECHANICAL SYSTEMS, VOL. 8:280– 289, 1999. [37] Sorin Alexander Huss. Model engineering in mixed-signal circuit design: a guide to generating accurate behavioral models in VHDL-AMS. Springer, December 2001. ISBN 9780792375982. [38] F. L. Cox III, W. B. Kuhn, J. P. Murray, and S. D. Tynor. Code-level modeling in xspice. Circuits and Systems, 1992. ISCAS’92. Proceedings., 1992 IEEE International Symposium on, 2, 1992.

BIBLIOGRAPHY

120

[39] Open SystemC Initiative(OSCI). Systemc language reference manual version 2.2.0. 2007. [40] Open Verilog International. Verilog-AMS Language Reference Manual Analog & Mixed-Signal Extensions to Verilog HDL, 2002. [41] Haslina Jaafar, Othman Sidek, Azman Miskam, and Shukri Korakkottil. Design and simulation of microelectromechanical system capacitive shunt switches. American J. of Engineering and Applied Sciences, 4:655–660, 2009. [42] M. Jakovljevic, P. A. Fotiu, Z. Mrcarica, and H. Detter. A system-level simulation of complex multi-domain microsystems by using analogue hardware description languages. Sensors and Actuators A: Physical, 82(1-3):30–39, May 2000. ISSN 0924-4247. [43] Y.-L. Jiang. Mathematical modelling on rlcg transmission lines. Nonlinear Analysis: Modelling and Control, Vol. 10:137149, 2005. [44] Le Lann J.M., Sargousse A., Sere Peyrigain P., and Joulia X. Dynamic simulation of partial differential algebraic systems: application to some chemical engineering problems. In 3rd ICL Joint Conference. Toulouse (France)., 1998. [45] Turhan Karaguler. A new method for solving transient lossy transmission line problem. In Numerical Analysis and Its Applications, pages 338–344. 2009. [46] T. Kazmierski. Techniques of Circuit Simulation in Computer-Aided Tools for VLSI System Design. Peter Peregrinus Ltd., Stevenage,U.K, 1986. [47] Rainer Kress. Numerical analysis. Springer, 1998. ISBN 9780387984087. [48] Gabriel Kron. Numerical solution of ordinary and partial differential equations by means of equivalent circuits. Journal of Applied Physics, 16(3):172–186, mar 1945. [49] K. S. Kundert and O. Zinke. The Designer’s Guide to Verilog-Ams. Springer, 2004. [50] Chandramouli Visweswariah Lawrence T. Pillage, Ronald A. Rohrer. Electronic Circuit and System Simulation Methods. MC-Graw Hill, 1998. [51] Zhihua Li, Huili Zhang, and Ling Zheng. Description of PDE models in modelica. In Computer Science and Computational Technology, 2008. ISCSCT ’08. International Symposium on, volume 1, pages 809–813, 2008. [52] S. Y. Liao. Towards a new standard for system-level design. International Conference on Hardware Software Codesign: Proceedings of the eighth international workshop on Hardware/software codesign, 2000:2–6, 2000.

BIBLIOGRAPHY

121

[53] W. Liniger, F.Odeh, and A.Ruehli. Circuit Analysis, Simulation and Design : Integration Methods for the Solution of Circuit Equations. Elsevier, 1986. [54] V. Litovski and M. Zwolinski. VLSI Circuit Simulation and Optimization. Chapman & Hall, 1997. ISBN 0412638606, 9780412638602. [55] M. Lobur. Designing of microelectromechanical structures for built-in systems using CAD tools. In The Experience of Designing and Application of CAD Systems in Microelectronics, 2003. CADSM 2003. Proceedings of the 7th International Conference., pages 77–78, Slavske, Ukraine, 2003. [56] Celoxica Ltd. Handel-C Language Reference Manual, 2002. [57] A. Mantooth, A. Francis, Y. Feng, and W. Zheng. Modelling tools built upon the hardware description language foundation. IET Computers & Digital Techniques, 1(5):519, 2007. ISSN 17518601. [58] W. McCalla and D. Pederson. Elements of Computer-Aided circuit analysis. Circuit Theory, IEEE Transactions on, 18(1):14–26, 1971. ISSN 0018-9324. [59] Scott Meninger, Jose Oscar Mur-Miranda, and Rajeevan Amirtharajah. Vibrationto-electric energy conversion. IEEE Transaction on Very Large Scale Integration (VLSI) Systems, 9:64–76, 2001. [60] Scott Meninger, Jose Oscar Mur-Miranda, Rajeevan Amirtharajah, Anantha Chandrakasan, and Jeffrey Lang. Vibration-to-electric energy conversion. In Proceedings of the 1999 international symposium on Low power electronics and design, pages 48–53, San Diego, California, United States, 1999. ACM. ISBN 1-58113-133X. [61] PD Mitcheson, T Sterken, C He, M Kiziroglou, EM Yeatman, and R Puers. Electrostatic microgenerators. Control and Power Optical and Semiconductor Devices, Vol 41 (4):pp 114 – 119, 2008. [62] Z. Mrcarica, H. Detter, D. Glozic, and V. Litovski. Describing space-continuous models of microelectromechanical devices for behavioral simulation. In EURODAC ’96/EURO-VHDL ’96: Proceedings of the conference on European design automation, pages 316–321, Los Alamitos, CA, USA, 1996. IEEE Computer Society Press. ISBN 0-8186-7573-X. [63] Z. Mrcarica, V. B. Litovski, and H. Detter. Modelling and simulation of microsystems using hardware description language. Microsystem Technologies, 3(2):80–85, feb 1997. [64] T. Mukherjee and G.K. Fedder. Design methodology for mixed-domain systemson-a-chip [mems design]. In Proc. IEEE Computer Society Workshop on System Level Design VLSI ’98, pages 96–101, 1998.

BIBLIOGRAPHY

122

[65] G. Nicolescu, S. Martinez, L. Kriaa, W. Youssef, S. Yoo, B. Charlot, and A. Jerraya. Application of multi-domain and multi-language cosimulation to an optical MEM switch design. In Proceedings of the 2002 Asia and South Pacific Design Automation Conference, page 426. IEEE Computer Society, 2002. ISBN 0-76951441-3. [66] P. V. Nikitin and C. J. R. Shi. Vhdl-ams based modeling and simulation of mixedtechnology microsystems: a tutorial. Integration, the VLSI Journal, 40(3):261–273, 2007. [67] P.V. Nikitin, C.R. Shi, and B. Wan. Modeling partial differential equations in VHDL-AMS [mixed signal systems applications]. In SOC Conference, 2003. Proceedings. IEEE International [Systems-on-Chip], pages 345–348, 2003. [68] Ayyaz Mahmood Paracha, Gilles Amendola, Philippe Basset, and Tarik Bourouina. Vhdl-ams based modeling of electrostatic vibration powered energy harvester using an in-plane overlap plate (ipop) mechanism. The 7th International Workshop on Micro and Nanotechnology for Power Generation and Energy Conversion Applications, pages 125–128, 2007. [69] Shukla Sandeep Patel, Hiren D. Ingredients for Successful System Level Design Methodology. Springer, 2008. [70] F. Pecheux, C. Lallement, and A. Vachoux. Vhdl-ams and verilog-ams as alternative hardware description languages for efficient modeling of multidiscipline systems. IEEE J CAD, 24(2):204–225, 2005. [71] R. Roth and D. Ramanathan. A high-level hardware design methodology using c/c++. High Level Design Validation and TestWorkshop, San Diego, USA, 1999. [72] S. Roundy, P.K. Wright, and J. Rabaey. A study of low level vibrations as a power source for wireless sensor nodes. Computer Communications, 26:1131–1144, July 2003. [73] A. E. Ruehli, editor. Circuit analysis, simulation, and design: general aspects of circuit analysis and design.

North-Holland Publishing Co., 1986.

ISBN

0444878904. [74] R.A. Saleh, B.A.A. Antao, and J. Singh. Multilevel and mixed-domain simulation of analog circuits and systems. IEEE J CAD, 15:68–82, 1996. [75] Shaharuddin Salleh, Albert Y. Zomaya, and Sakhinah Abu Bakar. Computing for numerical methods using Visual C++. Wiley-Interscience, November 2007. ISBN 9780470127957. [76] Y. Sawada and A. Ohsumi. Active vibration control for flexible cantilever beam subject to seismic disturbance. pages 436 –439, sep 1992.

BIBLIOGRAPHY

123

[77] M. Schlegel, F. Bennini, J.E. Mehner, G. Herrmann, D. Muller, and W. Dotzel. Analyzing and simulation of MEMS in VHDL-AMS based on reduced-order FE models. Sensors Journal, IEEE, 5(5):1019–1026, 2005. ISSN 1530-437X. [78] J. Seeger, X. Jiang, M. Kraft, and B. Boser. Sense finger dynamics in a sigma-delta force-feedback gyroscope. Technical Digest of Solid-State Sensor and Actuator Workshop, pages 296–299, 2000. [79] Kristofer S.J. Pister Shad Roundy, Paul K. Wright. Micro-electrostatic vibrationto-electricity converters. ASME International Mechanical Engineering Congress & Exposition, 2002. [80] C.-J. Shi and A. Vachoux. VHDL-AMS design objectives and rationale. Current Issues in Electronic Modeling, volume vol. 2. Kluwer Academic Publishers, 1995. [81] David W. Smith. Ams modeling. Computer Aided Network Design (CANDE) 2003 Workshop, New Mexico, 2003. CANDE. [82] IEEE Computer Society. IEEE standard VHDL analog and mixed-signal extensions (IEEE Std 1076.1TM-2007), 2007. [83] OSCI Standards. Analog/mixed-signal extensions, release 1.0 (ams 1.0). 2010. [84] Daves Steinberg. Vibration Analysis for Electronic Equipment. Third Edition. Wiley-Interscience, 2000. [85] Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley Professional, 3 edition, June 1997. ISBN 0201327554. [86] Harrie Tilmans. Equivalent circuit representation of electromechanical transducers: I. lumped-parameter systems. Journal of Micromechanics and Microengineering, 6(1):176, 157, 1996. [87] A. Vachoux, C. Grimm, and K. Einwich. Analog and mixed signal modelling with systemc-ams. Circuits and Systems, 2003. ISCAS’03. Proceedings of the 2003 International Symposium on, 3, 2003. [88] A. Vachoux, C. Grimm, and K. Einwich. Systemc-ams requirements, design objectives and rationale. In Proc. Design, Automation and Test in Europe Conference and Exhibition, pages 388–393, 2003. [89] A. Vachoux, C. Grimm, and K. Einwich. Towards analog and mixed-signal soc design with systemc-ams. Electronic Design, Test and Applications, 2004. DELTA 2004. Second IEEE International Workshop on, pages 97–102, 2004. [90] William T. Vetterling. Numerical recipes example book (C++). Cambridge University Press, 2002. ISBN 9780521750349.

BIBLIOGRAPHY

124

[91] M. Vlach, A. Inc, and O. R. Beaverton. Modeling and simulation with saber. ASIC Seminar and Exhibit, 1990. Proceedings., Third Annual IEEE, 1990. [92] Andrei Vladimirescu. The SPICE Book. John Wiley & Sons, April 1994. ISBN 0471609269. [93] L. Wang, T. J. Kazmierski, B. M. Al-Hashimi, S. P. Beeby, and R. N. Torah. Integrated approach to energy harvester mixed technology modelling and performance optimisation. Design, Automation and Test in Europe, 2008. DATE’08, pages 704–709, 2008. [94] Leran Wang, Chenxu Zhao, and Tom J. Kazmierski. An Extension to VHDL-AMS for AMS Systems with Partial Differential Equations, pages 123–136. Springer Link, 2008. [95] Alex S. Weddell, Neil J. Grabham, Nick R. Harris, and Neil M. White. Modular plug-and-play power resources for energy-aware wireless sensor nodes. In Sixth Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks - SECON 2009. IEEE eXpress Conference Publishing, June 2009. [96] C.B. Williams and R.B. Yates. Analysis of a micro-electric generator for microsystems. In Proc. and Eurosensors IX. Solid-State Sensors and Actuators Transducers ’95. The 8th International Conference on, volume 1, pages 369–372, 1995. [97] P. R. Wilson, N. J. Ross, A. D. Brown, and A. Rushton. Multiple domain behavioural modeling using vhdl-ams. IEEE International Symposium on Circuits and Systems, 2004. [98] P.R. Wilson, A.D. Brown, and H.A. Mantooth. Standard VHDL 1076.1.1 packages for multiple energy domain support. In Behavioral Modeling and Simulation, 2003. BMAS 2003. Proceedings of the 2003 International Workshop on, pages 70–75, 2003. [99] Bernard C Yen and Jeffery H Lang. A variable-capacitance vibration-to-electric energy harvester. IEEE Transaction on Circuits and Systems, 53:288–295, 2006. [100] R. Zhang, G.A. Jullien, Wei Wang, and A. Dounavis. Passive reduced-order macromodeling algorithm for structure dynamics in MEMS systems. In Circuits and Systems, 2006. ISCAS 2006. Proceedings. 2006 IEEE International Symposium on, page 4 pp., 2006. [101] C. Zhou, L. Wang, and T. Kazmierski. An efficient and accurate mems accelerometer model with sense finger dynamics for application in mixed-technology control loops. In: IEEE Behavioral Modeling and Simulation Conference (BMAS 2007), pages pp. 143–147, 2007.

BIBLIOGRAPHY

125

[102] Y. Zhu, J. E-Y. Lee, and A.A. Seshia. Mems electrometer system-level simulation using a time-domain variable capacitor model. 14th International Conference on Solid-State Sensors, Actuators and Microsystems (Transducers), 10-14 June, 2007. [103] David A. Zien. Circuit Analysis, Simulation and Design : Solution of Non-linear Algebraic Equations for General Purpose CAD Program. Elsevier, 1986.