Notes - University of Memphis

advertisement

Modeling and Computation

James J. Nutaro

August 24, 2016

2

Contents

1 Systems 5

1.1

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

2 Modeling with bond graphs 9

2.1

One port elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

2.1.1

Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

2.1.2

Resistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

2.1.3

Inertance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

2.1.4

Capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

2.2

Junctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

2.2.1

Transformers and gyrators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

2.3

Model construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

2.3.1

Electrical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

2.3.2

Planar and rotational mechanical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

2.3.3

Hydraulic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

2.3.4

Pseudo thermal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

2.4

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

3

4

Chapter 1

Systems

Throughout these notes we will be concerned with making models of systems. It will be very helpful to have a concrete idea of what constitutes a system. For our purposes the essential elements of a system are as follows:

1. A system is separate from the universe that it inhabits. Its boundaries are clearly identifiable, though these may be physical or conceptual. The condition of the system at any particular moment is called its state, and in mathematical models the state is composed of several variables, the state variables that change with time. The system is influenced by the universe which it inhabits via input variables that originate from outside of the system. The state of the system is not necessarily observable, and its output variables describes how the state and, sometimes, the input combine to affect our perception of the system.

2. We define the system for a specific purpose. In this sense there are no “natural” systems because we carve them out of the real (or some logical) universe to answer a set of questions. Different questions typically involve different systems, even if each system we define may reflect separate, or possibly related, aspects of some real thing.

3. A (larger) system can be constructed from (smaller) systems that interact with each other.

The composite is also a system. Again, there is no “natural” decomposition of larger systems into their parts, and we typically pick a decomposition (or composition) to suit some particular purpose that we have in mind.

There are some simple examples of systems that are probably already familiar to you. Hooke’s law for mechanical springs provides us with one system. This system is described by the equation x = kF which relates displacement x (compression or decompression) to the opposing force F . The stiffness parameter k summarizes all of the relevant mechanical properties of the real string into a single number. Completely ignored is the color of the spring; its exact geometry or material composition (though these help to determine k ); its temperature (which may influence k ); and a host of other factors.

Clearly, this system (or model) of a mechanical spring is intended to relate just two properties: its compression (or decompression) and the consequent resisting force. Curiously, we may choose x as the input and F as the single state and output variable, or vice versa. In effect, we may treat these as two separate models and which we choose will depend on our objectives (to determine force from compression or vice versa).

Mice used in experiments with some new drug are frequently treated as models of a human being. In this case, the boundaries of the mouse system are its skin, lungs, and other organs which, very literally, separate it from the outside universe. Of course, we cannot directly observe the condition of the organs (i.e., the state of the mouse) but we can take measurements indicating their health; that is, our instrumentation defines the output variables for this mouse system. The input is the drug supplied, the accompanying diet, and any other factors we control that are deemed relevant to the study.

5

Another popular example (at least, it was when I went to school) of a system is a lunar lander, for which we are interested in understanding how its descent is influenced by the rocket motor. If we denote the time varying force of the motor by F ( t ), gravitational acceleration as a function of height h by a function g ( h ), and if we assume the moon is airless (which it is) then the model is

˙ = F ( t ) /m − g ( h ) and

˙

= v .

(1.1)

(1.2)

In this model, the state variables are v and h , and the input is F ( t ). If we have instruments to measure v and h then those are both output variables as well.

For a second example, suppose the system of interest is people lining up at a bank. We are interested in how long each person must wait in line. Relevant state variables would include the number of persons in the line and the amount of time the teller needs to serve the current customer. Input is the arrival of new customers, and output is the departure of customers that have been served. This is an example of a discrete event system, and we will discuss their state space representations later in these notes.

If we denote the state of a system by x , input by u , and output by y , then we can identify two types of systems. The first are Moore type systems. These have a state transition function δ and output function λ in the form x

0

= δ ( x, u ) and y = λ ( x ) .

(1.3)

(1.4)

In this type of system, the output at time t does not depend on the input at time t . The second are Mealy type systems in the form x

0

= δ ( x, u ) and y = λ ( x, u ) .

(1.5)

(1.6) where the output at time t depends on the simultaneously arriving input. Computationally, we would generally prefer to have Moore type systems although this is not always achievable in practice. The reason for this can be made clear with an example.

Suppose we have two Mealy type systems that are connected to one another so that the input of the first is the output of the second and vice versa. This gives us a set of equations x

0

1 x

0

2

= δ

1

( x

1

, y

2

)

= δ

2

( x

2

, y

1

) y

1

= λ

1

( x

1

, y

2

) y

2

= λ

2

( x

2

, y

1

)

(1.7)

(1.8)

(1.9)

(1.10)

In this problem we need to know y

1 to calculate y

2 and y

2 to calculate y

1

. For discrete systems, this problem may not have a solution. In continuous systems, it leads to algebraic loops that increases the computational difficulty of a problem and prevents a simple separation into components.

A specific example of this difficulty can be written down very easily. Consider two systems described by the following set of continuous equations x

1

= y

2

− x

1 x

2

= y

1

− x

2 y

1

= x

1

− y

2

2 y

2

= x

2

− y

2

1

(1.11)

(1.12)

(1.13)

(1.14)

At any instant of time we know x

