© Strojni{ki vestnik 45(1999)7/8,278-286 © Journal of Mechanical Engineering 45(1999)7/8,278-286 ISSN 0039-2480 ISSN 0039-2480 UDK 519.87:629.3.015 UDC 519.87:629.3.015 Strokovni ~lanek (1.04) Speciality paper (1.04) Analiza dinami~nih sistemov s povezovalnimi grafi Analysis of Dynamic Systems by Bond-Graphs Alojz Hussu Modeliranje in simuliranje sistemov so vse pogosteje uporabljani postopki, ponujajo cenejše, hitrejše in za okolje manj obremenjujoče poti do analize in načrtovanja sistemov. Z razvojem računalništva so se razvile tudi nekatere nove metode. Mednje sodi tudi modeliranje sistemov s povezovalnimi grafi. V prispevku je predstavljen paket BONK, ki skupaj z grafičnim vmesnikom omogoča hitro in raznovrstno analizo dinamičnih sistemov. © 1999 Strojniški vestnik. Vse pravice pridržane. (Ključne besede: sistemi dinamični, modeliranje sistemov, grafi povezovalni, paketi programski) The modelling and simulation of systems is receiving increasing attention as it offers a cheaper, faster, and environmentally freendly method for the analysis and design of systems. In parallel with the development of computers some new methods of modelling and simulation, such as bond-graphs, have also been developed. In this paper we present the program BONK, which together with a graphical interface offers a quick and manifold analysis of dynamic systems. © 1999 Journal of Mechanical Engineering. All rights reserved. (Keywords: dynamic systems, systems modelling, bond graphs, software packages) 0 UVOD Trenutne razmere v poslovnem svetu terjajo hitro ukrepanje, hitro izrabo novih možnosti in hiter razvoj. Tako je npr. tudi pri proizvodnji avtomobilov. Končni proizvajalci iščejo najugodnejše, najcenejše in najhitrejše izdelovalce podsklopov. Po oceni avtomobilske industrije skrajšanje roka postavitve novega modela avtomobila na trg za en dan prihrani dva milijona ameriških dolarjev [1]. Zaradi takih razmišljanj nastajajo avtomatizirane proizvodne linije in se gradijo informacijski sistemi, ki naj po eni strani povežejo vse faze izdelave avtomobila, od zamisli, načrtovanja podsklopov, preskusov, načrtovanja izdelovalnih postopkov in podobno, po drugi strani pa dajejo ustrezno logistično podporo soizdelovalcem in nazadnje sestavo po želji kupcev in samo prodajo. Avtomatizacija je vedno bolj opazna tudi pri načrtovanju, ne samo na proizvodnih linijah. Uporabljajo razne programske pakete, ki naj pospešijo in pocenijo izračune in preverjanja s simuliranjem. Eno od področij pri načrtovanju avtomobilov je analiza dinamičnih lastnosti. V tem 0 INTRODUCTION The present day demands of manufacturing industry require swift reaction, the ability to take advantage of new opportunities and rapid development. This is particularly true of the car manufacturing sector. End producers are seeking the best, the quickest, the cheapest producers of subassemblies. The car industry estimates that reducing the lead-time to market of a new car model by one day saves 2 million US dollars. This kind of thinking results in the introduction of automated production lines and the construction of information systems connecting all phases of car production. Systems play a vital role in linking initial ideas with development, testing, production planning and production and to the logistics, connecting producers of subassemblies with the final producers of the cars according to the demands of buyers and sales departments. Automation receives more attention not only on the production lines but also in the development and design stages. Different program packages are used to speed up and reduce costs of calculations and testing through simulation. Designing a new car requires analysis of its dynamic properties, of 99-7/8 grin^SfcflMISDSD I ^BSfiTTMlliC | stran 278 Analiza dinami~nih sistemov - Analysis of Dynamic Systems okviru so zanimivi pospeški in pojemki, na udobnost in varnost vožnje pa zelo vpliva vzmetenje avtomobila. Lahko se posvetimo tudi pogonskim podsklopom avtomobila, npr. motorju. V zadnjem času pospešeno rešujejo, z razvojem ustreznih elektronskih krmilnikov, problem najprimernejšega vžiga goriva v valjih, da bi zmanjšali vibracije motorja. Z izbiro trenutka vžiga in/ali z oblikovanjem najprimernejših sesalnih in izpušnih cevi skušajo vplivati na porabo goriva za dano moč motorja. Ali s porazdelitvijo navora motorja in zavor na posamična kolesa vplivati na varnost in udobnost vožnje, tu velja omeniti domač prispevek na tem področju [2]. V nadaljevanju bomo najprej kratko orisali program BONK, ki omogoča preprosto analizo dinamičnih sistemov, modeliranih oziroma opisanih z povezovalnimi grafi. Sledi opis grafičnega vmesnika, ki še dodatno poenostavi uporabo programa oz. pripravo podatkov. Uporabo programa ponazorimo z analizo dinamičnih lastnosti preprostega modela vzmetenja avtomobila. Sledita povzetek in literatura. 1 PROGRAM BONK Dinamične sisteme matematično opisujemo z linearnimi ali nelinearnimi navadnimi diferencialnimi enačbami ali parcialnimi diferencialnimi enačbami. Če želimo analizirati obnašanje takih sistemov, je na voljo več poti. Ena od njih je izvedba ustreznih preskusov na stvarnih sistemih. Preskusi na stvarnem sistemu so včasih dragi, včasih jih je nemogoče izvesti, včasih pa sistem sploh še ni zgrajen in šele iščemo najprimernejšo izvedbo, ki naj bi jo s poprejšnjo analizo obnašanja sistema določili. V primerih, ko se moramo odreči preskušanju stvarnega sistema, skušamo določiti obnašanje sistema z uporabo opisov sistema, ki so na voljo. Če je to matematični model sistema (opis z diferencialno enačbo ali s sistemom diferencialnih enačb prvega reda), skušamo poiskati rešitev te oziroma teh diferencialnih enačb pri pogojih, pri katerih lahko v zadovoljivi meri sklepamo o obnašanju dejanskega sistema v stvarnih razmerah. Reševanje diferencialnih enačb je rutinsko samo v preprostih primerih. Pogosto moramo posegati po numeričnih postopkih. Pri linearnih diferencialnih enačbah včasih uporabljamo različne transformacijske postopke, npr. iz časovnega prostora se z Laplaceovo transformacijo prestavimo v prostor kompleksne spremenljivke s oziroma v frekvenčni postor. Če želimo reševati diferencialne enačbe, jih moramo najprej zapisati, kar tudi ni vedno preprosto in hitro. Tako kakor pri numeričnem reševanju diferencialnih enačb uporabljamo orodja, računalnike, lahko tudi za sam zapis diferencialnih enačb uporabljamo orodja, tudi računalnike, z particular interest are acceleration and deceleration; comfort and safety depend very much on the suspension. However, power-train subsystems are also of interest, the engine for example. Electronic controllers for the optimum timing of fuel ignition in the cylinders are studied to reduce the motor vibrations and, in connection with the most appropriate intake and exhaust manifolds, to reduce the fuel consumption for a given engine power. The torque distribution of the engine and the wheel braking system are studied, in order to improve comfort and promote safe driving conditions. Here, a Slovenian contribution should be mentioned [2]. In the next section the BONK program is described. The program attempts to simplify the analysis of dynamic systems, described or modelled by bond graphs. There follows a description of a graphical interface, which simplifies additional data preparation and the use of the program, which is illustrated by the analysis of a car suspension model. Conclusion and references end the article. 1 PROGRAM BONK Dynamic systems are mathematically described by differential equations, linear or nonlinear, ordinary or partial. There are several ways to analyze the dynamic properties of such systems. Making appropriate tests on real systems is one method, however making tests on a real system can be expensive and in some situations, impossible. In other cases the real system does not yet exist and we just require a thorough preliminary analysis in order to determine the most appropriate realization. In situations when testing of real systems is not possible, we try to draw conclusions from the descriptions available. If it happens that a mathematical model of the system (first order differential equation or system of equations) is available, we try solving it under conditions that allow a reliable guess as to what can happen to the system in the real world. Solving differential equations is a routine procedure only in simple cases. Usually numerical procedures may be used. When we have linear differential equations, transformation procedures like Laplace transforms are sometimes used, switching from the time (or some other variable) domain to the space of a complex variable s or to the frequency space respectively. If a solution to the differential equations is required, we first have to write them down, which is not always a simple and quick process. In the same way as various tools, like computers, are used to obtain numerical solutions to differential equations, computers with suitable programs can also be used to obtain differential equations. However, for the | gfin=i(gurMini5nLn 99/8 stran 279 I^BSSIfTMlGC A. Hussu ustreznimi programi. Vendar moramo sistem, ki mu želimo določiti matematični model, opis z diferencialnimi enačbami, poznati oziroma ga tako opisati, da je iz opisa mogoče izluščiti diferencialne enačbe z uporabo računalniškega programa. To početje je primerno tedaj, če lahko preprosteje in/ali hitreje določimo opis sistema, iz katerega določimo diferencialne enačbe, kakor pa sam opis z diferencialnimi enačbami. Tak opis sistemov so npr. povezovalni grafi ([3], [4], [9] in [10]). Omogočajo opis strukture sistemov. Sisteme opišemo kot skupek povezanih preprostih elementov, za vsak element sta značilni napetostna in pretočna spremenljivka. Povezave med elementi ponazarjajo pretakanja moči med elementi. Povezovalni grafi so zlasti primerni za področje strojništva, ker lahko na enovit način prikažemo oziroma opišemo sisteme, ki združujejo različne podsisteme, npr. mehanske, hidravlične, električne itn. Osnovni pojmi o povezovalnih grafih in obširni seznam dodatne literature so bili podani v [3]. Tam sta tudi dva zgleda določevanja diferencialnih enačb iz povezovalnega grafa. Za določevanje in kasneje reševanje diferencialnih enačb je avtor sestavil program BONK. Poglejmo, kako pripravimo podatke, kako ga uporabljamo in kaj omogoča. Uporaba programa BONK je doslej zahtevala pripravo podatkov v besedni datoteki, ki jo zapišemo na podlagi narisanega povezovalnega grafa ([4] in [5]). Datoteka ima več blokov: - komentar, ki besedno opiše obravnavani primer, - seznam elementov povezovalnega grafa, kolikšne so vrednosti posameznih elementov in preko katere (če je samo ena) oz. katerih povezav je povezan z drugimi elementi povezovalnega grafa (opis strukture), - seznam aktivnih povezav, - seznam povezav, ki imajo vnaprej predpisano smer pretoka moči, - seznam povezav, ki imajo vnaprej predpisano vzročnost, - seznam izhodov, - dolžino koraka neodvisne spremenljivke (najpogosteje časa), če želimo npr. določiti časovne odzive oziroma diskretne modele, - opis funkcij, ali vhodnih ali nelinearnosti ali obojih. Vsi bloki niso potrebni, nujno potreben je blok z elementi in povezavami, drugi so odvisni od posebnosti problema, ki ga obravnavamo in vrste analize, ki jo želimo izvesti. BONK omogoča določiti: - zvezni in diskretni matematični model sistema (sistem linearnih diferencialnih oz. diferenčnih enačb prvega reda), - prenosne funkcije (zvezne in diskretne), - ničle in pole prenosnih funkcij, - Nyquistov in Bodejev diagram prenosnih funkcij, 8 ^nnatäüllMliBilrSO | ^BSfirTMlliC | stran 280 system we are studying we have to have an appropriate description, from which we can obtain the differential equations with the aid of computers. All this makes sense only in the case when it is easier and/or quicker to get a description from which differential equations are obtained, rather than to get differential equations directly. Bond-graphs ([3], [4], [9] and [10]) are such a description of systems, which enable to describe the structure of the systems. The structure is described as an assembly of connected simple elements with each element having a characteristic effort and flow variable. Bonds between the elements represent the flow of the power between elements. Bond-graphs are a particularly suitable modelling tool in mechanical engineering, where all the subsystems (for example mechanical, hydraulic or electrical) incorporated in the systems, are modelled in some uniform way. The basic ideas relating to bond-graphs and an extensive list of references are given in [3]. There are also two examples showing how differential equations are obtained from the bond-graphs. To obtain differential equations from bond-graphs and then to solve them the author has written the program BONK. We will look at how data for it is prepared, how it is used and what it offers. Until now it was necessary for the program BONK to prepare data in a text file, based on the drawn bond-graph ([4] and [5]). The file has several blocks: - comment, describing the problem we have to deal with, - list of elements of the bond-graph, their values and their bonds to the other elements (description of the structure), - list of active bonds, - list of bonds with an in advance ascribed direction of power flow, - list of bonds with an in advance ascribed causality, - list of outputs, - length of the step of the independent variable (mostly time), if time responses or discrete models are desired, for example, - description of either input functions or nonlinearities or both. All of these blocks are not necessary, what is required is the block with elements and bonds, others are included depending on the problem and the kind(s) of analysis we want to do. With BONK we can determine: - the continuous or discrete mathematical model of the system (system of differential or difference equations of the first order), - transfer functions (continuous and discrete), - zeros and poles of transfer functions, - Nyquist and Bode plots of transfer functions, Analiza dinami~nih sistemov - Analysis of Dynamic Systems - odzive na izbrane vstopne funkcije, - korenske krivulje in - občutjivost sistema na vrednosti parametrov. Če imamo opraviti z nelinearnimi sistemi, za katere ne moremo določiti primernih linearnih modelov, ostane samo določitev in analiza odzivov [5]. Uporaba programa BONK zahteva, da za sistem, ki ga želimo analizirati, narišemo povezovalni graf. V grafu oštevilčimo elemente in povezave in podatke iz grafa zapišemo v datoteko kot blok elementov in povezav. Dodati moramo vrednosti posameznih elementov. Določimo izhode (napetostne in/ali tokovne spremenljivke na izbranih elementih). Vhodi so že vnaprej podani z napetostnimi in/ali tokovnimi viri, ki so upoštevani v modelu. Določitev smeri pretoka moči in vzročnosti na posameznih povezavah lahko določimo sami in opišemo v posebnem bloku datoteke, lahko pa prepustimo programu BONK, da jih določi namesto nas. Včasih, v izjemnih primerih, je potreben popravek določitve. Na podlagi pripravljenih podatkov BONK določi matematični model sistema, ki je osnova za nadaljnje izbrane vrste analize. Analizo pogosto uporabljamo kot sestavni del načrtovanja sistemov, ki običajno poteka iterativno. Najprej si zamislimo sistem, analiziramo delovanje, po rezultatih analize spremenimo oziroma izboljšamo sistem, ponovno analiziramo, izboljšamo itn., dokler ne najdemo ustrezne rešitve, ali pa za nadaljevanje zmanjka denarja, časa ali česa drugega. Lahko da iskane oziroma želene rešitve sploh ni. Program BONK zahteva opis sistema v datoteki, ki jo dobimo iz povezovalnega grafa sistema. Imamo dva opisa sistema, narisan povezovalni graf sistema in datoteko na podlagi povezovalnega grafa. Če spreminjamo sistem, moramo spremeniti povezovalni graf in preglednico. Spremembe moramo spremljati in dokumentirati v vseh opisih sistema, da ni neskladnosti med opisi. Za lažjo uporabo programa BONK je bil zamišljen grafični vmesnik ([6] in [7]) za neposredni, grafični vnos podatkov. Na njegovi podlagi je bil napisan vmesniški program, ki omogoča preprostejše in hitrejše delo pri analizi sistemov in preprostejšo in bolj usklajeno dokumentacijo. Usklajevanje podatkov pri spreminjanju strukture ali vrednosti parametrov ni več potrebno. 2 GRAFIČNI VMESNIK PROGRAMA BONK Grafični vmesnik omogoča preprostejšo in preglednejšo pripravo podatkov. Povezovalni graf sistema, brez vmesnih datotek, zadošča kot ustrezen opis sistema, iz katerega BONK določi diferencialne enačbe sistema in jih kasneje obdela. Ker je BONK dokaj zapleten in bi posegi vanj terjali preveč časa, - responses to selected input functions - root-locus plots - sensitivity of the system to the parameter values. If we have a nonlinear system and we are not able to get a suitable linear model for it, then studying the response of the system is the only possible analysis [5]. Before analyzing a system with BONK, we have to draw the bond-graph of the system. Elements and bonds have to be uniquely numbered. The data with the values for the elements are then written to the file. Outputs (effort and/or flow variables on selected bonds) are added. Inputs are given in advance as effort and/or flow sources in the model. Direction of power flow and causality on bonds can be given in advance or determined by BONK. Sometimes, in exceptional cases, corrections have to be made. Based on the data supplied, BONK determines the mathematical model of the system that is later on used as the basis for the selected analysis of the system. The analysis is often used as part of the system design, which is mostly done in an iterative way. An initial concept of the system is first made, it is analyzed, based on the results of the analysis an improvement is made, the system is analyzed again, improved upon, analyzed, improved upon and so on, until we find a good solution, or we exhaust available resources. It can happen that the desired solution does not exist or that there is no solution. BONK uses data written in a file. Data for the file are taken from the bond-graph. So we have at least two descriptions of the system. If changes are made to the system, everything has to be updated otherwise inconsistencies between descriptions are possible. To ease the use of the program BONK a graphical interface was conceived ([6] and [7]), for direct graphical input of the data. On this basis a program was written for simpler and quicker analysis and easier and consistent documentation. There is no need to update different sorts of documentation when the structure or values of the parameters are changed. 2 GRAPHICAL INTERFACE TO THE PROGRAM BONK Graphical interface offers an easier and more transparent preparation of data. The bond-graph, without any intermediate files, represents the input data, from which differential equations are determined by BONK and later worked on. As BONK is a complicated program, changing its | gfin=i(gurMini5nLn 99/8 stran 281 I^BSSIfTMlGC A. Hussu od grafičnega vmesnika zahtevamo: - da omogoča risanje povezovalnih grafov, določitev vrednosti elementov, funkcij, označitev, aktiviranja in vsega drugega, kar je potrebno pri opisu sistemov s povezovalnimi grafi in avtomatizira nekatere postopke, - da po končanem risanju pripravi ustrezno datoteko za uporabo programa BONK. Popoln opis nekega sistema s povezovalnim grafom zahteva označitev smeri pretoka moči, vzročnosti in morebitnih aktiviranj povezav. Te opise želimo imeti v povezovalnem grafu, določajo jih pa postopki znotraj programa BONK. Da odpravimo nujno potrebno povratno zvezo med grafičnim vmesnikom in programom BONK, so postopki za določevanje smeri pretokov moči in vzročnosti dodani tudi v sam grafični vmesnik. Aktivne povezave moramo vedno sami označiti. Oba programa, BONK in grafični vmesnik sta povezana v celoto prek datoteke s podatki, ki za uporabnika programa ni nujno potrebna. Je pa ohranjena kot različica besednega opisa problema oziroma povezovalnega grafa. Za ponazoritev uporabe grafičnega vmesnika je na sliki 1 prikazano okno, ki je na voljo uporabniku za risanje povezovalnega grafa. Narisani povezovalni graf je opis problema, ki ga obravnavamo v naslednji točki. Orodjarna obsega tri skupine gumbov, z leve strani so najprej gumbi za delo z datotekami, za shranjevanje slik, izpis, brisanje, sledijo elementi povezovalnih grafov, od napetostnega vira do povezave, zadnja skupina so gumbi za urejanje (spreminjanje) opisov elementov, premike in brisanje posameznih elementov. Običajna uporaba je taka, da nazadnje workings was deemed not appropriate. So for the graphical interface we have the following requirements: - to enable drawing of bond-graphs, inserting values, functions, assignments, activations and everything else which is necessary to describe a system with a bond-graph and to automate certain procedures, - when the bond-graph is completed to write the file with data for the program BONK. For a full description of a system with a bond-graph, power directions and causality on bonds have to be specified. These are determined by procedures inside BONK. But we want them also in bond-graphs. To make the feedback from BONK to the graphical interface unnecessary, routines for power directions and causality are also included in the graphical interface. Activation of bonds we always do ourselves. Both programs, BONK and the graphical interface, are connected through the data file, which for the user is not essential, however it is kept available as a textual version of the bond-graph. To illustrate the use of the graphical interface, Figure 1 represents the window a user has at his disposal for drawing bond-graphs. The drawn bond-graph is connected with the problem we will look into in the next section. The toolbar has three sets of buttons, the first set on the left is for working with files, storing and recalling them, storing bond-graphs as pictures, printing them, erasing them. Next follows the elements of bond-graphs, from sources to the bonds. The last set is for editing, moving, deleting and help. When drawing, bonds are drawn between Sl. 1. Okno z orodjarno za risanje povezovalnih grafov in povezovalni graf četrtinskega modela avtomobila za analizo vzmetenja Fig. 1. Window with toolbar for drawing bond graphs with a bond graph of a quarter car model for analysis of car s suspension 99-7/8 grin^sfcflMISDSD I ^BSfiTTMlliC | stran 282 Analiza dinami~nih sistemov - Analysis of Dynamic Systems vstavljamo povezave med že nameščene druge elemente povezovalnega grafa. Če neki element zbrišemo, hkrati zbrišemo tudi njegove povezave. 3 ANALIZA VZMETENJA AVTOMOBILA Vzmetenje je poleg vrste sistemov eden od pomembnejših dinamičnih sistemov v avtomobilu. Mora biti dovolj mehko, da je vožnja udobna in hkrati dovolj trdo, da ne pride do nihanj vozila in morebitnih udarcev vozila ob vozno površino, ali da bi kolesa izgubila stik z njo. Zahteve si pogosto nasprotujejo, iskanje najprimernejše rešitve je težavno. Izbiro si olajšamo z uporabo orodij, npr. programov za simuliranje vzmetenja. Program BONK je že takšno orodje. Problem vzmetenja ni preprost. Vozna površina običajno ni idealna ravnina, zato moramo upoštevati gibanje avtomobila v treh koordinatnih smereh in še vrtenje okoli treh osi. Da so problemi obvladljivi, jih poenostavljajo. Pri avtomobilu je tak preprost model četrtinski model avtomobila: - obravnavamo samo eno kolo in četrtino mase avtomobila, - dovoljeno gibanje je samo v navpični smeri, - obravnavano kolo je povezano s četrtinko avtomobila z vzmetjo in dušilnim elementom, - pnevmatiko ponazorimo z vzmetjo (boljši modeli dodajo še dušilni element). Na sliki 2 je skica obravnavanega sistema vzmetenja z označbami elementov. Vrednosti elementov smo povzeli po literaturi [8] in so: M = 267 kg m = 36,6 kg K = 18700 N/m k = 184000 N/m B = 1398 Ns/m already placed elements. If an element is deleted, bonds that are connected to the deleted element are also deleted. 3 ANALYSIS OF A CAR SUSPENSION Suspension is one of the most important dynamic systems on a car. It has to be soft enough so that the driving is comfortable, but it has to be stiff enough to prevent oscillations and contact with the driving surface or tires loosing contact with the driving surface. These requirements are often in contradiction, searching for a good solution is not easy. Progress is easier, if tools such as the program BONK are used. As has already been stated, dealing with suspension is not an easy problem. The driving surface is not ideal, so moving of a vehicle in 3D space and rotation around three axes must be taken into account. To make problems manageable, they are simplified. A simple model of a car’s suspension is a so-called quarter car model: - only one wheel is considered and 1/4 of the car’s mass, movements only in the vertical direction are allowed, the wheel is connected with 1/4 of the car through a spring and a damper, the tire is approximated with a spring (better models add a damper). A schematic model of the simple suspension is shown in Figure 2. The values of elements taken from [8] are: M = 267kg m = 36.6 kg K = 18700 N/m k = 184000 N/m B = 1398 Ns/m v2(t) K (vzmet, spring) B (dušilnik, damper) m: masa kolesa m: mass of the wheel v1(t) (pnevmatika tire) v0(t) Sl. 2. Četrtinski model vzmetenja avtomobila Fig. 2. Quarter car model of car s suspension stran 283 BCšD9 k A. Hussu Po skici sistema in po postopkih, obravnavanih v [3], [4], [9] in [10], lahko narišemo povezovalni graf sistema vzmetenja. Vidimo ga na sliki 1. Označene so tudi smeri toka moči in vzročnosti. Izbran je en sam izhod (y1 na povezavi 4). Iz lege označbe izhoda glede na označbo povezave lahko sklepamo, ali nas zanima napetostna spremenljivka ali tokovna (ali obe). Napetostni izhodi so nad označbo povezav, tokovni pod. Kot izhod nas torej zanima pretočna spremenljivka na povezavi 4, to je hitrost mase M (=I1), v2(t). Kje so vhodi? V grafu niso posebej označeni, so pa vidni. To so viri. V našem primeru imamo en sam vir, tokovni, hitrost spreminjanja višine vozne površine, v0(t). Vsak element ima lahko označbo, kaj pomeni, ime, različni elementi istega tipa se razlikujejo v indeksih, ki jih lahko poljubno definiramo (v okviru tromestnih števil), pod označbo tipa in indeksa je vrednost elementa ali pa ime funkcije, če je element nelinearen. Funkcije so definirane v posebnem oknu. Ko je povezovalni graf narisan in opremljen s potrebnimi podatki (smer toka moči in vzročnost na povezavah ni treba označiti, to stori program, vendar nariše v graf, da lahko preverimo pravilnost označitve in spremenimo, če je potrebno), lahko aktiviramo program BONK da izdela matematični model, nakar lahko izberemo eno ali več vrst analize. Kaj bi lahko bilo zanimivo? Če je sistem linearen, naš poenostavljeni model je, nas najpogosteje zanimajo prenosne funkcije. Za ponazoritev uporabe programa si oglejmo frekvenčni potek oziroma Bodejev diagram prenosne funkcije: With the described mechanical model and by following the procedures in [3], [4], [9] and [10], a bond-graph of the suspension system is drawn, see Figure 1. Power directions and causality are given as well. Only one output is selected (y1 on bond 4). The position of the output symbol relative to the bond index tells whether the effort or flow variable is of interest (or both). The effort output variables are above the labels, the flow output variables below. So we are interested in the flow variable on bond 4, which is the velocity v2(t) of the mass M (=I1). Where are the inputs? They are not explicitly given but still visible. They are sources and in our case there is only one source, the source of flow, the velocity v0(t) of the driving surface in the vertical direction. Each element can be assigned a label, a name, elements of the same type differ in indices limited to numbers with at most three places. Under the type symbol is either the value of the element or the function name, if the element is nonlinear. Functions are defined in a separate window. With the bond-graph drawn, power directions and causality assigned (either by the user or preferably by the program, changes, if necessary, are possible), BONK can be activated. After the mathematical model is computed, desired analysis, either one or more is selected. What can be of interest? If the system is linear and this is the case with our simplified model, transfer functions are most often of interest. In order to illustrate we can have a look at the frequency response or Bode chart of the transfer function: G(s) V2(s) V0(s) G(s) = V2(s) V0(s) 10 dB ojačenje 0 dB OdB -20 dB OdB ¦40 dB OdB ¦60 dB ¦70 dB OdB \ v ^\ \ \ \ o fazni kot stopinie -30 phase angle degrees 100.00 CQ s-1 \ 1000.00 Sl. 3. Amplitudni in fazni potek prenosne funkcije G(s) Fig. 3. Amplitude and phase diagrams of the transfer function G(s) 99-7/8 grin^SfcflMISDSD | ^BSfiTTMlliC | stran 284 Analiza dinami~nih sistemov - Analysis of Dynamic Systems na sliki 3, korene imenovalca prenosne funkcije v s ravnini na sliki 4 in na sliki 5 časovni odziv na koračno spremembo v0(t). Iz frekvenčnega diagrama ali iz lege korenov ali iz odziva lahko ugotovimo, da sistem nima dobrih lastnosti, da je premalo dušen. Potrebna bi bila poprava sistema, izbrati bi morali druge, primernejše vrednosti elementov, da bi dobili zadovoljive razmere. To bi lahko naredili, orodje je na voljo. Omejili smo se na eno samo prenosno funkcijo. Za podrobnejšo analizo bi morali upoštevati še druge, npr. stik pnevmatike s cestiščem, s kakšno silo pritiska kolo na cestišče. Koračna funkcija kot vhod je za določitev prehodnih pojavov zelo koristna, za boljšo oceno delovanja v stvarnih razmerah pa bi morali imeti tudi bolj stvarne vhodne funkcije. V [8], [9] in [11] do [14] lahko najdemo dodatne zglede za uporabo povezovalnih grafov na področju vozil in motorjev. in Figure 3, or at the poles of the transfer function in the s-plane in Figure 4 and the time response to a step change in v0(t) in Figure 5. Either from the frequency diagram or plot of the roots or from the time response a conclusion can be drawn that there is not enough damping in the system. A correction of the system is necessary with a more suitable set of parameters for the suspension system to show a better response. This correction can be achieved since the tool is available, however it will not be described here. In this example we have chosen only one transfer function, it is much better to take into account others as well, for example the contact of the tire with the driving surface. The step function is a very useful testing function, but for a good assesement of the car in real conditions, more real input functions are needed. In [8], [9] and [11] to [14] there are more examples of bond-graph usage in connection with vehicles and engines. Sl. 4 Fig. 4. Po . Poli pren les of the osne funkc ransfer fu ije G(s) in nction G(s) njihova le and their ga v s-rav location in nini s-plane v2(t) m/s nn 3.0 / S Sl. 5. Časovni odziv prenosne funkcije G(s) na koračno spremembo 1m/s ob času t = 0 s hitrosti v0(t) Fig. 5. Time response of the transfer function G(s) to the step change of 1m/s at t = 0 s of the velocity v0(t) ^vmskmsmm 99-7/8 stran 285 |^BSSITIMIGC A. Hussu 4 SKLEP Predstavljen je program BONK, ki z grafičnim vmesnikom za neposredni vnos povezovalnih grafov omogoča preprosto in hitro modeliranje in simuliranje linearnih in nelinearnih sistemov. Kot zgled in prikaz nekaterih zmogljivosti programa je bil obdelan preprost četrtinski model vzmetenja avtomobila. Delo na programskem paketu nadaljujemo, povečati želimo izbiro novih elementov v povezovalnih grafih in olajšati primerjave analiz. 4 CONCLUSION The program BONK and its graphical interface for entering bond-graphs directly as input data was presented. Through it, quick and simple modelling and simulation of linear and nonlinear systems is possible. As an example and to show some of the program’s capabilities a simple quarter car model of the car’s suspension was described. Work on the program is continuing, it is planned to include greater selection of bond-graph elements and easier comparison of analysis results. 5. LITERATURA 5. REFERENCES [I] Doherty C.,Usländer T, Plug-and-play software hones car and plane manufacture, IEEE Spectrum, Vol.35,No.10,Oct 1998,39-42 [2] Jurejevčič T,Fajdiga M., Applicability of Bond graph method to dynamic analysis of vehicle power transmissions, Ninth World Congress on the Theory of machines and Mechanisms, IFToMM’95, Proc.Vol.4, Trends in machines and mechanisms design, pp.1471-1474, Edizioni Unicopli, Milano, 29.8-1.9.1995 [3] Hussu A., Modeliranje sistemov in povezovalni grafi, Strojniški vestnik, 32,1-3,Mar 1986, 1-8 [4] Hussu A, Modeliranje s povezovalnimi grafi, Zbornik prve A, 28-30 sep.1992, Portorož, Slovenija Uredila B.Zajc, F.Solina Ljubljana, Slov.sekcija IEEE,1992, 173-176 [5] Hussu A., Povezovalni grafi in nelinearnosti, Zbornik tretje elektrotehniške in računalniške konference ERK’94, Zvezek A, 26-28 sep.1994, Portorož, Slovenija. Uredila B.Zajc, FSolina. Ljubljana, Slov.sekcija IEEE,1994, 233-236 [6] Hussu A., Grafični vmesnik za modeliranje s povezovalnimi grafi, Zbornik pete elektrotehniške in računalniške konference ERK’96, Zvezek B, 19-21 sep.1996, Portorož, Slovenija. Uredila B.Zajc, FSolina. Ljubljana, Slov.sekcija IEEE,1996, 99-102 [7] Hussu A., Entering Bond-graphs as graphs, Proc.EUROSIM’98, (Ed.KJuslin) Federation of European Simulation Societies,14-15.apr.1998, Helsinki, str. 277-279 [8] Redfield R.C.,Karnopp D.C., Performance sensitivity of an actively damped vehicle suspension to feedback variation, J.of Dynamic Sys.Mea.and Control, Vol.111,No1,mar.1989,51-60 [9] Karnopp,D.C.,Margolis,DL.,Rosenberg,R.C, System dynamics: A unified approach, Wiley, 1990 [10] Thoma,JU.,Simulation by Bondgraphs, Springer-Verlag,1990 [II] Cho D.,Hedrick J.K., Automotive powertrain modeling for control, J.of Dynamic Sys. Meas.and Control, Vol.111, No.4,Dec.1989, 586-576 [12] Karmel A.M., Design and analysis of a trasmission hydraulic system for an engine-flywheell hybrid-vehicle, J.of Dynamic Sys. Meas.and Control, Vol.112,No.2,Jun.1990,253-260 [13] Yang W.C.,Glidewell J.M.,Tobler W.E.,Chui G.K., Dynamic modelling and analysis of automotive multi-port electronic fuel delivery system, J.of Dynamic Sys. Meas.and Control, Vol.113,Mar.1991,143-151 [14] Rault A., Mechatronics and Bond graphs, 101-110 Karnopp D., A simple bond graph vehicle handling model including roll effects, 89-100 Bond Graphs for Engineers, (Breeedveld P.C., Dauphin-Tanguy G, ed.), North-Holland, Amsterdam, 1992 Avtorjev naslov: profdr. Alojz Hussu Fakulteta za strojništvo Univerze v Ljubljani Aškerčeva 6 1000 Ljubljana Author’s Adress: Prof.dr. Alojz Hussu Faculty of Mechanical Engineering University of Ljubljana Aškerčeva 6 1000 Ljubljana, Slovenia Prejeto: Received: 11.11.1998 Sprejeto: Accepted: 15.9.1999 8 Sšnn3(aul[M]! ma stran 286