Modeling and Simulation of Mechanical Systems Using Distributed Computing Networks: Manufacturing and Virtual Reality Applications 1 Introduction The recent emergence of high speed network technology has allowed clusters of computers to be linked together economically to form distributed computing networks capable of simulating systems that previously required a supercomputer. High speed network communication has also enabled the creation of virtual environments that allow many users to simultaneously interact with a distributed simulation. Distributed interactive simulation has been used extensively in training simulators for the defence industry, and is also being used for entertainment, automotive, and aerospace applications. Distributed control systems linked by networks have also become common in many applications. The further expansion of the internet and rapid deployment of wireless network technology will no doubt result in even wider applications of distributed computing. Despite the enormous potential of distributed computing there are currently few fundamental approaches to guide the development of distributed simulations. To a large extent this has delayed the application and compromised the power of this technology in many application areas. This is especially true for simulation of mechanical systems. A mechanical system simulation is generally characterized by complex interconnections of heterogeneous mechanical models that may involve different types of equations with different solution methods. An important potential application is full scale simulation of automobiles that could be used to detect flaws and reduce design time. An automobile is composed of many components such as fuel injectors, combustion chambers, transmission, and suspension that dynamically interact through thermal, fluid, solid, and electro-mechanical domains. Simulation of such problems generally requires the solution of large numbers of ordinary and partial differential equations with algebraic constraints and widely varying time scales and spatial resolutions. The complexity and heterogeneous multi-domain nature of mechanical system models that arise in automotive, aerospace, and virtual reality applications make systematic decomposition into a distributed network in general a very difficult unsolved problem. Simplification of distributed models, compensation for the effects of communication delays, and real-time simulation also remain unsolved. To fully exploit the power of distributed computing for mechanical systems a new type of modelling and simulation methodology is needed. To address this problem the following research is proposed. 2 Objectives The proposed research will aim at solving some of the key problems involved with distributed simulation of mechanical systems. Together, these new results will allow general mechanical systems to be simulated in a distributed computing network. This will allow high fidelity simulations to be used in situations where they were previously impractical due to computational limitations, which will have a substantial impact on aerospace, automotive, and virtual reality applications. The key problems to be addressed are described in the following paragraphs. Distributed Simulation of Differential-Algebraic Equations New methods will be developed for simulation of mechanical systems described by a mixed set of ordinary and partial differential equations with algebraic constraints. Ordinary differential equations frequently arise by applying Newton’s second law to rigid body problems. Partial differential equations are used to describe fluid flow, heat transfer, and solid mechanics problems. Algebraic constraints commonly result from kinematic constraints in machines and steady state approximations of thermofluid models. Dealing with systems described by a mixed set of differential-algebraic equations (DAEs) is one of the main difficulties for distributed simulation. The solution of such problems requires iteration to solve the algebraic equations which leads to a massive amount of communication between processors and sensitivity to communication delays. Fundamentally, this is a result of instantaneous communication implied by algebraic constraints. Furthermore, iterative solution methods cannot be applied to real-time simulation which is used for many engineering applications such as virtual reality, virtual prototyping, and control systems. Simplification and Robustness Analysis of Distributed Models To make complex simulations tractable, model simplifications are often made to reduce the dimension (number of states) and the number of time scales. For distributed simulation additional model simplifications for reducing the information flow between processors are necessary to fit complex problems within network communication limitations. New methods to systematically perform these reductions for mechanical differential-algebraic systems must be developed to fully exploit distributed computation. Further, the impact of simplifications and communication limitations on robustness of stability and other important properties needs to be determined. This is important because simulation is often used to make decisions, control actions, and feedback loops. Thus, it is important to ensure that the model is not oversimplified for its intended use and that it doesn’t lead to incorrect and misleading conclusions. Variable Resolution Distributed Models In addition to simplification techniques, new methods are needed to vary the complexity of the distributed simulation while it is running. This is especially important for distributed interactive simulations where different users may be working with or moving between different parts of the virtual environment that have different complexity. A systematic method to vary the model complexity while ensuring robustness will be developed. This will allow optimal use of available computing resources. 3 Proposed Approach and Methods The proposed approach and methods for the main research objectives are outlined in this section. Many of the current difficulties for distributed simulation of mechanical systems are a result of modelling and simulation being treated as separate processes. The proposed methods will address this problem by developing models that are specifically designed for distributed computation. The overall approach is based on developing new nonlinear control and model reduction techniques for constructing distributed models with reduced communication requirements, while maintaining acceptable approximation errors. Distributed Simulation of Differential-Algebraic Equations Mechanical systems are generally described by a mixed set of differential and algebraic equations (DAEs). These equations can be expressed in the general form (1) x f ( t , x, z ) 0 g( t , x, z ) (2) where x n , z m , f : n m n , and g : n m m . For example, in multibody mechanical systems x would represent the position and velocity described by momentum equations (1), and z would represent the forces (Lagrangians) which are determined by kinematic constraints (2). In many cases, including multi-body problems, the constraints are identically singular with respect to z. This is an example of a high index DAE which represents a more difficult type of simulation problem. Distributed simulation of DAEs is complicated by the constraint equations (2) which must be solved during each time increment of the simulation. This usually involves an iteration process to solve the nonlinear algebraic constraints. The constraints will generally involve variables that are updated on many different processors. Therefore, to simultaneously solve the constraint equations communication must occur between each processor involved for every iteration. This will lead to a dramatic increase in communication between the processors. Further, the constraints imply instantaneous information transfer between processors since changes in the state variable x imply immediate change in the constrained state z. Thus, the solution could potentially be very sensitive to communication delays that occur in distributed simulation. In the worst case scenario, all processors would have to be completely synchronized to the slowest processor to guarantee integrity of the simulation. Furthermore, iterations cannot be tolerated in real-time simulation because they are not guaranteed to complete in a fixed time interval. In the applicant’s Ph.D. research a new breakthrough approach was developed for constructing non-iterative models of DAE systems using nonlinear control techniques. This method uses the concept of virtual control based on an important new analogy between DAE systems and nonlinear control theory. Using this result the DAE modeling problem can be formulated as x f ( t , x, z ) z ν w g ( t , x, z ) where w is an output equal to the violation of the constraints and ν is the virtual control input. By developing an appropriate virtual nonlinear controller the output can be forced to zero which will result in a non-iterative ordinary differential equation model of the DAE system. Essentially, nonlinear control is being used to construct a model that no longer requires iteration. The new model is more suited to simulation while having many of the same properties as the original DAE. Criteria to design an appropriate controller were developed in the thesis to address this problem. The virtual control approach allows powerful techniques from nonlinear control theory to be used to simulate DAE problems. The proposed research will generalize this approach for distributed simulation of DAEs. One of the main difficulties involves developing new control methods that will compensate for variable communication delays between processors. This approach must be extended to discrete time control to fully account for the effects of communication sampling rates. Methods for automatic partitioning of the equations onto different processors must also be determined based on the controller structure and communication limitations. Furthermore, the virtual control method was developed assuming ordinary differential equations. The method must be extended to partial differential equations to include more general mechanical systems. This will result in a fundamentally different infinite dimensional control problem. The potential of model based communication and observers will also be investigated to reduce communication requirements. This direction is based on the observation that signals between processors have a unique structure associated with the model that may be exploited to allow significant information compression. Eventually, the DAE simulation approach will be generalized to mixed discrete and continuous hybrid systems which are common in many mechatronic applications. This will lead to even more challenging problems. Simplification and Robustness Analysis of Distributed Models Model reduction and simplification is a highly active field with the traditional objectives of reducing the system order (number of states), dimension, and number of time scales. Over the last several years the concepts of model error representation as uncertainty and robustness analysis have been very successful. Using Linear Fractional Transformation (LFT) representation the effects of structured errors associated with model reduction can be determined using powerful analytical techniques. The proposed research will evolve these methods for the special type of model errors introduced by communication time delays and reduction of model communication. Systematic approaches will be developed for representation of these model errors in the form of structured uncertainty. How to formulate the model reduction problem to achieve a trade off between model errors and communication reduction will also be explored. This work will lead to an increased understanding of the importance of information flow on system behaviour and greater connections between information and control theory. Quantitative measures will be developed to determine how important a communication path is for model fidelity and robustness. This will in turn be used to develop techniques for partitioning the model across different processors for optimal computational performance. Variable Resolution Distributed Models The approach that will be taken is to combine the virtual control method for distributed simulation of DAE systems with the new simplification and robustness techniques. The major problem is how to develop a virtual controller that will result in a model that can vary in complexity without introducing unwanted transients and instabilities. This will lead to new control problems associated with the structure of the differential-algebraic equations and controller varying with the model complexity. Conditions for robustness must be developed to ensure that during transitions the integrity of the simulation is preserved. In addition, real-time model partitioning algorithms must be developed to optimally redistribute the model on the computing network during transitions. Application to Automotive, Aerospace, and Virtual Reality Problems Realistic applications of distributed simulation will be investigated to help verify and guide the direction of the research. Full scale and real-time simulations of automobiles, aircraft, and virtual environments will be developed in collaboration with industrial, academic, and government labs. Furthermore, a distributed computing environment will be developed to implement and help disseminate new results. This special software will allow deterministic real-time execution and precise control over network communication. The environment will be based on the highly popular Windows NT operating system to allow dissemination of results to the largest possible audience. To achieve deterministic realtime operation a special extension to Windows NT recently developed by Venturcom will be employed. Initially, a cluster of six computers will be implemented with the long term objective of developing a software add-on for Windows NT that will allow distributed real-time simulation on larger networks (>50 workstations) employed in academic and industrial labs. 4 Significance of the Work The proposed research will eventually allow networks of computers to economically simulate complex models that would otherwise require prohibitively expensive supercomputers. This will result in more widespread use of high fidelity models for rapid prototyping and optimization of designs in aerospace and automotive applications. In turn, this will lead to better designs, higher quality products, and shorter design cycles which are critical for industrial competitiveness. The current generation of virtual reality often relies on relatively simple models with limited realism due to computational limitations. Application of high speed network simulation will allow high fidelity virtual reality models to be simulated which will allow more complex scenarios to be investigated with enhanced realism and training capability. Fundamental contributions will include the establishment of new relations between control, modelling, computation, and information theory. This will lead to new insights and help contribute to a general theory of distributed modelling and computation. The results will also lead to a greater understanding of distributed real-time systems which are becoming more prevalent with expanding use of the networks and internet. The interdisciplinary nature of the proposed research will raise new connections between mechanical engineering, control engineering, and information sciences. This will lead to greater collaboration on problems critical to the success of related research areas. 5 Contribution to the Training of Highly Qualified Personnel The research project will provide training for two Masters and two Ph.D. projects over a four year period. This research will have a good balance between theory and mechanical engineering applications. The interdisciplinary nature of the research will result in personnel that are highly qualified for bridging knowledge gaps in industrial or academic settings. Due to the economic importance and growth potential of networks and the internet, the students will have a background that is well suited for solving new technologically important problems combining mechanical engineering and information sciences. The research will also enable the author to establish a new research program that will help expand and deepen his knowledge in related fields. Collaboration with industrial and academic labs will result in even greater transfer of new technology and further training possibilities.