1 and y

2

. However, to solve for the derivatives we must first solve the non-linear algebraic system comprising Eqns. 1.13 and 1.14.

6

On the other hand, if this was a Moore type system in the form x

1

= y

2

− x

1 x

2

= y

1

− x

2 y

1

= x

2

1 y

2

= x

2

2

(1.15)

(1.16)

(1.17)

(1.18) then no algebraic problem arises; this is a computationally simpler system.

A word of caution. When building a model, we will want the simplest model that serves our purpose.

More complicated models only drive up the cost of obtaining answers. This cost comes in the form of additional time to estimate model variables, to perform calibration experiments, to process data produced by the model, to test any software that implements the model, and a variety of other activities that are difficult in proportion to complexity. It is a common mistake to talk about a model as if it were “the” model

- that is, a widely applicable substitute for the real thing. Such things do not exist, and an effort to create

”the” model will create new problems more quickly than it produces answers. To succeed, understand what the model is for and limit your activity to achieving that purpose.

1.1

Exercises

1. Get a rubber band and shoot it across the room. It will travel some distance before falling to the ground. At the moment you release the rubber band, it has been stretched by a length x

0

. Treating the rubber band as a simple string, the potential energy stored in the stretched band is

1

2

Cx

2

0

(1.19) where C is the ”capacitance” of the rubber band. If this potential energy is all transformed into kinetic energy when the band is released, then its initial velocity v

0 is determined by solving

1

2

Cx

2

0

=

1

2 mv

2

0

(1.20) where m is the mass of the rubber band. If the rubber band is released on a flat trajectory at an initial height y

0 above the floor, then it will fall at a rate ˙ = − mg and strike the floor when y = 0. If that happens at time t , then the distance traveled by the rubber band will be v

0 t . Write the equation relating the model parameters C , m , x

0

, and y

0 to the distance traveled by the rubber band.

2. Conduct several experimental shots, measuring x

0 and y

0 prior to releasing the rubber band (you’ll probably need a friend to measure x

0

). Try to determine m and C for your rubber band using the experimental data (hint: you might prefer to estimate a single parameter to subsumes m and C ).

Compare your calibrated model’s predictions and the actual experimental data. Predict the outcome of several shots not in your calibration data and then perform those shots. Compare your predictions and the actual outcomes.

7

8

Chapter 2

Modeling with bond graphs

A bond graph describes a physical system with two types of dynamic variables: effort and flow . Table 2.1

lists efforts, generically denoted by the variable e , and flows, generically denoted by f , as they appear in several engineering domains. It is somewhat troublesome that notational conventions across domains conflict, this making it impossible to simultaneously employ consistent variable naming conventions and adhere to domain specific customs. Here I will favor consistency (and, I hope, clarity) by using e and f throughout, even where if defies a domain’s convention. Nonetheless, several exercises will concern themselves with the simple (if sometimes confusing) translation from e and f variables to variables customarily used in various domains; these customary notations are also listed in Table 2.1.

Effort and flow are always defined so that their product is power, which can be checked by an analysis of the units in Table 2.1. It is sometimes convenient to think of effort as that which sets things in motion

(when you push a thing, you apply effort) and flow as the motion itself (when you push the thing, it moves).

domain electrical effort ( voltage e )

V [volt] flow ( f current

) i [ampere] mechanical translation force F [newton] mechanical rotation hydraulic velocity v [meter/second] torque τ [newton · meter] angular velocity ω [radian/second] pressure P [newtons/meter 2 ] volume flow rate Q [meter 3 /second]

Table 2.1: Effort and flow variables.

Elements in a bond graph are connected by power bonds, and each bond is associated with an effort variable and a flow variable. As the product of these is power, the bond can be thought of as transferring power from its blunt end to its pointy end. This is illustrated in Fig. 2.1.

e f

Figure 2.1: A power bond.

2.1

One port elements

One port elements are connected to a model with a single power bond. The element to which the bond is attached controls that bond’s effort or flow, but not both. The controlled variable is indicated by a bar drawn at one of the end of the bond. If the bar is adjacent to the element, then that element controls the flow. Otherwise, the element controls the effort. This will be illustrated in each specific case below.

9

A bond must have a bar at one end or the other, but never both. The assignment of a bar to a bond determines the causality of the element. If the bar assignment says that the element determines e in response to f , then f is the cause of e (i.e., causality is from f to e ). Otherwise, e is the cause of f . For this reason, the bars are called causal marks. Causality assignments are directly analogous to the selection of input and output variables for a component. The causal variable is an input and the response is an output.

2.1.1

Sources

Sources are the simplest one port elements. A source determines either the effort variable and is called a source of effort, or it determines the flow variable and is called a source of flow. A source of effort takes the form e = g ( t ) (2.1) where g is an arbitrary function of time. A source of flow has the form f = g ( t ) .

(2.2)

The causal mark is always placed away from a source of effort and adjacent to a source of flow. This is shown in Fig. 2.2. Because a source (as the name implies) injects power into the system, the bond customarily points away from the source. If the source was actually being used as a sink (e.g., as a very abstract model of some machine that requires constant power) then negative power would flow ‘into’ the model.

SF

SE e f e f

Figure 2.2: Sources of effort and flow.

