n 5.. 3mm ‘ 'C‘Li-u‘ls'. s ‘51 “w :l?‘-".:-‘“ V. ».-. ' _n§. “ I", .‘IJ‘V .1. L . ,_ \ 4. L ':,.. ,4..- .L. ¢ ," v: v ‘ . y’ V ' , ,rr 4 ‘L,. x ; H, .14 "KJCIC.’ ;, .... r‘ ,. 1-“ av rm L- ' #32 3X, a“ a i". .I'. 3m v p: 47 .‘m «.n ..I u“: m :0. Is. A , - 3 4 ”a 3' .n .5‘ vv. ‘3 4. u. .H ‘5‘" 1 .~.. .. . "‘ ....c >~{“,1.“.~,',.\, 3.; ~‘ J;,:u-:.~ 3.»; MK‘ ‘ah ‘ 32' L. m ‘1 ~ C «r» -.,..4 ‘1,» . .511: "' .u 1‘.“ .‘w ;& .,:., ”a. 4: a 41"‘44Fg’3: < i .' ‘— . ~~. 1" ., .‘.,v, . Sum. USENIVER S'TYL IIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIZIIIIIIIIIIIIII 3129300898 This is to certify that the thesis entitled User-Guided Reduction of Certain Storage Fields in Multiport Systems presented by John Michael McCalla has been accepted towards fulfillment of the requirements for M o S . degree in M o E o Major professor Date M 0.7 639 MS U is an Affirmative Action/Equal Opportunity Institution LIBRARY Michigan State I University PLACE IN RETURN BOX to remove this checkout from your record. TO AVOID FINES return on or before date due. DATE DUE DATE DUE DATE DUE iILL I I. I I I II‘I I MSU is An Affirmative Action/Equal Opportunity Institution WW1 USER-GUIDED REDUCTION OF CERTAIN STORAGE FIELDS IN MULTIPORT SYSTEMS By John Michael McCalla ATHESIS Submitted to Michigan State University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE Department of Mechanical Engineering 1991 555- 77:» ABSTRACT USER-GUIDED REDUCTION OF CERTAIN STORAGE FIELDS IN MULTIPORT SYSTEMS By John Michael McCalla A methodology is developed which replaces linear, dependent storage elements in a bond graph with an equivalent element. This substitution, which utilizes a causal path variable trace, restores integral causality to the bond graph. The procedure reduces the number of energy variables, thereby simplifying the system model, and facilitates the formulation of explicit state equations. This algorithm is implemented in the ENPORT software and applied to several examples. Simulation results demonstrate a new option for the engineer in designing certain types of systems. for Mom and Dad ACKINDWLEEXSEMENTS Thanks to Dr. Rosenberg, whose guidance kept me inspired. iv TABLE OF CONTENTS LIST OF FIGURES LIST OF SYMBOLS Chapter 1. Introduction Chapter 2. Identification of Derivative Causality 2.1 Identifying Derivative Causality 2.2 Solution Options for Derivative Causality Chapter 3. The Storage Field Reduction Technique 3.1 Identifying a Storage Field 3.2 The Reduction Technique 3.3 Example Problems Chapter 4. Algorithm implementation 4.1 Design of Implementation 4.2 Examples of Use 4.3 Description of Software Chapter 5. Conclusions 5.1 Summary 5.2 Recommendations for Further Development APPENDIXA Dynamic Augmentation of Roller Coaster Model APPENDIXB Dynamic Augmentation of Robot Arm Model APPENDIXC The FORTRAN Algorithm LIST OF REFERENCES vi vii 11 16 19 19 21 26 28 28 29 31 33 36 70 Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure A-1. Figure 8-1. LIST OF FIGURES Derivative and Integral Forms of C and I elements Bond Graph of Roller Coaster Model C-Subsystem Required for Dynamic Augmentation Augmented Bond Graph Model Inertial Storage Field Bond Graph Model with Derivative Causality Reduced Bond Graph Model Bond Graph Model with Derivative Causality Flow Chart of Methodology Lever Arm System Bond Graph Model of Lever Arm System Reduced Form of Bond Graph Model Bond Graph of Field with GY Element Reduced Form of Bond Graph Flow Chart of Subroutines Roller Coaster Model Robot Arm in Vertical Plane vi 20 21 22 24 24 25 27 31 34 LIST OF FIGURES, CONTINUED Figure 8-2. Bond Graph Model of Robot Arm Figure 33. Augmented Bond Graph Model of Robot Arm vii 35 36 d/dt: get 913 LIST OF SYMBOLS compliance time derivative effort (force) flow (velocity) efion ganr flour gann inertia coefficient mass momentum displacement time viii Chapter 1. Introduction One purpose of constructing a bond graph is to obtain a set of differential equations that describe the motion of a physical system. Through the use of power bonds and elements that represent various pieces of a physical system, an engineer can construct a bond graph model that closely represents an actual system. State equations for the system can be generated by using a straightforward procedure that follows the details of the bond graph. This methodology produces explicit state equations, x=E(x,t), when the bond graph model contains only integral causality. Implicit, 24mm). state equations arise when the model contains derivative causality. Causality provides this information through its inherent representation of the constitutive relationships for each energy variable. These energy variables are identified through energy storing elements inertia and capacitance. Thus, even if the model contains only one energy variable with derivative causality, the entire system of state equations will be implicit and the solution of the equations will require a robust, implicit integrator. For a discussion of causality in bond graphs see, 9.9., Rosenberg and Karnopp. [1] A methodology has been developed in which a storage field reduction takes place. The technique entails following a causal path that leads to the source of the derivative causality for the dependent 2 energy variable. This methodology reduces the number of energy variables by combining the effects of the dependent variable with an independent variable. Thus the technique restores integral causality to the bond graph and allows an explicit integrator to solve the system of equations. This reduction decreases the complexity of the system state equations by providing only those energy variables that are state variables. This project implemented the storage field reduction technique as an algorithm in the dynamic software simulation package ENPORT, presented by ROSENCDDE Associates in [2]. The user of this package now has the option to allow the program to make an attempt at solving any derivative causality problem. The algorithm, which will be presented in Chapter 3, determines if a particular model can be corrected using this storage field reduction technique. Once deemed eligible, the bond graph is adjusted in a user-interactive manner. The experienced system modeler will find this option beneficial due to the luxury of rapid equivalent coefficient computation by the algorithm. The details of the algorithm from initial development stages to the final process, its implementation in ENPORT, and several examples are presented in Chapters 2, 3, and 4. Finally, Chapter 5 summarizes the methodology and gives a set of recommendations for further development. Chapter 2. Identification of Derivative Causality 2.1 Identifying Derivative Causality Derivative causality presents dependent energy storing variables to the engineer attempting to write a system of state equations. The system equations cannot be reduced to explicit state-space form, in general, when derivative causality is present in the model. Identifying derivative causality is thereby the initial step in forming explicit state equations. This identification can take place after causality has been placed on the bond graph model according to the Sequential Causality Assignment Procedure (SCAP). [1] The number of energy storing variables can be found at this point by noting the number of energy storing elements in the model, assuming they are all 1-port. The dependent energy variables are evidenced by the causal stroke on the bond connecting the C or i element to the model. Figure 1 shows the derivative and integral forms for both the inertial and the capacitance elements. Integral Derivative Figure 1. Derivative and Integral Forms of C and l elements An example of a system model with derivative causality is shown in Figure 2, which is a bond graph model of a roller coaster originally 4 studied by Emery. [3] The physical system model is shown in Figure A-1, Appendix A. 35—41. l—\ TF l—AIB (F9) | (GWUX) '1; l1 '2 [m1] ["121 Figure 2. Bond Graph of Roller Coaster Model Note the derivative causality resulting on the l2 element. The formulation of state equations using this bond graph model would produce a system of nonlinear, implicit equations. The general form of the state equations arising from both integral and derivative causality will be detailed in the remaining portions of this section, where we restrict our attention to linear elements as noted. The constitutive law for a linear capacitance element in a bond graph always relates effort (e.g., force) to displacement (e.g., deflection). Displacement is the integral of flow (e.g., velocity). The constitutive equation for a linear capacitance element with integral causality is as follows: Itfdt =7 “I Olin 4 studied by Emery. [3] The physical system model is shown in Figure A-1, Appendix A. SEA 1A I"_'3 TF I—AIB (Pg) I (dy/dx) I: n '2 [m1] [m2] Figure 2. Bond Graph of Roller Coaster Model Note the derivative causality resulting on the l2 element. The formulation of state equations using this bond graph model would produce a system of nonlinear, implicit equations. The general form of the state equations arising from both integral and derivative causality will be detailed in the remaining portions of this section, where we restrict our attention to linear elements as noted. The constitutive law for a linear capacitance element in a bond graph always relates effort (e.g., force) to displacement (e.g., deflection). Displacement is the integral of flow (e.g., velocity). The constitutive equation for a linear capacitance element with integral causality is as follows: tfdt e=S=——— u) C C 5 However, the constitutive equation for a C element with derivative causality is quite different, namely: (1 (1 de f=— =—c =c— 2 <11;q (it 6 dt ( ) Note that these two sets of equations are simply two ways of expressing the same constitutive law. Each causality indicates how to use the relation and whether integration or differentiation is implied. The same ideas apply to the linear inertial element. The inertial element relates flow to momentum, and momentum is the time integral of effort. The constitutive equation for a linear inertial element with integral causality is as follows: Itedt I f=3 I (3) The constitutive equation for an inertial element with derivative causality is shown below: d e=—p=—If=I—— (4) These two sets of expressions represent the same constitutive law in different forms. 2.2 Solution Options for Derivative Causality When derivative causality arises in a model to be simulated, three solution options exist: 1. use robust, implicit integrator 2. use Dynamic Augmentation 3. use Storage Field Reduction The first option entails finding a robust, implicit integrator which would provide a means for numerically solving the implicit system of differential equations. This option is an issue involving numerical integration methodology and software implementation It will not be discussed in further detail in this work. Dynamic augmentation of a bond graph model involves the introduction of additional energy variables to facilitate dynamic independence of all the energy variables. For some examples in mechanical systems see [5], [6], and [7]. This procedure often requires the insertion of capacitance elements into the bond graph model. These insertions take the form shown in Figure 3. c/ Io Figure 3. C-Subsystem Required for Dynamic Augmentation The insertion of these additional elements, and the state variables they represent, takes place at strategic points in the model. The capacitance elements represent stiff springs in mechanical systems and are inserted at connection points in the model. Thus, the 6 7 coefficients for these elements are large, k - 1/C, in order to represent actual local material stiffness. The ideal location for insertion of the element remains a model specific issue. The dynamic augmentation methodology provides explicit state equations without eliminating any of the energy variables which may be of interest. However, the computational problems associated with dynamic augmentation are significant. A variable step integrator capable of dealing with stiff systems is required for numerical solution. The inserted variables represent the error associated with this modelling technique and provide insight into error control during simulation. Dynamic augmentation can be applied to the roller coaster bond graph model shown in Figure 2. The augmented model is shown in Figure 4. eel 1A l——>o ATP—41. (F9) ‘1; (dy/dx) l1 C3 '2 [m1] [m2] Figure 4. Augmented Bond Graph Model Note the elimination of derivative causality with the insertion of the stiff spring, CS. Further discussion of this model may be found in Appendix A. An additional example of the dynamic augmentation 8 procedure can be found in Appendix B, which details the development of a robot arm in the vertical plane. The storage field reduction of a bond graph is the third option for dealing with derivative causality. The application of causality, the crucial step in the construction of a bond graph, leaves a causal path. This path is used to locate the source of derivative causality and to eliminate it from the bond graph. This methodology provides explicit state equations by reducing the effects of a dependent energy variable into the parameter of a independent energy variable. Nonlinear and linear storage fields are both conceivably eligible for this reduction. The remaining chapters of this thesis will develop an algorithm for linear storage fields whose derivative causality is a direct result of the application of integral causality on a one port inertial or capacitance element during SCAP. Chapter 3. The Storage Field Reduction Technique 3.1 Identifying a Storage Field The causal path provides a means for the elimination of derivative causality in a bond graph model. During the second phase of SCAP integral causality may be assigned to either a capacitance or inertial element. This random application may result in the assignment of derivative causality to another I or C element during the extend portion of this phase. This particular problem can be corrected by following the path created during the causal extension process. The identification of a storage field is the initial step in the reduction technique. Once derivative causality has been identified on a linear, 1-port inertial or capacitance element, the causal path trace can begin. Consider a derivative inertial element and its potential causal path. The inertial causal trace follows a flow path. If the flow path enters a zero junction with more than two ports, the exiting flow path is not unique and the trace cannot continue. The dependent energy storing variable is a function of more than one energy and/or source variable if this split path situation occurs. The elements through which the causal path can travel include any number of one junctions, zero junctions, and linear, constant coefficient transformers. The inertial causal path trace leads to either an independent energy storing variable or to a source variable. If the path leads to a linear, independent, 1-port inertial element, 9 10 the storage field has been identified. However, if the causal path leads to a source variable the technique terminates because the dependent energy variable is not solely a function of an independent energy variable and cannot be reduced by our algorithm. Once the field has been identified, the reduction can commence. Similarly, if a capacitance derivative element exists in the model the causal trace follows an effort path. if the effort causal path enters a one junction with more than two ports this trace terminates due to the non-unique exiting path. The dependent energy variable is a function of more than one energy and/or source variable and cannot be reduced using this technique when this split path occurs. The elements eligible to be on the causal path are the same as for the inertial element's trace. If the causal path leads to a linear, independent, 1-port capacitance element, the storage field has been identified and reduction can commence. The reduction of an inertial element into a capacitance element, or vice versa, can occur only if the causal path between these two elements contains an odd number of linear, constant coefficient gyrators. The unique relationships of the gyrator make this combination possible by reversing the causal path trace variable (9 or f) through the element and allowing for the combination of mass and stiffness parameters. 3.2 The Reduction Technique The storage field reduction derives from consideration of the system equations. The coefficients of the elements along the causal path will represent these equations in a reduced form. The development of the relations will utilize inertia elements for the energy variables as an illustration. Equivalent relationships for the capacitance elements will be discussed after the initial development. Consider the details shown in Figure 5. causal path |———l-——I—— l1 l2 v1=(1/m1)p1 pz=(m2)vz Figure 5. Inertial Storage Field Following the causal path entails traversing through the different types of elements mentioned in section 3.1. The coefficients of these elements are recorded for this procedure in order for the reduction to account for all the system relationships. These coefficients are represented on either an effort gain, ge, or a flow gain, gf. Thus, by noting these coefficients we can reduce the dependent energy variable's effects into the independent energy variable. For the example in Figure 5, the total expression for e1 yields equation (5) on the following page. 11 12 e1=612+e1r (5) The effort, e12, is the contribution due to l2 and an is the contribution of the rest of the system. We can represent 912 as shown in equation (6). 912 =(g,)i>2 (6) The effort gain, ge, represents the coefficients obtained from the effort path from l1 to l2. The integration of equation (6) yields equation (6a). 912 - (geipz (6a) Substituting the constitutive relationship for l2, equation (7) into equation (6a) we find (8). 92 - Mafia (7) p12 - (gem2)f2 (3) Equation (9) represents the principle upon which the identification of unique causal path is based. Notice that the dependent energy variable, f2, is a function of only one independent energy variable, f1. The causal flow path does not branch at any point in the trace. The flow gain, gf, represents the coefficients obtained on the flow path from l2 to l1. f2 = (crib (9) Substitution of equation (9) into equation (8) yields (10). 13 me = (gem291)f2 (10) Equations (11-13) detail the integration and substitution steps necessary for the computation of the equivalent parameter. This computation requires a choice of element for reduction, and for the sake of example l2 will be reduced. The integration of equation (5), disregarding the effort associated with the rest of the model because it plays no role in the reduction process, yields (11). Pt=I(eu+eu)dt=Ieudt+Pu (11) Substitution of equation (10) into equation (11) yields (12). p1=JIekdt+(gengf)fl (12) Substituting the constitutive relationship for l1 into equation (12) yields (13). mlfi—(9.ngJfi=Ia.dt (13) Rearranging equation (13) yields the equivalent relationship (14). (ml-gengf)fl=leudt (14) Since the effort and flow gains can differ by a sign at most, the recording of one of these values is sufficient for storage field reduction. If the signs of the gains are opposite, the reduction equations will introduce a negative sign to ensure that the resulting equivalent coefficient is always positive, as in (14). Thus, the equivalent inertial parameter is represented in (15). 14 mmfl=Ieudt (15) The relationships for the causal path between capacitance elements are similar. In this case, the effort relationship comparable to (9) is the defining equation. If the dependent capacitance variable is a function of only one other independent capacitance energy variable, the reduction can take place. This reduction will yield an equivalent stiffness parameter which can be inserted into the selected capacitance energy variable. The relationships for the causal path between an inertial element and a capacitance element are similar. The odd number of gyrator elements required for this combination of energy variables ensures that the equivalent coefficient will have the correct form. Since either energy variable may remain in the model, the element reduction choice will determine the form of the equivalent parameter, inertial or capacitance. The effort and flow gains warrant a brief explanation. When the causal path travels through a power conserving zero or one junction, the power directions must be examined. Through a one junction, the flow gain will have an identity relationship, while the effort gain may have a sign change. Similarly, through a zero junction the flow gain may have a sign change, while the effort gain will have an identity relationship. Thus, the source of possible negative signs in the equivalence calculation has been identified. Similarly, if a linear, constant coefficient transformer is entered on the path, the 15 coefficient recorded is the transformer modulus. When the path enters a linear, constant coefficient gyrator the recorded coefficient is the gyrator modulus. The storage field reduction algorithm, shown in the following sequence, presents the ideas detailed in a systematic manner. 1. Allow causality to be assigned by SCAP. General non-linear models are permissible at this point. 2 Identify the existence of derivative causality. Allow simulation software to formulate implicit state equations for models with derivative causality. 3. Trace the specific structure of each storage field, with the result being complete (causal path is unique) or incomplete (causal path is not unique). 4. For complete, linear storage fields: calculate the causal path gains. 5. Select the location for the equivalent node. 6. Express the constitutive equation in terms of a stiffness or mass parameter. 7. Form the modified model with a single storage element and proper equivalence parameter. 8. Eliminate unnecessary elements from the model. 16 The elimination of unnecessary elements in the reduced bond graph is a critical final step in the process. This elimination technique uses the causal path to determine if there are elements in the bond graph that serve no purpose. These elements include: a one junction, zero junction, transformer or gyrator with only one bond. If found, the process eliminates these elements, thus reducing unnecessary steps in the equation formulation procedure. Once this elimination is complete the process can repeat in order to reduce other sources of derivative causality. If all storage fields containing derivative causality can be reduced, then explicit state equations can be formed for the entire system. 3.3 Example Problems This technique can be applied to a wide range of physical system models, including non-linear models which contain linear storage fields. Perhaps the simplest case is that of two masses travelling at the same velocity. Consider the portion of a bond graph model shown in Figure 6, which contains an element (l2) with derivative causality. SE——>|1|—A 3?? > I” (ma) (mb) Figure 6. Bond Graph Model with Derivative Causality 17 The flow path from l1 to l2 yields (13). The effort path between l1 and l2 yields (14). 99 = -1.0 (14) If we select l2 for reduction, the equivalent parameter is calculated as shown in equation (15). meq a ma - (1.0)(mb)(-1.0) (15) Thus, the equivalent parameter is: ma + mb. The model can now be represented as shown in Figure 7. se—a\I1I——\ l1 (ma+mb) Figure 7. Reduced Bond Graph Model. This simple example provides an illustration of the storage field reduction technique. Consider the portion of a bond graph shown in Figure 8. This example shows a derivative C element whose initial effort path leads directly into a one junction that has two exiting effort paths. Figure 8. Bond Graph Model with Derivative Causality. The trace would end at this point due to the ambiguity of the exiting effort path. The solution to this type of problem would entail a matrix reduction operation and is discussed in the recommendations section in Chapter 5. Chapter 4. Algorithm Implementation 4.1 Design of Implementation This methodology has been implemented into the ENPORT software simulation package. The form of the algorithm used to develop the FORTRAN code is compact and takes advantage of the processes discussed previously. These processes reduce the required storage space and increase the speed of calculation of the equivalent coefficient. The algorithm checks on the linearity of each element in the trace by examining the form of each coefficient it encounters. The computer implemented algorithm incorporates the identification process into the actual reduction by noting the coefficients along the initial examination of the path. The presentation of this process is shown in Figure 9 on the following page. The causal path trace begins at the derivative element and continues through to the independent energy storing element. The computer implemented algorithm requires that the linear coefficients associated with each element passed during the trace be noted. Several options are employed by the algorithm inserted in the software. The process allows the user to select the element that is to be reduced. Default is the derivative element originally found by the algorithm. Additionally, the user can provide the form of the equation for the modified element. Default is the original form of the equation for the unaltered element. The software provides a listing of the elements in the causal path strictly for user information. If a model has multiple elements with derivative 19 20 30.80522 he :20 26E .m 2:9”. 229:8 axe I} EoEoE _ T 2662306 $23.85 mom: E 32 ES .to8 3ch Bo: AEV 3 .o .tooo .tooo .tooo 2:3 .tooo .tooo 20826 20: So: So: 5:26 92m 22m .30.: 68: £59 5:953 .6295: 58.229: 88:8 355 oocgowomo Sofia W J W J EoEoE .I 2:838 A o>zm>too .6 o>=m>=oo 2.5 Es 28 O E n. 21 causality, the process is repeated until all eligible forms of derivative causality have been reduced. Upon encountering an ineligible storage field with derivative causality the software determines under what class of problem this particular storage field falls and provides the user with a message to that effect. This identification tool was installed in the hopes that future software development will utilize the identification process already encoded in this portion of the program. The topic of further research will be discussed in Chapter 5, section 5.2. 4.2 Examples of Use The following physical system model can be described in bond graph form. As the illustration shows, the system consists of two point masses attached at either ends of a massless bar which is pivoted in the middle. a b l<—>l<——>l m1I Im2 74> Figure 10. Lever Arm System The bond graph of this system is shown in Figure 11. Derivative causality results on the l2 element as a direct result of the 22 assignment of integral causality on the l1 element. This model is eligible for the storage field reduction technique. SE —l—>|;A |-3—\ TF I—‘I—X 13 (3)4000 ‘L (b/a) EL I1 l2 (m1) (m2) Figure 11. Bond Graph Model of Lever Arm System The flow path from l2 to 11 yields equation (16). f6=(b/a)f2 (16) The effort path from l1 to I2 yields equation (17) e2=-(b/a)e,3 (17) The equivalent parameter is shown in equation (18). m..=m.+(b/a)’m. (18) The text on the following page shows the exact format used by the ENPORT software package when reducing a storage field in a bond graph model. 23 *** The number of dependent C and I ports is: L: List the current equations M: Modify the equations S: Show function types available D: list nodes with Default equations T: list/modify named_parameTers C: Causality display or assignment A: Alleviate derivative causality P: Proceed to the solver menu R: Return to the main menu H: Help Enter option (P):A The path contains the following elements: I2 13 TF 1A l1 Which element would you like to reduce? l2 or l1 Enter selection (l2 ): Hit to continue... Select equation type for l1 (GAIN ): Trace is complete 1. As the text shows, the algorithm alleviates the derivative causality in a user interactive manner. The reduced bond graph model is shown in Figure 12. Note the absence of derivative causality in the model; l2 has been reduced. 24 SE 1—>|;A |i> TF |-3’—\ 1B (340(k) —L (b/a) I1 [m.+(b/a)’m.] Figure 12. Reduced Form of Bond Graph Model Equation development can now proceed to yield a system of explicit state equations because no derivative causality exists in the model. An example bond graph is shown in Figure 13. Derivative causality results on the C1 element as a direct result of the assignment of integral causality on the It element. SE —1—>|1A (53—3 or A 03 If I: Figure 13. Bond Graph of Field with GY Element The algorithm eliminates the derivative causality in a user interactive manner. The reduced bond graph model is shown in Figure 14. Note the absence of derivative causality in the model. The linear spring, C1, has been reduced. 25 SE —-1—>|1A2 I I1 [m +(r2 /k)] Figure 14. Reduced Form of Bond Graph The unnecessary gyrator and O junction have been eliminated from the bond graph model as they now serve no purpose and equation development will now yield a system of explicit state equations. These examples provide insight into the basic principles involved in the reduction of linear storage fields with derivative causality. 4.3 Description of Software The FORTRAN algorithm included in Appendix C contains six subroutines: TBACK, INIT, TRACE, REDUCE, ELIM, and REASSIGN. The controlling subroutine, TBACK, calls INIT, TRACE, and REDUCE. INIT and TRACE make no subroutine calls, while REDUCE calls ELIM and REASSIGN. When the controlling subroutine TBACK is called, it identifies derivative elements and calls INIT. lNlT simply initializes the variables for each causal path trace and returns to TBACK. The controlling routine, TBACK, then calls TRACE. This subroutine, which follows the causal path trace, records the corresponding coefficients and returns to TBACK. TBACK calls REDUCE for the reduction portion of the algorithm. REDUCE asks the user for the element to be reduced and the form of the equivalent element equation. The REDUCE subroutine then calls ELIM. The elimination routine, ELIM, removes all unnecessary elements from the bond graph and returns to REDUCE. The storage field reduction routine, REDUCE, then calls REASSIGN to align equation numbers after the removal of elements from the bond graph. This reorganization is necessary for the proper storage of equations and their coefficients. REASSIGN returns to REDUCE when this process is complete. REDUCE then returns to TBACK and the method is repeated for other linear storage fields. Figure 15, shown on the following page, presents a flow chart of the subroutines. 26 27 W TBACK — INIT — TRACE _— REDUCE I: W REASSIGN Figure 15. Flow Chart of Subroutines Chapter 5. Conclusions 5.1 Summary The process detailed in Chapters 3 and 4 alleviates derivative causality in certain linear storage fields by tracing a causal path from the dependent variable to the independent energy storing variable that forced the original application of the derivative causality. Through the use of a straightforward algorithm, the methodology records the coefficients of the elements in the path in order to calculate an equivalence parameter. This equivalence parameter is applied to the user selected element and the reduced element can then be removed from the bond graph. Thus, integral causality has been restored to the bond graph while keeping the effects of the derivative element encoded in the equations for the model. Equation formulation will thus yield a system of explicit state equations. The methodology was derived with the intent of assisting engineers with their derivative causality problems. The causal path technique, although presented in a different manner, has been detailed previously in [1]. The form of the presentation of this technique and its implementation into ENPORT represented the main efforts in this project. The process enables the program to determine which bond graph modes are eligible for a direct explicit computational solution and which models need to be reduced before any explicit computation can take place. 28 29 The reduction takes place in a user interactive manner, with the user choosing the variable to be reduced along with the form of the equation for the equivalent energy variable. This interactive process serves not only as a means of alleviating derivative causality in a linear storage field, but also as an enhancement of the instructional powers of the ENPORT software package. This enhancement will serve as a rapid equivalence calculation technique. Thus, ENPORT users can rely on the software to calculate their linear equivalence parameters quickly and accurately. 5.2 Recommendations for Further Development This project began with the intent of alleviating derivative causality in all its forms, including those that arise from non-linear elements. The range of the project was narrowed to its existing form when the details of dynamic augmentation were examined. Although dynamic augmentation yielded insight, it encompassed a range of problems much larger than originally anticipated. It is recommended that this procedure be examined in greater detail. The development of a set of standard rules for the insertion of capacitance elements would then be in order. The extension of the storage field reduction technique to include the Split path problems is recommended. This development should yield a matrix reduction technique which will enable the software to eliminate those dependent energy variables which are functions of more than one independent energy variable. It is hoped that this new process will take advantage of the enclosed method of identification 30 and the model reduction algorithm's ability to correct those forms of derivative causality which are already eligible for consideration. Along the same line, the zero eigenvalue case may be eligible for a storage field reduction. This class of problems involves models with one stationary real mode. This stationary energy variable could be reduced into another energy variable and the equations for the model would be of lower order. This type of relationship arises for two capacitance elements on a one junction. As long as the initial displacements of the springs are equal, the effects of one element may be incorporated into the other without losing any dynamic information. The nonlinear storage field may best be studied through a comparison of the dynamic augmentation method with a direct numerical solution based on implicit integration. It is not known which of these two solutions would yield the most favorable results generally. The final judgement should be made by the system modeler. APPENDICES APPENDIX A DYNAMIC AUGMENTATION OF ROLLER COASTER MODEL The roller coaster system model was based on a simulation study begun by Scott Emery, an MSU graduate student in Mechanical Engineering. [3] This system introduces derivative causality to the bond graph when attempts are made to force the coaster to follow the track. Integral causality was restored to the system model through dynamic augmentation; the insertion of a 0 junction with a stiff spring between the vertical velocity 1 junction and the transformer that represented the dy/dx connection point. The modified system model was then examined using ENPORT and the results compare favorably with theory, i.e., the coaster followed the track and the velocity and acceleration profiles were as expected. The physical model follows in Figure A-1. 31 32 Figure A-1. Roller Coaster Model The bond graph is shown in Figure 2 section 2.1. The derivative causality is reduced by the insertion of a stiff spring element at the connection point between the point mass and the path. The augmented bond graph is shown in Figure 4, section 2.2. APPENDIX B DYNAMIC AUGMENTATION OF ROBOT ARM MODEL The robot arm system was based on the work presented by Tarokh in [4]. Figure 8-1 shows the robot arm free to move in the vertical plane. // Figure 8-1. Robot Arm in Vertical Plane The bond graph of this model is shown in Figure 32 on the following page. The model yielded derivative causality when the pinned body and the unconstrained body were attached. 33 34 12 SE4 1 V C1 MTFS MTF8 MTF2 _L @[Mrra \ 1 MTF6 1 13 MTF7 {—3 1 MTF1 '1 )\/\I I4 I 853°»? SE2 Figure B-2. Bond Graph Model of Robot Arm The causality was corrected by dynamic augmentation; the insertion of stiff spring elements, used to represent the connection point of the two arms. One spring was inserted for the vertical velocity component and one stiff spring for the horizontal velocity. The augmented bond graph is shown in Figure B—3 on the following page. C1 MTF2 1 P6 MTF3: SE1 MTF1 I1 I )“o y 352 SE3 R2 Figure 18. Augmented Bond Graph Model of Robot Arm This dynamic augmentation methodology was discovered in Zeid's work [5]. The substitution served to alleviate the derivative causality, as Figure 8-3 shows, and facilitate the formulation of state equations. The modified system model was then examined using ENPORT and the simulation results compared favorably with those available in the literature. APPENDIX C THE FORTRAN ALGORITHM CTBACK>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Last Change: 03/09/91 C C SUBROUTINE TBACK C C C****t'hititiii'iiiiiii********************************* C C VARIABLE LIST: 0000000000OOOOOOOOOOOOOOO 5 CURRENT CONNECTOR NUMBER IN TRACE CURRENT ELEMENT IN TRACE CHECKS FOR MULTIPLE PATHS CHECKS ID OF PATH NUMBER OF TRACE PATHS IN MODEL PATH NUMBER PASSED TO REDUCE DERIVATIVE ELEMENT EXIT SIGNAL (TRACE FAILED IF FLAG-TRUE) CHARACTER NAME OF FUNCTION ASSOCIATED WITH IEQ POINTER FOR CONNECTOR LIST POINTER FOR CONNECTOR LIST PATH IDENTIFICATION ARRAY STORING NUMBER OF ELEMENTS IN EACH PATH EQUATION NUMBER ASSOCIATED WITH CURRENT E.EMENT INTEGER FUNCTION TYPE OF IEO mDE TYPE PREVIOUS ELEMENT IN TRACE ARRAY CONTAINING ELEMENT NUMBERS IN TRACE PRIMARY COEFFICIENT PRIMARY PATH TRACE SECONDARY COEFFICIENT SECONDARY PATH TRACE 36 37 Ci'itiiiii'*****i'iiitfiiiii'iiii'*tttiii’iifiit************** C C INTEGER CB,DE,CE,OE,IEO,IFI'P,CT,ID2(5) INTEGER 11 ,l2,CNT,CH1 ,CH2,ID(5),PATH(5,20) DOUBLE PRECISION PC(5),SC(5) CHARACTER PPT*1,SPT*1,NTYPE*4,FNAM*4 LOGICAL FLAG 00 INCLUDE 'SIZEBK.CBK' INCLUDE 'GREDBK.CBK‘ INCLUDE 'FUNCBK.CBK' INCLUDE 'UTILBK.CBK' EXTERNAL BLNKLN,PROMPT,WRTSTR,NEWL *iTBACKiiitiiiiii******i*****************ifiifitiiiiti ...IN|TIALIZE COUNTER FOR NUMBER OF PATHS "OOOOOO 00 0 CONTINUE CNT a 1 O C...USE CAUSAL PATH SUBROUTINES TO IDENTIFY THE DERIVATIVE C CAUSALITY AND, WHERE LINEAR ELEMENTS EXIST, CALCULATE c COEFFICIENTS AND ELIMINATE DERIVATIVE CAUSALITY FROM MODEL 0 C DO 2000 1-1,1NELS c C...IDENTIFY ELEMENT TYPE C NTYPE .. NBXTP(I)(2:2) c C...1 ELEMENT C IF (NTYPE.EO.'I') THEN C C ...OBTAIN THIS ELEMENTS CONNECTOR(S) AND ASSIGN CB 090 090 090 090 0090 C 38 I1 - IBDPTRU) I2 . IBDPTR(I+1)-1 ..IF MULTIPORT ELEMENT FOUND SKIP THIS PATH IF (l1.NE.|2) THEN CALL BLNKLN CALL WRTSTR(' A multiport l element was found') CALL BLNKLN GOTO 1900 ENDIF CB - IBDSEL(I1) ..CHECK CAUSALI'IY FOR I ELEMENT IF (BNDCAU(CB).NE.I) THEN DE - I ..FIND EQUATION NUMBER IEO - INEQP(I) ..FIND EQUATION TYPE IH’P - IFCNTP(IEQ) FNAM - FNNAM1(IFTP) ..IF EQUATION TYPE IS NOT ATTI'ENUATE OR GAIN SKIP THIS PATH IF EQUATION IS OK, START TRACE IF ((FNAM.EQ'GAIN').OR.(FNAM.EQ.'A1T)) THEN FLAG - .FALSE. ELSE CALL BLNKLN CALL WRTSTR(' A nonlinear I element was found') CALL BLNKLN GOTO 1900 ENDIF .INITIALIZE FOR TRACE CALL INIT(DE,PPT,SPT,PC,SC,CNT) 090 090 090 090 090 090 090 no 39 ..RUN TRACE AND CHECK FOR PUNTS OE - DE CALL TRACE(CB,PPT,SPT,PC,SC,OE,FLAG,PATH,CNT,ID,IDZ) IF (FLAG.EQ..TRUE.) GOTO 1900 CNT - CNT + 1 ENDIF ..C ELEMENT ELSE IF (NTYPE.EQ.'C') THEN ..OBTAIN THIS ELEMENTS CONNECTOR(S) I1 - IBDPTRII) l2 - IBDPTR(I+1)-1 ..IF MULTIPORT ELEMENT FOUND SKIP THIS PATH IF (l1.NE.|2) THEN CALL BLNKLN CALL WRTSTR(' A multiport C element was found') CALL BLNKLN GOTO 1900 ENDIF CB - IBDSEL(I1) ..CHECK CAUSALITY FOR C ELEMENT IF (BNDCAU(CB).EQ.I) THEN DE - I ..FIND EQUATION NUMBER IEO - INEQP(I) ..FIND EQUATION TYPE IFTP - IFCNTP(IEQ) FNAM - FNNAMI(IFrP) 40 ...IF EQUATION IS NOT ATTENUATE OR GAIN -- PUNT! IF EQUATION IS OK, START TRACE 0000 IF ((FNAM.EQ.'GAIN').OR.(FNAM.EQ.‘ATT')) THEN FLAG - .FALSE. ELSE CALL BLNKLN CALL WRTSTFIC A nonlinear C element was found') CALL BLNKLN GOTO 1900 ENDIF ...INITIALIZE FOR TRACE CALL IN|T(DE,PPT,SPT,PC,SC,CNT) ...RUN TRACE AND CHECK FOR PUNTS 000 000 OE = DE COUNT s 1 CALL TRACE(CB,PPT,SPT,PC,SC,OE,FLAG,PATH,CNT,ID,IDZ) IF (FLAG.EQ..TRUE.) GOTO 1900 CNT - CNT + 1 ‘ ENDIF ENDIF 0000 —L 900 CONTINUE NO 000 CONTINUE ...EXIT IF MODEL HAS NOT BEEN CHANGED 000 IF (CNT.EQ.1) THEN CALL BLNKLN CALL WRTSTRC No derivative causality was found') CALL BLNKLN RETURN ENDIF 41 C...CHECK FOR REDUCTION POSSIBILITIES C CH1 - 1 DO 2100 I-1,CNT-1 CH2 - ID(I) IF ((CH1.EO.1).AND.(CH2.EQ.1)) THEN CT - I CALL REDUCE(PATH,PC,SC,CT,IDZ,FLAG) CH1 - 2 ELSE IF (CH2.EQ.2) THEN CALL BLNKLN CALL WRTSTRC Split path found...') CALL BLNKLN ELSE IF (CH2.EO.3) THEN CALL BLNKLN CALL WRTSTRC Nonlinear element in path...') CALL BLNKLN ENDIF 2100 CONTINUE IF ((CH1.EO.2).AND.(CNT.GT.2)) GOTO 10 C C...DONE C CALL BLNKLN CALL WRTSTRC Trace is complete ') CALL BLNKLN CALL PROMPTC Press key to continue...') CALL NEWL CALL BLNKLN RETURN ED C C>>>>> C C C CINIT>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Last Change: 03/09/91 SUBROUTINE INIT(DE,PPT,SPT,PC,SC,CNT) 00 00 42 C*********tittiti************tifiitiiiiititit*iitittttt C C VARIABLE LIST: C C CNT: NUMBER OF PATHS IN MODEL C DE: DERIVATIVE ELEMENT C N'IYPE: ELEMENT TYPE C PC: PRIMARY COEFFICIENT C PPT: PRIMARY PATH TRACE C SC: SECONDARY COEFFICIENT C SPT: SECONDARY PATH TRACE C C'tiiitifiiiiiiiiti‘iiiifififiiiii********i**i*******ttttiit C C INTEGER DE,CNT CHARACTER NTYPE*4,PPT*1,SPT*1 DOUBLE PRECISION PC(5),SC(5) C INCLUDE 'SIZEBK.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'FUNCBK.CBK' INCLUDE 'UTILBK.CBK' C C**INIT*******i‘i'i'ktiiti'ifitttittttfii‘titfii‘tttt***t****** C C C...ASSIGN INITIAL VALUES DEPENDING ON FORM OF DE C NTYPE =- NBXTP(DE)(2:2) IF (NTYPE.EO.'C') THEN PPT - 'E' SPT - 'F' 00 ELSE PPT - 'F' SPT - 'E' ENDIF 0000 43 C...INIT|ALIZE PC, AND SC C PC(CNT) - 1.000 SC(CNT) -1.0D0 CTRACE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Last Change: 03/09/91 C C C C SUBROUTINE TRACE(CB,PPT,SPT,PC,SC,OE,FLAG,PATH,CNT,ID,IDZ) Cififiiiiiitiii*tifiiittifit*iiiitiitiiiitifiiiifiiflttttitiii C C VARIABLE LIST: OOOOOOOOOOOOOOOOOOOO AC: CB. CE: CNT: CONT: ENAM: FLAG: FNAM: l1 : I2: ID: ID2: IEQ: IFI' P: IVGY: MTF: NTYPE: BNDTYP: ACTUAL CONNECTOR (IDENITIFICATION TOOL) CONNECTOR TYPE CURRENT CONNECTOR NUMBER IN TRACE CURRENT ELEMENT IN TRACE NUMBER OF TRACE PATHS IN MODEL NUMBER OF ELEMENTS IN TRACE ELEMENT NAME IN SYSTEM GRAPH EXIT SIGNAL (TRACE FAILED IF FLAG-.TRUE.) NAME OF FUNCTION ASSOCIATED WITH IEQ CONNECTOR LIST POINTER CONNECTOR LIST POINTER PATH IDENTIFICATION ARRAY STORING NUMBER OF ELEMENTS IN PATH EQUATION NUMBER ASSOCIATED WITH CURRENT ELEMENT INTEGER FUNCTION TYPE OF IEQ GYRATOR MODULUS FOUND IN TRACE TRANSFORMER MODULUS FOUND IN TRACE ELEMENT TYPE 44 PREVIOUS ELEMENT IN TRACE ARRAY CONTAINING ELEMENT NUMBERS IN TRACE PRIMARY COEFFICIENT DIRECTION OF CONNECTOR BETWEEN OE AND CE DIRECTTON OF CONNECTOR BETWEEN CE AND NE PRIMARY PATH TRACE SECONDARY COEFFICIENT NUM. OF PRIMARY PATH'S EXITING A 0 OR 1 ELEMENT (NOTE: IF SCOUNT > 1 THE MODEL CANNOT BE ADJUSTED WITH THIS METHOD) SPT: SECONDARY PATH TRACE STRK1 : ELEMENT NUMBER AT CAUSAL STROKE END OF CB STRK2: ELEMENT NUMBER AT CAUSAL STROKE END OF NB TEST: COM PLETTON CHECK (COMPLETE IF TEST=.TRUE.) *iiiitttiiii'*********i'ttfiiifittitiitttiti‘tti**t****** 000000000000000000 INTEGER CB,CE,OE,I1 ,I2,AC,STRK1,STRK2,SCOUNT,IEO,IFTP INTEGER COUNT,CNT,ID(5),PATH(5,20),ID2(5) CHARACTER PPT‘1 ,SPT*1,NTYPE‘4,FNAM*8,BNDTYP*4 DOUBLE PRECISION PC(5),SC(5),POWER1,POWER2,MGY,MTF LOGICAL TEST,FLAG 00 INCLUDE 'SIZEBK.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'FUNCBK.CBK' INCLUDE 'UTILBK.CBK' EXTERNAL BLNKLN,WRTSTR,NEWL,PROMPT *OTRACE************fitiiiiiifiiiitii‘ttfiiii*tfifiiiiiittti ...|NITIALIZE TEST, FLAG, SCOUNT, COUNT, ID AND PATH 000000 00 FLAG - .FALSE. ID(CNT) - 1 TEST - .FALSE. SCOUNT - 0 COUNT - 1 45 PATH(CNT,COUNT) - OE C C 10 CONTINUE C C...IDENTIFY CURRENT ELEMENT, CE, FROM CURRENT CONNECTOR, CB, C AND OLD ELEMENT, OE. SIMILIARLY, IDENTIFY THE POWER C...D|RECTION WITH +1 INDICATING THAT POWER IS CONSERVED C (CB GOES FROM OE TO CE). C C CE-IELSBD(CB,1) POWER1 - -1.0D0 IF (CE.E0.0E) THEN CE-IELSBD(CB,2) POWER1-1.0DO ENDIF STRK1 - BNDCAU(CB) C C...IDENTIFY ELEMENT TYPE OF CE C NTYPE-NBXTP(CE)(2:2) C C Cittttiiti'ktt*fifittitifliiifitiiiiiitfitfitifitti'iifitittttii Cififiiiiifiiitttiii*ttitfitflittiiitttfiiifitiifiittittititti C C IF (NTYPE.EO.'0') THEN C C...IDENTIFY THE CONNECTOR LIST FOR THIS ELEMEMT C I1 - IBDPTR(CE) I2 - IBDPTR(CE+1)-1 C C...IF SIGNAL EXISTS IN CONNECTOR LIST -- PUNT! C DO 20 J-I1,l2 AC . IBDSEL(J) BNDTYP - BDTP(AC)(1 :1) |F(BNDTYP.EQ.'SIGNAL') THEN ID(CNT) .. 3 GOTO 10100 46 ENDIF 20 CONTINUE C C...EXAMINE EACH COIWECTOR ON THE ELEMENT C DO 100 l-l1,l2 AC . IBDSEL(I) ..FIND POWER DIRECTTON OF AC 090 IF (IELSBD(AC,1).EQ.CE) THEN POWER2 - 1.0D0 ELSE POWER2 = -1 .0D0 ENDIF ..IDENTIFY THE CAUSAL STROKE END CF AC STRK2 - BNDCAU(AC) .. .IF THE PRIMARY PATH IS FLOW, CHECK FOR SPLIT PATH, ASSIGN NEW CONNECTOR NUMBER, AND ADJUST PC & SC IF ((PPT.EO.'F').AND.(STRK2.NE.CE).AND.(AC.NE.CB)) THEN SCOUNT - SCOUNT + 1 ..USE CAUSAL INFO. ALONG WITH POWER DIRECTIONS OF AC AND CB TO DETERMINE ADJUSTMENTS TO SC AND PC 0000 00 00:00 000 IF (POWER1.EO.POWER2) THEN PC(CNT) . PC(CNT) ELSE PC(CNT) - -1.0DO*PC(CNT) ENDIF SC(CNT) - SC(CNT) C C...ASSIGN NEXT CONNECTOR C NB - AC C C...IF PPT IS EFFORT: ASSIGN NEw CON. NUMBER AND ADJUST SC 47 C ELSE IF ((PPT.EQ.'E‘).AND.(STRK2.EO.CE)) THEN C C...USE CAUSAL INFO. ALONG WITH POWER DIRECTIONS OF C AC AND CB TO DETERMINE ADJUSTMENTS TO SC AND PC C IF (POWER1.EO.POWER2) THEN SC(CNT) - SC(CNT) ELSE SC(CNT) . -1.0DO*SC(CNT) ENDIF PC(CNT) - PC(CNT) C C..ASSIGN NEXT CONNECTOR C NB =- AC C ENDIF 100 CONTINUE C C...ASSIGN VALUES FOR NEXT STEP IN TRACE C COUNT I COUNT + T PATT-I(CNT,COUNT) - CE OE =- CE CB - NB TEST - .FALSE. C C...NOTE SPLIT PATH C IF (SCOUNT.GT.1) THEN CALL BLNKLN CALL WRTSTR(' Split path at 0 junction ') CALL WRTSTR(' Trace failed... ') CALL BLNKLN ID(CNT) - 2 GOTO 10000 ENDIF C C CiiiiiiifiiiiiiiittiifiI'iiii’iiiititiiiitittiifififittttiiit C*****.*§*§**tiiiiitiiii***************ti************* C 48 C ELSE IF (NTYPE.EO.'1') THEN c C...IDENTIFY THE CONNECTOR UST FOR THIS ELEMENT C l1 . IBDPTR(CE) I2 - lBDPTR(CE+1)-1 C C...IF SIGNAL EXISTS IN CONNECTOR LIST -- PUNT! C DO 150 J-I1,l2 AC - IBDSEL(J) BNDTYP .- BDTP(AC)(1 :1) IF(BNDTYP.EQ.'SIGNAL') THEN ID(CNT) - 3 GOTO 10100 ENDIF 150 CONTINUE C C...EXAMINE EACH CONNECTOR ON THE ELEMENT C DO 200 I=|1,I2 AC - IBDSEL(I) c C...FIND POWER DIRECTTON OF AC C IF (IELSBD(AC,1).EO.CE) THEN POWER2 - 1.0D0 ELSE POWER2 . -1 .0D0 ENDIF ...IDENTII-v THE CAUSAL STROKE END OF AC STRK2 . BNDCAU(AC) ...IF THE PRIMARY PATH IS EFFORT, CHECK FOR SPLIT PATH, ASSIGN NEW CONNECTOR NUMBER, AND ADJUST PC & SC 0000 000 IF ((PPT.EO.'E').AND.(STRK2.EO.CE).AND.(AC.NE.CB)) THEN 00 49 SCOUNT - SCOUNT + 1 C C...USE CAUSAL INFO. ALONG WITH POWER DIRECTIONS OF C AC AND CB TO DETERMINE ADJUSTMENTS TO SC AND PC C IF (POWER1.EQ.POWER2) THEN PC(CNT) - PC(CNT) ELSE PC(CNT) . -1 .ODO*PC(CNT) ENDIF SC(CNT) - SC(CNT) C C..ASSIGN NEXT CONNECTOR C NB = AC C C...IF PPT IS FLOW: ASSIGN NEW CONNECTOR NUMBER AND ADJUST SC C ELSE IF ((PPT.EQ.'F').AND.(STRK2.NE.CE)) THEN C C...USE CAUSAL INFO. ALONG WITH POWER DIRECTIONS OF C AC AND CB TO DETERMINE ADJUSTMENTS TO SC AND PC C IF (POWER1.EO.POWER2) THEN SC(CNT) - SC(CNT) ELSE SC(CNT) .. -1.0DO*SC(CNT) ENDIF PC(CNT) - PC(CNT) C C..ASSIGN NEXT CONNECTOR 0 NB . AC C C ENDIF 200 CONTINUE C C...ASSIGN VALUES FOR NEXT STEP IN TRACE C COUNT - COUNT + 1 PATH(CNT,COUNT) - CE 5O OE - CE CB - NB TEST - .FALSE. C C...NOTE SPLIT PATH C IF (SCOUNT.GT.1) THEN CALL BLNKLN CALL WRTSTR(' Split path found at 1 junction ') CALL WRTSTR(' Trace failed... ') CALL BLNKLN ID(CNT) . 2 GOTO 10000 ENDIF C C Ctiittitttittttfitttttit.tttitit.tittttttttitfitttttttii' Cititititttitittititttittttt*tttfitttitttfittttttfitttitt C C ELSE IF (NTYPE.EQ.'T') THEN C C...IDENTIFY MOD.TF FROM CE C C...FIND EQUATION NUMBER FOR CE C IEO - INEOP(CE) C C...FIND EQUATION TYPE OF CE C IFT P - IFCNTP(IEO) FNAM - FNNAM1(IFTP) C C...IF MTF IS NOT A CONSTANT -- PUNT! C IF (FNAM.EO.'CON') THEN MTF - EOPAR(IEOPTR(IEO)) ELSE ID(CNT) - 3 GOTO 10200 ENDIF C C...FIND CONNECTOR LIST FOR THIS ELEMENT 51 I1 - IBDPTR(CE) I2 - IBDPTR(CE+1)-1 C C...IF SIGNAL EXISTS IN CONNECTOR LIST -- PUNTI C 00 250 J-I1,I2 AC - IBDSEL(J) BNDTYP . BDTP(AC)(1 :1) IF(BNDTYP.EO.'SIGNAL') THEN ID(CNT) - 3 GOTO 10100 ENDIF 250 CONTINUE C C...FIND NEXT CONNECTOR C DO 300 I - I1,I2 Ac - IBDSEL(I) IF (AC.NE.CB) THEN NB . AC C C...CHECK CAUSAL DIRECTION C IF (BNDCAU(NB).EO.CE) THEN C C...ADJUST PC AND SO C PC(CNT) - MTF'PC(CNT) SC(CNT) - (1.000/MTF)*SC(CNT) ELSE PC(CNT) - (1 .ODOIMTF)*PC(CNT) SC(CNT) - MTF*SC(CNT) ENDIF ENDIF 300 CONTINUE C C...ASSIGN VALUES FOR NEXT STEP IN TRACE C COUNT - COUNT + 1 PATH(CNT,COUNT) .- CE OE - CE CB - NB 5 2 TEST - .FALSE.C C Ciiii*‘Iiiiiti*ifiiiiii*iii'iiiiifiiitiiifiti*tttiiii****** C******.***.*****titiiiiiiittiti*************titfliiiti C C ELSE IF (NTYPE.EQ.'G') THEN C C IDENTIFY MGY FROM CE C C...FIND EOUATTON NUMBER OF CE C IEO - INEOP(CE) C C...FIND EQUATION TYPE OF CE C IFTP - IFCNTP(IEO) FNAM .. FNNAM1(IFTP) C C...IF MGY IS NOT A CONSTANT - PUNT! C IF (FNAM.EO.'CON') THEN MGY - EOPAR(IEOPTR(IEO)) ELSE ID(CNT) - 3 GOTO 10200 ENDIF C C...FIND CONNECTOR LIST FOR THIS ELEMENT C I1 = IBDPTR(CE) I2 - IBDPTR(CE+1)-1 C C...IF SIGNAL EXISTS IN CONNECTOR LIST - PUNTI C DO 350 J-I1,l2 AC - IBDSEL(J) BNDTYP . BDTP(AC)(1 :1) IF(BNDTYP.EQ.'SIGNAL') THEN ID(CNT) - 3 GOTO 10100 ENDIF 350 CONTINUE 53 C C...FIND NEXT CONNECTOR C DO 400 I - I1 ,12 AC - IBDSEL(I) IF (AC.NE.CB) THEN NB - AC ...CHECK CAUSAL DIRECTION IF (BNDCAU(NB).EO.CE) THEN ...SWITCH PATHS (ENTERED GY ON PRIMARY FLOW) 000 000 PPT - 'E' SPT - 'F' ...ADJUST PC AND SC 000 PC(CNT) .. (1.000/MGY)*PC(CNT) SC(CNT) - MGY*SC(CN1) ELSE ...SWITCH PATHS (ENTERED GY ON PRIMARY EFFORT) 000 0 PPT - 'F' SPT - 'E' ...ADJUST PC AND SC 000 PC(CNT) - MGY*PC(CN1) SC(CNT) - (1 .000/MGY)*SC(CNT) ENDIF ENDIF 400 CONTINUE C C...ASSIGN VALUES FOR NEXT STEP IN TRACE C COUNT - COUNT + 1 PATH(CNT,COUNT) .. CE OE . CE CB . NB 5 4 TEST - .FALSE. C C Ciiifliiiititiiiit*tiitttiittiiifiitttifiit*t*t****tttttt Ciiiiifiittfiitititiiiiiiiiiiifittt*tiiiittitttittt*ititfl C C ELSE IF (NTYPE.EQ.'I') THEN C C...FIND EQUATION NUMBER C IEQ - INEOP(CE) C C...FIND EQUATION TYPE C IFTP - IFCNTP(IEO) FNAM . FNNAM1(IFTP) C C...IF EQUATION TYPE IS NOT ATr OR GAIN -- PUNTI C IF ((FNAM.EO.'A‘I'I").OR.(FNAM.EO.‘GAIN')) THEN FLAG - .FALSE. ELSE ID(CNT) .. 3 GOTO 10200 ENDIF C C...FIND CONNECTOR LIST FOR THIS ELEMENT C I1 - IBDPTR(CE) 12 - IBDPTR(CE+1)-1 C C...IF SIGNAL EXISTS IN CONNECTOR LIST -- PUNTI 0 DO 450 J-I1,I2 AC - IBDSEL(J) BNDTYP - BDTP(AC)(1 :1) IF(BNDTYP.EQ.'SIGNAL') THEN ID(CNT) - 3 GOTO 10100 ENDIF 450 CONTINUE C 5 5 C...IDENTIFY THIS ELEMENT IN PATH c ID(CNT) . 1 COUNT - COUNT + 1 PATH(CNT,COUNT) - CE I02(CNT) - COUNT TEST . .TRUE. C C Ctfiiiiiiiflit.if...itititiifliititifiiiiiifi******i******* Ciil‘fiiiii*ttttiiiittfiittittiittt*********iiiiiitttti'i't C C ELSE IF (NTYPE.EQ.'C') THEN C C...FIND EQUATION NUMBER C IEQ - INEOP(CE) C C...FIND EQUATION TYPE C IFI'P - IFCNTP(IEO) FNAM - FNNAM1(IFTP) C C...IF FUNCTION IS NOT ATT OR GAIN - PUNTI C IF ((FNAM.EO.'ATI").OR.(FNAM.EQ.’GAIN')) THEN FLAG - .FALSE. ELSE ID(CNT)-3 GOTO 10200 ENDIF C C...FIND CONNECTOR LIST FOR THIS ELEMENT C I1 - IBDPTR(CE) I2 - lBDPTR(CE+1)-1 C C...IF SIGNAL EXISTS IN CONNECTOR LIST - PUNTI 0 DO 550 J-I1 ,12 AC . IBDSEL(J) BNDTYP - BDTP(AC)(1:1) 5 6 IF(BNDTYP.EQ.'SIGNAL') THEN ID(CNT)-3 GOTO10100 ENDIF 550 CONTINUE C C...IDENTIFY THIS ELEMENT IN PATH C ID(CNT)-1 COUNT - COUNT + 1 PATH(CNT,COUNT) - CE ID2(CNT) - COUNT TEST-.TRUE. C C Ctitttiii*tttttttttttttitititittittttttttttitittttitit Ctitittiitttitttfitttttttittttit.*ttttttttttt*ttiitttit C C ELSE IF (NTYPE.EQ.'E') THEN C C...PRINT ERROR MESSAGE AND RETURN C CALLBLNKLN CALL WRTSTR(' Trace found as forcing element') CALL WRTSTR(' Trace failed... ') CALLBLNKLN ID(CNT)-=3 FLAG=.TRUE. RETURN C C Ciitttttt*fltittttttttttttitititi*tttttttttitttittttttt C***i********tt***titttttitt*itiittittttiitttitt*ttitt C C ELSE IF (NTYPE.EQ.'F') THEN C C...PRINT ERROR MESSAGE AND RETURN C CALL BLNKLN CALL WRTSTR(' Trace found as forcing element') CALL WRTSTR(' Trace failed... ') 57 CALLBLNKLN ID(CNT)-3 FLAG-.TRUE. RETURN C C Ctttiitiiititttttttttttttitttitt*ttttttttttttit.titttt C*****ttt*tittiitttttiitiitt*ttittti'titfiiti'tttfittttiti C C ELSE IF (NTYPE.EQ.'R') THEN C C...PRINT ERROR MESSAGE AND RETURN C CALLBLNKLN CALL WRTSTR(' Trace found as forcing element') CALL WRTSTR(' Trace failed... ') CALLBLNKLN ID(CNT)-3 FLAG-.TRUE. RETURN C C Cttifiiiiiittt*titttttttitiititti*ttiittttttiititititit Ctiitifitittittttiittfitfittiiiiittiitittttttifittttittttt C C ELSE C C...TRACE HAS FOUND AN ILLEGAL ELEMENT TYPE C C CALLBLNKLN CALL WRTSTR(' Trace has found an illegal element') CALL WRTSTR(' Trace failed... ') CALLBLNKLN ID(CNT)-3 FLAG-.TRUE. RETURN C C...SPLIT PATH C 10000 CONTINUE 58 C FLAG - .TRUE. RETURN C C...SIGNAL FOUND C 10100 CONTINUE C CALL BLNKLN CALL WRTSTR(' A signal was found in the path) CALL WRTSTR(' Trace failed... ') CALL BLNKLN FLAG - .TRUE. RETURN C C...ILLEGAL FUNCTION TYPE C 10200 CONTINUE C CALL BLNKLN CALL WRTSTR(' Illegal function type found) CALL WRTSTR(' Trace failed... ') CALL BLNKLN FLAG - .TRUE. RETUFN C C Citttttttttitttitttttttttttttitttttt*ttttttttttttttttt Cttttttiitiittittttttitttittittitttttttttittttittttttt C ENDIF C C IF (T EST.EQ..FALSE.) GOTO 10 C C RETURN 3D C C C>>>>> 59 C C C CREDUCE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Last Change: 04/23/91 C C SUBROUTINE REDUCE(PATH,PC,SC,CNT,IDZ,FLAG) C C C**.****t*******************************fi************* C C VARIABLE LIST: C C ANS: ANSWER C CNT: PATH NUMBER C CONT: ELEMENT NUVIBER C II: DERIVATIVE ELEMENT C DFLT: DEFAULT ANSWER C DL: ELEMENT NLMBER C EC: EQUIVALENT COEFFICIENT C EL: ELEMENT NUMBER C ENAM1 : ELEMENT NAME C ENAM : ELEMENT NAME C FE: FORCING ELEMENT C FLAG: ERROR INDICATOR C l1 : POINTER C IB: POINTER C ID2: ARRAY STORING NUMBER OF ELEMENTS IN PATH C IEQ: EQJATION NUMBER C K: STIFFNESS PARAMETER C M: INERTIAL PARAMETER C N: ELEMENT NAME C NAM: ELEMENT NAME C NAME: ELEMENT NAMES C (D: ORIGINAL COEFFICIENT C PATH: MATRIX CONTAINING ELEMENTS IN TRACE C PC: PRIMARY COEFFICIENT C SC: SECONDARY COEFFICIENT C Z: POINTER C C*****1...fi****.*.*************i****§*fi****.§***fi*fifitfi‘I' C INTEGER PATH(5,20),CNT,IDZ(5),DE,FE,IEQ,EL,DL,I1,IB,Z 60 INTEGER COUNT DOUBLE PRECISION PC(5),SC(5),OC,EC,K,M CHARACTER NTYPE*4,ENAM1*3,ENAM2*B,ANS*3,STRING*40 CHARACTER NAM*8,NAME(20)*8,DFLT*8,N*8 LOGICAL FLAG C EXTERNAL WRTSTR,PROMPT,GETANS,BLNKLN,NEWL,MENSET,GOON C INCLUDE 'SIZEBK.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'FUNCBK.CBK‘ INCLUDE 'UTILBK.CBK‘ C CtiREDUCEttiitiiitittiititttttitttttt*itttttitfifititttt C COUNT =- ID2(CNT) CALL MENSET(.TRUE.) FULL - MMFULL C C...INFORM USER OF PATH CONTENTS C DO 4 I=1,COUNT Z - PATH(CNT,I) NAME(I) - ELNAM(Z) 4 CONTINUE C CALL BLNKLN CALL WRTSTR(' The path contains the following elements:') CALL BLNKLN WRITE(STRING,5)(NAME(I),I=1 ,COUNT) 5 FORMAT(4X,6(1X,A3)) CALL WRTSTR(STRING) CALL BLNKLN C C...OBTAIN REDUCTION CHOICES C DE - PATH(CNT,1) FE - PATH(CNT,COUNT) ENAM1 - ELNAM(DE) ENAM2 - ELNAM(FE) c C...PROMPT USER FOR REDUC‘ITON CHOICE (DEFAULT = DE) C 100 C 61 CONTTNUE CALL BLNKLN CALL WRTSTR(' Which element would you like to reduce?) CALL BLNKLN WRITE(STRING,100)ENAM1 ,ENAM2 FORMAT(5X,A8,'or ',5X,A8) CALL WRTSTR(STRING) CALL BLNKLN STRING-' Enter selection ('l/ENAM1/l'):' CALL PROMPT(STRING) C...READ AND INTERPRET ANSWER C C ANS - '11' CALL GETANS(ANS) IF ((ANS.EO.'#').OR.(ANS.EO.' )) THEN ANS - ENAM1 ENDIF C...ASSIGN VALUES FOR REDUCTION C C IF (ANS.EO.ENAM1) THEN EL - FE DL - DE ELSE IF (ANS.EO.ENAMZ) THEN EL - DE DL - FE ELSE CALL BLNKLN CALL WRTSTR(' Bad entry...Please try again‘) CALL BLNKLN GOTO 10 ENDIF C...FIND CC C NTYPE - NBXTP(DL)(2:2) IEQ - INEOP(DL) IF (NTYPE.EQ.'I') THEN OC - EQPAR(IEQPTR(IEQ)) IF (OC.NE.0.0DO) THEN OC - 1.0D0/OC 090 090 090 090 090 OO on 090 on 62 ENDIF ELSE OC - EQPAR(IEQPTR(IEQ)) ENDIF ..OBTAIN CORRECT COEFFICIENTS NTYPE - NBXTP(EL)(2:2) ..IDENTIFY CONNECTOR LIST I1 - IBDPTR(EL) IB - IBDSEL(I1) IF (NTYPE.EQ.'I') THEN ..FIND EQUATION NUMBER IEQ :- INEOP(EL) ..FIND COEFFICIENT M - EQPAR(IEQPTR(IEQ)) IF (M.NE.0.0D0) THEN M - 1.0D0/M ENDIF ..CALCULATE EQUIVALENT COEFFICIENT EC - M-PC(CNT)*SC(CNT)*OC IF (EC.NE.0.0D0) THEN EC - 1.0D0/EC ENDIF ELSE IF (NTYPE.EQ.'C') THEN ..FIND EQUATION NUMBER IEQ - INEOP(EL) ..FIND COEFFICENT 63 K - EQPAR(IEQPTR(IEQ)) ...CALCULATE EQUIVALENT COEFFICENT EC - K - PC(CNT)"’SC(CNT)*OC ELSE ...ERROR IN UST 000 00 000 0 CALL BLNKLN CALL WRTSTR(' An error in the procedure has occurred') CALL BLNKLN FLAG - .TRUE. RETUM ENDIF C...ELIMINATION 0 CALL ELIM(PATH,DL,CNT,ID2) DO 200 1:25 200 E7CFLG(I) - .FALSE. CALL REASSIGN(.TRUE.) C C...CORRECT THE EQUATION C DO 1000 I-1,INELS NAM - ELNAM(I) IF (ENAM1.EO.NAM) THEN DE - I IEQ . INEOP(DE) N - NAM ELSE IF (ENAM2.EQ.NAM) THEN FE - I IEQ . INEOP(FE) N . NAM ENDIF 1000 CONTTNUE C C...ASSIGN CORRECT COEFFICIENT C 64 EQPAR(IEQPTR(IEQ)) - EC C C...PROMPT USER FOR EOUATTON TYPE C 1400 CONTINUE CALL BLNKLN IF (NTYPE.EQ.'I') THEN DFLT - 'GAIN' ELSE IF (NTYPE.EQ.'C') THEN DFLT - 'ATT' ENDIF WRITE(STRING,1450)N 1450 FORMAT(5X,'SeIect equation type for ',A8) CALL WRTSTR(STRING) CALL BLNKLN STRING-' ('//DFLT//'):' CALL PROMPT(STRING) C C...READ AND INTERPRET ANSWER C ANS - '#' CALL GETANS(ANS) IF ((ANS.EO.'#').OR.(ANS.EQ.' ')) THEN ANS - DFLT ENDIF IF ((ANS.NE.'ATT‘).OR.(ANS.NE.'GAIN')) THEN IFT P - IFCNTP(IEO) FNNAM1 (IFT P) =- ANS ELSE CALL BLNKLN CALL WRTSTR(' Bad entry please try again...') GOTO 1400 ENDIF C C RETUFN 30 C C C>>>>> C C 65 CELIM>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Last Change: 04/23/91 C C SUBROUTINE ELIM(PATH,DE,CNT,ID2) C C Ci*i*****i*fi***i**i*tiii********************tiiiiiitii C C VARIABLE LIST: C C A: COUNTER C B: COUNTER C Q COLNTER C CF.- CURRENT ELEMENT C CNT: NUMBER OF TRACE PATHS IN MODEL C COUNT ELEMENT NUMBER IN PATH C DE: ELEMENT SELECTED FOR REDUCTION C I1 : CONNECTOR LIST POINTER C I2: CONNECTOR LIST POINTER C ID2: ARRAY STORING NUMBER OF ELEMENTS IN TRACE C NTYPE: NODE TYPE C PATH: ARRAY CONTAINING ELEMENT NUMBERS IN TRACE C C***********t*tttiititiiifiittiii**i**************ittti C INTEGER PATH(5,20),DE,CNT,ID2(5),l1,I2,CE,A,B,C INTEGER COUNT CHARACTER NTYPE*4 INCLUDE 'SIZEBK.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'FUNCBK.CBK' INCLUDE 'UTILBK.CBK' C CtiELlMitfiiiiiiitiiit*iitttfifi*tttifittittiittttitiit... C C C...BEGIN ELIMINATION BY DELETING THE SELECTED ELEMENT C CALL DELND(DE) COUNT . ID2(CNT) IF (COUNT.LE.3) GOTO 200 C C...CONTINUE ELIMINATION 000 00 000 00 000 00 000 000 66 IF (DE.EQ.PATH(CNT,1)) THEN A - 2 B - COUNT-2 C - 1 ELSE IF (DE.EQ.PATH(CNT,COUN1)) THEN A - COUNT-1 B .. 3 C - -1 ENDIF DO 100 I - A,B,C ...FIND TYPE OF NEXT ELEMENT IN TRACE CE .. PATH(CNT,I) NTYPE - NBXTP(CE)(2:2) IF ((NTYPE.EQ.'T).OR.(NTYPE.EQ.'G)) THEN ...CHECK NUMBER OF CONNECTORS I1 - IBDPTR(CE) 12 - lBDPTR(CE+1)-1 IF (l1.EQ.I2) THEN ...IF ONLY ONE CONNECTOR EXISTS, DELETE CE AND ITS CONNECTOR CALL DELND(CE) ENDIF ELSE IF ((NTYPE.EQ.'O').OR.(NTYPE.EQ.'1')) THEN ...IDENTIFY NUMBER OF CONNECTORS I1 .. IBDPTR(CE) I2 :- IBDPTR(CE+1)-1 ...IF ONLY ONE CONNECTOR EXISTS, DELETE CE AND ITS CONNECTOR 67 IF (11.EQ.12) THEN CALL DELND(CE) ENDIF C C ENDIF C C 1 00 CONTTNUE C C 200 CONTTNUE C C RETURN ED C C C C>>>>> C C CREASSIGN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 02/09/91 JM C SUBROUTTNE REASSIGN(PROCFG) C C—- PURPOSE: REASSIGNING EQUATIONS AND CAUSALITY TO MODEL C C--- OUTPUT: PROCFG, =.T. if user wishes to proceed, =.F. else C INCLUDE 'SIZEBK.CBK‘ INCLUDE 'GREDBK.CBK‘ INCLUDE 'UTILBK.CBK' C C--- VARIABLES: E7SFLG(2), was causality ever set? (yes-.true.) E7SFLG(3), were equations ever set? E7CFLG(2), does causality match graph data? E7CFLG(3), do equations match causal data? 0000 CHARACTER STRING‘72, ANS‘1 INTEGERI LOGICAL PROCFG, FULL, BGPART, AUTO, CHANGE, OKAY C 68 EXTERNAL GRPROC, MENSET, BLNKLN, WRTSTR, PROMPT, GETANS EXTERNAL LSTLB1, LSTEQS, SETFCN, RHFILE, INVOPT, DEFEQS EXTERNAL DMPFLG, REDOEQ, GOON, LSTDQS, PARDRV CtiiREASSIGNfiifiiiiiiii*i'*titiiiittfitt*****t**tttti*itt C 000 000 C CALL MENSET(.TRUE.) FULL. MMFULL ...Check on causality status first... BGPART- NEL.GT.0 IF (BGPART) THEN IF ((.NOT.E7SFLG(2)).OR.(.NOT.E7CFLG(2))) THEN ...Assign auto causality to the entire graph... DO 20 I- 3,5 E7CFLG(l)-.FALSE. AUTO-.TRUE. CALL GRPROC( AUT0,0KAY,CHANGE ) E7CFLG(2)- OKAY IF (OKAY) THEN E7SFLG(2)-.TRUE. ELSE C...Let the user try now... C CALL BLNKLN CALL WRTSTR(' Automatic causality assignment produced') CALL WRTSTR(' a system graph with derivative causality.') AUTO - .FALSE. CALL GRPROC( AUT0,0KAY,CHANGE ) E7CFLG(2)- OKAY IF (OKAY) THEN E7SFLG(2)-.TRUE. ENDIF ENDIF ENDIF ELSE E7SFLG(2)-.TRUE. E7CFLG(2)-.TRUE. ENDIF 000 0000 0 6 9 IF (DBGFLG) CALL DMPFLG('FUNCD2') ...Check on equation status next... IF (.NOT.E7SFLG(3)) THEN ...Set all node equations to their default status... E7CFLG(4)-.FALSE. E7CFLG(5)-.FALSE. I- 1 CALL DEFEQS( I,OKAY) E7SFLG(3)- OKAY CALL DEFEQS( I,OKAY) E7SFLG(3)- OKAY E7CFLG(3)- OKAY ELSE IF (.NOT.E7CFLG(3)) THEN C...Recover the equations to the maximum extent possible... E7CFLG(4)-.FALSE. E7CFLG(5)-.FALSE. CALL REDOEQ( OKAY) E7CFLG(3)- OKAY ENDIF ENDIF LIST OF REFERENCES _L O N UST OF REFERENCES Rosenberg. R. and KarnOPP D. ALIDILoduotionJLEhxsigaLsttem Wigs, 1st edition, New York, New York, MCGraw-Hill, 1983. ROSENCODE Associates Inc. IhLENEQBLBafeLenoiManual. ROSENCODE Associates, Inc., Lansing, MI, 1990, Vol. 7.3.1. Emery, S. ”Roller Coaster Analysis.” Michigan State University, Department of Mechanical Engineering, ME 851 Final Project, Dec.1989. Tarokh, M. ”Simulation analysis of dynamics and decentralized control of robot manipulators.” Technical Article, Simulation, October 1989, pp 169-176. Zeid, A. and Chang D. ”A Modular Computer Model for the Design of Vehicle Dynamics Control Systems.” Vehicle System Dynamics, 18 (1989), pp. 201-221. Zeid, A. ”Bond Graph Modeling of Planar Mechanisms With Realistic Joint Effects.” Journal of Dynamic Systems, Measurement, and Control, March 1989, Vol. 111, pp. 15-23. Karnopp. D. and Margolis, D. "Analysis and Simulation of Planar Mechanism Systems Using Bond Graphs.” Journal of Mechanical Design, April 1979, Vol. 101, pp. 187-191. 70