ON THE AUTOMATIC GENERATION OF EFFICIENT COMPUTATIONAL MODELS

  • Published on
    15-Apr-2017

  • View
    214

  • Download
    1

Transcript

  • This article was downloaded by: [University of Toronto Libraries]On: 21 December 2014, At: 23:27Publisher: Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House,37-41 Mortimer Street, London W1T 3JH, UK

    Cybernetics and Systems: An International JournalPublication details, including instructions for authors and subscription information:http://www.tandfonline.com/loi/ucbs20

    ON THE AUTOMATIC GENERATION OF EFFICIENTCOMPUTATIONAL MODELSTAREK M. NABHAN a & ALBERT Y. ZOMAYA aa Department of Electrical and Electronic Engineering , University of Western Australia ,Nedlands, Perth, Western AustraliaPublished online: 15 Mar 2007.

    To cite this article: TAREK M. NABHAN & ALBERT Y. ZOMAYA (1995) ON THE AUTOMATIC GENERATION OF EFFICIENTCOMPUTATIONAL MODELS, Cybernetics and Systems: An International Journal, 26:1, 59-78, DOI: 10.1080/01969729508927487

    To link to this article: http://dx.doi.org/10.1080/01969729508927487

    PLEASE SCROLL DOWN FOR ARTICLE

    Taylor & Francis makes every effort to ensure the accuracy of all the information (the Content) containedin the publications on our platform. However, Taylor & Francis, our agents, and our licensors make norepresentations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of theContent. Any opinions and views expressed in this publication are the opinions and views of the authors, andare not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon andshould be independently verified with primary sources of information. Taylor and Francis shall not be liable forany losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoeveror howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use ofthe Content.

    This article may be used for research, teaching, and private study purposes. Any substantial or systematicreproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in anyform to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http://www.tandfonline.com/page/terms-and-conditions

    http://www.tandfonline.com/loi/ucbs20http://www.tandfonline.com/action/showCitFormats?doi=10.1080/01969729508927487http://dx.doi.org/10.1080/01969729508927487http://www.tandfonline.com/page/terms-and-conditionshttp://www.tandfonline.com/page/terms-and-conditions

  • ON THE AUTOMATIC GENERATION OF EFFICIENT COMPUTATIONAL MODELS

    TAREK M . NABHAN AND ALBERT Y. ZOMAYA

    Department of Electrical and Electronic Engineering, University of Western Australia, Nedlands, Perth, Western Australia

    This paper presents an algorithm for the reduction of the computational requirements associated with a majority of mathematical models. This computational reduction plays an important role, especially in the case of real-time applications. In this work, we describe the different sections of the algorithm and their interactions with one another. Furthermore, as a case study, we investigate the synthesis of efficient robot dynamic models that can be employed for the symbolic and numeric modeling of robotic mecha- nisms.

    Simulation of computational models is a requirement for analysis, design, and control system purposes. The highly intensive nature of many of these models represents a major bottleneck in many real-time applications. Techniques based on computer algebra and symbolic sim- plification were developed to generate optimized models with less computational load. MACSYMA, developed by the Mathlab group at the MIT Laboratory for Computer Science, is a system for the manipu- lation for algebraic expressions (Rand, 1983). Stoutemeyer (1979) intro- duced another LISP-based package for mathematical systems.

    Received 9 March 1994; accepted May 1994. Address correspondence to Dr. Albert Y. Zomaya, Department of Electrical and

    Electronic Engineering, University of Western Australia, Nedlands, Perth, Western Aus- tralia 6009.

    Cybernetics and Systems: An International Journal, 26:59-78, 1995 Copyright O 1995 Taylor & Francis

    01 96-9722/95 $10.00 + .OO 59

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2014

  • 60 T. M . NABHAN AND A. Y. ZOMAYA

    Many tasks performed in systems such as those found in nuclear power plants, process control (Schoeffler, 1984), and robotics (Lee, 1991) have strict real-time constraints. Despite the order-of-magnitude improvements achieved through model simplification, many advanced algorithms are still not implementable in real time on state-of-the-art computers (Orin et al., 1991). These heavy computational needs have called for advanced computer architectures.

    Two different approaches can be used to provide the computational power required for this type of application. First is the building of specialized hardware for specific applications, second the design of massively parallel-processor architectures (Graham, 1989). Research in these areas has resulted in the development of many efficient computer architectures such as Cray-1, VP-200, Cyber-205, and FPS-164 (Bernstein et al., 1989). Among the different architectures suggested, multiproces- sor systems provide more flexibility to handle a wide range of applica- tions. To take advantage of these machines, computational models must be scheduled properly. Scheduling algorithms for multiprocessor sys- tems usually employ a task graph of the model in order to assign a particular processor for each task (Hwang & Brigs, 1986). This paper presents an algorithm for the automatic generation of optimized task graphs. The algorithm is a useful tool that will facilitate the develop ment of efficient implementations of highly computational models on multiprocessor systems.

    ALGORITHM OVERVIEW

    Figure 1 shows the different modules of the algorithm presented in this paper. The algorithm consists of three main modules: model generation, equation-based simplification, and model-based simplification and task graph generation. The model is generated first, and then the equations are simplified based on the model parameters. This is followed by deleting the redundant equations using a model-based simplification scheme. The different modules of the algorithm are discussed below.

    Model Generation

    The first step in the algorithm is to generate the model equations. Tasks are generally expressed as a set of matrix-oriented equations. To model a task, the whole calculations are broken down into scalar form equa-

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2014

  • ON THE AUTOMATIC GENERATION

    Model parameters

    I

    Model generation I Equation-based simplification

    Model-based simplification &

    task graph generation I The simplified model

    Figure 1. The different modules of the algorithm

    tions. The arguments of each equation are either constant values or elements of vectors or matrices identified by their indices. These equations can be expressed inside loop statements and the algorithm can generate the model automatically by resolving the indices. For example, consider the following equation:

    where Y, X, and B and n x 1 vectors, z is a constant, x [ i ] = y [ i + 11, and x [ n ] = 0. This expression can be modeled as follows:

    For i = 1 to n I F i < n

    analyzeyy - i = y - j + z X b - i", 'i', i , ' j ' , i + 1) else

    analyze("y - i = z X b - in, 'i', i , ' j ' , i + 1)

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2014

  • 62 T. M. NABHAN AND A. Y. ZOMAYA

    The analyze module will search for arguments containing a '-'. The letter following a ' - ' is checked. If it matches one of the indices, it is replaced by its index value. The algorithm provides a unique identifica- tion number (ID) to each equation; then it calls the equation-based simplification module. The general form of the analyze module argu- ments is analyze(equation, number of indices, array of indices-values pairs). This method allows the task to be coded in terms of general expressions. It also forms the model in a very efficient way by adding, through IF statements, any special conditions and by grouping common terms together.

    Equation-Based Simplification

    In this phase, the number of operations in each expression is minimized through three processing modules: preliminary processing, simplifica- tion, and tables maintenance. The module components and their inter- actions with the different tables are shown in Figure 2. Three tables are shown in the figure: constants table, variables table, and assignments table. The constants table is a list of all the model constants symbols and their corresponding values, and the variables table is a list of all the variables symbols in the model. A symbol is composed of letters, digits, hyphens, and the underscore character. Note that a symbol must begin with a letter. The assignments table contains expressions of the form

    Preliminary Constants processing

    table 1 Variables

    table Simplification

    Assignments I table Tables maintenance

    Figure 2. The main components of an equation-based simplification module and their interactions with the different tables.

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2014

  • ON THE AUTOMATIC GENERATION 63

    variable1 = kvariable2. Each item of this table has a symbol and its equivalent assignment.

    Initially, the constants table has the parameters symbols of the model and their values, the variables table has the input variables symbols, and the assignments table is empty. New items are added to these tables based on the simplified forms generated, as explained later.

    The first module in this phase is the preliminary processing module, which consists of two submodules: validation and replacement. The validation submodule checks that the arguments of each equation are either constants or variables. Otherwise, an error is signaled. A constant is either a number or a symbol listed in the constants table; a variable is a symbol listed in the variables table. This step reduces the possibility of model equation inconsistencies. The replacement submodule replaces symbols listed in the constants table by their values. In addition, symbols listed in the assignments table are replaced, if valid, by their equivalent assignments, as discussed later.

    The simplification module simplifies the equation through an algo- rithm of recursive nature in order to handle the use of parentheses as explained below:

    simplijj4expression) Begin

    Do Get next parenthetical subexpression, Extract the subexpression, and Call simplify(subexpression).

    Until end of expression. Execute all computable operations. Remove redundancy. Symbolically simplify the expression. Remove redundancy.

    End.

    This module simplifies each equation by minimizing the number of its operations. An operation is an expression that consists of two operands and one arithmetic operator (+, -, x, /), where an operand is either a number or a symbol. Expressions usually have more than one opera- tor. In this case the operator precedence, that is, the order by which operators are evaluated, has to be considered. In this algorithm, multi-

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2014

  • 64 T. M. NABHAN AND A: Y. ZOMAYA

    plication and division have a higher precedence than addition and subtraction. This means that they are evaluated first. Multiplication and division have the same precedence. Addition and subtraction have the same precedence too. Operators that have the same precedence are evaluated from left to right. However, operator precedence can be overridden by the use of parentheses. Hence, all parenthetical subex- pressions in the equation are simplified first.

    An expression is simplified through the following procedures. First, all computable operations are executed. An operation is computable if both operands are numbers. For example, consider the following expres- sion:

    The computable operations are executed in two steps as follows:

    The algorithm first executes the multiplication operation, followed by the subtraction operation. Note that in the case of executing a com- putable addition/subtraction operation the operands are not necessar- ily consecutive.

    The remove redundancy procedure optimizes the equation by re- moving all redundant parentheses, i.e., parentheses of the form (symbol) or ((subexpression)). Then it simplifies all operations that have one operand equal to 1 or - 1 or 0 and a multiplication/division operator or have one operand equal to 0 and an addition/subtraction operator. The definition of an operand in this procedure is extended to include subexpressions between parentheses. Again, in the case of compound expressions, operator precedence is considered. For example, in the case of the following expression:

    the redundant operations are removed through the following steps: . .

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2014

  • ON THE AUTOMATIC GENERATION 65

    The redundant parentheses are first removed in step 1, then operations are simplified in steps 2 and 3. Due to the operator precedence, multiplication operations are considered first in step 2. This is followed by removing redundant addition/subtraction operations in step 3. Note that the' parenthetical subexpression (f x k ) is considered an operand in step 2.

    The symbolic simplification procedure cancels simple/compound symbols of opposite signs in each equation. A compound symbol is composed of symbols and numbers separated by multiplication/division operators. The compound symbol must have at least one symbol. For example, the expression

    is simplified to

    Since the compound symbol in this example has multiplication opera- tors only, the order of the operands is not important. However, if the compound symbol has a division operator, the order of the operands is considered. The remove redundancy' procedure is then executed again to handle any redundant operation resulting from the previous proce- dure and thus the final form of the previous expression is reduced to -20. Other simplification methods, such as trigonometric simplifica- tion, can be implemented as well. For example,

    In the third module, the tables are updated according to the final form of the equation as follows:

    If the equation takes the form: symbol = constant Add (symbol, constant) item to the constants table.

    else Add (symbol) item to variables table.

    If the equation takes the form: symboll = +symbol2 Add (symboll, f symbol2) item to assignments table.

    In subsequent equations, symbols listed in the assignments table are replaced by their equivalent expression. This simple method has the

    Dow

    nloa

    ded

    by [

    Uni

    vers

    ity o

    f T

    oron

    to L

    ibra

    ries

    ] at

    23:

    27 2

    1 D

    ecem

    ber

    2...

Recommended

View more >