2.1.2

Resistance

A resistance models the dissipation of power as a function of f or i . Because the resistance customarily takes power out of a model, the power bond points into this one port element. In fact, the resistor absorbs power and transforms it into a form not represented in the model; e.g., an electrical resistor that heats as it opposes the flow of current or the heat caused by friction in a mechanical system.

law

The simplest model of resistance has a single parameter R and relates effort and flow through the linear e = Rf .

(2.3)

Of course, other relationships are possible; for instance e = Rf

2

(2.4) or more generically we might have a function g such that e = g ( f ) .

(2.5)

I will focus on the linear case because it is illustrative of the general principle and common in practice.

Figure 2.3 shows a resistor attached to a bond. A linear resistor can determine either the effort or the flow, as indicated in the figure. What is determined by the resistor depends on the context; we will come back to this point later. For the generic relation e = g ( f ), the causal marks correspond to either e = g ( f ) (2.6)

10

domain resistance electrical resistor [ohm = volt / current] mechanical translation friction [newton · second / meter = force / velocity] mechanical rotation hydraulic friction [newton · meter · second / radian = torque / angular velocity] flow restriction [newton · second / meter 5 = pressure / volume flow rate]

Table 2.2: Analogous resistive elements.

when e is the determined variable and f is the cause (input) or f = g

− 1

( e ) when f is the determined variable and e is the cause (input).

e f e f

R

R

(2.7)

Figure 2.3: A resistor with its possible causalities. The top bond has the form e = g ( f ) and the bottom f = g

− 1

( e ).

The power dissipated in the resistor can be calculated from the relation between effort and flow. We know that the power flowing into the element is ef . Knowing that e = g ( f ) (or, f = g

− 1 ( e )) we can calculate power = ef = g ( f ) f = f g

− 1

( f ) .

(2.8)

For the linear resistor, this is the familiar relation power = ef = e

2

/R = f

2

R .

(2.9)

An electrical resistor Figure 2.4 shows a circuit with a voltage source v ( t ) (a source of effort), a resistor

R , and a current (flow) i that flows through the resistor. The causal marks in the diagram can be understood intuitively. The source of effort necessarily has the bar at then end of the bond that is away from it. It follows that the resistor has effort as an input and flow as an output. If we write the equations for each element we obtain the pair e = v ( t ) and f = i = e/R = v ( t ) /R .

(2.10)

(2.11)

The power dissipated in the resistor is ef = v ( t ) i/R = v

2

( t ) /R .

(2.12)

A mechanical resistor Figure 2.5 shows a damper that is being extended at a rate v . As it resists extension, it pulls on the wall (which is fixed in place) with a force F = vR , where R is a constant that characterizes the linear damper. The bond graph has a source of flow to describe the motion v and a resistance that models the force required to cause the damper’s extension at rate v . The causal marks can be understood intuitively. The source of flow must have the bar adjacent to it. Therefore, the resistance must determine the effort F in response to the flow v . The governing equations are f = v ( t ) and e = F = v ( t ) R .

(2.13)

(2.14)

11

R i v(t) −

+

SE: v(t)

(b) v i

(a)

Figure 2.4: A simple resistive circuit.

R

The power dissipated by the damper is ef = v

2

( t ) R .

F v

SF: v(t)

(b)

F v

(a)

Figure 2.5: A mechanical damper.

R

(2.15)

2.1.3

Inertance

Inertance models the tendency of a flow to remain ‘in motion’ until is it influenced by a force. The analogous elements are masses in mechanics and fluids or inductors in electrical circuits. These elements have an inertance I ; its analogs in several engineering domains are listed in Table 2.3. The constitutive law for a linear inertial element is df dt

=

1

I e .

(2.16)

The corresponding law in, for example, mechanical translation is F = ma = m v ˙ and for an electrical inductor is v = L i

˙

. The preferred causality for these devices is indicated in Fig. 2.6. This preference follows from our desire to have the element described by an ordinary differential equation in which e is the input and f is the output, as in Eqn. 2.16. When this happens, the inductor contributes a state variable to the model.

e f

I

Figure 2.6: Power bond with an inductor. The bond has the inductor’s preferred causality.

If, for reasons to be discussed later, we cannot obtain the desired causality then the inductor will not contribute a state variable to the model. In this case, the flow will be governed by some other element but is algebraically influenced by the presence of the inductor. Cases where this occurs are explored in the exercises.

These elements store energy in what is analogous to kinetic energy. To see this, consider an inertance subjected to an effort. The power flowing into the inertance is power = ef = I df dt f .

(2.17)

12

domain inertance electrical mechanical translation mechanical rotation hydraulic inductor [Henry] mass [kilogram = newton

/ meter

·

5 ] second 2 / meter] angular inertia [newton · meter · second 2 ]

[newton · second 2

Table 2.3: Analogous inertial elements.

Assuming that initially f = 0 then the energy accumulated over a time τ is the time integral of the power; that is energy = I

Z

τ

0 df dt f dt .

(2.18)

Doing integration by parts with du = ( df /dt ) dt and v = f we get

I

Z

τ

0 df dt f dt = I f

2

( τ ) −

Z

τ

0 f df dt dt .

Moving the righthand integral to the lefthand side in the above we get

2 I

Z

τ

0 df dt f dt = If

2

( τ ) and solving for the stored energy gives

I

Z

τ

0 df dt f dt =

1

2

If

2

( τ ) as expected.

(2.19)

(2.20)

(2.21)

A mechanics problem Suppose we have a mass m subjected to a time varying force F ( t ). This is illustrated in Fig. 2.7. This could represent a rocket in deep space with F being provided by its motor.

Again, the causality assignments follow naturally from the requirements of the source of effort and preferred causality of the mass. If we denote displacement of the object by x , then the governing equations are

˙ =

1 m

F ( t ) and

˙ = v .

(2.22)

(2.23)

The accelerating mass accumulates kinetic energy at the rate vF Watts.

v m F

SE: F(t)

(b)

F v

I:m

(a)

Figure 2.7: A mass subjected to a force. Note that the force F pulls on the mass and the velocity is in the direction of the force. This is reflected in the orientation of the power bond, which imparts positive velocity to the mass given a positive force.

An electrical inductor An electrical circuit that subjects an inductor to a time varying voltage source is shown in Fig. 2.8. The causal mark satisfies the requirement for the source of effort and the preferred causality of the inductor. The equation relating effort and flow is ˙ = v/L .

13

L i v(t) −

+

SE: v(t)

(b) v i

(a)

Figure 2.8: An inductive circuit.

L domain electrical capacitance capacitor [farad] mechanical translation stiffness [meter / newton] mechanical rotation hydraulic

[radian / newton · meter]

[meter 5 / newton]

Table 2.4: Analogous capacitive elements.

2.1.4

Capacitance

Capacitance models energy stored in springs (mechanics), capacitors (electronics), bladders (hydraulics), and other analogous elements. A capacitive element absorbs flow and stores it as effort. A linear capacitance has a parameter C to describe the rate at which it can absorb and release energy. Analogous efforts in several engineering domains are listed in Table 2.4.

In some domains, the capacitance is used directly (e.g., electrical capacitors are measured in farads, which has units of ampere · second / volt). In others, it may be described by compliance, such as with the compliance

K of a spring (which has units newton / meter), so that the stiffness C = 1 /K is the analogous capacitance of the devices.

The linear constitutive relation of a capacitance is de dt

=

1

C f .

(2.24)

The preferred causality for a capacitive device is illustrated in Fig. 2.9. As with the inductor, this is preferred because it gives an ordinary differential equation to describe the element. If the desired causality is not possible, then the element will not contribute a state variable to the model, but rather it will algebraically influence the other state variables.

e f

C

Figure 2.9: Power bond with a capacitor.

Capacitive elements store what is analogous to potential energy. Assuming no energy is stored initially, then the energy stored after a time τ can be calculated as energy =

Z

τ

0 ef dt = C

Z

τ

0 e de dt dt .

(2.25)

The integral of the flow is displacement in mechanical systems and net charge in electrical systems. Proceeding as before with the inductor and recalling the relation between displacement and flow, the stored energy

14

can be calculated as energy =

1

2

C

Z

τ

0 f

2

.

(2.26)

A battery Suppose we have a battery with capacitance C and we charge it with a current i ( t ). This is illustrated in Fig. 2.10. The causality assignment follows naturally from the requirements of the source of effort and preferred causality of the battery. The resulting voltage v across the battery is

˙ =

1

C i ( t ) .

The power being dumped into the battery at any instant is vi .

(2.27)

+ v

C

− i(t)

SF: i(t)

(b) v i

C

(a)

Figure 2.10: A capacitor being charged by a current.

2.2

Junctions

There are two basic types of connective elements or junctions, which are illustrated in Fig. 2.11. These elements may have two or more bonds attached to them. A bond pointing into the junction carries power into it; a bond pointing away carries power out. No connective element may store energy, and hence the sum of the power flowing into the junction must equal the sum of the power flowing out. Typically we will use a sign convention such that power in is positive and power out is negative. For a junction with n attached bonds pointing in, the following relationship must be satisfied at the junction: e

1 f

1

+ · · · + e n f n

= 0 .

(2.28)

Of course, if any bond is pointing away from the junction then its corresponding sign in the sum will be negative rather than positive.

A 0 (zero) junction models a point of common effort. In electrical circuits, this is a node in the circuit diagram; in hydraulics an example is a junction in a pipe or tube network. Mechanical examples represent a force acting simultaneous on several objects. At a zero junction with all bonds pointing into the junction we must have e

1

= · · · = e n and f

1

+ · · · + f n

= 0 .

(2.29)

(2.30)

Again, if any bond is pointing away from the junction then its sign in this sum will be negative rather than positive.

The effort at the zero junction can be imposed by just one of its bonds, and this ‘input’ effort fixes all of the ‘output’ efforts. Recall our convention that an element which is a source (‘output’) of effort on a bond

15

e

4 f

4

0

(b) e

4 f

5 e

7 f

7

1

(d) e

8 f

7 e

1 f

1

0 e

1 f

3 e

10 f

12

1

(a)

Figure 2.11: Zero and one junctions.

(c) e

12 f

12 always has the causal mark away from it. By necessity, that mark is attached to the zero junction. All other attached elements must have effort for input, and so their marks are necessarily away from the zero junction.

It follows that exactly one causal must be adjacent to the zero junction, as illustrated in Fig. 2.11.

A 1 (one) junction models a point of common flow. In an electrical circuit, this is a segment of wire; in hydraulics, a segment of pipe; and in mechanics it represents a common velocity for a group of objects. At a one junction where all bonds point in we must have f

1

= · · · = f n and e

1

+ · · · + e n

= 0 .

(2.31)

(2.32)

As before, if any bond points away from the junction then its sign in the sum will negative rather than positive.

Only one effort can be determined by the elements attached to this junction and all of the others must be imposed. Consequently, exactly one causal mark must be away from the one junction and all others must be adjacent to it. This is illustrated in Fig. 2.11.

Figure 2.11 shows several examples of junctions that illustrate how the directions of the bonds affects the signs in the corresponding summations. The power expression for the lower zero junction (a) is e

1

( f

1

+ f

2

+ f

3

) = 0 (2.33) because all bonds point into the junction. Of course, one of these flows will turn out to be negative, but which it is will depend on the model in which such a junction appears. At this bond we will calculate f

1

= − ( f

2

+ f

3

) (2.34) because of the location of the causal mark that shows the effort to be determined by bond 1; hence the flow must be calculated for that bond.

The power expression for the upper zero junction (b) is e

4

( − f

4

+ f

5

+ f

6

) = 0 (2.35)

16

because bond 4 carries power out of the junction and the others bring power in. At this bond we will calculate f

4

= f

5

+ f

6

(2.36) because of the location of the causal mark that shows the effort to be determined by bond 4; hence the flow must be calculated for that bond.

The one junctions have a single flow rather than a single effort, but otherwise the reasoning is the same as before. To illustrate, for the one junction labeled (c), we have f

12

( e

10

+ e

11

+ e

12

) = 0 and we will calculate e

12

= − ( e

10

+ e

11

) .

For the one junction labeled (d), the net power is f

7

( − e

7

+ e

8

+ e

9

) = 0

(2.37)

(2.38)

(2.39) and we will calculate e

7

= e

8

+ e

9

.

(2.40)

Notice that bonds pointing into the junction have a positive sign before their efforts (hence, the bond adds energy to the junction) and bonds pointing away have a negative sign before their efforts (hence, the bond removes energy from the junction). The choice of effort to calculate at the bond is indicated by the causal markings.

RLC circuit An RLC circuit and its bond graph is illustrated in Fig. 2.12. The equations describing this circuit can be read directly from the bond graph. The bond graph contains a zero junction for each node and one junction for each wire connecting a pair of nodes. If a circuit element is attached to the wire, then it is attached to the corresponding one junction in the bond graph. If we read the equations from this graph we obtain i

1

= i v

1

− v = 0 i

1

= i

2

= i

R v

1

− v

R

− v

2

= 0 v r

= i

R

R v

2

= v

C

= v

L i

2

− i

C

− i

L

= 0 v

C

= i

C

/C

˙ i

L

= v

L

/L

Left junction

Middle junction

Right junction

Of course, these equations contain many redundant variables. We can simplify this set of equations algebraically or using bond graph transformations. Examining the left junction, we can note that the zero junction is superfluous. Clearly, the efforts and flows on both sides must be equivalent. This is readily apparent in Eqns. 2.41-2.42. Hence, we could eliminate this junction and attach the source of flow directly

17

(2.41)

(2.42)

(2.43)

(2.44)

(2.45)

(2.46)

(2.47)

(2.48)

(2.49)

Figure 2.12: RLC circuit.

to the middle one junction. If we do this, then i

1 and v can be eliminated to give us the equations i = i

2

= i

R v

1

− v

R

− v

2

= 0 v

R

= i

R

R v

2

= v

C

= v

L i

2

− i

C

− i

L

= 0 v

C

= i

C

/C

˙ i

L

= v

L

/L

Middle junction

Right junction

Now these equations can be simplified by replacing equivalent variables to obtain the expressions v

1

= iR + v

2 i

C

= i − i

L v

2

= i

C

/C

˙ i

L

= v

2

/L

(2.50)

(2.51)

(2.52)

(2.53)

(2.54)

(2.55)

(2.56)

(2.57)

(2.58)

(2.59)

(2.60)

(2.61)

2.2.1

Transformers and gyrators

Gears, levers, and electrical transformers are familiar examples of transformer elements. The ideal transformer relates effort and flow on one side - call these e

1

- call these e

2 and f

2 and f

1

- to another effort and flow on the other side

. The ideal transformer does not store or dissipate energy so that e

1 f

1

= e

2 f

2

.

(2.62)

18

The transformation ratio n of the transformer describes, in effect, what we gain in effort for a reduction in flow and vice versa. The mathematical relationship governing an ideal transformer is e

1

= ne

2 and nf

1

= f

2

.

(2.63)

(2.64)

The value n could be a gear ratio, turns ratio in an electrical transformer, or ratio of lengths in a lever. In a bond graph the transformer has two sides as illustrated in Fig. 2.13. The transformer can determine the e

1 effort given the e

2 effort or vice versa. Hence it will always have one causal mark attached and one away.

In the figure, the lower causality assignment determines e

1 and f

2 by

(2.65)

(2.66) e

1

= ne

2 f

2

= nf

1 and the upper causality assignment determines e

2 and f

1 by e

2

= e

1

/n f

1

= f

2

/n

(2.67)

(2.68) e

1 f

1

TF e

2 f

2 e

1 f

1

TF e

2 f

2

Figure 2.13: Transformer and its possible causalities.

Gyrators are similar to transformers in that they relate effort and flow while conserving the flow of power

(i.e., e

1 f

1

= e

2 f

2

). However, the gyrator relates effort to flow and flow to effort according to e

1

= nf

2 e

2

= nf

1

(2.69)

(2.70)

The possible causality assignments for a gyrator are shown in Fig. 2.14. The lower causality markings relate efforts and flows by e

1

= nf

2 e

2

= nf

1

(2.71)

(2.72) and the upper causality marks by f

1

= e

2

/n f

2

= e

1

/n

(2.73)

(2.74)

Electric motors are a good example of a gyrator. The current through the motor determines its torque (or vice versa) and the voltage across the motor determines its speed.

Electric winch An electric winch will provide us with a nice example of gyrators and transformers at work in a system. The winch and its bond graph are illustrated in Fig. 2.15. The electric motor is modeled by an inductor in series with a resistor and then a gyrator that links the electrical and mechanical elements. The

19

e

1 f

1

GY e

2 f

2 e

1 f

1

GY e

2 f

2

Figure 2.14: Gyrator and its possible causalities.

voltage across the motor and current through it determine the angular velocity and torque of the motor shaft.

This transformation from current and voltage to torque and angular velocity is modeled with a gyrator. The ideal gear box with gear ratio g in our model transforms the rotation of the motor shaft at high speed, low torque into rotation of the winch wheel at low speed, high torque. The gear box imposes a rotational resistance B . The winch wheel, with radius r and angular inertia J , causes the line to move with a linear speed ωr ; that is, it acts as another transformer. The line has a stiffness C (acting as a capacitance as it stretches) and lifts a mass m against the force mg of gravity.

The equations governing this system can be read directly from the bond graph. These are i

˙

=

1

L e

2 e

2

= v − e

1

− e

3 e

1

= iR e

3

= αω

τ

3

= αi

˙

τ

2

=

1

J

τ

2

= τ

3

− τ

1

− τ

τ

1

= ωB

τ = rF v

1

= rω

˙ v

2

=

1

C v

2

= v

1

− v v ˙ =

1 m

F m

F m

= F − mg electric motor gear box winch wheel and shaft wheel line mass

(2.75)

(2.76)

(2.77)

(2.78)

(2.79)

(2.80)

(2.81)

(2.82)

(2.83)

(2.84)

(2.85)

(2.86)

(2.87)

(2.88)

2.3

Model construction

The prior examples were construct by “by inspection”, which is a useful and quick approach when your intuition is good. In other cases, it is better to have a procedure that guides the modeling process.

2.3.1

Electrical

1. Create a 0 junction for each node in the circuit diagram. These are the electric potentials at those points in the circuit.

2. Create a 1 junction for each wire that connects two node. This is the current carried through that wire. Connect zero and one junctions with power bonds that point in the direction of current flow.

20

(a)

(b)

Figure 2.15: An electric winch.

3. Attach sources of effort and flow to the one and zero junctions as appropriate.

4. For each one port element along a wire, attach it to the one junction with the power bonds pointing into the one port elements.

5. Place a two port gyrator or transformer, as appropriate, between 0 or 1 junctions that are linked by such an element.

Example 1 See Fig. 2.16. The equations that can be read from the final step are i

1

= v

R

/R v

R

= v − v

1 v

C

=

1

C i

2 i

2

= i

1

− i

3 i

˙

3 v

L

=

1

L v

L

= v

1

− 0 = v

1

(2.89)

(2.90)

(2.91)

(2.92)

(2.93)

(2.94)

21

Figure 2.16: Electrical example 1

Example 2 See Fig. 2.17. The equations that can be read from the final step are

˙ v v i

C 2

C 1

1

=

=

=

1 i

2

C

2

1

C

1 i

1

1

L

( v

3

− 0) i

2

= i − i

1 v

3

= v

1

− v

C 1 v

1

= v

C 2

+ v

2 v

2

= i

2

R

22

(2.95)

(2.96)

(2.97)

(2.98)

(2.99)

(2.100)

(2.101)

Figure 2.17: Electrical example 2

Example 3 See Fig. 2.18. The equations that can be read from the final step are v

0

= i

1

R

1 v

R 2

= i

1

R

2 v

1

= v − v

R 2

˙

˙ i

3

= i

2

=

1

L

1

( v

1

− v

2

)

1

L

2

( v

1

− v

2

) i

C

= i

2

+ i

3 v

2

=

1

C i c

Other examples See Figs. 4.4 (pg. 76), 4.5 (pg. 77), 4.7 (pg. 79), 4.8 (pg. 80), 4.9 (pg. 81), 4.10 (pg.

83), and 4.11 and 4.12 (pg. 84) of “System dynamics”.

(2.102)

(2.103)

(2.104)

(2.105)

(2.106)

(2.107)

(2.108)

2.3.2

Planar and rotational mechanical

1. Create a one junction for each velocity.

2. Between one junctions, place a zero junction for the forces/torques that act on the elements that are moving with those velocities.

3. Connect one port elements to the one junctions that represent their velocity or zero junction that represents an applied force/torque.

23

Figure 2.18: Electrical example 3

24

Figure 2.19: Mechanical example 1

4. Put transformers and gyrators between one junctions or zero junctions when the corresponding forces/torques or velocities are related by a transformer or gyrator element.

Example 1 Figure 2.19 shows a shock absorber modeled under the assumption that the wheel never leaves the road and the shock absorber never bottoms out. The velocity v g is the up and down movement of the tire as it travels over the uneven road. The equations for this model are

F

C

=

1

C

( v g

− v )

F

R

= R ( v g

− v ) v ˙ =

1

M

( F

R

+ F

C

− mg )

(2.109)

(2.110)

(2.111)

Example 2 Figure 2.20 shows an electric motor driving a wheel through a gearbox (e.g., as happens in an electric car). The equations for this model are

F

C

F

R

=

1

C

( v g

− v )

= R ( v g

− v ) v ˙ =

1

M

( F

R

+ F

C

− mg )

(2.112)

(2.113)

(2.114)

Notice here that we take the motor speed to be related to the voltage across the terminals of the motor. In our electric winch example, we subtracted the voltage drop across the resistor and inductor before applying the remaining voltage to the motor.

Other examples See Figs. 4.13 (pg. 86), 4.14 (pg. 87), 4.15 (pg. 88), 4.16 (pg. 89), 4.17 (pg. 91), 4.18

(pg. 92), 4.21 (pg. 97), and 4.22 (pg. 98) of “System dynamics”.

2.3.3

Hydraulic

The procedure for hydraulic systems is the same as that for electrical systems. In this case, however, voltages become pressures at junctions of tubes and hydraulic lines and currents become mass flows through pipe

25

Figure 2.20: Mechanical example 2

26

sections and lines.

Examples See Figs. 4.23 (pg. 99), 4.24 (pg. 101), 4.25 (pg. 102) of “System dynamics”.

2.3.4

Pseudo thermal

These are not really bond graphs because the product of effort and flow is not power. Hence, they cannot be connected to models of circuits, hydraulics, etc. as we’ve been doing. There are genuine thermodynamic bond graphs (See Chapter 12 of “System dynamics”), but I won’t cover those here. The pseudothermal bond graphs are simple to use and applicable to many first order approximations of heating and cooling equipment.

In a pseudothermal bond graph, the effort is temperature T and flow is heat flow Q , which is itself in units of power. Thermal resistors typically represent insulation (or, in a very poor insulator, a heat exchanger).

A thermal resistor has units of joules / degree and the governing relation in a linear model is

T = RQ .

(2.115)

Capacitors represent the heat capacity, measured in joules / degree. The governing relation in a linear model is dT Q

= .

(2.116) dt C

There are no thermal inductors.

The modeling procedure is the same as for electrical and hydraulic systems. A zero junction is introduced for each temperature. One junctions are placed where heat flows between temperatures. Elements that affect the heat flow are attached to the one junctions.

A refrigerated grocery case The mass in the display case has a heat capacity C . This will act as a capacitor and has a temperature T . This mass is cooled by the discharge air injected into the case at a temperature T d

. Some heat is added to this air due expansion as it enters the case, heating seeping through the discharge piping, and an assortment of other factors. The resulting change in temperature is represented by a resistance R . The remaining cold air heat cools the food. The environment outside the case serves to heat the case contents, injecting heat at a rate Q a

. A schematic of this case is shown in Fig. 2.21 and its pseudo bond graph is shown in Fig. 2.22.

Discarge air

Return air

Refrigerated case

Cooling coil

Ambient heating

Figure 2.21: A refrigerated display case

The equations for this model are

T

˙

=

1

C

Q

C

Q

C

= Q d

+ Q a

Q d

= T

R

/R

T

R

= T d

− T

27

(2.117)

(2.118)

(2.119)

(2.120)

C

SE

T d

Q d

1

T

Q d

0

T

Q a

SF

R

Figure 2.22: Bond graph for the refrigerated case.

A one room building Consider a small one room house shown, like an old schoolroom. The room has a temperature T that it retains with a capacitance C . It is insulated from the outside air at temperature T a by an insulator with resistance R . The room is heated directly by a furnace that dumps heat Q f into the room, and it is indirectly heated by the sun, which applies a heat Q s through the windows. The bond graph model for this schoolroom is shown in Fig. 2.23. The equations for this model are

R

SE

T a

Q a

0

T a

Q a

1

T

Q a

0

T

Q s

SF

C

Figure 2.23: Bond graph for the one room schoolhouse.

˙

=

1

C

Q

C

Q

C

= Q a

+ Q f

+ Q s

Q a

= T

R

R

T

R

= T a

− T

(2.121)

(2.122)

(2.123)

(2.124)

2.4

Exercises

1. Mechanical power has units of watt = joule / second = newton · meter / second. Show that the product of effort and flow in the mechanical and hydraulic domains has units of power. Recall that radians are dimensionless. A watt in the electrical domain is equal to current · volt, and the product of effort and flow is obviously power.

2. See Fig. 3.1 (pg. 32) in “System Dynamics”. For each model in subfigure (c) mark the bond graph with each of its possible causalities and write the corresponding equation with output variable on the lefthand side and input on the right.

28

3. Repeat the above for a resistive element for which f = exp( e ) and again for e = Rf

2

. What are the preferred causalities of these resistive elements and why?

4. Consider two electrical resistances connected in a series as shown below. The current through each resistor must be the same, otherwise the circuit would accumulate charge and store energy which the resistors cannot do. Call this current i . The voltage drop v

1 v

1

= iR

1

, and the voltage drop across the second resistor R

2 is v

2 across the first resistor R

1 and satisfies v

2

= iR

2 satisfies

. The voltage drop across the pair is v

1

+ v

2

. What equivalent, single resistance will cause this voltage drop?

+ v

R

1

1

− + v

2

R

2

− i

5. Consider two electrical resistors in parallel as shown below. The current into the circuit must be equal to the current out otherwise the circuit would accumulate charge and store energy. The current i

1 through the first branch is ( v

2

− v

1

) /R

1 and the current through the second branch is i

2

= ( v

2

− v

1

) /R

2

.

The requirement that current in equals current out implies that resistance would cause this voltage drop?

i = i

1

+ i

2

. What equivalent, single i

2

R

2 i v

2 v

1

R

1 i

1

6. Consider the sled shown below where the skids experience sliding friction b

1 and b

2

(perhaps one is greased better than the other). The skids necessarily have the same linear velocity v , otherwise the sled would deform. The force of friction F

1 second skid. The total force of friction is F

1 this frictional force?

= b

1 v is imposed by the first skid and F

2

= b

2 v by the

+ F

2

. What single, equivalent resistance would generate v

7. Look at the mechanical dampers shown below. This model has velocities v

1

, v

2

, and v

3

F

1 and F

2

. The dampers are modeled as linear resistances with resistances b

1 and b

2 and forces respectively.

Calculate the forces F

1

, F

2

. The total force across the pair is F = F

1

+ F

2

. What single resistance would have the same effect as the pair with regard to F ? (hint: the rates of displacement are v and v

2

− v

3 respectively, and the net displacement is v

1

− v

3

).

1

− v

2

29

F v

2 v

1 v

3

F

1

F

2

8. Check that units of Eqns. 2.21 (pg. 13) and 2.26 (pg. 15) for each domain is equal to Joules.

9. Replace the resistances in problem 4 with inductors. This circuit has a single current i and so ( d/dt ) i = v

1

/L

1

= v

2

/L

2

. As before, the total voltage drop across the pair of inductors is v = v want to replace L

1 and L

2 by a single inductance L , what should be the value of L ?

1

+ v

2

. If we

10. Replace the resistances in problem 5 with inductors. As before i = i

1 resistor yields the same relationship between i and v ?

+ i

2

. What equivalent, single

11. Replace the resistors in problem 4 with capacitors. What single capacitor produces the same voltage and current at the terminals of the circuit?

12. Replace the resistors in problem 5 with capacitors. What single capacitor produces the same voltage and current at the terminals of the circuit?

13. Suppose two masses m

1 force F

1 act on m

1 and F

2 and on m m

2

2 are connected. Clearly, they must share a single velocity so that the total force on the combined masses is F = F

1 v

+ F

2 how v and F are related. What single mass m yields the same relationship between v and F ?

. Let a

. Show

14. Suppose two springs C

1 and C

2 are arranged such that C

1 and C

2 are connected to a single, shared physical point on their left sides and right sides respectively as shown below (see Fig. 2.24). Clearly, the springs must be displaced at a single rate v corresponding to the difference in speed between the two points. The springs will exert forces F

1 and F

2 with the total equivalent force how v and F are related. What single spring behaves like the pair?

F = F

1

+ F

2

. Show

Figure 2.24: Springs in parallel.

15. Generalize the rules above to show how parallel inertances and capacitances can be reduced to a single, equivalent element.

16. Generalize the rules above to show how series inertances and capacitances can be reduced to a single, equivalent element.

30

17. Draw the simplified bond graph described in the RCL example on pg. 17.

18. Problems 3-2, 3-3, 3-7, 3-8, and 3-9 in “System dynamics”.

19. Derive Eqn. 2.26 (pg. 15). Compare your calculation with Hooke’s Law and the resulting definition of elastic potential energy stored in a spring (you can find the latter in almost any introductory physics textbook).

20. Consider a gear box in which one turn of the e

1

, f

1 gear results in 100 turns of the e

2

, f

2 is the transformer ratio for this device? What if 1 turn of the e

2

, f

2 gear. What gear requires 100 turns of the e

1

, f

1 gear?

21. Exercises 4-1, 4-2, 4-3, 4-4, 4-5, 4-6, 4-8, 4-14, 4-16, 5-1, 5-8, 5-13, 5-14 from ”System Dynamics”.

Create causality marks for your models and write the corresponding equations.

Where there are several choices for a state space model, just pick one.

22. Add a basement to the single room model on pg. 28. Include the ambient temperature of the ground and the insulation between the ground and the basement and the ground and the basement and the room above.

31

Download