Вы находитесь на странице: 1из 153

Lecture Notes

Jay A. Farrell, Professor College of Engineering University of California, Riverside March 5, 2014

Contents
1 System & Model Basics: Lecture 1 2 Review Basic Matrix & Linear Algebra Concepts 3 Types of Models: Lectures 2 3.1 Fundamental Concepts . . . . 3.2 Causality . . . . . . . . . . . 3.3 Advanced Concepts . . . . . . 3.4 Exercises . . . . . . . . . . . 3 . . . . 1 5 7 . 7 . 11 . 12 . 13

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

4 Frequency and Step Responses: Lecture 4 16 4.1 Frequency response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5 Simulation: Lecture 5 6 Energy Domains & Power Connections: Lecture 6 6.1 Energy Domains (Karnopp Section 2.1) . . . . . . . . 6.2 Power Connections (Karnopp Section 2.1) . . . . . . . 6.3 Word Bond Graphs (Karnopp Section 2.2) . . . . . . . 6.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 7 Bond Graphs: Lecture 8 7 . . . . 19 21 21 22 25 26 29

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

8 Multiports: Lecture 9 32 8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9 Causality Propagation and State Space Models: Lecture 10 11 36 9.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 10 Electrical Systems & Bond Graphs: Lectures 12 11 Bond Graph modeling (Circuits, Fluids, 11.1 Modeling Procedure . . . . . . . . . . . 11.2 Electrical Circuit Examples . . . . . . . 11.3 Exercises . . . . . . . . . . . . . . . . . 12 Exam 1 Thermal): . . . . . . . . . . . . . . . . . . . . . Lects. 12 . . . . . . . . . . . . . . . . . . . . . . . . 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 47 47 48 52 55

13 Bond Graph modeling Two Ports: Lecture 15 56 13.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 13.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

CONTENTS

March 5, 2014

14 Bond Graph modeling of Networks: Lecture 16 63 14.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 15 Fluids: Lectures 17-18 15.1 Fluid Systems . . . . . . . . . . . . . . . 15.2 Additional Examples . . . . . . . . . . . 15.3 Fluids Bond Graph Modeling Procedure 15.4 Examples . . . . . . . . . . . . . . . . . 15.5 Exercises . . . . . . . . . . . . . . . . . 65 66 68 71 71 74

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

16 Thermal Systems: Lecture 19-20 76 16.1 Steady State (static) Thermal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 16.2 Dynamic Thermal Systems: Lecture 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 16.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 17 Exam 2 88

18 Causality Problems: Lecture 21 89 18.1 Derivative Causality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 18.2 Algebraic Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 18.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 19 Linear Dependence, Determinants, Matrix Inverse: Lecture 22 19.1 Linear Dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2 Determinants, Minors, and Cofactors . . . . . . . . . . . . . . . . . 19.3 Matrix Inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 97 98 99 103

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

20 Eigenvalues and Eigenvectors: Lecture 23 20.1 Matrix Diagonalization: Extra material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.2 Similar Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104 . 106 . 106 . 107

21 State Space to Transfer Function: Lecture 23 108 21.1 Equivalent State Space Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 21.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 22 Mechanical Systems: Lecture 24 22.1 Velocities . . . . . . . . . . . . . 22.2 Mechanical: Translation Systems 22.3 Mechanical: Rotation Systems . 22.4 Right hand rule . . . . . . . . . . 112 112 113 115 115

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

23 Bond Graph modelingMechanical Systems: Lecture 25 116 23.1 Mechanical Modeling Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 24 Bond Graph modeling Translation Examples: Lecture 26-27 116 24.1 Sign convention examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 24.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 25 Bond Graph modeling Rotation Examples: Lecture 27-28 122 25.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 26 Mechanical Coupling Slip or No slip: Lecture 29 125 26.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. ii

CONTENTS

March 5, 2014

27 Simple Mixed Systems: Lecture 27.1 Wheels . . . . . . . . . . . . . . 27.2 Electric Water Pump . . . . . . 27.3 Exercises . . . . . . . . . . . .

29 128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 133 134 . 134 . 135 . 141 142 146 . 146 . 146 . 148

28 State Space to Convolution: Interesting Lecture 29 System Design and Analysis: Lecture 30 29.1 Stability Specications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29.2 Steady State & Transient Specications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Extra Lecture - Diagram Models (w/ Simulink) A Vector & Matrix Review A.1 Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Matrix and Vector Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. iii

CONTENTS

March 5, 2014

Preface

This document contains my lecture notes for a one quarter course on dynamic system modeling and simulation. The objective is to train students: 1. to develop state space and transfer function models for dynamic systems; 2. to understand how to transform between state space and transfer functions models; 3. to simulate the dynamic system models; and 4. to perform basic analysis of the system performance. These notes are not a text book. I make the notes available to students in my class, because I know that there may be errors either when I write on the board or when students write their notes. Distributing the notes allows students:
X to x both types of errors, X to work through examples at a slower pace, X to try additional examples that are in these notes that I do not get to in lecture, and X to double check these notes while working through the homework.

The notes will contain errors. Please help improve the notes by reporting errors to me, by making constructive suggestions, and by asking questions during class. Please do not think that, because I distribute my lecture notes, it is not necessary to come to class. These notes are only a guide to the lecture material. The notes are note a textbook. I will discuss many issues in class that are not in these notes. Also, questions ask by students will raise important clarications. If you skip class you will miss many important points, as well as problem solving suggestions that will save you time both on homework, on exams, and later in your career. The main references for this set of notes are [2, 3]. The textbook [1] is available on-line as a pdf; however, its notation is slightly dierent from the standard notation established in [2] that we use in this class. The course will introduce many new concepts. Most will be mathematically expressed. You may not be comfortable with the concepts or mathematics when we start, but like anything else in life, we improve with practice, practice, and more practice.

Jay A. Farrell Department of Electrical Engineering University of California, Riverside

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. iv

SYSTEM & MODEL BASICS: LECTURE 1

March 5, 2014

System & Model Basics: Lecture 1


1. Syllabus 2. Curve 3. ILearn 4. Lab handout distribution

Course Organization.

Course Objectives. Modeling and Simulation of Dynamics Systems 1. Dynamic Systems a system whose status changes with time (i.e., position of a vehicle) 2. Modeling development of mathematical representations to enable quantitative analysis and design 3. Simulation numeric analysis of system models Course Focus. State space modeling for analysis and simulation. 1. State space models allow convenient and ecient analysis via numeric methods. Inputs: External variables that aect the system behavior. States: Internal memory of the system. Initial values of the state variables are required to solved the system equations. Outputs: Algebraic functions of the input and state variables that are of interest. 2. Main Tools: (a) Matlab: Originally written by engineers for engineer to analyze models for the design of dynamic physical systems. (b) Bond graphs: Organize the variables and equation necessary for model derivation. i. emphasize power interactions between subsystems ii. emphasize analogies between dierent energy domains (Electrical, translational, rotational, uids, thermal) iii. provide a systematic approach to the development of state space models (c) Intellect: Ultimately, the designer is responsible for ensuring the accuracy and reasonableness of the model and the analysis.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 1

March 5, 2014

System Variables. [3] The mathematical model of a system may contain a variety of quantities that can be categorized as follows:
X Constants do not vary as a function of time

System parameters Any constant that is dened by the system and not changeable by the designer. Design parameters Any constant that the design can choose to aect the cost or behavior of the system.
X Signals may vary as a function of time

External variable Any signal that can aect the behavior of the system, but is not (signicantly) aected by the system. Inputs An external signal that the designer/user can choose. Inputs are denoted by u(t). Disturbances An external signal that the designer/user cannot choose. Disturbances are denoted by d(t) or w(t). Outputs A variable that is of primary interest to the user/designer of the system. The output is denoted by y (t). Internal variables (i.e., states) Additional signals required to completely represent the systems behavior that are distinct from the output and external variables. Example 1.1 A bank checking account has a balance that changes as a function of time based on the net deposits and fees. A model is b k = b k 1 + d k fk where bk is the checking account balance at the end of month k , i is the monthly interest rate, dk is the total net deposits during month k , and fk is the total amount of fees charged during month k . A bank savings account has a balance that changes as a function of time based on the net deposits and interest. A model is sk = i sk1 + wk where sk is the savings account balance at the end of month k , i is the monthly interest rate and wk is the total net deposits to this account during month k . For this system, the variables are categorized as follows: Inputs Disturbance Internal variables System parameter dk , wk fk bk , sk i

Denition of the output requires a little more discussion, as it is dependent on the purpose of the model. If the main interest of the model is to specify total networth, then yk = bk + sk ; however, some users may have other interests and therefore specify other outputs. For example, if the balance in either account gets too low, it may trigger fees. To allow us to prevent this, we may want to monitor the two account balances by dening the vector output [ ] bk yk = . sk

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 2

SYSTEM & MODEL BASICS: LECTURE 1

March 5, 2014

Example 1.2 Corresponding to Figure 1, the system variables are categorized as follows: Output Input Disturbance Internal variables Design parameters vL (t) u(t) iL (t) v1 (t), v2 (t), v3 (t) R1 , R2 , R3 , R4 C1 , C2 , C3 , C4

R1 v R2 1 u
+ _

v2 R3 C3

v3 R4 C4

iL

C1

C2

+ vL _

Load

Figure 1: Electrical example. Discuss why iL is the disturbance while vL is the output. Example 1.3 Example 1.4 Example 1.5
1 Unnished. 2 Unnished. 3 Unnished.

1 2 3

Repeat above with an output voltage. Rectier with inductor determining output current. Room temperature.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 3

March 5, 2014

Model Characteristics. [3] The models for systems can be sorted according to their various characteristics: Static vs. Dynamic: A system is static if there is a direct and instantaneous relationship between the inputs and the outputs. A resistor is an example of static system where the voltage and current are instantaneously related via Ohms law: v (t) = Ri(t). Static systems have not memory of past inputs. A system is dynamic if the output at time t depends on some past history of the the input. Inductors and capacitors are both examples of dynamic systems. For example, with t a capacitor, the voltage is 1 i( )d . Another example dependent on the entire past history of the current through it: vc (t) = C is the velocity of a mass m which is dependent on the entire past history of the applied force according to t 1 v (t) = m f ( ) d . Continuous-time vs. Discrete-time: Models that represent the change of the system variables as a function of the variable t are continuous-time models. Models that represent the changing system variables as a function of k I are discrete-time models. Often discrete-time models result from the sampling of continuous-time systems at discrete-time instants. Most physical systems evolve in continuous-time. Lumped vs. Distributed Parameter: Many physical systems are described by partial dierential equations. For example, the change of temperature u as a function of location and time is described by ( 2 ) u u 2u 2u =k + + . t 2x 2y 2z This represents the fact that the temperature change is distributed as a function position. The solution u(x, y, z, t) is innite dimensional. Many systems can be accurately represented by lumped models where the changing system status is represents by a nite number of lumped variables. Linear vs. Nonlinear: A system model is linear if it includes only linear algebraic and dierential equations. Otherwise, the model is nonlinear. Deterministic vs. Stochastic: A model is stochastic when it involves random variables, processes, or effects as representation of uncertainty. Otherwise, the model is deterministic. This course will construct and analyze of continuous-time, lumped, deterministic, linear models for dynamic systems. Nonlinear models and their linearization may be discussed briey. Conversion of distributed parameter models to lumped parameter models will also be considered briey in the discussion of thermal systems.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 4

REVIEW BASIC MATRIX & LINEAR ALGEBRA CONCEPTS

March 5, 2014

Review Basic Matrix & Linear Algebra Concepts

This section is intened as a review. We will build on these concepts for the rest of the quarter. Please make sure that you have them now. If you are not understanding, please read the appendix and ask questions. Matrices:
X The notation A nm means that A is a n row by m column tabular arrangement of real numbers.

Example 2.1 An example for n = 3 and m = 4 is 0.20 0.00 3.14 0.00 2.00 0.00 34 . A = 1.71 0.00 1.00 1.00 1.00 0.00
X The notation A = [aij ] indicates that the element in row i and column j will be named aij .

Example 2.2 In Example 2.1, a2,3 = 2.00 and a1,1 = 0.20. There are a few important matrices with special symbols. The identity matrix A = In nn has { ai,j = for i = j otherwise. 1.00 0.00 is I3 = 0.00 1.00 0.00 0.00 1 0

Example 2.3 The identity matrix 33

0.00 0.00 . 1.00

The null matrix is Z = 0n,m nm has zi,j = 0 for all i [1, n] and j [1, m]. [ ] 0.00 0.00 0.00 23 Example 2.4 The zero matrix is 02,3 = . 0.00 0.00 0.00 Matrix equality: For matrices A, B nm the notation A = B means that ai,j = bi,j for all i [1, n] and j [1, m]. Matrix Addition and Subtraction: For matrices A, B , C nm :
X The notation C = A + B means that ci,j = ai,j + bi,j for all i [1, n] and j [1, m]. X The notation C = A B means that ci,j = ai,j bi,j for all i [1, n] and j [1, m].

For example, if [ A= 0.20 0.00 1.71 0.01 ] and B = [ 0.00 3.00 1.71 2.00 ] , then C = A + B = [ 0.20 0.00 3.00 2.01 ] .

Scalar multiplication: When and A nm , then the notation C = A means that ci,j = ai,j for all i [1, n] and j [1, m]. For example, with A as dened above, [ ] 0.40 0.00 D = 2.0A = . 3.42 0.02

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 5

March 5, 2014

Matrix multiplication:
X For matrices A np and B pm , the matrix C = A B nm is dened as

ci,j = for all i [1, n] and j [1, m].

p k=1

ai,k bk,j

X Note that matrix multiplication is only dened when the inner dimensions (number of columns of the matrix A and number of rows in B ) are compatible. This is referred to as A and B being conformable. X For example, for [ ] [ 0.20 0.00 1.00 2.00 A= and B = 1.00 3.00 1.00 4.00

3.00 1.00

] , then C = A B =

0.20 0.40 2.00 14.00

0.60 6.00

] .

X The identity matrix I has the property that for any situation where A and I are conformable, AI = A. X The order of matrix multiplications is important. For conformable A, B , and C ,

(AB )C = A(BC ) AB = BA The product AB can exist when BA is not even conformable. Consider above example.
X Matrix multiplication is very useful for organizing (and solving linear systems of equations). For example,

1 =

2x1 4x2 8x3

2 = 4x2 + 15x1 + 16x3 3 = 3x2 3x3 is equivalent to 1 2 4 8 x1 2 = 15 4 16 x2 . 3 0 3 3 x3

Linear Systems of Equations:


X The general form of such equations is

b = Ax where b
n1

is known, A

nm

is known, and x m is the unknown vector variable.

X This equation would be easy to solve if we new a matrix B such that B A = I , then

b Bb Bb

= Ax = BAx = I x=x
1 A,

X The matrix B is referred to as the left inverse of A. The inverse of A is denoted as A1 . This is not which is not even dened. We will be very interested in matrix inverses:

When does such a matrix exist? How can the inverse be calculated? The matrix inverse is discussed in Section 19. For additional matrix review, see Appendix A.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 6

TYPES OF MODELS: LECTURES 2 3

March 5, 2014

Types of Models: Lectures 2 3

We are interested in mathematical models that relate the input, disturbances, and constants to the time evolution of the outputs and internal variables.

3.1

Fundamental Concepts

There are various types of equation-based models. Systems of Ordinary Dierential Equations: Consists of one ODE for each output. The ODE relates the output and its derivatives to the inputs, other outputs and their derivatives, the disturbances and the constants.
X A general n-th order SISO model could have the form ( ) g y (n) (t), y (n1) (t), . . . , y (t), u(n1) (t), u(n2) (t), . . . , u(t) = 0

where y (k) (t) =

dk y (t) dtk

and g is a (possibly) nonlinear function. (( (t) + n2 )2 ( )2 ) (t) + u(t)

X A nonlinear 3-rd order SISO model is

(3)

(t) + d1 |y

(2)

(t)| + d2 y

(1)

(t) + d3 sin (y (t)) = n1 u

(2)

(1)

X A linear 3-rd order SISO model is

y (3) (t) + d1 y (2) (t) + d2 y (1) (t) + d3 y (t) = n1 u(2) (t) + n2 u(1) (t) + n3 u(t)
X A set of coupled ODEs

(1)

z +z = y+u y = z Often, the direct application of physical laws will yield a set of higher order ODEs.

(2) (3)

Transfer Functions: For a linear system with all initial conditions set to zero, it is possible to nd a transfer function from each input to each output. The transfer function is dened as the ratio of the Laplace transform of the output divided by the Laplace transform of the input. For a linear system without pure delay, the transfer function is the ratio of two polynomials in the Laplace variable s. Setting the numerator of the TF to zero, N (s) = 0, allows determination of the TF zeros. Setting the denominator of the TF to zero, D(s) = 0, allows determination of the TF poles.
X Corresponding to eqn. (1), the transfer function is4 ( ) L y (3) (t) + d1 y (2) (t) + d2 y (1) (t) + d3 y (t) =

( ) L n1 u(2) (t) + n2 u(1) (t) + n3 u(t) n1 s2 U (s) + n2 sU (s) + n3 U (s) ( ) n1 s2 + n2 s + n3 U (s) (4)

s3 Y (s) + +d1 s2 Y (s) + d2 sY (s) + d3 Y (s) = ( 3 ) s + +d1 s2 + d2 s + d3 Y (s) = 2 n1 i=1 (s + zi ) n1 s2 + n2 s + n3 N (s) Y (s) = 3 = = 3 U (s) s + +d1 s2 + d2 s + d3 D(s) i=1 (s + pi )

This third order, strictly proper system has three poles and two nite zeros.
X Example 3.1 Corresponding to eqns. (23) the transfer functions from the input u to the outputs y and z are

L ( z+z ) = s Z (s) + sZ (s) =


4 Note

L (y + u) Y (s) + U (s)

(5) (6)

( ) = s2 F (s) sf (0) f(0). that L f

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 7

3.1

Fundamental Concepts

March 5, 2014

L ( y) = s2 Y (s) = s2 Z (s) + sZ (s) = s4 Z (s) + s3 Z (s) + Z (s) = Z (s) = U (s) Y (s) = U (s) =

L (z ) Z (s) 1 Z (s) + U (s) s2 s2 U (s) s2 4 s + s3 + 1 s2 Y (s) Z (s) 1 = 2 4 Z (s) U (s) s s + s3 + 1 1 4 s + s3 + 1

(7) (8) (9) (10) (11) (12) (13)

State Space: Earlier discussion mentioned that a dynamic system has memory in the sense that the present value of its output y (t) is dependent on the entire past history of the input u(t). Therefore, to determine y (t) for all t t0 it is not enough to know u(t) for all t t0 . In addition, we require information about that completely characterizes the status of the system at t0 . Example. To determine the monthly ending balance of a bank account, it is not enough to know the daily inows and outows for the given month, we also must know the initial account balance for the month. Concept of state: The state of a system at time t0 is the information required such that knowledge of the state at time t0 and of u(t) for all t t0 allows determination of the output y (t) for all t t0 .
X For nite dimensional systems, the state information can be organized into a vector x = [x1 , . . . , xn ] n . X The denition of the state vector is not unique. Consider a capacitor with an input current and the output being the capacitor voltage. Knowledge of the initial charge of the capacitor and all subsequent currents through the capacitor are sucient to determine the voltage across the capacitor at any future time. Similarly, knowledge of the initial capacitor voltage and all future currents, is sucient to allow computation of the capacitor output voltage at all future times. Either the initial charge or the initial voltage could be selected as the system state. X Initial conditions for an ODE are one example of a state denition.

Order of a System: The order of a system is minimum number of independent pieces of information required to specify the state.
X Variables are dependent if they are algebraically related. X In the capacitor example, the capacitor charge and voltage are algebraically related by q (t) = Cv (t). X The order of the capacitor system is n = 1. Either the capacitor charge or the capacitor voltage cam be selected as the state variable.

State space models: A state space model for an n-th order system with m inputs, p outputs includes n rst order ODEs and and p algebraic equations: x n , u m , and y p .
X There is one rst order ODE describing the time derivative of each state as a function only of the state variables and the inputs: 1 (t) = f1 (x(t), u(t)) } x x i (t) = fi (x(t), u(t)) . . . i = 1, . . . , n x n (t) = fn (x(t), u(t)) X There is one algebraic equation relating each output only to the state variables and the inputs: } y1 (t) = h1 (x(t), u(t)) yj (t) = hj (x(t), u(t)) . . . j = 1, . . . , p yp (t) = hp (x(t), u(t))

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 8

TYPES OF MODELS: LECTURES 2 3

March 5, 2014

The general notation is x (t) = y (t) = f (x(t), u(t)) h(x(t), u(t)) (14) (15)

where the vector functions f and h can be nonlinear.


X Linear A state space model is linear if the (n + p) functions f (x, u) and h(x, u) are all linear functions of x and u. In this case,

f (x, u) = h(x, u) =

Ax + Bu Cx + Du

where A nn , B nm , C pn , and D pm . In this case, the linear state space model is x y Consult Linear Algebra review. State Variable Selection:
X One method to dene the state variables is to select the set of initial conditions that would be required to solve the set of dierential equations. Example 3.2 The ODE describing a rigid pendulum is

= Ax + Bu = Cx + Du.

(16) (17)

+ b + mg sin() = 0. J To solve this 2nd order ODE, we require knowledge of the initial angle and initial angular rate. If we ], then the state space model is select the output and state vector as y = and x = [, x 1 x 2 y = x2 mg d = sin(x1 ) x2 J J = x1 . (18) (19) (20)

This model is in the form of eqns. (1415) where [ ] x2 f (x, u) = d mg J sin(x1 ) J x2

and

h(x, u) = x1 .

This is a nonlinear model due to the presence of the sin(x1 ) term. Example 3.3 For the system of eqns. (23), dene x1 x2 x3 x4 = z = z = y = y.

Take the derivative of each of these equations, and eliminate all variables except the states and the input. For x1 , x 1 = z = x2 . For x2 , x 2 = z = y+uz = x3 + u x2 . p. 9

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

3.1

Fundamental Concepts

March 5, 2014

For x3 , x 3 = y = x4 .

For x4 , x 4 = = = The state space model is x 1 x 2 x 3 x 4 with outputs dened by y z = x3 = x1 . = x2 = x2 + x3 + u = x4 = x1 y z x1 .

Because this system is linear, we can write it in the form of eqns. (1617) with 0 1 0 0 0 0 1 1 0 1 A= B= 0 0 0 0 1 1 0 0 0 0 [ ] [ ] 0 0 1 0 0 C= D= 1 0 0 0 0
X In future lectures, we will see how to read the state variable denitions and the state space model directly from a bond graph. X When a linear ODE contains derivatives of the input, it is sometimes dicult to proceed. One method is exemplied below. Example 3.4 Corresponding to eqns. (1), the transfer function of eqn. (4) is

Y (s) n1 s2 + n2 s + n3 = 3 . U (s) s + +d1 s2 + d2 s + d3 To simplify the process, we introduce the intermediate signal r(t): such that
Y (s) U (s) u(t) 1 s3 +d1 s2 +d2 s2 +d3

r (t)

n1 s2 +n2 s+n3 1

y (t)

Y (s) R(s) R(s) U (s)

where Y (s) R(s) R(s) U (s) = = n1 s2 + n2 s + n3 , and 1 1 ; 3 2 s + d1 s + d2 s2 + d3

therefore, we have y ( t) = Copyright n1 r(2) (t) + n2 r(1) (t) + n3 r(t) (21) p. 10

2000-2014, J. A. Farrell. All Rights reserved.

TYPES OF MODELS: LECTURES 2 3

March 5, 2014

and r(3) (t) + d1 r(2) (t) + d2 r(1) (t) + d3 r(t) = u(t). (22)

By dening the state vector x = [r, r, r ] , eqn. (21) can be rewritten as y ( t) = and eqn. (22) can be written as r(3) (t) + d1 x3 (t) + d2 x2 (t) + d3 x1 (t) = Now we are in a position to simplify and nd the state space model r(3) (t) = x 3 (t) = d1 x3 (t) d2 x2 (t) d3 x1 (t) + u(t) d1 x3 (t) d2 x2 (t) d3 x1 (t) + u(t). u(t). (24) n1 x3 (t) + n2 x2 (t) + n3 x1 (t) (23)

It is also straightforward to show that x 1 = x2 and x 2 = x3 . Summarizing these equations yields the state space model: x 1 = x2 x 2 = x3 x 3 = u(t) d1 x3 d2 x2 d3 x1 and y = n1 x3 + n2 x2 + n3 x1 .

3.2

Causality

Simple devices are congured to construct systems to perform desired objectives. Some simple devices have a causality that is natural or preferred. Device causality has three types: algebraic, integral, and derivative. To explain the concept of causality, we will follow the convention of writing equations with the inputs (i.e., independent) variables on the right of the equals sign and the output (i.e., dependent or determined) values on the left hand side. The equation y = f (u) should be read as y is the output of the system f when the input is u. Consider a resistor with resistance R connected across the terminals of a voltage source. In this case the voltage 1 source is the input v (t), the resulting current i(t) = R v (t) is the output of the resistor in response to the applied input. This is an example of algebraic causality because the equation relating the input v (t) to the output i(t) is algebraic. It is algebraic because the equation does not involve any integrals or derivatives. If the resistor were connected to a current source input, then the input-output relationship would be v (t) = Ri(t), where this is still an algebraic expression. Now the input is i(t) and the output is v (t). Many simple devices have algebraic causality: dampers, friction, valves, etc. Alternatively, consider a capacitor with capacitance C connected across the terminals of a voltage source. The resulting current i(t) = C d dt v (t) is the output of the capacitor in response to the applied input voltage. Because the output is determined by taking the derivative of the input, this is an example of derivative causality. If the t capacitor 1 were connected to a current source as its input, then the input-output relationship would be v (t) = C i( )d . Because the output v (t) is a function of the integral of the input i(t), this is an example of integral causality. Note that the manner in which the capacitor is connected determines it causality. Many simple devices will have either integral or derivative causality depending on the manner in which they are connected: inductors, masses, inertias, springs, uid tanks and pipes, etc. Causality is a critical issue, as nature prefers integral causality and abhors derivative causality. Models showing devices with derivative causality are missing critical assumptions or have unmodeled eects and should be carefully evaluated. Systems connected with devices having derivative causality may have extra unneeded components or design aws that may lead to short system life spans. In your circuits course, you should have learned not to connect an inductor in series with a current source or a capacitor in parallel with a voltage source. Both of these are simple examples of devices connected with derivative causality. In more complex systems, devices with derivative causality are more dicult to detect. The bond graph method will detect instances of derivative causality.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 11

3.3

Advanced Concepts

March 5, 2014

3.3

Advanced Concepts

Following is a brief discussion of important concepts that are slightly more advanced. Stationary solutions: If u(t) = u0 (i.e., constant) and x0 is a solution to f (x0 , u0 ) = 0, then x(t; x0 , t0 , u0 ) = x0 is a solution to the initial value problem x (t) = f (x(t)), u0 ) with initial condition x(t0 ) = x0 . The solution (x0 , u0 ) is a stationary point, singular point, or equilibrium of the system. All stationary points of a system must satisfy f (x0 , u0 ) = 0. Example. A uid tank with inow u is described by the ODE (t) = h(t) + u(t) h with output ow rate described by q (t) = h(t).

The variable h is the height of the uid in the tank and must be positive. This is a nonlinear rst order state space model with x = [h], f (x, u) = x + u, and h(x, u) = x. For a constant input u(t) = u0 , the equilibria are dened by the solutions x0 = uo or x0 = u2 0. Example. A model of two species where species one preys N1 on species two is 1 N 2 N = (1 1 )N1 + 1 N1 N2 = (2 2 )N2 2 N1 N2

where Ni 0 is the number of individuals of species i, i is the reproduction rates of species i, i is the death rate of species i, and i represent predation rates. This is a second order state space model with no inputs. of the state is x = [N1 , N2 ] . The system has two equilibria: x0 = (0, 0) and ( A valid denition ) 1 1 2 2 x0 = . If the number of species were to start out at either of these values, they would remain 1 , 2 constant forever. Otherwise, the number of each species will change. Stability: This refers to the tendency for an equilibrium to attract solutions. An equilibrium is Locally stable If initial conditions suciently near to the equilibrium do not diverge away from the equilibrium. Locally asymptotically stable If it is locally stable and initial conditions suciently near to the equilibrium eventually converge to the equilibrium. Globally asymptotically stable If all initial conditions eventually converge to the equilibrium. Unstable If there exist initial conditions arbitrarily near the equilibrium that diverge from the equilibrium. As engineers, we are usually interested in designing systems with (at least) locally asymptotically stable equilibria. Linearization: Engineers are often interested in analyzing solutions of a nonlinear system with initial conditions near an equilibrium (x0 , u0 ). We dene the deviation variables: x = u = y Then, by Taylors Theorem, x x x Copyright = x 0 = f (x0 , u0 ) + Ax + Bu p. 12 f (x, u) x x +
(x0 ,u0 )

x x0 u u0 y h(x0 , u0 ).

f (x, u) u

u + h.o.t s
(x0 ,u0 )

2000-2014, J. A. Farrell. All Rights reserved.

TYPES OF MODELS: LECTURES 2 3

March 5, 2014

and y y y = h(x, u) h(x0 , u0 ) h = h(x0 , u0 ) + (x, u) x Cx + Du


f x (x, u)

x +
(x0 ,u0 )

h (x, u) u

u + h.o.t s h(x0 , u0 )
(x0 ,u0 )

which is a linear model that is valid for x and u small, where A = C=


h x (x, u) (x0 ,u0 ) ,

,B=
(x0 ,u0 )

f u (x, u)

,
(x0 ,u0 )

and D =

h u (x, u) (x0 ,u0 ) .

The stability of an equilibrium of a nonlinear system can sometimes be determine by analysis of the linearized system valid at that equilibrium location. Example 3.5 The system of eqn. (1820) has equilibria at x = [n, 0] for integer values of n, which correspond to two physical equilibria. If we wish to nd a linearized model valid for x near [, 0] , then we dene x y Then, because
sin(x1 ) x1

= x (, 0) = y .

= cos(x1 )| = 1, x 1 x 2 y = x2 d mg x1 x2 = J J = x1 . [ x y = = [ ] x ] x.

In matrix form this is

0
mg J

1 d J 0

3.4

Exercises

Exercise 3.1 For each of the following:


X Determine if the system is linear. If not, clearly state why not? X If the system is linear, nd the transfer function from input to output.

In each subproblem, the inputs are either u(t) or v (t). The outputs are y (t) and z (t). 1. y (5) (t) = u(t) 2. y 5 (t) y (1) (t) = u(t). Note that y 5 = y y y y y and y (5) (t) = 3. y (t) + 15y (t) + sin(y (t)) = u(t) (t) y (t) + 3y (t) = u (t) + u(t) 4. y 5. y (t) = u(t) and z (t) = u(t) z (t) y (t)
d5 dt5 y

are not the same!

Exercise 3.2 For Example 3.4: Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 13

3.4

Exercises

March 5, 2014

X Dene the functions f (x, u) and h(x, u) for the state space model. X If the systems is linear, specify the matrices A, B , C , and D.

Exercise 3.3 For each of the following I/O ODEs:


X Clearly state the order of the system. X Clearly dene a state vector of that order. X Find the state space model. Organize the state space model in the format

(t) = x y (t) = and clearly dene the functions f and h.

f ( x(t), u(t)) h( x(t), u(t))

X If the systems is linear, specify the matrices A, B , C , and D and write the system in matrix vector form.

Treat each numbered item as a separate system with inputs u and v ; and, outputs y and z . 1. y (3) (t) 2y (2) (t) + y (t) = u(t) 2. z (3) (t) 2|z (2) (t)| + z (t) = u(t) ( )2 3. z (3) (t) 2z (2) (t) + z (t) = u(t) (t) 2z (t) = u(t) + 2z (t) 4. z 5. z (t) = u(t) + 2y (t) z (t) and y (t) = u(t) z (t) (t) 6. y (3) (t) = u(t) + z (t) and z (2) (t) = u(t) y (t) y 7. y (t) = u(t) v (t) 8. y (4) (t) 2y (3) (t) = 7u(t) 9. y (t) + 17|y (t)| + 10y (t) = u(t) (t) = 4u(t) and z (t) = 3y (t) + z (t) 10. y 11. z (t) + 2z (t) + z (t) = u (t) u(t) (See Example 3.4.) (See Example 3.4.)

12. y (3) (t) 2y (2) (t) + y (t) = u(2) (t) + 2u(1) (t) + u(t)

Exercise 3.4 For each of the ODEs in Exercise 3.1, nd a state space model.

Exercise 3.5 For the linear system v w w v v where the output vector is y = w . z 1. Dene a valid state vector. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 14 z = 0 = u = v

TYPES OF MODELS: LECTURES 2 3

March 5, 2014

2. Specify the order of the system. 3. Find the matrices A, B , C , and D so that the state space model can be written as x y = Ax + Bu = Cx + Du

Exercise 3.6 An inductor with a current source as an input has derivative causality. This is because the input current would be dierentiated by the inductor to determine the output voltage across the inductor. The same inductor with a voltage source input would have integral causality, because the voltage input would be integrated by the inductor to determine the current through the inductor. Questions: 1. Consider a capacitor connected to either a voltage source or a current source. Which interconnection yields integral causality and which yields derivative causality for the capacitor? Draw the simple schematics. Label the voltages and currents. Write down the voltage-current relationships for the capacitor for each of the two schematics 2. For the inductor with derivative causality diL . dt If the input iL is a step function at time t = 0 that turns o at t = 1, what is vL (t)? What is the power supplied by the power source? Is this physically reasonable? vL ( t ) = L 3. For the inductor with integral causality iL (t) = 1 L
t

vL ( )d.

If the input vL is a step function at time t = 0 that turns o at t = 1, what is iL (t)? What is the power supplied by the power source? Is this physically reasonable? 4. Why is it reasonable to claim that nature prefers integral causality?

Exercise 3.7 For the nonlinear system x 1 x 2 = 1 |x2 | = x1 ,

nd all of the equilibria (i.e., stationary points) of the system.

Exercise 3.8 For the system of eqns. (1820), nd the linearized model around the equilibrium point at x = [0, 0] .

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 15

March 5, 2014

4
4.1

Frequency and Step Responses: Lecture 4


Frequency response.
Y (s) = G(s). U (s)

Let a strictly stable5 linear system have a transfer function indicated by G(s):

If the input is u(t) = A sin(t), then the output after transients have decayed away is y (t) = |G(j )|A sin(t + G(j )). Note that a complex number z , can be written in either rectangular z = a + jb or polar form z = M ej = M . It is necessary to know how to convert between the two forms. Using Eulers identity, z = M ej = M (cos() + j sin()) = M cos() + jM sin(); therefore, given the polar form we can compute the rectangular form as a = M cos() and b = M sin(). Given the rectangular form, M = |z | ( = ) zz = a2 + b2 and = z = atan2(b, a). The function atan2 is s four quadrant b arctangent. If you use atan a , you need to ensure that you manually adjust the result to be in the correct quadrant.
2 Example 4.1 What is the steady state response of the linear system with transfer function G(s) = (s+2)( s2) to the input u(t) = 4 sin(2t)? This system has poles at s = 2. The pole as s = 2 is in the right half plane. The natural response of the system will contain terms proportional to e2t and e2t . The system is not stable. No steady state response will exist. Therefore, the frequency response approach cannot be used.

Example 4.2 What is the steady state response of the linear system with transfer function H (s) = input u(t) = sin(t)? Evaluating H (s) at s = j we can compute its magnitude and phase. Its magnitude is |H (j )|2 = = = |H (j )| = Its phase is computed as follows H (s)|s=jw j 1 + j )( ) ( 1 j 2 + j j = = 1 + j 1 j 1 + 2 ( ) 1 = = atan = 90 atan( ). = H (j )H (j ) = H (j )H (j ) (j )(j ) (1 + j )(1 j ) 2 1 + 2 | | . 1 + 2

s (s+1)

to the

H (j )

Therefore, for a xed value of the steady state output is | | sin (t + 90 atan( )) . y (t) = 1 + 2 For this example, the time constant is = 1 second. Therefore, steady-state would be achieved in approximately 4 = 4 seconds.
5 All

the system poles are in the left-half of the complex plane.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 16

FREQUENCY AND STEP RESPONSES: LECTURE 4

March 5, 2014

Example 4.3 If the system with transfer function G(s) = Find the steady state output signal for = 0, 1, 2. 0 1 2 G(j ) 0.5 0
3 2+6j

s2 +1 s2 +3s+2

were excited by the signal u(t) = 4 sin(t).

|G(j )| 0.5 0 0.4743

G(j ) 0 DNM 71.56

y 2 0 1.897 sin(2t + 71.56 )

For this example, the system has two poles, one at s1 = 1 and the other at s2 = 2. The transient response will have the form a1 e1t + a2 e2t . The corresponding time constants are 1 = 1 sec and 2 = 0.5 sec, respectively. The term that decays the slowest is a1 e1t . Therefore, the dominant time constant is 1 = 1 second and steady-state would be achieved in approximately 41 = 4 seconds. Proof of Freq. Resp. Result: In the following, the denominator D(s) is factored such that G(s) = n N (s) i=1 (s + pi )

where each pi > 0. In addition, since we are interested in steady state for a stable system, WOLG, we let the initial conditions be zero. Y (s) = G(s)U (s) = N (s) Aw 2 2 i=1 (s + pi ) s + n C C Di = + + s + pi s j s + j i=1 n =
n Di C C + + s + pi s j s + j i=1

G(s)
A s+jw

Aw (s + j )(s j )

where C = G(s)

s=jw

= G(j ) 2A j . Therefore, { L
1 n Di C C + + s + pi s j s + j i=1

Y (t)

= = = =

n i=1 n i=1 n i=1

Di epi t + G(j )

A A jt e G (j ) ejt 2j 2j ) 1 ( j (t+G(j)) e ej (t+G(j) 2j

Di epi t + |G(j )|A

Di epi t + |G(j )|A sin (t + G(j )) .

The term |G(j )|A sin (t + G(j )) is the steady state response because for pi > 0 i = 1, . . . , n, the term n pi t approaches i=1 Di e n zero as t . The summation i=1 Di epi t contains n terms each of which decays away to zero. The rate at which each term decays is determined by the value of pi . The slowest rate of decay will be due to the smallest value of pi . A quick estimate of the time required for the system to reach steady state of within 2% is Tss = 4 mini (pi ). Some books will say Tss = 3 mini (pi ), which is within 5% if the nal value. In either case, the idea is the same. The shape of the transient response as a function of the pole locations in the complex plane is further discussed in Section 29.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 17

4.2

Exercises

March 5, 2014

4.2

Exercises

Exercise 4.1 For each of the following systems and inputs: 1. Check whether the system is stable. 2. If the system is stable, use frequency response to determine the steady state response? 3. For a stable system, the time to reach steady state can be estimated as four times the time constant of the slowest pole. When a system is stable, all poles are in the left half plane (LHP). The slowest pole is the one with the largest (least negative) real part. For each stable system, approximately how long will it take for the steady state condition to be achieved. The time constant is the reciprocal of the absolute value of the real part of the pole location. Problem 1 2 3 4 5 6 7 8 9 10 11 12 13 System 2 +101 H (s) = (ss 2 +2s+1) s H (s) = s+10 1 H (s) = s+5 s H (s) = 10 s+4 2 H (s) = s17 s1 H (s) = (s+10)( s+1) s H (s) = 10 s+10 s H (s) = s+10 1 H (s) = s+3 s2 +100 H (s) = (s2 +200 s+100) 2 H (s) = s 10 s1 H (s) = (s+10)( s+1) H (s) =
s2 +4 (s+10)(s+1)

Input u(t) = sin(1t) u(t) = 10 sin(10t) u(t) = cos(5t) u(t) = sin(3t) u(t) = sin(t) u(t) = cos(t) u(t) = sin(t) u(t) = 10 sin(t) u(t) = cos(3t) u(t) = sin(10t) u(t) = sin(t) u(t) = sin(t) u(t) = cos(2t)

Exercise 4.2 1. For the I/O ODE, y (3) (t) + 5y (2) (t) + 7y (1) (t) + 3y (t) = u (t) + 2u(t) nd the transfer function from the input u(t) to the output y (t). 2. For the input u(t) = cos(2t), nd (a) the steady state output; and (b) the approximate time to reach steady state. Feel free to use Matlab to help with the evaluation of the transfer function. Useful functions are polyval and root. 3. Find a linear state space model. (See Example 3.4.) 4. Clearly dene the matrices A, B , C , and D of the matrix form of the state space model: x (t) = y (t) = Ax(t) + Bu(t) Cx(t) + Du(t)

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 18

SIMULATION: LECTURE 5

March 5, 2014

Simulation: Lecture 5

It is very dicult and tedious to nd analytic solutions for systems that are either nonlinear or higher order. Simulation: The creation of one system which acts like another.
X May be motivated by the cost or risk of operating the original system. X To be useful for design and analysis, the simulation must be an accurate representation of the original system.

Check variable units and interpret them correctly. Keep track of and check assumptions. Numeric simulation: Solution of ODEs by numeric methods. Advantages: X Flexibility model characteristics are easily changed X Accuracy completely controllable by the analyst X Simplicity high dimensions and nonlinearities are not problems. Disadvantages: Results are only as accurate as the model and simulation. Model and simulate carefully. Eulers Method: Consider the system x = y = f (x, u) h(x, u)

with initial condition x(t0 ) = x0 . By the denition of a derivative dx dt therefore, x(t0 + b) x(t0 ) f (x(t0 ), u(t0 )) b x(t0 + b) = x(t0 ) + bf (x(t0 ), u(t0 )). If x(0) = x0 is known, u(t) is known for all t 0, and b is small, then x(b) = x(2b) = . . . = x((k + 1)b) = for k = 1, 2, 3, . . .. Show simulation: instruction sim for x (t) = 2x(t)+?. Comments:
X Eulers method assumes that the slope is constant over time step. X No solution is known between time steps. Matlab simply connects the dots. Interpret with caution. X Eulers method is rst order.

x(t + b) x(t) for small b; b

x(0) + bf (x(0), u(0)) x(b) + bf (x(b), u(b)) . . . x(kb) + df (x(kb), u(kb))

(25) (26) (27) (28)

It requires one function eval per step Error grows proportional to d. Smaller d means smaller error, but more computation. Higher order methods:
X An n-th order method has error proportional to dn , but typically requires n function evals per time step.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 19

March 5, 2014

X Predictor-Corrector:

xp (k + 1) = x(k ) + b f (x(k ), u(k )) xc (k + 1) x(k + 1) Show simulation: Show simulation: = x(k ) + b f (xp (k + 1), u(k )) = 0.5 (xc (k + 1) + xp (k + 1))

This is a second order method. It estimates the slope at the beginning and end of each step. instruction sim leture instruction sim pred corr

X Matlab has very well designed simulation algorithms (up to order 6) with adaptive step-size formulas, etc. Still analyze with care.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 20

ENERGY DOMAINS & POWER CONNECTIONS: LECTURE 6 7

March 5, 2014

Energy Domains & Power Connections: Lecture 6 7

This lecture introduces the eort, ow, momentum, and displacement variables in dierent energy domains (See Section 2.1 in Karnopp [2] or Ch. 5 in Ljung [3]). The basic idea is that by recognizing parallels between the variables and physical relations in dierent energy domains, we can develop a general modeling procedure applicable to all the energy domains. This lecture will work through one energy domain at a time while lling in the entries in Table 1. Domain Generic Electrical Fluid Thermal Translational Rotational Eort e e, Volt P , Newton/m2 T , Kelvin F , Newton , Newton-m Momentum p , Volt-s pP , Newton-s/m2 ****** p, Newton-sec. p , Newton-m-s Flow f i, Amp QV , m3 /sec QH , Joules/sec v , m/s , rad/sec Displacement q Q, Coul. V , m3 EH , Joules X, m , rad Power, N-m/sec P , Joules/sec. e(t)i(t) P (t)QV (t) T (t)QH (t) F (t)v (t) (t) (t)

Table 1: Physical analogies between variables in dierent energy domains.

6.1
6.1.1

Energy Domains (Karnopp Section 2.1)


Generic

In each energy domain, we will dene the following:


X An eort variable e(t) and its ANSI units X A momentum variable p(t) = e(t)dt and its ANSI units X A ow variable f (t) and its ANSI units X A displacement variable q (t) = f (t)dt and its ANSI units X The product of eort and ow P (t) = e(t)i(t) has units of power (Watts=Joules/sec).

6.1.2

Electrical Systems

X The eort variable is voltage e(t) measured in Volts (Joules/Coulomb). t X The momentum variable (t) = 0 e(t)dt is the ux linkage. Its units are Volt-seconds. This variable is useful for the modeling of inductors, transformers, and other devices storing magnetic energy. X The ow variable is current i(t) measured in Amps (Coulombs/sec) t X The displacement variable is Q(t) = 0 i(t)dt measured in Coulombs. X The product of eort and ow P (t) = e(t)i(t) has units of power (Joules/sec=Watts).

6.1.3

Fluid Systems

X The eort variable is pressure P (t) measured in Newton/(sq. m) (kg 1/(ms2 )). t X The pressure momentum variable is pP (t) = 0 P (t)dt. Its units are Newton-m-seconds (kg 1/(m s)). X The ow variable is the volume ow rate QV (t) measured in m3 /s t X The displacement variable is V (t) = 0 QV (t)dt measured in m3 . X The product of eort and ( ow p(t))= P (t)QV (t) has units of power ((kg 1/(ms2 ))(m3 /s) = kg (m/s)2 /s=Joules/sec=Watts).

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 21

6.2

Power Connections (Karnopp Section 2.1)

March 5, 2014

6.1.4

Thermal Systems

See discussion of pseudo-bond graphs in Karnopp [2].


X The eort variable is temperature T (t) which is dimensionless, but measured using the Kelvin scale. X The momentum variable is not used in thermal analysis. X The ow variable is heat ow rate QH (t) measured in Watts. t X The displacement variable is EH (t) = 0 QH (t)dt measured in Joules. X The units of QH (t) are already power. The product of eort and ow does not dened power for thermal systems. This is one reason why for thermal systems we have pseudo bond graphs.

6.1.5

Mechanical: Translation Systems

X The eort variable is force F (t) measured in Newtons (kg m/s2 ). t X The linear momentum variable is p(t) = 0 f (t)dt. Its units are Newton-seconds (kg m/s). X The ow variable is velocity v (t) measured in m/s t X A displacement variable X (t) = 0 v (t)dt measured in meters, m. X The product of eort p(t) = F (t)v (t) has units of power ( and ow ) ((kg m/s2 )(m/s) = kg (m/s)2 /s=Joules/sec=Watts).

6.1.6

Mechanical: Rotation Systems

X The eort variable is torque (t) measured in Newton-meters (kg m2 /s2 ). t X The angular momentum variable is p (t) = 0 (t)dt. Its units are Newton-m-seconds (kg m2 /s). X The ow variable is angular velocity (t) measured in rad/s t X A displacement variable (t) = 0 (t)dt measured in radians, rad. X The product of eort and ( ow p(t )) = (t) (t) has units of power ((kg m2 /s2 )(rad/s) = kg (m/s)2 /s=Joules/sec=Watts).

6.2

Power Connections (Karnopp Section 2.1)

X Energy is transferred between interconnected systems. X Power is the rate of energy transfer and power is the product of eort times ow. X The term port refers to the point at which a subsystem may interconnect with another subsystem. A subsystem may have one or multiple ports. One ports have a single port (e.g., battery). Two ports have two ports (e.g., pump). ... X Associated with any port is a pair of eort and ow variables in the same energy domain. The energy domain for dierent ports can be dierent.

Draw DC motor and pump schematics Label power variables at ports Field and armature current supplying power to motor. Motor supplying power to load. Torque applied to motor opposing rotation.
X When subsystems are connected physically, the complementary power variables of the variable pair at the interconnected ports are forced to have the same values. This is referred to as a bond.

Draw interconnected battery,DC motor, and pump Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 22

ENERGY DOMAINS & POWER CONNECTIONS: LECTURE 6 7

March 5, 2014

Discuss variables at ports


X Each bond connects exactly two ports and has exactly two power variables an eort and a ow in the same energy domain. At any bond, one of the ports will determine the eort and the other port will determine the ow. The variable that the port determines is its output. The other variable is the input of the port. The determination depends on the connected subsystems.

Examples. Consider the circuit shown in Fig. 2. In the left portion of the gure, we see two disconnected subsystems. The voltage source has one set of eort and ow variables, vB and iB and therefore has one port. The resistor also has one set of eort and ow variables, vR and iR and therefore has one port. While disconnected, the eort and ow variables of these ports are independent. The right portion of the gure shows the connected system. Once connected, the connection (or bond) forces the eort and ow variable at the bonded ports to be the same: vB (t) = vR (t) and iB (t) = iR (t). Also, notice that at the bond, the voltage source determines the eort variable. With the eort 1 variable determined, the resistor determines the ow according to iR (t) = R vB (t).

iB
+ _

iR R + vR

iB=iR +_ vB + R + vR

+ vB

Figure 2: Basic circuit illustration of a one port. Consider the circuit shown in Fig. 3. In the left portion of the gure, we see two disconnected subsystems. The current source has one set of eort and ow variables, vS and iS and therefore has one port. The resistor also has one set of eort and ow variables, vR and iR and therefore has one port. While disconnected, the eort and ow variables of these ports are independent. The right portion of the gure shows the connected system. Once connected, the connection (or bond) forces the eort and ow variable at the bonded ports to be the same: vS (t) = vR (t) and iS (t) = iR (t). Also, notice that at the bond, the current source determines the ow variable. With the ow variable determined, the resistor determines the eort according to vR (t) = RiB (t).

iS + vS

iR R + vR

iS=iR + vS

R + vR

Figure 3: Basic circuit illustration of a one port. Fig. 4 shows system that involves eort and ow variables in the electrical, rotational, and uids energy domains. Prior to their interconnection, the eort and ow variables in each energy domain are unconstrained. The voltage source has one port. The motor has two ports with power variables related according to the following two equations: m = km vm and im = km m . The pump has two ports with power variables related by the following two equations: Qv = kp p and p = kp Pp . Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 23

6.2

Power Connections (Karnopp Section 2.1)

March 5, 2014

Tank

Voltage v Source s

+s -

im

vm Motor

+ -

tp,wp Pump tm,wm

Qp Pp

QT

PT

Figure 4: Disconnected electrically powered uid transport system. The connected system is shown in Fig. 5. After the system is connected, their is only one eort and ow variable at each interconnection point (i.e., bond). It is important to note that any bond connects ports that are in the same energy domain. For example, the pump bonds are not compatible with the voltage source bonds. The purpose of the voltage source is to supply electrical power as represented by the eort and ow variables vs (t) and im (t). The DC motor transforms the electrical power to mechanical power through the eort and ow variables p (t) and m (t). The pump transforms the mechanical power to power in the uid domain through the eort and ow variables PT (t) and Qp (t). After the interconnection, the voltage source outputs the voltage vs , which is an eort variable. Since the voltage source has determined the eort vm = vs , using the DC motor equations above, the rotational rate m = p has been determined by the motor. Since the DC motor has determined p = m , by the pump equations above, the ow rate Qv is determined. The accumulation of the ow Qv in the tank creates a back-pressure on the pump that we have labeled PT . Using the equations above, we see that this determines p because Pp = PT . We also see that p determines im because m = p . Note that all eort and ow variables at all bonds have been determined (conceptually). Bond graphs provide an ecient mechanism for proceeding through the above reasoning process in an orderly fashion. State variable models can be determined directly form the bond graph.
Tank im Voltage v Source s

+
Motor

tp,wm

Pump Qp

PT

Figure 5: Connected electrically powered uid transport system..

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 24

ENERGY DOMAINS & POWER CONNECTIONS: LECTURE 6 7

March 5, 2014

6.3

Word Bond Graphs (Karnopp Section 2.2)

Used to introduce concepts. Also useful for analyzing power ow.


X Represent each subsystem by a title word X Represent each port interconnection by a single line or bond. X The line is labeled with the names of the eort (top or left) and ow (bottom or right) variables. X A half arrow is added to each line to indicate the direction of power ow at any time instant when the eort and ow variables are both positive. X A full arrow is used to indicate environmental eects that occur with essentially zero power ow: gear selection, thermostat setting, etc. This is called a signal ow or active bond. It represents information ow at essentially zero power. These are one-way inuences. X On every bond, a causal stroke is used to indicate the port that determines the ow (i.e., has ow as its output). The port at the opposite end of the bond determines the eort. X The half arrow power ow sign convention and the causal stroke notation are completely independent.

Subsequent lectures will introduce methods to enable development of detailed quantitative models.
6

Examples.
X For the circuit shown in Fig. 2, the word bond graph is shown in Fig. 6.

The bond is the horizontal line from the voltage source to the resistor. For this bond, the eort variable is labeled as vB and the ow variable is labeled as iR . The half arrow indicates that for the voltages and currents as labeled on the schematic positive power is owing from the source to the resistor. The causal stroke shows that the resistor is determining the ow (current) and the source is determining the eort (voltage).
Voltage source

vB iR

Resistor

Figure 6: Word bond graph corresponding to the system in Fig. 2.


X For the circuit shown in Fig. 3, the word bond graph is shown in Fig. 7.

The bond is the horizontal line from the voltage source to the resistor. For this bond, the eort variable is labeled as vR and the ow variable is labeled as iR . The half arrow indicates that for the voltages and currents as labeled on the schematic positive power is owing from the source to the resistor. The causal stroke shows that the source is determining the ow (current) and the resistor is determining the eort (voltage).
Current source

vR iR

Resistor

Figure 7: Word bond graph corresponding to the system in Fig. 3.


X Fig. 8 shows the word bond graph corresponding to the system in Fig. 5. Compare the bond graph to the system and conrm the application of the causal strokes.
6 Assign

HW on power ow, energy storage, half arrows, subsystem inputs and outputs, causal strokes.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 25

6.4

Exercises

March 5, 2014

Volt Supply

vs im

Motor

tp wm

Pump

PT Qp

Tank

Figure 8: Bond graph for the system in Fig. 5.

6.4

Exercises

Exercise 6.1 Consider the system drawn in Figure 9. The system has six subsystems: a battery to supply a 1 1 xed voltage e, a motor equations are i(t) = K (i) and m (t) = K e(t), a shaft to transmit the motor torque to a rotational inertia (by twisting: = km ), a rotational inertia J , a cable to transmit a force T = a(r x) to a mass, and a mass M that will be lifted against the force of gravity. The schematic labels the eort and ow variables at
wL qL tm wm qm Motor tm T T g M x,v T is the cable tension applied to the mass and to the rotational inertial tm is the torque applied to the shaft i + e _

Transl. Gravity

Transl. Mass

Transl. Inertia

Rotat. Shaft

Rotat. Motor

Electrical Battery

Cable

Figure 9: Schematic and word bond graph for a Crane. See Exercise 6.1 each port. Note the following: 1. The eort variable T at the two ends of the cable has equal magnitude, but opposite directions. 2. The ow variables at the two ends of the cable are dierent: v and rL . The rate at which the cable stretches is sT = rL v . 3. The eort variable m at the two ends of the shaft has equal magnitude, but opposite directions. 4. The ow variables at the two ends of the shaft are dierent: m and L . The rate at which the shaft twists is s = L m .
X Consider the energy storage in each of the ve subsystems. Describe each as chemical, potential, or kinetic. If possible, write an equation for the amount of energy that is stored in terms of the eort and ow variables. X Construct a word bond graph (BG).

Connect the six subsystems with appropriate bonds. Apply the correct causal stroke to each bond. Label each bond with the eort and ow variables (in the correct locations) to correspond with your causal strokes.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 26

ENERGY DOMAINS & POWER CONNECTIONS: LECTURE 6 7

March 5, 2014

Exercise 6.2 Consider the system drawn in Figure 10. The system has ve subsystems: two masses, a shock absorber modeled as F1 = s(x1 x2 ), a spring modeled as F2 = s(x2 x3 ), and a velocity source that determines vs .

M1
F1

x1,v1

Shock Absorber

F1

M2
F2
Spring

x2,v2

F2

xs,vs

Velocity source
Figure 10: Schematic for a shock absorber system intended to isolate the motion of M1 from the motion of ve . See Exercise 6.2 The schematic labels the eort and ow variables at each port. Note the following: 1. The eort variable F1 at the two ends of the shock absorber has equal magnitude, but opposite directions. 2. The eort variable F2 at the two ends of the spring has equal magnitude, but opposite directions. 3. The ow variables at the two ends of the shock absorber are dierent: v1 and v2 . The rate at which it stretches (i.e., stores potential energy) is v1 v2 . 4. The ow variables at the two ends of the spring are dierent: v2 and v1 . The rate at which the spring stretches is v2 v3 .
X Consider the energy storage in each of the ve subsystems. Describe each as potential or kinetic. If possible, write an equation for the amount of energy that is stored in terms of the eort and ow variables. X Construct a word bond graph (BG).

Connect the ve subsystems with appropriate bonds. Apply the correct causal stroke to each bond. Label each bond with the eort and ow variables (in the correct locations) to correspond with your causal strokes.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 27

6.4

Exercises

March 5, 2014

Exercise 6.3 This problem asks energy and power related question based on facts shown on the 2013 Hoover Dam brochure. 1. The height of the water behind the Dam in 2013 was near 337m. The average water height is typically 358m. The minimum water height is 305 m. Compute the potential energy per cubic meter of water at each of these heights. 2. If the area of Lake Mead, behind the Dam, is 640 km2 , how much total energy is lost when the lake height changes from its typical average height to its 2013 height. 3. Compute the pressure created by h meters of water. This is the force of the column of water per square meter. 4. Assuming 100% eciency, derive the formula for the power output P of the ow Qv through the Dam. This should be expressed as a formula containing P , Qv , h, and two physical constants. 5. Evaluate the power formula in Part 4 for the typical water height when the volume ow rate is 9.2 109 m Yr. 6. Discuss the sequence of dierent energy domains in this problem and the physical elements that transform power from one domain to the next. Note and carefully show unit and unit conversions throughout this problem.
3

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 28

BOND GRAPHS: LECTURE 8

March 5, 2014

Bond Graphs: Lecture 8

Bond Graphes use bonds between one ports, two ports, and multiports to represent power ow within a system. From bond graphes we are able to check causality and derive state space models. This lecture reviews bonds and introduces one port elements for bond graph models (See Sect. 3.1 in Karnopp [2] or Ch. 6 in Ljung [3]). This lecture will work through one energy domain at a time while lling in the entries in Table 2. Energy Domain Generic Electrical Translational Rotational Fluid Thermal Dissipate Energy R : e = Rf Resistor Friction Friction Resistance Heat transfer Potential Energy C : q = Ce Capacitor Linear Spring Torsional Spring Tank Heat capacity Kinetic Energy I : p = If Inductor Mass Inertia Pipe ***

Se Voltage Source Force Source Torque Source Pressure source Temperature source

Sf Current Source Velocity Source Angular rate source Flow rate source Heat ow source

Table 2: Physical analogies between components (one port elements) in dierent energy domains.

Bonds:
X Represent the transfer of energy where power is the product of ow times eort. X The bond is labeled with eort (on the top or left) and ow (on the bottom or right) variables. X The half arrow indicates the direction of positive power ow and assigns a sign convention. X The half arrow is usually on the side with the eort. X The causal stroke indicates the element that determines the ow. X The half arrow and causal stroke are completely independent. X Full arrows indicate signal ow (i.e., essentially zero power)

Basic One-ports:
X Components with a single power port (i.e., a single set of eort and ow variables). X Can represent simple components (e.g., resistor, capacitor, mass). X Can represent complex subsystem (e.g., wall outlet or constant pressure pump). X The ve types of one-ports are described below. In addition, they are illustrated with a single bond in Fig. 11.

R-element: 1. Element in which the eort and ow are related by a static (algebraic) function.

e R f Se e

ec

C Sf f

fI

Figure 11: Simple bond graphs for the ve types of one ports. Passive one ports (R, I , C ) are on the top row. The half arrow is always into the element because the elements always absorb net power. The causal stroke of the elements that are capable of storing energy are drawn to indicate integral causality. The active elements (Se , Sf ) are drawn in the second row. These may either supply or absorb net power, so no half arrow is indicated. The causal stroke indicates their natural causality.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 29

March 5, 2014

2. When this expression has the linear form e(t) = Rf (t), then the power is p(t) = Rf 2 (t) = 1 2 e (t). R

Since R > 0, a resistance element always dissipates power. Most often this power is wasted as heat. 3. In Fig. 11, the R element bond graph is drawn with a half arrow (absorbing power), but no causal stroke (it has no natural causality). C -element: 1. Element in which the eort and displacement are related by a static function d 2. When this expression has the linear form q (t) = Ce(t) or f (t) = C dt e(t), then the energy stored in a C element is EC (t) = ef dt = eCde = 1 2 1 2 Ce (t) = q (t). 2 2C

Therefore C elements can store energy. Since the stored energy is proportional to q (t), which is the integral of ow, a capacitor is a ow storage device. 3. The stored ow is q (t), which is proportional to eort e(t). Because the C element energy is proportional to both q (t) and e(t), neither q (t) nor e(t) can change in a discontinuous fashion. Therefore, the natural or integral causality of a C element is to determine the eort e(t). 4. In Fig. 11, the C element bond graph is drawn with half arrow and causal stroke (w/ integral causality). The half arrow is always into the C element as the C element can never supply more power than has previously been stored into it. I element: 1. Element in which the momentum and ow are related by a static function. d 2. When this expression has the linear form p(t) = If (t) or e(t) = I dt f (t), then the energy stored in a I element is EI (t) = f edt = f Idf = 1 2 1 2 If (t) = p (t). 2 2I

Therefore I elements can store energy. Since the energy is proportional to p(t), which is the integral of eort, an inductor is a eort storage device. 3. The stored eort is p(t), which is proportional to ow f (t). Because the I element energy is proportional to both p(t) and f (t), neither p(t) nor f (t) can change in a discontinuous fashion. Therefore, the natural or integral causality of an I element is to determine the ow f (t). 4. In Fig. 11, the I element bond graph is drawn with half arrow and causal stroke (w/ integral causality). The half arrow is always into the I element as the I element can never supply more power than has previously been stored into it. Se : 1. A source of eort. 2. Ideally supplies the indicated, possibly time varying eort, no matter what ow is required. 3. In Fig. 11, the bond graph is drawn for a source of eort Se with a causal stroke showing its natural causality (determining eort). The half arrow is not shown because the source may either supply or absorb power. Sf : 1. A source of ow. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 30

BOND GRAPHS: LECTURE 8

March 5, 2014

2. Ideally supplies the indicated, possibly time varying ow, no matter what eort is required. 3. In Fig. 11, the bond graph is drawn for a source of ow Sf with a causal stroke showing its natural causality (determining ow). The half arrow is not shown because the source may either supply or absorb power.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 31

March 5, 2014

Multiports: Lecture 9

Basic Multi-port Junctions: There are two types of multi-port junctions: These are used to connect one-ports and two-ports in arbitrary congurations.
X The junctions represent the only two ways that components can be connected. X In electrical systems, the corresponds to series and parallel connections.

Flow, Common eort, or 0-junction:


2 2 3 1 4

0
4

Figure 12: Example zero junction.


X Can have any number of ports. X The eort variable is the same at all ports: e1 = e2 = e3 = e4 . X Power conserving:

e1 f1 e2 f2 + e3 f3 + e4 f4 = 0 e1 f1 e1 f2 + e1 f3 + e1 f4 = 0

f1 f2 + f3 + f4 = 0 f1 + f3 + f4 = f2 .

X zero: sum the ow (using sign convention supplied by half arrows) all eorts are the same.

Electrical- Represents Kirchos current law at a node where four branches join. Mechanical- Represents geometric compatibility for a situation involving a single force and for velocities that algebraically sum to zero. Fluid- Represents conservation of volume ow rate at the junction of four pipes. Example gures-

2 1

Q1 Q3 Q2

F v1

. x3 v3 = x3 F v2

+ e1-

i1 i3 + e2 e+ - i2 3 -

Figure 13: Example zero junction.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 32

MULTIPORTS: LECTURE 9

March 5, 2014

Eort, common ow, 1-junction:


2 2 3 1 4

1
4

Figure 14: Example one junction.


X Can have any number of ports. X The ow variable is the same at all ports: f1 = f2 = f3 = f4 . X Power conserving:

e1 f 1 e2 f 2 e3 f 3 + e4 f 4 = 0 e1 f 1 e2 f 1 e3 f 1 + e4 f 1 = 0

e1 e2 e3 + e4 = 0 e1 + e4 = e3 + e2 .

X one, sum the eorts (using sign convention supplied by half arrows) all ow are the same.

Electrical- Represents Kirchos voltage law around a loop with a single loop current and four voltage drops. Mechanical- Represents the sum of four forces at a point with a well-dened velocity. If the point has mass, this is Newtons law. Fluid- Represents the sum of pressures around a ow circuit with four pressure drops.

2 1

e1

Figure 15: Example one junctions.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

+ -

. v=x F1 M F3 F2

+ e2 i + e3 -

p. 33

March 5, 2014

Example gures- Bond Graph Simplications:


X A junction with only two inputs, with half-arrows pointing the same direction, can be replaced with a similarly directed half-arrow.
e1 f

e2 f

==>

e1=e2 f

0
f1 f2

==>

e f1 = f2

X Two adjacent junctions of the same type can be combined.


2 1 3 2 4 3

1
5

==>

1
5

3 1

0
2

0
5

==>

0
5

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 34

MULTIPORTS: LECTURE 9

March 5, 2014

8.1

Exercises

Exercise 8.1 For each of the following 0-junctions, write the equations relating the eorts and ows.

a)
1

b)

2 1

c)

2 1 4

3 5

Exercise 8.2 For each of the following 1-junctions, write the equations relating the eorts and ows.

a)
1

b)

2 1

c)

2 1 4

3 5

Exercise 8.3 If possible, simplify the bond graphs in Fig. 16.


R:a I:g R:d 0 R:b C:c
I:g R:a 0 0 R:d 1 0 C:c R:b

(a) Reduce.
R:a I:g 0 0 I:h 1 0 C:c R:b

(b) Reduce.
R:a Sf:u I:g R:d 0 0 C:c 0 R:n 1 0 C:m R:b

(c) Reduce.
R:a I:g 1 R:d 0 1 R:n 1 0 Se:u

(d) Reduce.
R C
1 1

se:u

(e) Reduce.

(f) Reduce.

Figure 16: Possibly unreduced bond graphs

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 35

March 5, 2014

Causality Propagation and State Space Models: Lecture 10 11

Causality Propagation: Procedure: (walking the bond graph) 1. 2. 3. 4. 5. 6. 7. 8. 9. Choose a source and mark its automatic causality. Assign a source variable name. Propagate this causality and variable as far into the graph as possible. Repeat 1 and 2 for all remaining sources. Choose an I or C element and mark its natural causality. Assign a (state) variable to the natural output having integral causality. Propagate this causality and state variable as far into the graph as possible. Repeat 4 and 5 for all remaining I and C elements. Choose an R element and mark an arbitrary causality. Assign a variable name. Propagate this causality and variable as far into the graph as possible. Repeat 7 and 8 for as many R elements as necessary to complete the causality graph.

Normally, the procedure would halt at step 6. If the algorithm fails due to a causality conict, then the graph is ill-posed (has derivative causality). This is a topic of a future lecture. Rules: 1-junction Rule All bonds except one will have the causal stroke at the 1-junction. 0-junction Exactly one of the bonds will have the causal stroke at the 0-junction. State variable models from bond graphs: After completing the above procedure for walking the bond graph: 1. The number of energy storage devices (with integral causality) is the number of states (i.e., order). 2. A valid denition of the state vector is the vector of output power variables (i.e., eorts or ows) associated with each energy storage devices having integral causality
X Eort variables for C -elements X Flow variables for I -elements

Dene a vector containing these variables. 3. For each energy storage element with integral causality, write the dierential equation for the corresponding state variable. 4. Write the vector state equations.

9.1

Examples

Example 9.1 This example develops the state space model for the bond graph on the top left of Fig. 17. Since this is the rst example, we go through the method with considerable discussion, normally this will not be the case. For this example, the outputs are the ows through the R and C elements.

R C 0 R C
ec ec ec/R ec

R I C
ec

0 R

I
fR=e c / R

ec fR ec e C -f -f 0 fc R I I

Figure 17: Propagation of state variables through a bond graph. See Example 9.1. Note that we dened the symbol c fr = e R just for the convenience of tting the equations onto the gure.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 36

CAUSALITY PROPAGATION AND STATE SPACE MODELS: LECTURE 10 11

March 5, 2014

Because the bond graph has no sources, we begin at step 4, by selecting the C element. Its integral causality determines an eort variable that we have named ec . Because the C element determined an eort, the causal stroke on the bond is placed at the port connected to the 0-junction. The result of step 4 is shown in the bond graph at the upper right. In step 5, we propagate the result of step 4 as far as we can. Because all eorts on a 0-junction are equal and the C element determines one of the eorts to be ec , the eorts on all the other bonds connected to this 0-junction must also be ec . Because the 0-junction determined the eort on the bonds connected to the R and I elements, the causal stroke is placed at the end of the bonds connected to the R and I elements. By the denition c of a linear R element (e.g., Ohms law), the ow determined by the R element is fR = e R . The result of step 5 is shown in the bond graph at the lower left. In step 6 we check whether there are still energy storage devices with unspecied output power variables. Because the ow of the I element is unspecied, we return to step 4 and name this variable fI . In step 5 we propagate the ow through the 0 element to the ow of the C element by summing the ows according to the sign convention dened by the half arrows. The result is the bond graph on the bottom right with all eorts and ows dened and each bond having exactly one causal stroke. Because the bond graph has two energy storage devices and both have integral causality, the number of states is n = 2. A valid denition of the state vector is the output power variables of these energy storage devices: [ ] x = ec f I . The state space model has two parts: (1) a vector algebraic equation relating the vector of outputs to the state vector and input vector and (2) one rst order dierential equation [ ]for each state variable. y1 ec ec The outputs are y1 = R and y2 = R + fI . The output vector is y = . The output vector is written as a y2 vector function of the state as ][ ] [ 1 ] [ 1 0 ec 0 R R = x. y= 1 1 fI 1 1 R R The rst-order dierential equation for each state is read o the bond graph. 1 = e c . The eort ec is the power output variable of an C element. By 1. For the rst state x1 = ec ; therefore, x 1 the denition of a generic C element: e =C f . For the C element in Fig. 17, the ow is fR + fc . Therefore, e c 1 (fR + fc ) C 1 ec fc = CR C 1 1 = x1 x2 CR C =

x 1 which is the rst order ODE for x1 .

2. For the second state x2 = fI ; therefore, x 2 = fI . The ow fI is the power output variable of an I element. By 1 the denition of a generic I element: f = L e. For the I element in Fig. 17, the eort is ec . Therefore, fI x 2 which is the rst order ODE for x2 . Because this system is linear, it can be written in the standard matrix form as [ 1 1 ] RC C x x = 1 0 I [ 1 ] 0 R y = x. 1 1 R = = 1 ec I 1 x1 I

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 37

9.1

Examples

March 5, 2014

Example 9.2 This example develops the state space model for the bond graph on the left of Fig. 18. The left image shows the result of rst labeling the output u of the source of eort with its causality; then labeling the output power variable of the C element as eC along with its causality and propagating it as far as possible; nally, labeling the output power variable of the I element as fI along with its causality. The image on the right shows the result of propagating fI through the bond graph. Along the way, the symbol eR = fi R was dened, just so that the bond graph did not get too crowded.

R C
ec 1 u fI

R I C
ec fI eR fI 1 u fI

eR=f I R u-eC-eR fI

se:u

se:u

Figure 18: Propagation of state variables through a bond graph. See Example 9.2. Note that we dened the symbol eR = fi R just for the convenience of tting the equations onto the bond graph. For this example, the output y is the eort across the R element. The bond graph contains two energy storage devices: C and I . Both have integral causality. Therefore the state dimension is two. A valid denition of the state vector is the output power variables of these energy storage devices: [ ] x = f I ec (It is only coincidence that the names are the same as in Example 9.2.). From the denition of an 1 I element (f = I e) we have fI 1 (u eC eR ) I R 1 1 = eC f I + u I I I R 1 1 = x1 x2 + u I I I =
1 C f)

x 1

which is the rst order ODE for x1 . From the denition of an C element (e = e C = = 1 fI C 1 x1 C

we have

which is the rst order ODE for x2 . The eort across the R element is eR = RfI , so y = Rx1 . Because this system is linear, it can be written in the standard matrix form as [ R ] [ 1 ] 1 I I I x = x + u 1 0 0 C [ ] R 0 x. y =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 38

CAUSALITY PROPAGATION AND STATE SPACE MODELS: LECTURE 10 11

March 5, 2014

Example 9.3 This example develops the state space model for the bond graph on the left of Fig. 19. The left image shows initial bond graph. By combining the adjacent bond 1-junctions the bond graph reduces to that shown on the right, which is that same as the starting point of Example 9.3; therefore, the state space model is the same.

R C
1 1

R I C
ec 1 u fI

se:u

se:u

Figure 19: Reduction of a bond graph. See Example 9.3. Example 9.4 For the bond graph on the left of Fig. 20. The reader should be able to walk the causality and the variables labeled on the left bond graph through to obtain the bond graph on the right. [ ] For this example, the outputs are the eorts across the two I elements: y = ea eb ..

R:d I:a
fa 1 u 0 fb ec

R:d C:c I:a


ec ec/d ec u-ec ec 0 fa 1 fa fa-fb-ec/d ec fb u fa

C:c

se:v

I:b

se:v

I:b

Figure 20: Reduction of a bond graph. See Example 9.4. Given the bond graph on the right:
X There are three energy storage devices. All three have integral causality. Therefore, the number of state [ ] variables is n = 3 and a valid denition of the state vector is x = fa fb ec . X For this denition of the state vector, the output vector is computed as [ ] u x3 y= . x3 X From the denitions of the I and C elements, the state equations are

fa fb e c

= = =

1 ( u ec ) a 1 ec b( ) 1 1 fa fb ec c d

X The state space model, since it is linear, can be written in matrix form as 1 1 0 0 a a 1 0 x = 0 x + 0 u b 1 1 0 1 cd c [ c ] [ ] 0 0 1 1 y = x+ v. 0 0 1 0

Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 39

9.1

Examples

March 5, 2014

Example 9.5 For the bond graph on the left of Fig. 21, the output is are the ow across the C : c element: y = fc . The reader should be able to state a reason why each of the red or green circle items can be removed.

sf:u

I:b

C:a sf:u
1 0

C:c
1 0 1

I:b

C:a sf:u
ea u

C:c I:b

ea-ec ea 0 1 fb fb ea u-fb ec fb

C:a

C:c

Figure 21: Reduction of a bond graph. See Example 9.5.

The resulting simplied bond graph is shown with inputs and state variables, as well as causal strokes, propagated through out. The reader should be able to show the following:
X There are three energy storage devices. All three have integral causality. Therefore, the number of state [ ] variables is n = 3 and a valid denition of the state vector is x = ea fb ec . X For this denition of the state vector, the output vector is computed as [ ] y = x2 . X From the denitions of the I and C elements, the state equations are

e a fb e c

= = =

1 (u fb ) a 1 (ea ec ) b 1 fb c

X The state space model, since it is linear, can be written in matrix form as 1 1 0 0 a a x + 0 u 0 1 x = 1 b b 0 0 1 0 c [ ] 0 1 0 x. y =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 40

CAUSALITY PROPAGATION AND STATE SPACE MODELS: LECTURE 10 11

March 5, 2014

9.2

Exercises

Exercise 9.1 Propagate the listed variables and the power output variable of the C element through the bond graph to show that the following two bond-graphs are equivalent in the sense that the eorts and ows on each element and at the output on the right hand side are identical.
C:c 0

e f

e f
1 C:c

1 0 R:d

R:d

Exercise 9.2 Propagate the listed variables and the power output variable of the I element through the bond graph to show that the following two bond-graphs are equivalent in the sense that the eorts and ows on each element and at the output on the right hand side are identical.
I:b 1

e f

e f
0 I:b

0 1 R:d

R:d

Exercise 9.3 For each of the following, 1. Walk the causality and state variables through the bond graph. 2. Dene the state vector. 3. Dene the state variable model. 4. If possible, write the state space model in matrix form. For each bond graph, the output y of the system is the eort across the I -element.
I:L I:L

Se

R:R2

Se

C:C

R:R1

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 41

9.2

Exercises

March 5, 2014

Exercise 9.4 For each of the bong graphs in Fig. 22: 1. Walk the causality and state variables through the bond graph. 2. Dene the state vector. 3. Dene the state variable model. 4. If possible, write the state space model in matrix form. For each bond graph, the output y of the system is the eort across the R : R1 element.
I:L

Sf

C:C

Sf

C:C

R:R1

R:R1

Figure 22: Bond graph for Exercise 9.4.

Exercise 9.5 After simplifying the bond graphs in Figs. 16 (see page 35): 1. Walk the causality, input variables, and state variables through the bond graph. 2. Write the state space model. Consider the output in each case to be the vector of ows through the energy storage devices.

Exercise 9.6 For each of the bond graphs in Fig. 23: 1. Walk the causality and state variables through the bond graph. 2. Dene the state vector. 3. Dene the state variable model. 4. If possible, write the state space model in matrix form. For each bond graph, the output of the system y is the vector containing the eort across each I element.

R:d I:a
fa 1 u 0 fb ec

R:d C:c C:a


ea 1 u 0 fb ec

C:c

se:v

I:b

se:v

I:b

Figure 23: Bond graph for Exercise 9.6

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 42

CAUSALITY PROPAGATION AND STATE SPACE MODELS: LECTURE 10 11

March 5, 2014

Exercise 9.7 For each of the bond graphs in Fig. 24. Consider the output y of the system to be the vector of ows through the R-elements. 1. Simplify the BG if possible. 2. How many energy storage devices? 3. How many inputs? What are the input signal variables? 4. How many outputs? What are the output signal variables? 5. Walk the inputs and state variables through the BG while applying the causal strokes. 6. Derive the state space model.

R:a L:g 0 Sf:u R:a L:g 0 0 C:c I:g

R:a 1 0 R:d L:h 1 0 C:c

I:h 1 0 C:c Sf:u

Sf:u

Figure 24: Bond graph for Exercise 9.7

Exercise 9.8 For the bond graph in Fig. 25, with the vector of currents through each C element and the source as output vector y .
C:a e1 1 v sf:v I:b f1 0 e2 C:c R:d

Figure 25: Bond graph for Exercise 9.8 1. How many inputs? What are the input signal variables? 2. How many independent7 outputs? What are the output signal variables? 3. Walk the inputs and state variables through the BG while applying the causal strokes. 4. What is the state order? 5. Derive the state space model.

7 The variables are independent if and only if there is no way to form a linear sum (with nonzero coecients) that adds to zero. For example, the currents through resistors connected in series are not independent.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 43

9.2

Exercises

March 5, 2014

Exercise 9.9 For each of the bond graphs in Fig. 26. Consider the output y of the system to be the vector of ows through the I -elements. 1. Simplify the BG if possible. 2. How many energy storage devices? 3. How many inputs? What are the input signal variables? 4. How many outputs? What are the output signal variables? 5. Walk the inputs and state variables through the BG while applying the causal strokes. 6. Derive the state space model.
I:M Sf:u1 0 R:d I:M Se:u1 0 R:d 1 0 C:1/k 1 0 C:1/k I:M 1 0 R:d Se:u2 I:M 1 0 R:d Sf:u2

Figure 26: Bond graph for Exercise 9.9

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 44

CAUSALITY PROPAGATION AND STATE SPACE MODELS: LECTURE 10 11

March 5, 2014

1 Exercise 9.10 For the bond graph in Fig. 27, with input u(t) and output y (t) = k Fk (t).

C:1/h sf:u Fc 0

R:d 1
v Fk

C:1/k

I:M
Figure 27: Bond graph for Exercise 9.10 1. How many inputs? What are the input signal variables? 2. How many independent outputs? What are the output signal variables? 3. Walk the inputs and state variables through the BG while applying the causal strokes. 4. What is the state order? 5. Derive the state space model.

Exercise 9.11 For the bond graph in Fig. 28, with the currents through each I element and the source as outputs.
C:C R:b vc 1 ia I:L 0
vs

I:d io 1
vm

R:k

se:vs

C:m

Figure 28: Bond graph for Exercise 9.11 1. How many inputs? What are the input signal variables? 2. How many independent outputs? What are the output signal variables? 3. Walk the inputs and state variables through the BG while applying the causal strokes. 4. What is the state order? 5. Derive the state space model.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 45

March 5, 2014

10

Electrical Systems & Bond Graphs: Lectures 12


eR (t) = RiR (t) where R is the resistance measured in Ohms. A resistor has a static relationship between an eort variable and a ow variable; therefore, according to Table 2 this is an R type element. No real resistor is linear. Some resistors, like a diode, are designed to be nonlinear.

X The current through and voltage across an ideal linear resistor are related by Ohms law:

X The current through and voltage across an ideal linear capacitor are related by

iC (t) = C

d eC (t) dt

where C is the capacitance measured in Farads. Integration of this equation yields iC (t)dt = = CeC (t) QC (t) = CeC (t).

A capacitor has a static relationship between a displacement variable and an eort variable; therefore, according to Table 2 this is a C type element.
X The current through and voltage across an ideal linear inductor are related by

eL (t) = L

d iL (t) dt

where L is the inductance measured in Henries. Integration of this equation yields eL (t)dt = = LiL (t) L (t) = LiL (t).

An inductor has a static relationship between a momentum variable and a ow variable; therefore, according to Table 2 this is an I type element.
X The eort source is a voltage source. X The ow source is a current source.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 46

11

BOND GRAPH MODELING (CIRCUITS, FLUIDS, THERMAL): LECTS. 12 14

March 5, 2014

11

Bond Graph modeling (Circuits, Fluids, Thermal): Lects. 12 14

This section rst presents a modeling procedure. Then it presents several examples of the application of the method.

11.1

Modeling Procedure

The procedure described below is useful for electrical, uid, and thermal system modeling. Procedure: 1. Draw a schematic diagram and assign a power convention. (a) Label positive voltage drops. (b) Label positive current directions. (c) For R, I, and C elements ensure that the current enters the terminal that is assumed to be positive. This is the positive power is absorbed sign convention. 2. Label each node voltage and insert a (labeled) 0-junction to represent each node. (a) Repeat ground node if convenient. (b) Use nodes even between series elements. 3. Establish the positive voltage drops between nodes using 1-junctions. (a) Attach elements between nodes using 1-junctions. (b) Use half-arrow sign conventions to correctly dene voltage drops. (c) For an output voltage connect a Sf with f = 0. 4. Remove all bonds having zero power. (a) The ground voltage is zero. Propagate this through to the extent possible. (b) Remove all elements with zero power (i.e., zero eort). 5. Simplify the bond graph (using identities on next page). 6. Walk causality, inputs, and state variables through the BG 7. Read o the state space model.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 47

11.2

Electrical Circuit Examples

March 5, 2014

11.2

Electrical Circuit Examples

This subsection presents several examples of the bond graph modeling of circuits. The purpose is to nd the state space model. Example 11.1 The top portion of Fig. 29 shows a circuit schematic fully labeled to dene the power convention. Each element has dened voltage and current. For R, I , and C elements the voltage and currents are dened such that the elements are absorbing power. The schematic also has all nodes labeled. The ground node is labeled g . For this circuit, the input is u = iS . The design parameters are R, C , and L. For the purpose of the example, we choose the output to be y = vL . The second portion of Fig 29 shows the result of Step 2. Each node is represented by a 0-junction. The node label is above the 0-junction to facilitate the matching process. To facilitate the next steps, the 0-junctions representing some nodes are replicated. When multiple 0-junctions are used to represent the same node, they are connected by a bond, to ensure that the duplicated 0-junctions have the same eort and ow. Because the g node is the ground, its eort variable is dened to be 0 volts. In the third step, the circuit elements are inserted between the nodes. From the circuit schematic, Kirchos voltage law gives the following equations: vg + vs = va , vg + vR = va , vg + vL = vb and vb + vC = va .

These equations are used to determine the directions of the half-arrows surrounding each of the 1-junctions.
X Starting with the current source, because the current iS is entering the node assumed to be negative, the current source is supplying power to the circuit; therefore, its bond has the half arrow entering the 1-junction. Then, using the equation vg + vs = va and the properties of 1-junctions (the sum of eorts on entering half arrow is equal to the sum of the eorts on exiting half arrows), the va half arrow is leaving the 1 and the vg half arrow is entering it. X R elements can only absorb power. In the previous step, we were careful to dene the variables such that this physical condition is satised. Because the R element is absorbing power, the half arrow connecting it to the 1-junction is entering the R element. Then, using the equation vg + vR = va and the properties of 1-junctions (the sum of eorts on entering half arrow is equal to the sum of the eorts on exiting half arrows), the vg half arrow is leaving the 1-junction and the va half arrow is entering it. X Similarly I elements can only absorb power. Therefore, the half arrow connecting it to the 1-junction is entering the I element. Then, using the equation vg + vL = vb and the properties of 1-junctions, the vg half arrow is leaving the 1-junction and the vb half arrow is entering it. X C elements can only absorb power. Therefore, the half arrow connecting it to the 1-junction is entering the C element. Then, using the equation vb + vC = va and the properties of 1-junctions, the vb half arrow is leaving the 1-junction and the va half arrow is entering it.

This portion of the gure also shows the bonds that have zero power, which will be removed from the bond graph. The second to the bottom portion of the gure shows the resulting bond graph after removing the nodes and bonds that have zero power. The red circles on the bond graph indicate that the two 0-junctions representing node a can be merged and that three 1 junctions and one 0 junction that can each be replaced by a bond. The result of the bond graph simplication is shown in the bottom portion of the gure. The causal strokes, inputs, and state variables have been propagated through the network. From this bond graph:
X There are two independent energy storage devices, so the state dimension is n = 2. X A valid denition of the state vector is dened by the power output variables of the energy storage devices [ ] which is x = vc iL X The state space model, since it is linear, can be written in matrix form as [ ] [ ] 1 0 0 C x = x + u R 1 L R L L [ ] [ ] 1 R x + R u. y =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 48

11

BOND GRAPH MODELING (CIRCUITS, FLUIDS, THERMAL): LECTS. 12 14

March 5, 2014

is
g a

+ _vs

C b +v iL C + + vL v_ _ L R R iR
a g a g b

iC

Step 1

+ y _

Step 2

0g
a

0g
a

0 g
b

0 sf:is 1
0

0 R
0

1 C
0 0

0 1 0 g I:L

1
0

0g Step 3 Steps 4-5 sf:is sf:is


vR is v a

0g

0 1 0 R

0 1
vR-vC i vC iL L

1 C I:L

0 1 I:L

vR iL R is-iL

vR=R(is-iL)

Figure 29: Figure used in Example 11.1 to illustrate the steps in the bond graph modeling of a circuit.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 49

11.2

Electrical Circuit Examples

March 5, 2014

Example 11.2 The top portion of Fig. 30 shows a circuit schematic fully labeled to dene the power convention. Each element has dened voltage and current. For R and I elements the voltage and currents are dened such that the elements are absorbing power. The schematic also has all nodes labeled. The ground node is labeled g .
a a a

Step 1

is vs
+ _ g a

+ v_ R R iR
g a

iL=y + vL _ L
g a

Steps 2-3

0 se:vs 1
0

0 R
0 0

0 1
0 0

1 0g
vs iL

I:L

0g se:vs
vs iR-iL

0 g

Steps 4-6

0
vs iR

I:L
iR=vs/R

Figure 30: Figure used in Example 11.2 to illustrate the steps in the bond graph modeling of a circuit. For this circuit, the input is u = vS . The design parameters are R and L. For the purpose of the example, we choose the output to be y = iL . The second portion of Fig. 30 shows the result of Steps 2 and 3. Each node is represented by a 0-junction. Because the g node is the ground, its eort variable is dened to be 0 volts. In the third step, the circuit elements are inserted between the nodes. From the circuit schematic, Kirchos voltage law gives the following equations: vg + vs = va , vg + vR = va , and vg + vL = va .

These equations are used to determine the directions of the half-arrows surrounding each of the 1-junctions. This portion of the gure also contains a red lasso indicating the junctions and bonds that have zero power, which will be removed from the bond graph. The result of the bond graph simplication is shown in the bottom portion of the gure. The causal strokes, inputs, and state variables have been propagated through the network. From the nal bond graph:
X There is one independent energy storage device, so the state dimension is n = 1. X A valid of the state vector is dened by the power output variable of the energy storage device: [ denition ] x = iL X The state space model, since it is linear, can be written in matrix form as [ ] [ 1 ] 0 x+ L x = u [ ] 1 x. y =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 50

11

BOND GRAPH MODELING (CIRCUITS, FLUIDS, THERMAL): LECTS. 12 14

March 5, 2014

Example 11.3 The top portion of Fig. 31 shows a circuit schematic fully labeled to dene the power convention. Each element has dened voltage and current. For R, C and I elements the voltage and currents are dened such that the elements are absorbing power. The schematic also has all nodes labeled. The ground node is labeled g .
a

Step 1

is vs
+ _ g

L iL + vL C iC + v C

+ v_ R R iR
g

+ y _

I:L Steps 2-3


a

1 1
0

0
0

se:vs

1
0

C:C

1 0 g

0g

Steps 4-6

se:vs

vs

I:L vC iL v -v vs 1 si C iL L vs-vC vs 1 iL-iR v i -i iL-iR C L R C:C

vs-vC iR

iR=(vs-vC)/R

Figure 31: Figure used in Example 11.3 to illustrate the steps in the bond graph modeling of a circuit. For this circuit, the input is u = vS . The design parameters are R, C and L. For the purpose of the example, we choose the output to be y = vR . The second portion of Fig. 31 shows the result of Steps 2 and 3. Each node is represented by a 0-junction. Because the g node is the ground, its eort variable is dened to be 0 volts. In the third step, the circuit elements are inserted between the nodes. From the circuit schematic, Kirchos voltage law gives the following equations: vg + vs = va , vg + vR = vb , vb + vC = va , and vb + vL = va .

These equations are used to determine the directions of the half-arrows surrounding each of the 1-junctions. This portion of the gure also contains a red lasso indicating the junctions and bonds that have zero power, which will be removed from the bond graph. The result of the bond graph simplication is shown in the bottom portion of the gure. The causal strokes, inputs, and state variables have been propagated through the network. From the nal bond graph:
X There are two independent energy storage devices, so the state dimension is n = 2.

of the state vector is dened by the power output variable of the energy storage devices: X A valid [ denition ] iL x= vC
X The state space model, since it is linear, can be written in matrix form as [ ] [ ] 1 0 0 L x = x+ u 1 1 1 RC [ C ] [ RC ] 0 1 x+ 1 u. y =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 51

11.3

Exercises

March 5, 2014

11.3

Exercises

Exercise 11.1 For each of the following circuits: 1. Find the simplied bond graph model. 2. Propagate the causality, inputs, and state variables through the model. 3. Dene a valid state vector. 4. Dene the state space model. If the system is linear, write the model in matrix form.

b a d
+ _

y(t) u(t)

e c
u(t)

d R L c

+ y(t) _

(a) See instructions for Exercise 11.1.


a

(b) See instructions for Exercise 11.1.

+ vL + _vs

iC

+ _ g

vR R iR
g

(c) See instructions for Exercise 11.1. The output y (t) = vc (t).

Exercise 11.2 For each of the bond graphs in Exercise 9.6, nd the circuit that would produce it.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

+ _

is

C +v C

b c u
+ _

i3 + + _ Av _ R
g

+ ve _

+ _

Ave

+ _y

(d) See instructions for Exercise 11.1.

R + u_ L + y -

(e) See instructions for Exercise 11.1. To get y on the bond graph at the indicated open circuit location, you can insert a source of ow with value zero. Or, strategically place your ground node between the R and C elements.

Figure 32: Circuits for state space modeling.

p. 52

11

BOND GRAPH MODELING (CIRCUITS, FLUIDS, THERMAL): LECTS. 12 14

March 5, 2014

Exercise 11.3 1. Show that the circuit in Figure 33 yields the bond graph in Figure 25 on p. 43.

+ u_

a +e 1

f1 d b

+ e2 _

Figure 33: Circuit for state space modeling Exercise 11.3. 2. Dene the output to be the ow through the two capacitors. Use the bond graph to show that the state space model with state x = [e1 , f1 , e2 ] is 1 0 0 0 a 1 0 x = 0 x + 0 u b 1 1 0 1 cd c [ ] [ ]c 0 0 0 1 y = x+ u 1 1 0 1 d

Exercise 11.4 1. Show that the circuit in Figure 34 yields the bond graph in Figure 28.

c ia vc a b + + u_ -

d io + vm_ m k

Figure 34: Circuit for state space modeling Exercise 11.4. 2. Use the bond graph to show that the state space model with state x = [vc , vm , ia , io ] is 1 0 0 0 0 c 1 0 0 0 m x + 0 u x = 1 b 1 0 a 0 a a 1 1 0 d 0 k d d [ ] 0 0 0 1 x y =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 53

11.3

Exercises

March 5, 2014

Exercise 11.5 For the circuit shown in Figure 35:


a

+ vL -

iC

is

+ + _ v _ s
g

+ v_ R R iR
g Av +v

C +v C

io i3 + + + _ Av y _ R RL _
g

se:vs

vs

is

1 i R C 0 iR-i C 1 i -iR 0 i R R:RL o s R s R v vL i s AvR+vC iR C is-iR AvR is-iR-io s se:AvR R:R2 C:C I:L i R=
AvR+vC R2 vC=(1-A)vR

Av +v

Av

Av

vL=vs- 1 vC (1-A)

i o=

AvR RL

Figure 35: Circuit for state space modeling Exercise 11.5. 1. Show that it can be modeled using the bond graph indicated. 2. Find the state space model when the state vector is dened as x =

iS vC

3. Show thathe state space model, since it is linear, can be written in matrix form as [ ] [ 1 ] 1 0 L(1A) x = x+ L u 1 1 0 C RC (1A) ] [ ] [ A 0 1 x + 0 u. y = A

Exercise 11.6 Fig. 36 shows a half-wave rectier circuit. This circuit converts an alternating current voltage source u(t) into an approximately constant voltage source.
i1
+

v4
_

L v1

L v2

i2

+ _

ic

v C1 i

v3

+ _

C2 i3

vo

Figure 36: Bond graph for Exercise 11.6 For this half-wave rectier circuit: 1. Find the equivalent bond graph. Note that a diode is a nonlinear resistor because the voltage (eort) and current (ow) are algebraically related. 2. What is the state order? 3. Walk the inputs and state variables through the BG while applying the causal strokes. 4. Derive the state space model. 5. Simulate the state space model for a sinusoidal input: u(t) = 10 sin(2 60t). Consider and explain the temporal variation of i5 , vi , v3 , and v0 . Each diode should be modeled as a nonlinear resistor with current and voltage ( related by ) the (algebraic) function id (t) = g (vd (t)), where g represents a known nonlinear function, such as id = IS e40vd 1 with IS = 1020 Amps. In this expression, is a large positive real number. Example 18.4 on page 93 analyzes a full wave rectier circuit.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 54

12

EXAM 1

March 5, 2014

12

Exam 1

For 2013, Exam 1 covers material to here. The topics of the exam can be read directly from the content of the lectures. For example, some topics are: ODE to TF, TF to ODE, poles and zeros, frequency response, State space modeling, linear state space models, matrix and vector multiplication, simulation, energy domains, power connections, bonds and their properties, 1-ports and their properties, multi-ports and their properties, causality, bond graph simplication, causality and variable propagation through bond graphs, state space models from bond graphs, electrical circuit modeling via bond graphs.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 55

March 5, 2014

13

Bond Graph modeling Two Ports: Lecture 15


X Power conserving: e1 (t)f1 (t) = e2 (t)f2 (t). Power absorbed equals power delivered. X Non-ideal models constructed by combination with R, L, and C elements.

Basic (Ideal) Two-ports:

There are two types of two ports: Transformer:


X Constitutive law: e1 = me2 and mf1 = f2 with transfrmer modulus m. X Physical examples of transformers are shown in Figure 37.
F2 v2
e1 e TF 2 f1 f2 t1 w1 t2 w2 v F
A

F1 a v1
i1 e+ 1 t1

i2 +e - 2

Q w1

P Q

Figure 37: Examples of two-port transformers Lever: Massless, rigid, frictionless. = v2 v1 = b a b v1 = v2 . a b F1 = F2 a a m= b

aF1 = bF2

Gear Train: Massless, rigid, frictionless. vc = 1 2 = r1 r2 1 2 Fc = = r1 r2 r1 1 = 2 . r2 r1 F1 = F2 r2 r1 m= r2

Electrical Transformer: Lossless. N i1 = i2 . e1 = N e2 m=N

Hydraulic Ram: Massless, frictionless. Av = Q. F = AP m=A

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 56

13

BOND GRAPH MODELING TWO PORTS: LECTURE 15

March 5, 2014

Gyrator:
X Constitutive law: e1 = rf2 and rf1 = e2 with gyrator modulus r. Similar to resistor equation, relating eort to ow. Except eort and ow are at two ports. Power conserving. X Physical examples of transformers are shown in Figure 38.

v2 e1 e GY 2 f1 f2 i1 e+ 1 i2 +e - 2 i1 +e - 1 t2 w2

v1 F2

F1

Figure 38: Examples of two-port gyrators Mechanical Gyrator: Rigid, frictionless. F1 = rv2 . F2 = rv1

DC Motor: No friction, no resistance, no inductance, no inertia. 2 = T i1 . e1 = T 2 r=T

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 57

13.1

Examples

March 5, 2014

13.1

Examples

Example 13.1 Fig. 39 shows the initial and completed bond graph for a system containing a transformer with inputs, state variables, and causality propagated throughout. Note that power in equals power out for the

R:R1 se:vs
vs :

R:R2 TF
N

VT=vs-R1f/N-v1 VL=vT/N-R2f-v2

1
v1

1
f

v2

C:C2

C:C1

C:C1

I:L

R:R1 R:R2 R2f f R1f/N f/N se:vs vs 1 VT TFVT/N 1 v2 f f/N f/N N f VL f v1 f/N I:L

C:C2

Figure 39: Example transformer bond graph model. transformer. For this system:
X The input is u(t) = vs (t), the output is y (t) =
f N,

the design parameters are N , R1 , R2 , L, C1 , and C2 .

X There are three independent energy storage devices, so the state dimension is n = 3. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x = v1 v2 f . X Assuming linear elements, the state space model is 1 0 0 C1 N 1 0 0 x = ( C2 1 1 1 N L L L R2 + [ 0 1 0 y =

0 0 u ) x+ 1 R1
N2

NL

x.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 58

13

BOND GRAPH MODELING TWO PORTS: LECTURE 15

March 5, 2014

Example 13.2 Fig. 40 shows the bond graph of a system containing a gyrator with inputs, state variables, and causality propagated throughout. For this system:

R:R1 R:R2 vR vR/R2 R2f f v fN GYNvR/R2 1 v2 1v C:C2 se:vs v s f f R/R2 N R/R2 vL f v1 vR/R2 vR=vS-v1-Nf C:C1 I:L vL=NvR/R2-R2f-v2
Figure 40: Example gyrator bond graph model. Consider the output to be the ow through R1 .
X The input is u(t) = vs (t), the output is y (t) = C1 , and C2 .
1 R2

(vS v1 N f ), the design parameters are N , R1 , R2 , L,

X There are three independent energy storage devices, so the state dimension is n = 3. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x = v1 v2 iL . X Assuming linear elements, the state space model is 0 C11 R2 0 0 x =

RN 2L

1 L

1 L

N C1 R2 1 ( C2

N2 R2

) x + ] x+ [

1 C1 R2

u u.

0
N R2 L 1 R2

R2 +
N R2

1 R2

The reader should compare the models that resulted from Examples 13.1 and 13.2. The only change in the bond graphs is the replacement of the transformer with a gyrator.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 59

13.2

Exercises

March 5, 2014

13.2

Exercises

Exercise 13.1 For each of the following: 1. Clearly state the inputs, outputs, and design parameters. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Write the state space model.
R:R1 se:vs 1 GY
: N

R:R2 1 I:L C:C2

R:R1 se:vs 1 0

The output is the current through the R element.

GY
: N

C:C2

The outputs are the currents through the R elements.

C:C2
(b) See instructions for Exercise 13.1.
R:R1 R:R2 GY
: N

(a) See instructions for Exercise 13.1.

R:R1 se:vs 1 GY
: N

C:C2

se:vs

1 I:L

C:C2

The output is the current through the R element.

The outputs are the currents through the R elements.

(c) See instructions for Exercise 13.1.

(d) See instructions for Exercise 13.1.

Figure 41: Gyrator bond graphs for state space modeling.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 60

13

BOND GRAPH MODELING TWO PORTS: LECTURE 15

March 5, 2014

Exercise 13.2 For each of the following: 1. Clearly state the inputs, outputs, and design parameters. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Write the state space model.
R:R1 se:vs 1 TF
: N

R:R2 1 I:L C:C2

R:R1 se:vs 1

The outputs is the current through the R element.

0 C:C2

TF
: N

I:a

The outputs are the currents through the R elements.

(a) See instructions for Exercise 13.2.

(b) See instructions for Exercise 13.2.


R:R1 R:R2 TF
: N

R se:vs 1

outputs is the current :R1 The through the R element.

se:vs

1 I:L

C:C2

TF
: N

C:C2

The outputs are the currents through the R elements.

(c) See instructions for Exercise 13.2.

(d) See instructions for Exercise 13.2.

Figure 42: Transformer bond graphs for state space modeling.

Exercise 13.3 For each of the following: 1. Clearly state the inputs, outputs, and design parameters. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Write the state space model.
R:R se:vs 1 C:C GY
: G

R:R TF
: N
The output is the current through the R element.

I:a

se:vs

1 I:C

GY
: G

TF
: N

I:a

The output is the current through the R element.

(a) See instructions for Exercise 13.3.

(b) See instructions for Exercise 13.3.

Figure 43: Gyrator-Transformer bond graphs for state space modeling.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 61

13.2

Exercises

March 5, 2014

Exercise 13.4 For the bond graph in Fig. 44: 1. Clearly state the inputs, energy storage devices, and design parameters. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Write the state space model with the output being the ow through the I -element with value M .

I:J2

R2

TF

TF
R1

1 I:J1

se:t

R:d2 I:M R:d1

Figure 44: Transformer bond graphs for Exercise 13.4.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 62

14

BOND GRAPH MODELING OF NETWORKS: LECTURE 16

March 5, 2014

14
14.1

Bond Graph modeling of Networks: Lecture 16


Examples

Example 14.1 Fig. 45 shows three steps in the bond graph derivation of a state space model of a circuit containing a transformer. The top portion of the gure shows the circuit schematic with nodes, voltages, and currents labeled. For this example, all elements are modeled as linear elements. Note that the left side of the transformer as it is labeled is absorbing power and the right side is supplying. The middle portion shows the unsimplied bond graph. The bottom portion shows the simplied bond graph after completing the causality and state variable propagation. From the simplied bond graph,
a

R1
+ +v 1

L
+v L + e2 _

is

+ __

vs

vC_

C1 iC

d R2 h +v 2

e+ 1 _

C2 iL I:L
d

+ _y

N g

R:R1 0 se:vs 1 0
g a

R:R2 0 1 0 1 0
g h

1 C:C1

0 1

0 1

0
:

TF
N
g

1 0
g

C:C2

R:R1 R:R2 R2iL iL vS-vC iS y v v vC C TF Nv 1 i se:vs i s 1 i C 0 Ni iL S L S L N vC iS-NiL vL iL vL=NvC-y-R2iL iS=(vS-vC)/R1 C:C1 I:L
:

C:C2

Figure 45: Examples a circuit containing a Transformer


X The input is u(t) = vs (t), the output is y (t), the design parameters are N , R1 , R2 , L, C1 , and C2 . X There are three independent energy storage devices, so the state dimension is n = 3. It is important to note that the transformer is modeled as ideal, having no resistance or inductance. The inductance and resistance are accounted for by the series insertion of L and R2 . X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x = vC y i L . X The state space model, since it is linear, can be written in matrix form as 1 N R11C1 0 C R 1 C1 1 1 x + 0 u 0 0 x = C2 N 1 2 0 L R L L [ ] 0 1 0 x. y =

Exercise 14.1 Fig. 46 shows the circuit schematic and reduced bond graph for a simple AC to DC power supply circuit. In this circuit, the triangular element with voltage vd and current id is a diode, which is a nonlinear resistive element with voltage and current related by id = g (vd ). The function g is positive and monotonically increasing; therefore, its inverse exists: vd = g 1 (id ) for ic > 0. 1. Derive the reduced bond graph for the circuit schematic. 2. Use the bond graph to derive a state space model for the system. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 63

14.1

Examples

March 5, 2014

LT +

id

LF + + _vC RL

f + _y

is

+ __

vs
g

e+ 1 _
N

vd + e _ 2 CF

I:LT se:vs 1 TF
: N

R:diode 1 0 C:Cf

R:RL 1 I:Lf

Figure 46: Examples a circuit containing a Transformer Explanation of the circuit:


X In the United states, the voltage supply between nodes a and g is typically 120 volts at 60 Hz. X The portion of the circuit between nodes a and b is an electrical transformer. The purpose of the transformer is to reduce the input voltage to the specied level of the load. X The portion of the circuit between nodes b and f is a half-wave rectier and lter. The purpose of the diode is to prevent id from being negative when e2 (t) < vc (t) + vd (t). When e2 (t) > vc (t) + vd (t), id (t) charges the capacitor and supplies the load. When e2 (t) < vc (t) + vd (t), the capacitor discharges to supply current to the load.

Overall, the intent of the circuit is to convert an alternating and noisy input voltage to a constant DC value for a resistive load.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 64

15

FLUIDS: LECTURES 17-18

March 5, 2014

15

Fluids: Lectures 17-18

A uid is a substance that cannot support shear stress. Liquids and gases are each uids.
X Liquids are (essentially) non-compressible. X Gases are compressible8 .

Hydraulic systems operate using a liquid operating uid. Pneumatic systems operate using a gaseous operating uid. Why use hydraulic/pneumatic systems? Hydraulic/Pneumatic: 1. high power density (1000-8000 3. automatic cooling 4. very nonlinear dynamics Electromechanical: 1. low power density (<200 3. requires external cooling 4. fairly linear dynamics
8 Compressible

lbs in2 )

2. high bandwidth with high power

lbs in2 )

due to magnetic saturation

2. low bandwidth with high power due to large amount of ferrous metal required for high power

means that the density is a function of pressure.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 65

15.1

Fluid Systems

March 5, 2014

15.1

Fluid Systems

The following two tables were presented in previous lectures. Domain Generic Electrical Translational Rotational Fluid Thermal Eort e e, Volt F , Newton , Newton-m P , Newton/m2 T , Kelvin Momentum p , Volt-s p, Newton-sec. p , Newton-m-s pP , Newton-s/m2 ****** Flow f i, Amp v , m/s , rad/sec QV , m3 /sec QH , Joules/sec Displacement q Q, Coul. X, m , rad V , m3 EH , Joules Power, N-m/sec P , Joules/sec. e(t)i(t) F (t)v (t) (t) (t) P (t)QV (t) T (t)QH (t)

Table 3: Physical analogies between variables in dierent energy domains.

Domain Generic Electrical Translational Rotational Fluid Thermal

R : e = Rf Resistor Friction Friction Resistance Heat transfer

C : q = Ce Capacitor Linear Spring Torsional Spring Tank Heat capacity

I : p = If Inductor Mass Inertia Pipe ***

Se Voltage Source Force Source Torque Source Pressure source Temperature source

Sf Current Source Velocity Source Angular rate source Flow rate source Heat ow source

Table 4: Physical analogies between components in dierent energy domains.

R-Elements are used to model (memoryless) ow restrictions that dissipate energy. Because they are memoryless, they can be modeled by algebraic relations between the eort Pd and ow QVd : Pd (t) = g (QVd (t)). Examples are orices or valves. Typically, the function g will be nonlinear. For linear analysis, the simplied model is often assumed: Pd (t) = RQVd (t). As illustrated in Fig. 47, Pd (t) = P1 (t) P2 (t) is the pressure dierence along a pipe of length L with cross-sectional area A. The shape of the cross-section also aects the resistance, for example: Circular cross-section: Rc = Square cross-section: Rs =
128 L d4 32L w4 ( 8L )
w h2 1+ h w

Rectangular cross-section: Rr =

where is the absolute viscosity, h is the height, w is the width, and dh is the hydraulic diameter.

P1 L

P2

QV

Figure 47: Pipe Resistance.

Figure 48 shows a section of pipe that changes cross-sectional area. Assuming that the volume ow rate is constant throughout the length of pipe, then the velocity in each section of pipe is related as Qv = A1 v1 = A2 v2 = A3 v3 .

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 66

15

FLUIDS: LECTURES 17-18

March 5, 2014

A1

v1

A2 v 2 Q

v3

A3

Figure 48: Fluid orice.

C-Elements are used to model elements for which the pressure (the eort variable)) is an algebraic function of the volume in the element. The volume of uid in the element (a displacement) is the integral of the net inow. One example is an open tank lled with a liquid of density . The volume of liquid in the tank is the integral of the net volume ow rate: V (t) = Qv (t)dt. For a tank with constant cross-sectional area A, the height of uid in the tanks is h = V /A. The weight of uid in the tank is W (t) = g V (t). The force at the bottom of the tank is the sum of the weight of the uid plus the force due to atmospheric pressure: F (t) = A Pa + g V (t) = A Pa + g A h. The pressure at the bottom of the tank is P = Pa + gh which can be expressed as g A P g ( t) = V (t) or V (t) = Pg (t), A g where Pg (t) = P (t) Pa is the gauge pressure. The liquid tank has a static relationship between a displacement variable V (t) and an eort variable P (t); therefore, according to Table 2 this is a C type element, where A CT = g . Note that this expression assumes an open tank of uniform cross-sectional area. Another example is derived on page 68.
Pa

Qv(t)

P(t)

h(t)

C: A rg

Figure 49: Illustration of a liquid lled open tank.

Fluid tanks store potential energy Other types of uids or other types of tanks can result in nonlinear capacitance equations. I-Elements: Consider the ow of a uid of density through a tube of length L and uniform cross-sectional area A, is illustrated in Fig. 50. A pressure dierence PL (t) = P1 (t) P2 (t) between the ends of the tube results in
A
P1 v(t) L P2 QV(t)

I:rL A

Figure 50: Illustration of a liquid lled open tank. a force P A on the mass AL of uid between the ends of the tube. Newtons law states that PL (t)A = AL d v (t) dt

where v (t) is the velocity of the uid and Qv (t) = Av (t). Therefore, P (t)A = L P ( t) = P ( t) = where Lf =
L A

d Qv (t) dt L d Qv (t) A dt d Lf Qv (t) dt

is the uid inertance with units kg/m4 . Integration of this equation yields pP (t) = Lf Qv (t). p. 67

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

15.2

Additional Examples

March 5, 2014

This is a static relationship between a momentum variable and a ow variable; therefore, according to Table 2 an inertance is a I type element. Fluid inertors store kinetic energy in the form of a uid mass moving, for example through a pipe. The eort source is a pressure source. The ow source is a volume ow rate source. In uid systems it is important to understand the dierence between absolute pressure and gauge pressure. Gauge pressure measures the dierence between the pressure at a specic point inside a vessel and the atmospheric pressure outside the vessel at a nearby point. This is analogous to a voltmeter measuring the eort in a circuit between two points.

15.2

Additional Examples

This section contains a few more examples related to uid elements. 15.2.1 Bulk Modulus

The bulk modulus characterizes the compressibility, change in pressure as a function of density, of a uid. Bulk . Typical values are 442 109 Pa for diamond, 50 109 Pa for glass, 2.2 109 modulus is dened as = 0 P Pa for water, and 1.0 105 Pa for air. Note that
P0 , T0

d d dP . = = P dt dP dt

(29)

Example 15.1 This example considers the capacitance of a closed container holding a gas with bulk modulus . The closed tank in Fig. 51 has constant volume V and net inward volume ow rate Qv (t). By the conservation
P(t) Qv(t)

C: V b

Figure 51: Capacitance of a closed tank. of mass, (t)Qv (t) = d ((t)V ) dt = (t)V + (t)V

The equation Qv (t) = ( t) V +V (30)

is referred to as the Continuity Equation. = 0. Using eqn. (29), this simplies as Because the container has a constant volume, V Qv (t) = Qv (t) = ( t) V (t) V P.
V

Therefore, the capacitance of a closed tank containing a gas with uniform bulk modulus is C =

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 68

15

FLUIDS: LECTURES 17-18

March 5, 2014

15.2.2

Absolute and Gauge Pressure

Absolute pressure is the pressure measured relative to absolute vacuum. At the surface of the earth, this pressure is atmospheric pressure. Most gauges, such as the simple gauge illustrated in Fig. 52, measure the pressure P of the device connected to it relative to atmospheric pressure. This is referred to as gauge pressure. The left end of the gauge connects to a lever mechanism moves the gauge dial. The pressure dierence across the diaphragm is balance by the spring force. 1 Due to an openings in the left side of the canister, the pressure dierence is P = P Pa . Therefore, x = k (P Pa )

x P Pa

Qv(t)

Figure 52: Pressure gauge.

Example 15.2 This example considers the diaphragm mechanism in Fig. 52. The left half of the mechanism is mechanical. The spring stores potential energy. The right half of the mechanism is a uid capacitor storing the ow Qv (t) in the chamber with volume V (t) = A x(t). Assuming that the piston is massless, the force balance equation is P (t)A = kx(t) k = V (t) A

Therefore,
2 (t). ( t) = A P V k Starting from the continuity equation of eqn. (30) on page 68 and using the bulk modulus relation of eqn. (29):

Qv (t)

(t) V +V 2 A (t) (t) + A P x(t)P = k ( ) A A2 = P (t). x(t) + k (


A x

The capacitance of this device, neglecting the mass, is nonlinear with expression C (x) =

A2 k

) .

15.2.3

Massless uid ram

Consider the uid ram illustrated in Fig. 53. For this example, the ram is considered to be massless and frictionless. These non-idealities will be discussed later. Due to the rigid shaft, the velocities v1 and v2 are equal: v = v1 = v2 .
v1 Q1 P1 A1 v2 P2 Pa Pa A2 Q2

Figure 53: Fluid ram.

Because the volume ow rates are related to the shaft velocity as Q1 (t) = A1 v (t) and Q2 (t) = A2 v (t), we have v (t) = Q2 Q1 = A1 A2 or A2 Q1 = Q2 . A1 p. 69

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

15.2

Additional Examples

March 5, 2014

Similarly, according to Newtons law: mr v = P1 A1 P2 A2 for a massless ram (mr = 0), the forces on its two ends will be equal and opposite; therefore, P1 A1 = P2 A2 Because P1 mQ1 with m =
A2 A1

or

P1 =

A2 P2 . A1

= mP2 = Q2

the uid ram is a form of transformer as dened in Section 13.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 70

15

FLUIDS: LECTURES 17-18

March 5, 2014

15.3

Fluids Bond Graph Modeling Procedure

The method to develop a bond graph for a uid system is exactly the same as that stated on p. 47 with pressure and volume ow rate replacing voltage and current. Often, to aid the process, it is convenient to sketch an analogous electrical circuit. Procedure: 1. Draw a uid schematic diagram and assign a power convention. (a) Label positive pressure drops. (b) Label positive volume ow rate directions. (c) For R, I, and C elements ensure that the current enters the terminal that is assumed to be positive. This is the positive power is absorbed sign convention. (d) Clearly label atmospheric pressure Pa 2. Draw an analogous electrical circuit schematic diagram and assign a power convention. (a) Label positive pressure drops. (b) Label positive volume ow rate directions. (c) For R, I, and C elements ensure that the current enters the terminal that is assumed to be positive. This is the positive power is absorbed sign convention. (d) Atmospheric pressure Pa plays the role of the ground voltage. There should be a direct correspondence between each element, ow, and eort labeled in the uid and electrical schematics. At each node, the pressures and volume ows in the uid schematic should satisfy exactly the same equations as they do in the electrical schematic. After this point, the methods are identical.

15.4

Examples

The following examples clarify the procedure. Example 15.3 Fig. 54 shows a uid system schematic, the analogous electrical circuit, and the reduced bond graph with inputs, state, and causality propagated throughout. In the equivalent electrical circuit,
X The three absolute pressures Pp , Pt , and Pa are explicitly labeled. X The pipe from the pump to the tank is modeled as a R : b element in series with and L : a element. These two elements are in series, not in parallel, as there is one ow Qi in the pipe. The pressure drop Pp Pt along the pipe is the pressure necessary to overcome the resistance of the pipe and the inertance of the uid in the pipe. The actual values of a and b would be determined by the uid and the dimensions of the pipe. In some cases either value may be approximated as being zero. X The ows Qi and Q0 are explicitly labeled. X The net ow into the tank or into Ct is Qt = Qi Q0 .

An implicit assumption of the model is that the tank does not overow. From the bond graph:
X There are two energy storage devices. Both have integral causality. Therefore, there are two independent energy storage devices and the state dimension is n = 2. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x = Pt Qi . X The input is u(t) = Pp (t) and the model parameters are the pipe parameters a and b, the tank capacitance Ct , and the valve setting Rv . The model parameters are themselves functions of the physical system parameters: pipe length, diameter, and shape; uid density ; and tank cross sectional are. The output is y (t) = h(t).

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 71

15.4

Examples

March 5, 2014

Constant Pressure Pump

h Qi Pp Pt

Pa Qo Valve

Qi Pp
+ _

a b Pt + v - +v Qo 1 2 Qt Ct P a Rv

Infinite Liquid Resevoir

I:a
Pp-Pt-bQi Qi Pp Pt 1 Q Qi i bQi Qi Pt Pt/Rv Pt Q -P /R i t v

Se:P p

R:Rv

R:b

C:Ct

Figure 54: Fluids example. The output of interest is h(t) the height of uid in the tank.
X The state space model can be written as

[ x y = = [

Rv1Ct 1 a
1 g

1 Ct b a

] x+

0
1 a

] u

where g is the acceleration due to gravity. Example 15.4 Fig. 55 shows a uid system schematic, an equivalent electrical circuit schematic, and the reduced bond graph with inputs, state, and causality propagated throughout.
Q i Constant Flow Source

P1 Q1
P1 valve Q 1

P2 Q2 Q1 R1 Qc2 C2 Pa R2

Qi

Qc1 C1 Pa

valve Q 2

C:C1 P1 Qi-Q1 SF:Qi P1 Qi

C:C2 P2 Q1-Q2 P2 P2 R:R2 Q1 Q2

0
P1 Q1 R:R12

SF:Q1

Q1=P1/R1 Q2=P2/R2

Figure 55: Fluids example. The output of interest is Q2 (t). The model makes the following assumptions: 1. The inertance of each pipe is small and has not been modeled. 2. The tanks do not overow. 3. All uid resistance models are linearized about the steady-state ow. From the bond graph:
X There are two energy storage devices. Each has integral causality. The state dimension is n = 2. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] . x = P1 P2

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 72

15

FLUIDS: LECTURES 17-18

March 5, 2014

X The input is u(t) = Qi (t) and the model parameters are C1 , C2 , and the valve settings R1 and R2 . These model parameters are themselves functions of the physical system parameters: pipe length, diameter, and shape; uid 1 density ; and tank cross sectional are. The output is y (t) = Q2 (t) = R P2 (t). 2 X The state space model can be written as

[ [

x y

= =

R11C1
1 R 1 C2

0 R21C2
1 R2

] x+ ] x.

1 C1

] u

Example 15.5 Fig. 56 shows a uid system schematic and the reduced bond graph with inputs, state, and causality propagated throughout.

Q 1 Constant Pressure Source

P1 Qp

P2 valve

Q2

Reservoir

C:C1 P1 Q1-QP

I:Mw P1-P2 P1 Qp Qp P2 Qp

C:C2 P2 QP-Q2 P2

SE:Pp

Pp Q1

P1 Q1

Q2

R:Rv

Pp-P1 Q1 R:Rp

QpR12 Qp R:R12

Q1=(Pp-P1)/Rp Q2=P2/Rv

Figure 56: Fluids example. The output of interest is Q2 (t). The model makes the following assumptions: 1. For the pipe from the pump into tank 1, only the resistance to uid ow has been modeled. 2. For the pipe connecting the two tanks, both resistance and inertance have been modeled. 3. The tanks do not overow. 4. All uid resistance models are linearizations about the steady-state ow. From the bond graph:
X There are three energy storage devices. Each has integral causality. The state dimension is n = 3. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x = P1 Qp P2 . X The input is u(t) = Pp (t) and the model parameters are RP , C1 , Mw , R12 , C2 , and the valve setting Rv . These model parameters are themselves functions of the physical system parameters: pipe length, diameter, and shape; uid density ; and tank cross sectional area. The output is y (t) = h(t). X The state space model can be written as Rp1C1 1 x = M w 0 [ 0 y =

1 C 1 0 1 C2

0
1 M w 1 Rv C1 1 Rv

x + ] x.

1 Rp C1

0 0

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 73

15.5

Exercises

March 5, 2014

15.5

Exercises

Exercise 15.1 For the uid system in Fig. 57: 1. Find and label the analogous circuit. 2. Find the state space model for the uid system. Consider the output to be the height of the uid in each of the tanks.
Constant Flow Source Q 1 Constant Pressure Source P1 Qp

P2 valve

Q2

Figure 57: Fluid system for Exercise 15.1.

Exercise 15.2 For the uid system in Fig. 56, nd and label the equivalent circuit. Exercise 15.3 For the respirator system in Fig. 58: 1. Find and label the equivalent circuit. Account for accumulation of ow in the tube plus each of the two lungs. 2. Find the state space model for the uid system. Consider the output to be the pressure of the uid in the lungs.

Flow Source Q1

PT PL

Figure 58: Fluid system for Exercise 15.3.

Exercise 15.4 Draw and label the schematic for a uid system that is analogous to the circuit in Fig. 33 on page 53. Exercise 15.5 Draw and label the schematic for a uid system that is analogous to the circuit in Fig. 34 on page 53. Exercise 15.6 For the uid system of Fig. 54 on page 72, there is a circular pipe (inner diameter of 0.02m and length 60 m) between the pump and tank is modeled as storing kinetic energy in I : a and dissipating energy through R : b. The tank is storing energy in C : CT . 3 N 9 N The uid has viscosity = 1.0 103 mkg sec , bulk modulus = 2.2 10 m2 , and = g = 9.7 10 m3 . The 2 cross-sectional area of the tank is A = 100 m . kg 7 kg 2 m4 s2 Use the parameters provided above to show that a = 2.0 108 m 4 , b = 1.5 10 m4 s , and CT = 1.03 10 kg . Check that the units work out for the eorts and ows summed on the various bonds in the bond graph. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 74

15

FLUIDS: LECTURES 17-18

March 5, 2014

Exercise 15.7 For the uid system in Fig. 59, consider the Pump to be source of pressure: 1. Find and label the analogous circuit. 2. Find the state space model for the uid system. Consider the output to be the height of the uid in each of the tanks.
Pa h
Pump

Qi Pp

Pt

Infinite Liquid Resevoir

Figure 59: Fluid system for Exercise 15.7.

Exercise 15.8 For the uid system in Fig. 60, makes the following assumptions:

Q1 Flow Source

P1 Qp

P2 valve

Q2

Reservoir

Figure 60: Fluids example. The outputs are the heights of the uids in the two tanks.
X For the pipe from the pump into tank 1, only the resistance to uid ow has to be modeled. X For the pipe connecting the two tanks, both resistance has to be modeled. X The tanks do not overow. X All uid resistance models are linear. X The cross-sectional areas of the two tanks are A1 and A2 .

1. Find and label the analogous circuit. 2. Find the state space model for the uid system.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 75

March 5, 2014

16

Thermal Systems: Lecture 19-20

Modeling of thermal systems using bond graph methods produces pseudo-bond graphs, not bond graphs. See discussion of pseudo-bond graphs in Karnopp. Pseudo-bond graph: Eort - Temperature (dimensionless), T . Quanties the average energy of microscopic molecular motion.
X There are various temperature scales: Fahrenheit TF , Celsius TC , and Kelvin Tk . X Because TK = TC + 273.15, temperature dierences are the same in the Kelvin and Celsius scales:

TK

= TK1 TK2 = (TC1 + 273.15) (TC2 + 273.15) = TC1 TC2 = TC

Flow - Heat ow rate (Joules/s=Watts), QH


X Product of temperature and heat ow rate is not power. Heat ow rate already has units of power. X Because the thermal eort (temperature) and heat ow do not multiply to give power, they are not power variables and the bond graph method applied to thermal systems, while useful, does not yield a bond graph. X Bond graph methods are applicable to pseudo-bond graphs using methods comparable to circuit analysis. X Bond graphs and pseudo-bond graphs cannot be connected.

Methods of Heat Transfer: 1. Radiation - Heat transfer without the presence of a surrounding medium. 2. Conduction - The process of heat transfer through a solid. 3. Convection - The process of heat transfer between the surface of a solid and a uid that is in contact with the surface of the solid. (a) Conduction of heat from solid to uid in immediate contact with surface (b) Replacement of heated uid with fresh uid due to uid ow. Heat Storage: Is achieved by changing the temperature of an object. See denition of temperature. General Thermal Modeling:
X Nonlinear X No I -elements. Heat ow can stop instantaneously. X Partial dierential equations: (Laplace Equation)

2T 2T 2T 1 T + + = 2 2 2 x y z t T - temperature k = C - Thermal diusivity p k - thermal conductivity cp - specic heat (x, y, z ) Cartesian coordinates - density

X Linear lumped-parameter models are rst order approximations. X Accurate modeling requires knowledge of

thermodynamics heat ow uid mechanics

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 76

16

THERMAL SYSTEMS: LECTURE 19-20

March 5, 2014

16.1

Steady State (static) Thermal Systems


Assumptions: 1. One dimensional ow (ideal insulation on remaining sides) 2. Steady state (no time dependent change in temperature, no energy stored) 3. Thermal conductivity k is independent of position and temperature
z T0 Rk= T0
L kA

Special Case - Steady state 1-d conductive heat ow:

Qk T1

Qk

DT
T1 y x DT Qk
L R: kA

Dx

Figure 61: Illustration of 1-d conductive heat ow. Fourier Equation: dT (x) dx X A is the area through which heat transfer occurs (i.e., normal to x) X The negative sign in the Fourier equation indicates that heat ows toward the lower temperature. X For a single layer model, as shown in Fig. 61, assuming that insulation prevents heat ow in the x and y directions, kA Qk = (T0 T1 ) L or L T0 = T1 + Qk . kA Qk = kA
L . If the temperature on X The solid could be subdivided into n layers each with resistance Rk (n) = nkA the front of the block is Tn , then the increasing temperatures moving backwards through the block are related by Ti1 = Ti + Rk (n)Qk for i = n, . . . , 1.

Thermal Conductive resistance: Rk =

L kA .

Caveats: Temperature change is actually continuous along the medium. This equation 1. Allows computation of Q when T1 , T2 , and all parameters are known. 2. Allows computation of T2 when T1 , Q, and all other parameters are known.

Table 5: Thermal constants for selected solids: - density, cp - specic heat capacity, k - thermal conductivity. kg , m cp , kgJ k, mW 3 K K Copper 8933 383 399 Aluminum 2702 896 153 Silicon 2330 703 0.19 Plexiglass 1180 1500 0.19 Glass 2800 800 0.81

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 77

16.1

Steady State (static) Thermal Systems

March 5, 2014

Special Case - Convection: The process of heat transfer between the surface of a solid and a uid that is in contact with the surface of the solid. 1. Conduction of heat from solid to uid in immediate contact with surface 2. Replacement of heated uid with fresh uid due to uid ow.

TF Qh Ts

Fluid flow Profile Boundary Layer

1 Rh= hc A

Qh TF

TS

Solid Thermally Conductive Material

DT Qh

1 R: hc A

Figure 62: Illustration of 1-d convective heat ow. Newtons Law of Cooling: Qh = hc A(TS TF ) Resistance due to convection: Rh = 1 hc A

Coecient of convection hc : depends on the uid density and nature of ow.


X Free convection - Flow is induced due to temperature induced density gradients. X Forced convection - Flow is forced by a pump or fan.

Table 6: Thermal coecients of convection for selected uids: h - thermal conductivity. Air Air Water Water Free Forced Free Forced h, mW 6-30 30-600 60-300 300-6000 2 C

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 78

16

THERMAL SYSTEMS: LECTURE 19-20

March 5, 2014

Example 16.1 How much heat is lost per square meter of plexiglass window? Assumptions:
X Ti = 25 C , To = 0 C , W 2 X k = 0.195 mW K , h = 20.0 m K , thickness = 0.006 m, A = 1.0m . X The four edges of the window perpendicular to the heat ow are perfectly insulated.

Variables:
X Inputs: Inside temperature Ti , outside temperature To X Outputs: Temperature of window inner surface TSi , Temperature of window outer surface TSo
TS i Inside Air Ti Plexiglass Window TS o Outside Air To Rk TS i Rh i + - Ti TS o Rk Rh Q Rh i 1 Rh Se:T o o

o To + -

Se:T i

Figure 63: Illustration of 1-d heat ow example for a plexiglass window. Schematic, Equivalent Circuit, Pseudo-BG Parameters: Rk =
L 0.006m K ) =( = 0 . 0308 W 2 kA W 0.195 m K (1.0m ) 1 1 K ) =( = 0 . 0500 W 2 hA W 20 m2 K (1.0m )

Rh = Solution: 1. To only nd QH :

QH = 2. To nd QH , Tsi , and Tso :

Ti To Rhi + Rk + Rho

QH Rhi QH Rk QH Rho Rhi Rk Rho

= Ti Tsi = Tsi Tso = Tso To

1 0 QH 25 1 1 Tsi = 0 0 1 Tso 0

QH = 191W, Tsi = 15.4 C, Tso = 9.5 C. 24hrs Cost: The energy usage per day is E = 0 QH dt = 4.58kW Hrs. If energy costs 0.07 per kW Hr, then the cost is 0.32 per day or 117 per year.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 79

16.1

Steady State (static) Thermal Systems

March 5, 2014

Example 16.2 Safe operation of an electrical component requires Tc < 75 C . The component is rated for 0.25 W without a heat sink when the ambient temperature is Tc = 25 C . How large of an area of a copper heat sink is required to operate at 1.0 W?
component A Q=0.25 W Heat sink d

Tc

Rk Qht Qc Rht Ta

Ths Qhb Rhb Qhs 1R 4 hs

Figure 64: Illustration of static heat sink example. The equivalent circuit is shown in Fig. 64. The component is producing Qc = 1W of heat ow. The heat ow must rst be conducted from the component into the solid Rk , then convect through either the top Rht , bottom Rhb , or sides Rhs into the ambient air. Let A = L2 denote the area of one surface of the heat sink, which is assumed to be square with edges of length C 1 L. There are two surfaces with this area. Each will have convective resistance Rht = Rhb = hc A W. In addition, there are the four edges. Because the plate will be very thin (d L), the area of each side As = L d will be very small in comparison to A. Therefore, the convective heat resistance through each side C Rhs = hc1 As W will be very large in comparison to the either Rht or Rhb . The total resistance to heat ow is Rk plus the parallel combination of Rht , Rhb , and 1 4 Rhs . Assuming that the convective heat resistance is dominant (i.e., Rh >> Rk ), we can neglect Rk . Also, the parallel combination of the six conductive heat paths is approximately Rh =
W Assume that hc = 25 m2 C . 1 C . 2hc A W

Tc

= Ta + QRh

75 > 25 + (1W ) 50A > A >

C 1 2hc A W

1 1 = = 0.02 2hc 50.0 (0.02)2 m2

A square copper plate that is L = 2cm per edge would be sucient.


C For this area, the resistance due to convection is Rh = 50 W and Rk =. Assuming that the heat sink is d = 0.001 m thick, then with the component located at the center of the heat sink, the resistance due to conduction is L/2 C approximately Rk = 400 Ld 1.25 W , which veries the convection dominance assumption (Rh Rk ).

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 80

16

THERMAL SYSTEMS: LECTURE 19-20

March 5, 2014

Example 16.3 A solid-state electronic component inside a case must dissipate heat Q = (Vi Vo )I = 5W (i.e., I = 3A and (Vi Vo ) = 1.67V ). Assume the device is in steady state. For safe operation, the junction temperature Tj must remain less than 125 C . The ambient temperature is C 25 C . The junction to case resistance is 3 W .
T1 Q
Ta gas device Tj Silicon Thermal compound Heat sink Ta Case

T2 Rtc Q Rhs Ta + -

Rjc + -Tj

Rtc T1 T2 Rjc Sf:Q 1 Rhs Se:T a

Figure 65: Illustration of static heat sink example For the heat to leave the active portion of the device, it must conduct from the junction to the case, from the case through a thermally conductive adhesive to the heat sink, and convect from the heat sink into the ambient air. That is the path of least resistance. Heat can also convect directly from the case to the air, but due to the small surface area, that path is less signicant. The thermally conductive adhesive is critical. If it was not included, then the small gap of trapped air would insert a convective resistance between the case and the heat sink. Use the following notation: Rjc Heat resistance from junction to case (parallel paths through gas and silicon) Rtc Heat resistance of thermal compound Rhs Heat resistance of heat sink (including conduction and convection) From the bond graph in Fig. 65, the junction temperature can be computed as Tj = Ta + Q (Rjc + Rtc + Rhs ) (31)

The constraint Tj < 125 C can be achieved by 1. decreasing the ambient temperature Ta (rarely possible) 2. decreasing the heat ow (rarely possible) 3. decreasing Rjc (not possible by the end user) 4. decreasing Rtc
X Use a high quality thermally conductive adhesive to ensure a low conductivity path for heat ow and to avoid trapped air (an insulator) in the gap.

5. decrease Rhs (usually possible). Based on the above data, eqn. (31), and the constraint that Tj < 125 C : 125 C 100 C 3 5 W W C 17 W > Ta + Q (Rjc + Rtc + Rhs ) > (Rtc + Rhs ) > Rtc + Rhs .

Many heat sinks satisfying this constraint can be found from electronic suppliers. Many electronic component application notes include discussion of specication of a heat sink that are similar to this example.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 81

16.2

Dynamic Thermal Systems: Lecture 20

March 5, 2014

16.2

Dynamic Thermal Systems: Lecture 20


dT dW = QHi QHo + QHg + dt dt

Heat Capacity: The ability to hold or store heat by a change in temperature cp m (32)

( ) where cp is the specic heat kgJ and m is the mass. Note that eqn. (32) is in the standard form for a K C-element (C e = f ) where the value of the C element is Cp = cp V. (33)

Major Assumption: Heat ow is small enough that temperature inside the mass can be considered uniform (i.e., no temperature gradient inside mass). This assumption will be approximately true is the process is convection dominated: Rh >> Rk . This can always be achieved by subdividing the mass into n layers in the direction of heat ow. Biot Number: The Biot number is dened as Bi (n) = R k ( n) . Rh

If Bi (n) < 0.1, then the process is convection dominated and each layer can be modeled as constant temperature. Therefore, we would like to choose n such that the system is convection dominated. We nd n as follows: 0.1 0.1 0.1 n Bi (n) ( L ) ) (nkA 1 ( hA ) Lh nk ( ) Lh . 0.1k (34)

(35)

Choosing n to satisfy eqn. (35) yields a model where the convection dominated assumption is valid. The system is then divided into n layers in the direction of heat ow with Rk (n) and Cp (n) computed appropriately: Cp = cp AL , n Rk (n) = L , nkA Rh = 1 . hA

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 82

16

THERMAL SYSTEMS: LECTURE 19-20

March 5, 2014

Example 16.4 Continuing from Example 16.2 where A = (0.02m)2 and d = 0.001. Parameters: kg = 8933 m 3 cp = 383 kg J K k = 400 mW K h = 20 m2W K density of copper heat capacity of copper copper coecient of conductivity coecient of convection

Biot Number Computations: Rk = 1 1.25 L = = 2nkLd n(800)(0.001) n Rk Bi (n) = Rh Rh = =


1 1 K = = 62.5 2 hA 2(20)(0.02) W 1.25 0.02 = < 0.1 for n = 1. 62.5n n

Rk can be ignored and heat sink can be modeled accurately as having a uniform temperature. ( )( ) ( ) kg J J Cp = cp V = 8933 3 383 0.022 m2 0.001 m = 1.37 m kg K K Model: Energy Balance: Energy stored = Heat ow in - Heat ow out. cp V dTc dt dTc Cp dt dTc 1.37 dt dTc dt = = = = Qi Qo 1 (Tc Ta ) Rh 1 v (t)i(t) (Tc Ta ) Watts 62.5 1 1 Tc + Ta + 0.73v (t)i(t). 86 86 v (t)i(t)

In steady state, Tc = Ta + 63v (t)i(t). The time constant is = 86s.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 83

16.2

Dynamic Thermal Systems: Lecture 20

March 5, 2014

Example 16.5 Model the temperature distribution through a plate glass window [6]. Parameters: A = 0.88m2 t = 7.5mm kg = 2800 m 3 cp = 800 kg J K k = 0.75 mW K h = 30 m2W K Area of glass Thickness of glass Density of glass Specic heat capacity of glass Glass coecient of conductivity Coecient of convection

Biot Number Computations: Rk = 0.0075 0.0114 K 1 1 L = = Rh = = = 0.0379 nkA n(0.75)(0.88) n W hA (30)(0.88) Rk 0.0114 0.3 B i ( n) = = = 0.1 for n 3. Rh n0.0379 n ) ( )( )( 0.88 m2 0.0075 m cp V kg 14784 J = 4928 Cp (n) = = 2800 3 = 800 n m kg K n n n=3 K W

J
K

Model: The glass slab is modeled as three layers. This involves ve temperatures within the glass slab: TSi is the temperature on the inside surface of the glass, TSo is the temperature on the outside surface of the glass, and Ti is the temperature at the center of the i-th glass slab for i = 1, . . . , 3. These temperatures are illustrated in Fig. 66. The equivalent circuit shows the inside and outside temperatures as constant temperature sources. Because the distance from Ti to Ti+1 is L 3 it has resistance Rk . On the two edges, because the distance from the Rk temperature at the edge to the center of the rst slab is L 6 it has resistance 2 plus the resistance due to convection.
TS i Inside Air Ti C C C T1 T2 T3 TS o

Outside Air To

TS Rk/2 T1 Rk i Rh i C Ti + C

T2 Rk T3 Rk/2 TS o C Rh o + - To

L/3 Rh +Rk/2 i Se:T i 1


T1 T1

Rk 0 C
T1

Rk
T2 T2 T 0 2

Rh +Rk/2 o
T3 T3 T 0 3 T 1 0 Se:To

Figure 66: Illustration of dynamic window example

The reader should be able to derive the state space model as 3Rk +2Rhi 1 0 Rk (2Rhi +Rk )C Rk C 1 1 2 x = Rk x + Rk C C Rk C 3 R +2 R k ho 1 0 Rk (2R Rk C ho +Rk )C [ ] 0 1 0 x y = where x = [T1 , T2 , T3 ] , the output is T2 , and u = [Ti , To ] .

2 C (Rhi +2Rk )

0 0

0 0
2 C (Rho +2Rk )

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 84

16

THERMAL SYSTEMS: LECTURE 19-20

March 5, 2014

16.2.1

Summary

X The one dimensional heat transfer QH between two bodies having temperature dierence T between them is:

T (t) = RQH (t) where R is the resistance to heat ow (conductive or convective) measured in
K W att .

X The rate of change of the temperature of a body as a function of net heat ow into the body is described by

QH (t) = C

d T (t) dt

where C is the thermal capacity. Integration of this equation yields QH (t)dt = = CT (t) EH (t) = CT (t).

which is a static relationship between a displacement variable and an eort variable; therefore, according to Table 2 this is a C type element.
X There is no I type element for thermal systems. X The eort source is a temperature source. X The ow source is a heat ow source. X To simplify analysis (by avoiding partial dierential equations), we divide a conductor into small enough pieces such that each piece can be approximated to have a constant temperature. The Biot number provides a method to select the number of layers required to make this assumption reasonable.

16.3

Exercises

Exercise 16.1 Repeat Example 16.1 using glass instead of plexiglass. Compare the cost of the heat loss. How does this cost change as a function of the temperature dierence Ti To (e.g., constant, linear, quadratic )? Exercise 16.2 For the two pane window of Fig. 67, assume the system is in steady state. Be careful with units.
Insulation Air Gap

Plexiglass Window

Ti

Plexiglass Window

To Q

Insulation
W Figure 67: Two pane window for Exercise 16.2. The parameters are Ti = 25 C , T0 = 5 C , h = 20 m2 K , W 2 k = 0.195 m K , t = 0.006m per pane, and A = 2 m .

The stated convection coecient is for the ambient free owing air outside of the window. Select a value for the convection coecient in the airgap and discuss why you choose it.
X Draw the equivalent circuit. X Give numeric values with units for all model parameters. X Draw the bond graph. X Compute the heat ow Q. Estimate the cost of this heat ow on an annual basis. X Sketch an equivalent uid system.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 85

16.3

Exercises

March 5, 2014

Exercise 16.3 Similar to example 16.5, model the one dimensional temperature distribution through a plate with the following parameters: Parameters: A = 1.00m2 t = 7.5mm kg = 2500 m 3 cp = 1000 kg J K k = 0.50 mW K h = 20 m2W K Area Thickness Density Specic heat capacity Coecient of conductivity Coecient of convection

Be careful with units. The solution should have n = 4. Similar to Fig. 66,
X Give numeric values with units for all model parameters. X Draw the thermal schematic. X Draw the equivalent circuit. X Draw the bond graph. X Find the state space model. X Sketch an equivalent uid system.

Exercise 16.4 Consider the system shown in Fig. 68. The cube of material is insulated on ve sides, with a source of heat in the center of the left edge.
Insulation Insulation Q(t) L=0.09 m Insulation To To= 0 C, k = 10.0 W/(m K), h = 20.0 W/(m2 K), A = 2 m2 (right surface) cp = 383 J/(kg K) r = 5000 kg/(m3)

Figure 68: Two pane window for Exercise 16.4

X Draw the thermal schematic. X Draw the equivalent circuit. X Use the Biot number to compute the number of required layers. X Give numeric values with units for all model parameters. X Draw the bond graph. X Find the state space model. X Sketch an equivalent uid system.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 86

16

THERMAL SYSTEMS: LECTURE 19-20

March 5, 2014

= Exercise 16.5 A can of soda with initial temperature 35 C is emersed into an ice water bath, as illustrated in Fig. 69. The ice water should be modeled as a constant temperature source. Use the parameter values listed below and list any additional assumptions: 1. The heat can follow two paths out from the soda. Compare the total resistance of each path. Which path will carry the majority of the heat? Neglect the other path in the subsequent analysis. 2. Compute the heat capacitance of the soda and the can. Which is dominant? Why? 3. Draw an equivalent circuit that includes a single capacitor for the heat capacity of the soda, a single temperature source for the ice water bath, and two resistors representing convective heat resistance through the soda and through the ice water. 4. Develop a single state dynamic model for the temperature of the soda. 5. Identify the time constant in minutes. How long would it take for the temperature to reach steady-state? Does this match your real-life experience?
Ta=20 C Tw=0 C

Ts

BE CAREFUL WITH UNITS.

Figure 69: Two pane window for Exercise 16.5


W Parameters: r = 1.3in (can radius), t = 0.004in (can thickness), l = 4in (can height), hw = 60 (m2 K ) coef. W W convection for water, ha = 6 (m2 K ) coef. convection for air, hs = 60 (m2 K ) coef. convection for soda, kal = J J 236 (mW K ) coef. conductivity for aluminum, cpal = 896 (kg K ) specic heat of aluminum, cps = 4180 (kg K ) specic kg heat of soda, al = 2702 (m 3 ) density of aluminum.

Exercise 16.6 Derive a dierential equation model for a pot of water being heated over a ame of burning natural gas in a pot with stainless steel sides and a copper bottom. Note that you need to model the heat capacity of both portions of the pot and the water separately. Natural gas burns with a ame temperature of 1960 C. Assume that there is forced air convection having W h = 20 m2 K with the bottom of the pot that has a 10cm radius. Assume that convection in the water inside the W pot is free with h = 100 m2 K . Assume room temperature is 25 C and the temperature along the sides of the pot are 500 C. The height of the water in the pot is 4 cm. The thickness of the pot is 1mm. The parameters of stainless kg kg W J W steel are = 8000 m 3 , k = 16 m C , and cp = 500 kg K . The parameters of copper are = 8940 m3 , k = 400 m C , and
kg W J cp = 385 kgJ K . The parameters of water are = 1000 m3 , k = 0.58 m C , and cp = 4183 kg K .

1. Comment on which is the dominant path for heat conductivity and give at least two reasons why. 2. Simulate the system and note the time that it takes for the water to go from room temperature to 100 C . Is this reasonable given your everyday experience? At 100 C , the water begins to boil, which is a phase change. Therefore, the above model is no longer valid. Therefore, extending the simulation above this temperature is invalid.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 87

March 5, 2014

17

Exam 2

Exam 2 covers to here in 2013.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 88

18

CAUSALITY PROBLEMS: LECTURE 21

March 5, 2014

18

Causality Problems: Lecture 21

The examples and exercises up to this point have been designed such that the state variable and causality propagation procedure on page 36 ended prior to Step 7 and only involved integral causality. In general use, two slightly more complicated situations may arise. Derivative Causality While propagating causality through a bond graph, an energy storage device may be forced, by prior causality assignments, to have derivative causality. Such energy storage devices are dependent on at least one other input of energy storage device in the bond graph. Algebraic Loops After assigning causality to all inputs (Steps 1-3) and to all energy storage devices (Steps 4-6), there may still be R elements without assigned causality. When this occurs, there is at least one algebraic loop in the system. Steps 7-9 describe how to continue with the causality propagation. Each of these cases is described in greater detail, with examples, in the following subsections. Each of these issues is created by design and modeling decisions, possible made without realization. These issues can be removed by alteration of the design or modeling decisions. At least in the case of derivative causality, the designer should pause and reconsider whether the design and model are reasonable.

18.1

Derivative Causality

Fig. 70 shows I and C elements in derivative causality. For the I element, the graph to which the I element is connected determines the ow fw and the I element determines the eort I fw , which exhibits the derivative causality. For the C element, the graph to which the C element is connected determines the eort ew and the C element determines the ow C e w , which exhibits the derivative causality. In either case, the causality propagation continues normally.

.
Ifw fw

ew Cew

Figure 70: Energy storage elements with derivative causality. A valid denition of the state vector is still given by the output power variables of the energy storage devices that have integral causality. The energy storage elements with derivative causality still store energy, but the amount of energy is determined by those elements that have integral causality. The process is easily claried with a few examples. Example 18.1 Fig. 71 shows a circuit and the corresponding reduced bond graph. The black, green, and blue variables show the propagation of the causality and state variable up to the point where the C : b element is recognized as having derivative causality. The red variables show the propagation of the results of the derivative causality through the bond graph. Given that the C : b input is eort e1 , the C : b element determines the ow to be be 1 , then the 0-junction determines the ow at C : a. From the bond graph:
X There are three energy storage devices, but one has derivative causality. Therefore, there are two independent energy storage devices and the state dimension is n = 2. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x = e1 f . X The input is u(t) and the design parameters are L, a and b. The output is y (t) = x1 (t). X The dierential equations for each state are found by the standard method:

f(t) ae 1 (t) x 1 Copyright

= =

1 1 u(t) x1 (t) L L

f (t) be 1 (t) 1 = x2 (t) (a + b) p. 89

2000-2014, J. A. Farrell. All Rights reserved.

18.1

Derivative Causality

March 5, 2014

L
f
+ __

+v L

+ e1 _

+ _y

i1

i2

se:u

u 1 f u-e1 f

e1 f

e1 . be . 1 e1 f-be1

C:b

I:L

C:a

Figure 71: Bond graph with derivative causality. where (a + b) is the equivalent capacitance of the two parallel capacitors.
X The state space model can be written as

x =

0
1 L

1 (a+b)

] x+

0
1 L

] u.

The derivative causality should motivate the designer to carefully consider why the circuit dcontains two capacitors in parallel. Example 18.2 The top portion of Fig. 72 shows a bond graph where the I :L element is dened with integral causality. As the power output variable f and causality is extended through the bond graph, the C element is found to have derivative causality. The bottom portion of the gure uses derivative causality for the C element to dene g the ow as k f and continues with the variable propagation throughout the graph. From the bond graph:

se:u

u f

1
f

GY
: g

gf

0
gf

gf v

I:J

I:L se:u
g(v+gf/k) u 1 f f . u-g(v+gf/k) f

C:1/k . GY
: gf . g v+gf/k gf v gf gf/k

I:J

I:L

C:1/k

Figure 72: Bond graph with derivative causality.


X There are three energy storage devices, but one has derivative causality. Therefore, there are two independent energy storage devices and the state dimension is n = 2. X A valid denition of the state vector is dened by the power output variables of the energy storage devices: [ ] x= v f . X The input is u(t) and the design parameters are L, k , g and J . The output is has not been specied. X The dierential equations for each state are found by the standard method: g f ( t) v (t) = J

Lf(t)

u gv (t) ( 1 L+
g2 k

g2 f k

f = f = Copyright

) (u gv (t))

1 (u gv (t)) Le p. 90

2000-2014, J. A. Farrell. All Rights reserved.

18

CAUSALITY PROBLEMS: LECTURE 21

March 5, 2014

where Le = L +

g2 k

is the equivalent I value. [ x = ] x+ [ ] u.

X The state space model can be written as


kg Lk+g 2

g J

0
k Lk+g 2

18.2

Algebraic Loops

When the causality propagation does not end at Step 6, the bond graph is said to have incomplete causality. Each time that the modeler assumes an arbitrary causality for an R element at Step 7 implies the existence of one algebraic loop. Propagation of the arbitrary causality through the bond graph will ultimately provide the formula for the algebraic constraint. Example 18.3 The top portion of Fig. 73 shows a circuit schematic. The bond graph at the completion of Step 6 of the causality propagation procedure is shown in the middle section of the gure. Note that all energy storage and input devices have their causality and power output variables assigned and that the causality has been propagated as far as possible, yet at least some R elements do not yet have their eort, ow, and causality assigned.
a

Schematic

+ vs _ i s
g

C _ i1 + vC + + v_ v_ 1 R 2 R i2
g g

Steps 1-6

sf:is

is

0 R

1
vs

C
vc+R(is-i2) is-i2 R(is-i2) is-i2 vc is-i2

Steps 7-9

sf:is

vc+R(is-i2) is

0
i2

Figure 73: Circuit with incomplete causality. The output is y (t) = v1 (t). At Step 7, the modeler arbitrarily selects an R element and assigns its causality. The bottom portion of the gure shows the result of selection the left most R element to dene the ow i2 and propagating that choice as far as possible through the bond graph. The eort v2 has purposefully been left blank. Note that there are two denitions for v2 . From the properties of the 0-junction we have that v2 = vc + R(is i2 ) and from the properties of the R element we have that v2 = i2 R. These two denitions of the same variable supply the algebraic constraint: i2 R = vc + R(is i2 ) which yields 2Ri2 = vc + Ris or i2 = 1 2 is + From the bond graph,
1 2R vc .

X There is one independent energy storage devices, so the state dimension is n = 1.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 91

18.2

Algebraic Loops

March 5, 2014

X A valid denition of the state vector is dened by the power output variable of the energy storage device: [ ] x = vC . X The input is u(t) = is (t) and the design parameters are R and C . The output is

y ( t) =

1 1 v1 (t) = R(is (t) i2 (t)) = R(is (t) is (t) vc (t)) 2 2R 1 1 = Ru(t) x(t). 2 2

X Assuming linear storage devices, the state space model can be written as

x = = x =

1 (is i2 ) C( )) ( 1 1 1 is + vc ) is C 2 2R 1 1 x+ u. 2RC 2C

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 92

18

CAUSALITY PROBLEMS: LECTURE 21

March 5, 2014

Example 18.4 The full wave rectier circuit of Fig. 74 is one of the most commonly used circuits. It converts an alternating voltage into an approximately constant voltage. The amount of voltage variation is determined by the circuit parameters.
i1 iu u
+ _
b b

v4 i6
_ _

i4
+

v5

L v1

_ +

L v2

i2
g

v6

Figure 74: Figure used in Example 18.4. This example is a work in progress.
R:d5
-va R:d4 i5 1 va i5 va-x1 i4 va va i4-i5 0 a i4 1

I:L I:L x1 i4 x -x x2 x3-Rx4 x4 1 3 x f x3 x1 1 se:u i u 1 x3 0 x4 1 R:d6 b0 x2 2 4-i5 x x -x Rx4 x4 v6 ***** x1 i5+i7-x2 3 2 4 x1 vc vc c R:R C:C1 C:C2 1 i4-i5 0 i5+i7-i4 i5+i7-i4 Def. Aux. Var. vc i7 vc=(v6+x1) -v Constraints at ***** i7=g(-vc) R:d7 i c 1 i =g(v ) 6 6 va=u+vc 7 i6=i5+i7-i4 i5=g(-va) i4=g(va-x1)

Figure 75: Figure used in Example 18.4.

x1

i5 i7
d

v3 _

C2 i3

vo

i C1 8
c

v7

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 93

18.3

Exercises

March 5, 2014

18.3

Exercises

1 Exercise 18.1 For the bond graph in Fig. 76, with (eort) input u(t) and output y (t) = k Fk (t).

C:1/h se:u Fc 0

R:d 1
v Fk

C:1/k

I:M
Figure 76: Bond graph for Exercise 18.1 1. How many energy storage devices are there? 2. Walk the inputs and state variables through the BG while applying the causal strokes. 3. Identify any instances of derivative causality. 4. Give an example of a type (e.g., sinusoid, step, ...) of nite magnitude input u(t) that would require innite power to apply. Explain why. 5. Derive the state space model.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 94

18

CAUSALITY PROBLEMS: LECTURE 21

March 5, 2014

Exercise 18.2 For each of the following: 1. Clearly state the inputs, outputs, and design parameters. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Write the state space model.

C:b

se:u

I:L
(a) See instructions for Exercise 18.2.

I:L
GY:g C:b

TF
:

I:J

se:u

TF
g

1 C:c

I:J

(b) See instructions for Exercise 18.2.

I:a

R:d
(c) See instructions for Exercise 18.2.

Figure 77: Bond graphs exhibiting derivative causality.

Exercise 18.3 For each of the following, using the variables and indicated causality: 1. Clearly state the inputs, outputs, and design parameters. 2. Propagate the causality, inputs (where specied), and state variables through the bond graph. 3. Write the state space model.
R:a 0 R:b

R:a

R:b

I:d

C:c

(a) See instructions for Exercise 18.3. The output is the eort across the I element.

(b) See instructions for Exercise 18.3. The output is the ow through the C element.

Figure 78: Bond graphs exhibiting algebraic loops.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 95

18.3

Exercises

March 5, 2014

Exercise 18.4 For the circuit in Fig. 79: 1. Find the simplied bond graph model. 2. Propagate the causality, inputs, and state variables through the model. 3. Dene a valid state vector. 4. Dene the state space model. If the system is linear, write the model in matrix form. Clearly indicate the location at which you arbitrarily assign an eort or ow. You should only need to do this once. State the constraint that results.

R + u_
+ _

C R

+ y R L

Figure 79: See instructions for Exercise 18.4.

Exercise 18.5 For the uid system in Fig. 80, consider the Pump to be source of (volume) ow: 1. Find and label the analogous circuit. Account for both frictional loss and kinetic energy stored in the pipe. 2. Find the state space model for the uid system. Consider the output to be the height of the uid in each of the tank.
Pa h
Pump

Qi Pp

Pt

Infinite Liquid Resevoir

Figure 80: Fluid system for Exercise 18.5. Clearly indicate any elements that have derivative causality.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 96

19

LINEAR DEPENDENCE, DETERMINANTS, MATRIX INVERSE: LECTURE 22

March 5, 2014

19
19.1

Linear Dependence, Determinants, Matrix Inverse: Lecture 22


Linear Dependence

Given vectors ui n for i = 1, . . . , m, the vectors are linearly dependent if there exists i , not all zero, such m that i=1 i ui = 0.
X If this is only true when all i = 0, then the set of vectors is linearly independent. X Example: Consider u1 , u2 , u3 3 where 1 u1 = 1 , 1

0 u2 = 1 , 1

0 u3 = 0 . 1

Then, 1 u1 + 2 u2 + 3 u3 = 03 1 0 0 0 1 1 + 2 1 + 3 0 = 0 . 1 1 1 0 The rst row implies that 1 = 0. The second row implies that 2 = 0. The third row implies that 3 = 0. Therefore, these three vectors are linearly independent.
X Example: Consider v1 , v2 , v3 3 where

1 v1 = 1 , 1

0 v2 = 1 , 1

1 v3 = 0 . 0

Then, 1 v1 + 2 v2 + 3 v3 = 03 1 0 1 0 1 1 + 2 1 + 3 0 = 0 . 1 1 0 0 This equation is satised for 1 = 1, 2 = 1, 3 = 1, Therefore, these three vectors are linearly dependent.
X We would like to have a convenient tool to check whether a set of vectors is linearly independent.

A set of m > n vectors in n is always linearly dependent. A set of n vectors ui n , i = 1, . . . , n can be arranged as a square matrix U = [u1 , u2 , . . . , un ] nn . If this set of vectors is linearly independent, then we say that the matrix U is nonsingular.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 97

19.2

Determinants, Minors, and Cofactors

March 5, 2014

19.2

Determinants, Minors, and Cofactors

X If A nn , then the determinant of A is denoted by |A| or det(A). The determinant is a scalar real number. X If |A| = 0, then A is nonsingular. The vectors forming the rows (and columns) of A are linearly independent. X If |A| = 0, then A is singular. The vectors forming the rows (and columns) of A are linearly dependent. X We need an organized method for computing |A|, since it involves a summation with n! terms.

Minors Mij is the minor associated with aij . Mij is the determinant of the matrix formed by dropping the i-th row and j -th column from A. The elements Mij dene a matrix M . 1 5 4 Minor example: For A = 0 7 1 , 3 2 7 M11 M21 = = 7 1 2 7 5 4 2 7 = 7 7 2 (1) = 51. = 5 7 2 4 = 27.

Cofactors The cofactor associated with aij is cij = (1)i+j Mij . 1 5 Cofactor example: For A = 0 7 3 2 4 1 , 7 c11 c21 = = (1)1+1 51 = 51. (1)2+1 27 = 27.

Determinant Formulae Two formulae are possible: n Row expansion: |A| = j =1 akj ckj . n Column expansion: |A| = j =1 ajk cjk . Select k to make your life easy. Example 19.1 Is the matrix A singular? 1 0 0 A = 1 1 0 Using row one. 1 1 1 |A| = 1 1 0 1 1 +0 1 0 1 1 +0 1 1 1 1 =1

Not singular. Column (and rows) are linearly independent.

Example 19.2 Is the matrix B singular? 1 0 B = 1 1 1 1 |B | = 1 1 1 1 1

1 0 Using column three. 0 +0 1 0 1 1 +0 1 0 1 1 =0

Singular. Columns (and rows) are linearly dependent.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 98

19

LINEAR DEPENDENCE, DETERMINANTS, MATRIX INVERSE: LECTURE 22

March 5, 2014

19.2.1

Properties of Determinants

For A, B nn 1. |AB | = |A| |B | 2. |A| = |A | 3. If any row or column of A is entirely zero, then |A| = 0. 4. If any two rows (or columns) of A are linearly dependent, then |A| = 0. 5. Interchanging two rows (or two columns) of A does not change the determinant. 6. Multiplication of a row of A by , yields |A|. 7. A scaled version of one row can be added to another row without changing the determinant.

19.3

Matrix Inversion
b a

Scalars: For scalars, a, b, x , the solution to the equation ax = b is found by division x = approach does not extend to matrices, as the idea of matrix division is not dened.

when a = 0. This

We can consider multiplication by the scalar a to be an operation. The inverse operation is multiplication 1 by the scalar a1 = a which is well-dened when a = 0. We know that the real number 1 is the unity 1 operator for scalar multiplication. ( 1 ) We know that multiplication by a is the inverse multiplicative operation to multiplication by a, because a a = 1. This idea extends to matrices. Matrices: For A, B nn , with |A| = 0, we will call B the inverse of A if BA = AB = I where I is the identity matrix in nn .
X Note that the matrices A and B must be square. X The matrix A must be nonsingular and by the properties of determinants,

|AB | = |A| |B | |I | = |A| |B | 1 = |A| |B | 1 |B | = . |A| Since |A| is well-dened (not 0 or ), the |B | is also well-dened. The matrix B is nonsingular.
X Typically, we use the notation B = A1 , which is read B is the inverse of A.

Computation of A1 : When A is a square nonsingular matrix, A1 = C |A|

where C is the cofactor matrix for A and C is called the adjoint of A.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 99

19.3

Matrix Inversion

March 5, 2014

Example 19.3 1 0 6 Let A = 0 4 3 . Find A1 . 3 5 1 First we compute |A|. If the determinant is zero, then there is no need to try computing A1 , as it would not exist. We use row expansion with row 1: |A| = 1c11 + 0c12 + 6c13 4 3 = (1)2 + 0 + 6(1)4 5 1 (4 + 15) + 6(12) = 61

0 4 3 5

Since |A| = 0, the inverse will exist and we calculate it. M11 = 4 3 5 1 0 6 5 1 0 6 4 3 = 11 = 30 = 24 M12 = 0 3 1 3 1 0 3 1 6 1 6 3 =9 = 19 = 3 M13 = 0 4 3 5 1 0 3 5 1 0 0 4 = 12

M21 =

M22 =

M23 =

=5

M31 =

M32 =

M33 =

=4

C11 = (1)1+1 (11) C21 = (1)2+1 (30) C31 = (1)3+1 (24) C= Check: AA1

C12 = (1)1+2 (9) C22 = (1)2+2 (19) C32 = (1)3+2 (3)

11 30 24

C13 = (1)1+3 (12) C23 = (1)2+3 (5) C33 = (1)3+3 (4) 11 30 24 9 19 3 9 12 12 5 4 C 19 5 ; therefore, A1 = = |A| 61 3 4 6 11 30 24 1 3 9 19 3 61 1 12 5 4

11 72 30 30 76 + 15 = 36 + 36 33 45 + 12 90 95 + 5 1 0 0 = 0 1 0 0 0 1

1 = 0 3

0 4 5

24 + 24 1 12 12 61 72 + 15 4

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 100

19

LINEAR DEPENDENCE, DETERMINANTS, MATRIX INVERSE: LECTURE 22

March 5, 2014

Example 19.4 Symbolic Example (microphone feedback): s 1 0 c . Find (sI A)1 . Let (sI A) = a s + b d 0 s+f Compute |A|- Using a row 1 expansion, with the cofactors as computed below: |sI A| = sC11 + 1C12 + 0C13 = s(s + b)(s + f ) cd + a(s + f ) = s3 + (b + f )s2 + (bf + a)s + (af cd) Compute minor( s + b) c M11 = 0 (s + f ) 1 0 a c = a(s + f ) cd d (s + f ) a (s + b) = d(s + b) d 0 s 0 = s(s + f ) d (s + f ) s 1 = d d 0 s 0 = cs a c s 1 = s2 + bs + a a (s + b)

= (s + b)(s + f )

M12 = M13 =

M21 =

0 (s + f )

= (s + f )

M22 = M23 =

M31 =

1 ( s + b)

0 c

=c

M32 = M33 =

Compute cofactor-

(s + b)(s + f ) (s + f ) C= c Form inverse

a(s + f ) + cd d(s + b) s(s + f ) d 2 cs s + bs + a

(sI A)1 Check: (sI A)(sI A)1 = I

(s + b)(s + f ) (s + f ) c a(s + f ) + cd s(s + f ) cs d(s + b) d s2 + bs + a = s3 + (b + f )s2 + (bf + a)s + (af cd)

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 101

19.3

Matrix Inversion

March 5, 2014

Two dimensional Examples: The special case of 2 2 matrices is useful to consider as it frequently occurs in examples. For A 22 : A = [ M C = [ = [ A1 =

a11 a21 a22 a12 a22 a12

a12 a22 a21 a11

] ] ]

] a22 a12 a21 a11 a11 a22 a12 a21


a21 a11

This result will be used frequently without proof. (s + 2) 3 Example 19.5 If (sI B ) = . Note s2 +5s 2 (s + 3) that all elements have the same denominator prior to pole-zero cancellations. Note that the denominator has the same order as the original matrix. [ Example 19.6 If (sI C ) = s 0 1 (s + 4) ] , then (s + 4) 0 1 s s2 + 4s [ 1 0 s
1 s(s+4)

] , then (sI B )1 =

(s + 3) 3 2 (s + 2)

(sI C )1

= =

] .

1 s+4

Note that all elements have the same denominator prior to pole-zero cancelations. After pole-zero cancelations, this fact may not be as apparent. Typically it is better to leave the answer in the rst form. Check both of the above to ensure the inverse is correct.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 102

19

LINEAR DEPENDENCE, DETERMINANTS, MATRIX INVERSE: LECTURE 22

March 5, 2014

19.4

Exercises

Exercise 19.1 Each of the following species a matrix A. In each case:


X Find A1 using the cofactor method. X Multiply A1 A to check the result.

Show your work. [ ] 3 0 1) A = 2 2 3 0 0 A = 2 2 0 0 0 1

[ 2) A=

1 1 1 2 0 0 1

3)

4)

1 A= 1 1

0 0 2

Exercise 19.2 For the state space system in Example 15.4 on p. 72: 1. Show that ( (sI A) = 2. Compute (sI A)
1

s+

1 R1 C1

) ( s+ 0
1 R2 C2

R11C2

Exercise 19.3 For the state space system x y 1. Find (sI A). 2. Compute (sI A)
1

0 = 0 0 [ 1 =

1 0 0

0 0 1 x + 0 u 5 1 ] 0 0 x.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 103

March 5, 2014

20

Eigenvalues and Eigenvectors: Lecture 23


Avi = i vi are the eigenvalues and eigenvectors of A. or (i I A)vi = 0n

X Let A nn . The set of (complex) scalars i C and (nonzero) vectors vi C n satisfying

X We are only interested in nontrivial solutions. The vector vi = 0n n is always a solution of the above equations. It is referred to as the trivial solution and is not of interest. X The variable is a dummy variable. The solutions to |I A| = 0 and |sI A| = 0 are exactly the same. X Nontrivial solutions vi exist only if (I A) is a singular matrix. Therefore, the eigenvalues of A are the values of such that A is singular. Using the properties of the determinant, this is the values of such that |I A| = 0. The equation |I A| = 0 is an an n-th order polynomial in that is called the characteristic equation of A. Because |I A| = 0 is an n-th order polynomial in , there are n (possibly non-unique) eigenvalues. [ ] 0 0 Example 20.1 Let B = : 1 4

[ (sI B ) =

s 0 1 (s + 4)

] and |sI B | = s2 + 4s = s(s + 4).

The eigenvalues of B are s = 0 and s = 4. The eigenvector corresponding to 1 = 0, is a nonzero vector v1 such that [ (i I B )v1 ] 0 0 v1 1 4 = = 02 [ ]

0 0

[ ] which is satised by v1 = 4, 1 or any scalar multiple of this vector. The eigenvector corresponding to 2 = 4, is a nonzero vector v2 such that [ (i I B )v2 ] 4 0 v2 1 0 = = 02 [ ]

0 0

[ ] which is satised by v2 = 0, 1 or any scalar multiple of this vector. This inverse of (sI B ) is [ ] (s + 4) 1 0 s (sI B )1 = . s(s + 4) Note that (sI B )1 is a matrix of transfer functions. Before any simplication (pole-zero cancelations) all of these transfer functions have the same denominator, which is the characteristic equation of B . Therefore, the poles of these transfer functions are the same as the eigenvalues of B . When a matrix has complex eigenvalues, the eigenvalues and eigenvectors will occur in complex conjugate pairs. [ ] 0 1 Example 20.2 Find the eigenvalues and eigenvectors of A = : 25 6 [ ] s 1 (sI A) = and |sI A| = s2 + 6s + 25 = (s + 3 + 4j )(s + 3 4j ). 25 (s + 6) The eigenvalues of A are s = 3 4j .

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 104

20

EIGENVALUES AND EIGENVECTORS: LECTURE 23

March 5, 2014

The eigenvector corresponding to 1 = 3 + 4j , is a nonzero vector v1 such that [ [ (i I A)v1 ] 3 + 4j 1 v1 25 3 + 4j ] = = 02 [ ]

0 0

which is satised by v1 =

or any scalar multiple of this vector. [ ] The eigenvector corresponding to 2 = 3 4j is v2 = v1 = 3 + 4j, 25 .

(3 + 4j ), 25

The following example computes eigenvectors for a matrix of dimension higher than n = 2. Students typically nd this a bit harder. 0 0 1 1 . Performing the Laplace expansion along the rst column, it is straightExample 20.3 Let A = 0 0 0 2 1 forward to show that s 1 = s(s + 2)(s 1). |sI A| = s 2 s + 1 Therefore the eigenvalues of A are 0, 1, and -2. For s = 0: We need to nd a nontrivial vector v1 such that (sI A)|s=0 v1 0 0 1 0 0 1 v1 0 2 1 Because the rst column is zero, choosing v1 = [ 1 0 0 ] = 03 = 03 . (36) (37)

satises the equation.

For s = 1: We need to nd a nontrivial vector v2 such that (sI A)|s=1 v2 0 1 1 1 v2 2 2 = 03 = 03 . (38) (39)

1 0 0 Choosing v2 = [ 1 1 1 ]

satises the equation.

For s = 2: We need to nd a nontrivial vector v3 such that (sI A)|s=2 v3 2 0 1 0 2 1 v3 0 2 1 Choosing v3 = [ 1 1 2 ] satises the equation. = = 03 03 . (40) (41)

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 105

20.1

Matrix Diagonalization: Extra material

March 5, 2014

20.1

Matrix Diagonalization: Extra material

If a matrix A nn has n distinct eigenvalues i , then it also has n distinct and linearly independent eigenvectors vi . Form the diagonal matrix D = diag (i ) and the matrix M = [v1 , . . . , vn ]. The matrix A can be decomposed as A = M DM 1 . A more general version of this result applies to matrices with repeated eigenvalues. The interested reader should investigate the Jordan canonical form. [ ] 5 2 Example 20.4 Consider the matrix A = . The determinant of (sI A) is 2 2 |sI A| = s2 7s + 6 = (s 6)(s 1); therefore, the eigenvalues of A are s = 1 and s = 6. The eigenvector corresponding to 1 = 1, is a nonzero vector v1 such that [ (i I A)v1 ] 4 2 v1 2 1 = 02 [ ] 0 = 0

[ ] which is satised by v1 = 1, 2 or any scalar multiple of this vector. The eigenvector corresponding to 2 = 6, is a nonzero vector v2 such that [ [ ] (i I A)v2 ] 1 0 v2 1 4 ] and M = 02 [ ] 0 = 0

which is satised by v2 = Therefore,

2, 1

or any scalar multiple of this vector. [ 1 2 2 1


1

M= Note that
1

1 = 5

1 2

2 1

] .

[ ][ ][ ] [ ] 1 1 2 5 2 1 2 1 0 M AM = = , 2 2 2 1 0 6 5 2 1 which demonstrates the Jordan decomposition (or eigenvector-eigenvalue decomposition).

This decomposition shows that the eigenvalues and eigenvectors of a matrix contain all the information needed to describe the matrix. The eigen-decomposition of A is also useful for certain types of theoretical analysis. 0 0 0 1 1 1 0 and M = 0 1 1 . Direct Example 20.5 Continuing from Example 20.3, we dene D = 0 1 0 0 2 0 1 2 multiplication conrms that A = M D M 1 .

20.2

Similar Matrices

Two square matrices A and B are similar if there exists a nonsingular matrix S such that B = S 1 A S. It is straightforward to show that any two similar matrices have the same eigenvalues. Let A and B be similar matrices and let be an eigenvalue of B . Starting from the denition of eigenvalues we have that |I B | = 0 |I S 1 A S | = 0, by the denition of similarity 1 |S S S 1 A S | = 0, by the denition of the matrix inverse |S 1 (I A) S | = 0, |S 1 | | (I A) | |S | = 0, by the denition of the determinant | (I A) | = 0, because S is nonsingular; Therefore, is an eigenvalue of A. Note for example, in Section 20.1, A and D are similar matrices. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 106 (42) (43) (44) (45) (46) (47)

20

EIGENVALUES AND EIGENVECTORS: LECTURE 23

March 5, 2014

20.3

Exercises

Exercise 20.1 For a square matrix A that has non-repeated eigenvalues, use the results of Section 20.1, to show the following: 1. A2 = M D2 M 1 2. Am = M Dm M 1 for any integer m.

Exercise 20.2 For a square matrix A, the matrix exponential is dened as eAt = I + At + 1 1 (At)2 + (At)3 + . 2! 3!

Assuming that A that has non-repeated eigenvalues, use the results of Section 20.1 and Exercise 20.1, to show the following: ( ) 1 1 1. eAt = M I + Dt + 2! (Dt)2 + 3! (Dt)3 + M 1 ( ) 1 1 2. diag (et ) = I + Dt + 2! (Dt)2 + 3! (Dt)3 + .
1 1 Note that for scalar C : et = I + t + 2! (t)2 + 3! (t)3 + which is the standard denition of the exponential function.

1 0 Exercise 20.3 For A = 0 5 0 1

0 6 : 0

1. Find the eigenvalues and eigenvectors of A. 2. Form the eigenvalues and eigenvectors of A into the matrices M and D and show that A = M DM 1 . 3. Find eAt . 4. Find the solution x(t) = eAt x(0) of x (t) = Ax(t) with initial condition x(0) = [ 1 1 0 ] .

Do the computations of this problem by hand. Only use Matlab to check and debug your answer. 0 0 0 0 : 6 8 1 0

0 0 0 1 Exercise 20.4 For A = 0 0 0 0

1. Find the eigenvalues and eigenvectors of A. 2. Form the eigenvalues and eigenvectors of A into the matrices M and D and show that A = M DM 1 . 3. Find eAt . 4. Find the solution x(t) = eAt x(0) of x (t) = Ax(t) with initial condition x(0) = [ 1 1 1 1 ] .

Do the computations of this problem by hand. Only use Matlab to check and debug your answer.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 107

March 5, 2014

21

State Space to Transfer Function: Lecture 23


x = Ax + Bu y = Cx + Du.

A linear state space model has the general form

In most physical systems D = 0. The goal of this lecture is to discuss computation of the transfer function corresponding to the above state space system, when the initial conditions are assumed to be zero. To derive the transfer function, we take the Laplace transform of each of the above equations, solve for and eliminate X (s), and then solve for Y (s) as a function of U (s): L {I x } = L {Ax + Bu} L {y } = L {Cx + Du} sIX (s) = AX (s) + BU (s) Y (s) = CX (s) + DU (s) sIX (s) AX (s) = BU (s) Y (s) = CX (s) + DU (s) (sI A) X (s) = BU (s) Y (s) = CX (s) + DU (s) 1 X (s) = (sI A) BU (s) Y (s) = CX (s) + DU (s) 1 Y (s) = C (sI A) BU (s) + DU (s) Y (s) 1 = C (sI A) B + D U (s) Note that the C in this equation is from the state space model, it is not the cofactor matrix of A. Useful facts: is a matrix of transfer functions. The denominator of each transfer function is the polynomial 1. (sI A) d(s) = |sI A| .
X The poles are the solutions to d(s) = |sI A| = 0. X The eigenvalues of A are the solutions of |sI A| = 0.
1

2. The eigenvalues of A and the poles of the transfer function from U (s) to Y (s) are identical, before pole-zero cancellations. 3. The Matlab function ss2tf performs this operation.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 108

21

STATE SPACE TO TRANSFER FUNCTION: LECTURE 23

March 5, 2014

Example 21.1 Consider the state space system [ ] [ ] 0 1 0 x = x+ u 6 5 1 [ ] 1 1 x. y = [ (SI A) = s 1 6 s+5 ] |sI A| = s2 + 5s + 6 = (s + 3)(s + 2) eigenvalues: 2, 3 Y (s) 1 = C (sI A) B + D U (s) [ ] [ [ s 1 6 s+5 ] 1 [ 0 1 ]

= = Zeros: s = 1 and Poles: s = 2, 3

] s+5 1 [ ] [ ] 6 s 0 1 1 (s + 3)(s + 2) 1 Y (s) (s + 1) = U (s) (s + 3)(s + 2)

Example 21.2 Consider the state space system [ ] [ ] 2 0 1 v = v+ u 0 3 1 [ ] 1 2 v. y = [ (SI A) = s+2 0 0 s+3 ] |sI A| = s2 + 5s + 6 = (s + 3)(s + 2) eigenvalues: 2, 3 Y (s) 1 = C (sI A) B + D U (s) [ ] [ [ s+2 0 0 s+3 ] 1 [ ] [ 1 1 ] ]

1 2

= =

s+3 0 [ ] 0 s+2 1 2 (s + 3)(s + 2) Y (s) (s + 1) = U (s) (s + 3)(s + 2)

1 1

Zeros: s = 1 and Poles: s = 2, 3 which are identical to the previous example.

A single transfer function has an innite number of equivalent state space transformations. If x is a valid state vector and P is a nonsingular [ matrix, then ] v = P x is also a valid state vector. Note that in the previous two 3 1 examples, v = P x where P = . While the state space representations of Examples 21.2 and 21.2 are 2 1 dierent, they have the same transfer functon.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 109

21.1

Equivalent State Space Representations

March 5, 2014

Example 21.3 Consider the state space system 0 1 0 0 0 1 v + 0 u v = 0 0 1 2 1 [ ] 0 1 0 v. y = s (SI A) = 0 0 1 0 s 1 1 s+2

|sI A| = s3 + 2s2 + s = s(s + 1 + 1j )(s + 1 1j ) eigenvalues: 0, 1, 1

Y (s) 1 = C (sI A) B + D U (s)

= = Zeros: s = 0 and Poles: s = 0, 1, 1.

1 s 1 0 0 0 1 0 0 s 1 0 0 1 s+2 1 2 (s + 2s + 1) (s + 2) 1 0 s(s + 2) s 0 [ ] 0 s s2 0 0 1 0 s(s + 1)(s + 1) 1 ] Y (s) s s = = 2 U (s) s(s + 1)(s + 1) s(s + 2s + 1)

Be extremely careful with pole-zero cancelations. Never cancel an unstable pole. Example 21.4 Find the transfer function for the following system 0 1 0 0 c x + 0 u x = a b d 0 f 1 [ ] 1 0 0 x. y = Using the results from Example 19.4 on page 101, the transfer function is Y (s) c = 3 . U (s) s + (b + f )s2 + (bf + a)s + (af cd)

21.1
9

Equivalent State Space Representations

9 Not

nished.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 110

21

STATE SPACE TO TRANSFER FUNCTION: LECTURE 23

March 5, 2014

21.2

Exercises

Exercise 21.1 For [ each of the ] following [ ] state space systems, nd the input to output transfer function: [ ] 3 0 1 0 1 x a) x = x+ u with y = 2 2 0 [ b) x = c) v = 1 0 0 1 ] x+ [ 1 1 ] u with y = [ 1 1 ] x ]

0 1 0 0 0 0 1 v + 0 u 0 1 2 1 0 1 0 0 0 0 1 v + 0 u 0 1 2 1 0 1 0 0 0 0 1 v + 0 u 0 1 2 1

with

0 0

d)

with

0 1

e)

with

1 0

Exercise 21.2 For the state space system in Example 15.4 on p. 72, show that the transfer function from Qi to Q2 is )( ) ( )( 1 1 1 R2 R1 C2 C1 Q2 (s) ( ) ( ). = Qi (s) s+ 1 s+ 1
R1 C1 R2 C2

See also Exercise 19.2 on page 103.

Exercise 21.3 Find the transfer function for each of the following: 1. Exercise 15.8. Give expressions for the undamped natural frequency, the DC gain, and the decay rate. 2. The state space system in Example 25.1 on page 122. 3. The state space system in Example 25.2 on page 123.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 111

March 5, 2014

Domain Generic Electrical Fluid Thermal Translational Rotational

Eort e e, Volt P , Newton/m2 T , Kelvin F , Newton , Newton-m

Momentum p , Volt-s pP , Newton-s/m2 ****** p, Newton-sec. p , Newton-m-s

Flow f i, Amp QV , m3 /sec QH , Joules/sec v , m/s , rad/sec

Displacement q Q, Coul. V , m3 EH , Joules X, m , rad

Power, N-m/sec P , Joules/sec. e(t)i(t) P (t)QV (t) T (t)QH (t) F (t)v (t) (t) (t)

Table 7: Physical analogies between variables in dierent energy domains.

22

Mechanical Systems: Lecture 24

This section discusses both rotational and translational motion of mechanical systems. Both types of systems use the same bond graph modeling methodology, which is distinct from the method used for electrical, uid, and thermal systems. Tables 7 and 8, which were presented in previous lectures, summarize the variable classications and the one port elements. Domain Generic Electrical Fluid Thermal Translational Rotational

R : e = Rf Resistor Resistance Heat transfer Friction Friction

C : q = Ce Capacitor Tank Heat capacity Linear Spring Torsional Spring

I : p = If Inductor Pipe *** Mass Inertia

Se Voltage Source Pressure source Temperature source Force Source Torque Source

Sf Current Source Flow rate source Heat ow source Velocity Source Angular rate source

Table 8: Physical analogies between components in dierent energy domains.

22.1

Velocities

In the analysis of mechanical systems it will be necessary to clearly distinguish between absolute and relative velocities. Absolute velocity is the velocity at which a point moves with respect to an inertial reference frame. Relative velocity is the velocity at which one point moves with respect to another point. An inertial frame is one that for the purpose of the analysis can be considered to be non-accelerating and non-rotating. For an automobile, the analyst might consider the roadway as the frame-of-reference. Although the roadway is attached to the earth, which is rotating and accelerating, for the purpose of the analysis, earths acceleration and rotation might be considered negligible. The velocity of the center of a mass of the car with respect to the roadways inertial frame denes an absolute velocity. The velocity of any point on the body of the car, for example a wheel, with respect to another point on the car denes a relative velocity. Relative velocities are very useful in the analysis of springs and dampers. In Fig. 81, v1 , v2 , and v3 represent absolute velocities.Each absolute velocity denition includes a name and an assumed positive direction. Relative velocities are the dierence between two absolute velocities. The rates of compression and expansion of the spring with constant k 1 2 are, respectively: k vc = v1 v2 and ve = v1 + v2 .

The rates of compression and expansion of the spring with constant h are, respectively: vc = v1 + v3 and ve = v1 v3 .

v1

v3

In applications, the denitions of the (assumed) positive absolute velocities will be imposed by the application, then the relative velocities are computed accordingly. In each application, regardless of the direction of the positive direction of the absolute Figure 81: Relative Vevelocity, the analyst must dene whether they are dening relative velocities to be positive locities when compressing +C or stretching +T . Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 112

22

MECHANICAL SYSTEMS: LECTURE 24

March 5, 2014

+C vC=-v1-v2 v1
d

+C v1

vC=v1-v2
d

v2

v2

+T

vT=v1+v2

+T

vT=-v1+v2

Figure 82: Relative Velocities

22.2

Mechanical: Translation Systems

This section briey introduces the translational 1-ports. R-elements: The force Fb applied to compress a damper is related to the rate of compression vb of the damper by an algebraic equation: Fb (t) = g (vb (t)). For a linear (viscous damper), this simplies to Fb (t) = bvb (t) where b is the coecient of viscous damping in Newtons-s/m. Because dampers have a static relationship between an eort variable and a ow variable, according to Table 8, dampers are R-elements. Dampers are used to model friction between objects in relative motion. Most friction is inherently nonlinear. Fig. 83 shows a few dierent methods of depicting viscous friction in mechanical schematic diagrams. C -elements: The force Fk applied to the two ends of a spring and the relative compression of the ends of the spring Xk are related by 1 Fk (t) = kXk (t) or Xk (t) = Fk (t) k where k is the spring constant in Newtons/m. A spring has a static relationship between a displacement variable and an eort variable; therefore, according to Table 8 springs are C type elements. Note that the capacitance 1 of a spring is Ck = k . I -elements: The velocity vM of and net force F applied to a mass M are related by F (t) = M d vM (t) dt

where M is the inertial mass in kg. In this relation ship, the positive direction of the applied force and positive direction of the velocity are assumed to be in the same direction; otherwise, a negative sign is required in the equation. Integration of this equation yields F (t)dt = = M vM (t) p(t) = M vM (t).

A mass has a static relationship between a momentum variable and a ow variable; therefore, according to Table 8 this is an I type element. The eort source is a force source. The ow source is a velocity source.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 113

22.2

Mechanical: Translation Systems

March 5, 2014

x
Friction with coefficient d

M
xxxxxx

x
No friction

M x M

Friction with coefficient d

Figure 83: Methods for depicting viscous friction in mechanical schematics.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 114

22

MECHANICAL SYSTEMS: LECTURE 24

March 5, 2014

22.3

Mechanical: Rotation Systems

X The torque b applied to the two ends of a linear angular rate damping element is related to the angular velocity dierence b (i.e., ow) between the ends of the damper by:

b (t) = bb (t) where b is the coecient of viscous damping in Newton-m-s/rad. A damper has a static relationship between an eort variable and a ow variable; therefore, according to Table 8 this is an R type element.
X The torque k applied to the two ends of a torsional spring and the relative angular displacement of the ends of the spring k are related by 1 k (t) = kk (t) or k (t) = k (t) k
1 where k is the spring constant in Newtons-m/rad and Ck = k . A torsional spring has a static relationship between a displacement variable and an eort variable; therefore, according to Table 8 this is a C type element.

X The angular velocity J of and net torque applied to an inertia J are related by

(t) = J

d J (t) dt

where J is the rotational inertia in kg m2 . Integration of this equation yields (t)dt = = JJ (t) p (t) = JJ (t).

A mass has a static relationship between a momentum variable and a ow variable; therefore, according to Table 8 this is an I type element.
X The eort source is a torque source. X The ow source is a angular velocity source.

22.4
Explain:

Right hand rule


= R = rF

v Need gures.10
10 Unnished

(48) (49)

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 115

March 5, 2014

23

Bond Graph modelingMechanical Systems: Lecture 25

For both translational and rotational systems, the following procedure facilitates the derivation of a state space model.

23.1

Mechanical Modeling Procedure


(a) Dene positive absolute velocities. (b) Dene sign convention for R & C -elements (Tension or Compression) (c) Dene zero absolute velocity.

1. Assign a power convention to schematic.

2. Use 1-junctions to represent each distinct point with a well-dened absolute velocity. (a) Attach I -elements to 1-junctions that have inertia (b) Attach sources as necessary to 1-junctions. (c) Use a 1-junction to establish the zero absolute velocity. (d) Add half-arrows. 3. Add 0-junctions between 1-junctions as necessary to dene relative velocities. (a) Do not add half-arrows yet. 4. Add R and C -elements. (a) Power is entering. (b) Use 1-junctions for R and C -elements acting between the same points (summed eorts are in series). 5. Add half-arrows to 0-junctions from Step 3. (a) Relative velocity must be dened consistent with the power convention assumed in Step 1b (i.e., Tension or Compression). (b) Be careful here. This step is the key. 6. Eliminate zero power bonds. 7. Simplify. 8. Apply causality and walk variables through graph. 9. Write state space model.

24
24.1

Bond Graph modeling Translation Examples: Lecture 26-27


Sign convention examples

Step 1b of the procedure described above often initially causes confusion. This section derives the state space model for a simple physical system by two dierent methods. The only dierence is the assumed sign convention. In the nal comparisons, the state space models are dierent; however the input-output behavior as described by the transfer functions are identical.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 116

24

BOND GRAPH MODELING TRANSLATION EXAMPLES: LECTURE 26-27

March 5, 2014

Example 24.1 In this version of the example, the Application of the element dening equations at each en+T or tension sign convention is assumed. This means ergy storage device yields the following ODEs: that the force applied to the elements while they are At I : mv 1 = F Fk dv1 stretched is considered to be positive. The rate of stretch 1 of the spring and damper is vT = v1 v0 . At C : F k = v1 k For this example, the output is the velocity of the mass: y (t) = v1 (t). Solving for the state variable derivatives yields:

v0=0
k d

v1 M

+T F

v 1 k F

1 1 d F F k v1 m m m = kv1 =

Theerefore, the state-space ODE is x 1 1 1 d F x2 x1 m m m = kx1 =

Sf:0

v0

v1

I:m

x 2

Se:F

Sf:0

v0

v0

v1

v1

I:m

vT=v1-v0

which can be written in matrix form as [ ] [ 1 ] d 1 m m x = x+ m F 0 k 0 [ ] 1 0 y = x. The resulting transfer function is Y (s) s = . F (s) ms2 + ds + k If a second output of interest is the displacement of the 1 spring from its equilibrium position, p1 (t) = k Fk , then the readers should be able to derive that The resulting transfer function is P1 (s) 1 = . F (s) ms2 + ds + k

Se:F

Sf:0

v1

1
R:d

v1

I:m

vT=v1-v0

C:1/k

Fk vT 1 vT

Se:F

I:m
F-(Fk+dv1) v1 F dv C:1/k v k 1 v 1 1 1 F v1 Se:F

R:d

Figure 84: Translation Example 24.1: In Tension. Fig. 84 shows the steps in drawing and simplifying the bond graph for the translational system shown in the upper left. The second to last portion of the simplication is not obvious. The spring and damper act between the same two locations (the wall and the mass). Each element could be modeled separately as in the bond graph on the left side of Exercise 9.1 on the page 41. Exercise 9.1 shows that that bond graph can be equivalently represented as shown here. A valid denition of the state vector is [ ] v1 x = Fk Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 117

24.1

Sign convention examples

March 5, 2014

Example 24.2 In this version of the example, the The state vector is dened as [ ] +C or compression sign convention is assumed. This v1 means that the force applied to the elements while they x = fC are compressed is considered to be positive. The rate of compression of the spring and damper is vC = v0 v1 . Application of the element dening equations at each energy storage device yields the following ODEs: v2=0 +C v1 At I : mv 1 = F + fC dv1 k 1 F M d At C : fC = v1 . k

Sf:0

v0

v1

Solving for the state variable derivatives yields:

I:m
v 1 fC
v1

Se:F

1 1 d F f C v1 m m m = kv1 . =

Sf:0

v0

v0

v1

I:m

Therefore, the state-space ODE is x 1 1 1 d F + x2 x1 m m m = kx1 =

vC=v0-v1

Se:F

Sf:0

v0

v0

v1

v1

I:m

x 2

vC=v0-v1

C:1/k

fC vC 1 vC

Se:F R:d

which can be written in matrix form as ] [ 1 ] [ 1 d m m x+ m F x = 0 k 0 [ ] 1 0 x y =


I:m

f -dv1 F+fC-dv1 0C 1 v1 v1 fC-dv1 -v1 Se:F fC -dv C:1/k -v 1 -v1 R:d 1 1

The resulting transfer function is Y (s) s = . 2 F (s) ms + ds + k

Figure 85: Translation Example 1: Compression.

Note that in the nal bond graph, the remaining 0Dierent denitions of the state result in dierent, junction cannot be removed and inserts a negative sign but equivalent, state models. The state space models in the equations. are equivalent in the sense that the have the same inputoutput response (i.e., transfer function).

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 118

24

BOND GRAPH MODELING TRANSLATION EXAMPLES: LECTURE 26-27

March 5, 2014

Example 24.3 This example considers a massless junction with output y = p2 .

+T
h
v 1

v0=0

1
v 0 v1 - v0

Sf:0

0 1
v1 v1 v 2

M
Mg

v2

v2 - v1

0 1

I:M

v2

Se:Mg
F -F 2 1 d

1 C:1/h
v0 v -v 1 0

v0

Sf:0
F1 v1

v1 =

R:d
F2-F1 v1

C:1/h
F2 v - v 2 1 F2 v1

0 1 0 1
v1

R:d C:1/k 1
v2 - v1 v2

C:1/k

0
F 2 v2

v1 v2

I:M

Se:Mg

I:M

Mg-F2 v 2

Mg v2 Se:Mg

Figure 86: Translation Example 2.

Fig. 86 shows the steps in following the standard method. A valid denition of the state is x = [F1 , F2 , v2 ] . The element ODEs are: 1 1 = d (F2 F1 ) k F1 1 1 F = v 2 d (F2 F1 ) h 2 Mv 2 = F2 + M g The state space model in matrix form is x y = = [ k d
h d k d h d 1 M 1 h

0
1 k

0 0 h x + 0 g 0 ] 0 x.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 119

24.2

Exercises

March 5, 2014

24.2

Exercises

Exercise 24.1 For the translational system shown in Fig. 87, assume that the input u(t) is an applied force. 1. Draw the simplied bond graph for the system. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Dene the state space model.

Exercise 24.3 For the translational system shown in Fig. 89, assume that the input u(t) is an applied force. 1. Draw the simplied bond graph for the system. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Dene the state space model.

v1(t)
h b1

v2(t)
b

v1(t)
k h

v2(t) m2
xxxxxxx

m1
xxxxxxx

m2
xxxxxxx

b2

u(t)

m1
xxxxxxx

b2

u(t)

Figure 89: Mechanical schematic diagram for translaFigure 87: Mechanical schematic diagram for transla- tional Exercise 24.3. tional Exercise 24.1. Note that the damper between the masses represents friction in the mechanism interconnecting the two masses. This viscous friction should be proportional to the rela- Exercise 24.4 For the translational system shown in tive velocity between the masses. The cross-hatching un- Fig. 90, assume that the input u(t) is an applied force. derneath each mass represents friction between the mass 1. Draw the simplied bond graph for the system. and the xed reference frame. 2. Propagate the causality, inputs, and state variables through the bond graph. Exercise 24.2 For the translational system shown in 3. Dene the state space model. Fig. 88, assume that the input u(t) is an applied force. 1. Draw the simplied bond graph for the system. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Dene the state space model.
v3(t) v1(t) v2(t)

m1
xxxxxxx

m2
xxxxxxx

b2

u(t)

v1(t)
b2 b1

Figure 90: Mechanical schematic diagram for translational Exercise 24.4.

m1
xxxxxxx

v2(t) u(t)

m2

xxxx xxx x x xxxx x x xxx

Figure 88: Mechanical schematic diagram for translational Exercise 24.2. The cross-hatching between the two masses represents friction between them and should be proportional to their relative velocity. The cross-hatching underneath the bottom mass represents friction between the mass and the xed reference frame. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 120

24

BOND GRAPH MODELING TRANSLATION EXAMPLES: LECTURE 26-27

March 5, 2014

Exercise 24.5 For the translational system shown in Fig. 91, assume that the inputs u1 (t) and u2 (t) are forces applied at the indicated locations. 1. Draw the simplied bond graph for the system. See Exercise 9.9. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Dene the state space model.

p(t)
k d

u(t)
A

Figure 92: Mechanical schematic diagram for translational Exercises 24.7 and 24.8. 3. Dene the state space model.

v1(t) u1(t)
d

v2(t) M
b

u2(t)

4. Find the transfer function from the applied force u(t) to the displacement p(t) of the mass M .

Figure 91: Mechanical schematic diagram for translational Exercises 24.5 and 24.6. Exercise 24.6 For the translational system shown in Fig. 91, assume that the inputs u1 (t) and u2 (t) are velocities applied at the indicated locations. 1. Draw the simplied bond graph for the system. See Exercise 9.9. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Dene the state space model.

Exercise 24.7 For the translational system shown in Fig. 92, assume that the input u(t) is a velocity applied at the point labeled A. 1. Draw the simplied bond graph for the system. See Exercise 9.10. 2. Propagate the causality, inputs, and state variables through the bond graph. 3. Dene the state space model.

Exercise 24.8 For the translational system shown in Fig. 92, assume that the input u(t) is a force applied at point A. 1. Draw the simplied bond graph for the system. See Exercise 18.1. 2. Propagate the causality, inputs, and state variables through the bond graph. Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 121

March 5, 2014

25

Bond Graph modeling Rotation Examples: Lecture 27-28

The modeling procedure is the same as for translational systems. See page 116. Example 25.1 The schematic in Fig. 93 shows a rotational system. The torque is applied to a rotational inertia at one end of a shaft. The twist of the shaft transmits a torque to the opposite end of the shaft, which causes the inertia J2 to rotate. There is viscous friction between the shaft and a housing. The output is the shaft twist: y (t) = 2 (t) 1 (t).

+T t w0

w1
k J1 d1 d2

w2
J2

Sf:0 R:d1 I:J1

0 1
1

C:1/k 0

0 1
2

R:d2 I:J2

Se:t R:d1 R:d2

I:J1

d1w1 w1 d2w2 w2 t+ts-d1w1 -t -d w ts 0 ts 1 s 2 2 w1 1 w1 w2 w2 t w -w t w1 s 2 1 Se:t C:1/k

I:J2

Figure 93: Top: Schematic diagram for rotational Example 25.1. Middle: BG at the end of Step 5b (see p. 116). Bottom: Complete BG. The middle section of Fig. 93 shows the bond graph for the mechanical system at the completion of the modeling procedure that is specic to mechanical systems. The bottom section shows the completed bond graph. A valid denition of the state vector is [ ] 1 s 2 x = . Application of the element dening equations at each energy storage device yields the following ODEs: At I : At C : At C : J1 1 1 s k J2 2 = d1 1 + s + = 2 1 = s d2 2

Therefore, the state-space model can be written in matrix form as d1 1 1 J1 0 J1 J1 0 k x + 0 x = k d2 1 0 0 J J 2 2 ] [ 1 0 x. 0 y = k

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 122

25

BOND GRAPH MODELING ROTATION EXAMPLES: LECTURE 27-28

March 5, 2014

Example 25.2 The schematic in Fig. 94 shows the ECP torsional system which contains two rotational inertias mounted on a shaft such that there is no translational motion, but each inertial can rotate around the vertical axis. The twist in the shaft between J1 and the frame is modeled as a spring. The twist of the shaft between J1 and J2 is also modeled as a spring. A motor attached at J2 cn apply a torque . Finally, there is viscous friction between each disk and the frame at the points of support. The output is the angle of each disk: y (t) = [1 (t), 2 (t)] .
C:1/k 0 1 0 I:J1 C:1/h b J2 1
1

R:d 1
0

+T
J1

Sf:0

k d

w1
h 0 1
2

w2

I:J2

R:d Se:t dw 1 w 1 t -t -dw1 tk C:1/k 1 I:J1 h wk 1 t w w1 h 1 th C:1/h w -w 0 2 1t w h 2 t-th-bw2 bw 2 I:J2 1 w2 R:b w2 t w2 Se:t

R:b

Figure 94: Top left: Schematic diagram for ECP torsional plant in Example 25.2. Top right: BG at the end of Step 5b (see p. 116). Bottom: Complete BG. The top right section of Fig. 94 shows the bond graph for the ECP system at the completion of the modeling procedure that is specic to mechanical systems. The bottom section shows the completed bond graph. A valid denition of the state vector is [ ] 1 k h 2 x = . Application of the element dening equations at each energy storage device yields the following ODEs: At I : J1 1 At C : k 1 At C : h At I : J2 J1 1 = d1 k + h 1 s = 1 k 1 2 = 1 2 h J2 2 = h b2 + as 0 x + 0 0 ] x.
1 J2

Therefore, the state-space model can be written in matrix form 1 d 1 J J 0 J1 1 1 k 0 0 0 x = h 0 0 h 1 b 0 0 J J 2 2 [ 1 0 0 0 k y = 1 1 0 0 k h

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 123

25.1

Exercises

March 5, 2014

25.1

Exercises

Exercise 25.1 Find the state space model for the system in Fig. 95.
J1 d

t w1
0

Figure 95: Rotational schematic for Exercise 25.1. 1. As depicted, with a source of torque applied at the left side. 2. With the source of eort replaced by a source of angular rate (i.e., ow).

Exercise 25.2 Find the state space model for the system in Fig. 96.

J1 k

t w2 w1
0

Figure 96: Rotational schematic for Exercise 25.2. 1. As depicted, with a source of torque applied at the left side. 2. With the source of eort replaced by a source of angular rate (i.e., ow). In this exercise, there is no inertia at the point marked with angular rate 2 . Exercise 25.3 Fig. 97 shows a clutch plate system where friction between J1 and J2 is used to transmit power (and angular motion). The motion only involves rotation, no translation. Find the state space model for the system.
w1
J1 d h

t
J2 J3

w2

w3

Figure 97: Rotational schematic for Exercise 25.3.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 124

26

MECHANICAL COUPLING SLIP OR NO SLIP: LECTURE 29

March 5, 2014

26

Mechanical Coupling Slip or No slip: Lecture 29

There are two ways to model the interconnections between mechanical systems. These are referred to as slip and no slip. Slip: In this modeling scenario, two surfaces move relative to each other each with dierent velocities at the point of contact. The dierent relative velocities result in a friction force that is applied equal on both surfaces in opposite directions. No slip: In this modeling scenario, a constraint force ensures the constraint that the relative velocity at the point of contact is always zero. This contact force is applied equally, in opposite directions, to the two surfaces. The no slip modeling approach is applicable to chains and gears. It is also sometimes used in situations where the friction is large enough to motivate the no-slip assumption. Consider the following two examples to motivate the modeling dierences. Example 26.1 Consider the schematic in the top portion of Fig. 98, wherein a (nonstretchable) belt moves relative to rotational inertia J with radius r. The angular rate of the disk is , so the velocity of a point on the edge of the disk has speed vc = R . The gure also shows two bond graphs, one for a source of ow and one for a source of eort. Note that the transformer separates the translational energy domain on the left from the rotational energy domain on the right.
Input: Source of flow R:d Fd v-rw Fd Fd Sf:v 0 v rw
x x

Fd=d(v-rw) TF:r rFd w I:J

x x

Input: Source of effort vc=F/d R:d Se:F F vc F F 0 vc-rw rw TF:r rF w I:J

Figure 98: Schematic for Example 26.1. First consider the case where the input is a source of velocity. The state space model is J = rd(v r ). The corresponding transfer function is (s) rd = . V (s) Js + dr2 Next consider the case where the input is a source of force. The state space model is J = rF. The corresponding transfer function is (s) r = . F (s) Js

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 125

March 5, 2014

Example 26.2 Consider the schematic in the left portion of Fig. 99, wherein a (nonstretchable) belt moves relative to rotational inertia J with radius r. Due to the no-slip constrain, v = r . The gure also shows two bond graphs, one for a source of ow and one for a source of eort. Note that the transformer separates the translational energy domain on the left from the rotational energy domain on the right.
Input: Source of flow

No slip

x x x x

J r

Sf:v v

(J/r2)v (J/r)v TF:r I:J v v/r

Input: Source of effort Se:F F rw TF:r rF w I:J

Figure 99: Schematic for Example 26.1. First consider the case where the input is a source of velocity. In the corresponding bond graph, the I -element has derivative causality. Because the number of energy storage devices with integral causality is zero, there are no states. The corresponding transfer function is 1 (s) = . V (s) r Next consider the case where the input is a source of force. The state space model is J = rF. The corresponding transfer function is (s) r = . F (s) Js Comparison of Examples 26.1 and 26.2 shows that the type of input and choice of assumptions aects the resulting model. The analyst is responsible for ensuring that the assumptions made are applicable to the problem that is of interest. The no-slip assumption can simplify analysis by reducing the order of the system. It also may result in models having derivative causality. The derivative causality can be removed by altering the model assumptions. For example, accounting for stretch of the belt or friction between the disk and belt. Example 26.3 Fig. 100(a) shows the schematic of a mechanical system with two masses and on rotational inertia (pulley). In this example, we consider the case where the cable is a massless and non-stretchable chain. The pulley has teeth that prevent the cable from slipping over the pulley. The simplied bond graph is shown in Fig. 100(b).
v1 F m1 xxxx b J
x

x x

Se:F-m2g
v2

m2 m2g

bv1 F v v1 1 1 R:b I:m2 F1 = -F+m2g-m1v1-Jv1/r2-bv1


(b) Reduced bond graph.

(a) Schematic.

Figure 100: Schematic and bond graph for Example 26.3. Due to the assumptions that the cable cannot stretch and ( ) the cable does not slip, two of the inertias have J derivative causality. The state space model is m1 + m2 + r v 1 = bv1 F + m2 g . 2

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

. .

No slip

x x

vc

I:m1 m1v1 v1 Jv1/r2 Jv1/r F 1 TF:r v1 v1/r I:J v1

p. 126

26

MECHANICAL COUPLING SLIP OR NO SLIP: LECTURE 29

March 5, 2014

26.1

Exercises

Exercise 26.1 Reconsider the mechanical system in Example 26.3. Derive the state space model in matrix form under the following alternative assumptions. 1. The cable cannot stretch, but the cable can slide over the pulley. 2. The cable can stretch, the point vc cannot slide relative to the pulley. 3. The cable can stretch and can slip over the pulley. In both cases 2 and 3, you should consider the cable as having two distinct pieces. The portion between v1 and vc and the portion between vc and v2 . Each can stretch separately.

Exercise 26.2 The schematic in Fig. 101 shows two pulleys connected by a wrap-around belt. Develop the bond

t1 w1 k t2 R2 J2 R1 k
Figure 101: Pulley schematic for Example 26.2. graph and state space model for each of the following scenarios. 1. Consider the belt to be massless, non-stretching, and non-slipping. 2. Consider the belt to be massless and non-slipping, but being stretchable. The coecient k is the same at both indicated locations, but the amount of stretch will be dierent. 3. Consider the belt to have mass, to be capable of stretching, and to be stretchable.

J1

w2

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 127

March 5, 2014

27
27.1

Simple Mixed Systems: Lecture 29


Wheels

This section considers a few models of wheels. Signicantly more involved nonlinear models exist. Fig. 102 shows the schematic and bond graph for a hard wheel that is assumed to not slide at the point of contact with the surface. This example would apply to applications such as a cog railroad. The state space model is ( ) J m+ 2 v c = F. r

I:m r F 0 F-vcJ/r2 vc 2 F 1 vcJ/r TF:r vcJ/r I:J Se:F vc vc vc/r

w No slip

vc J

Figure 102: Schematic and bond graph for a hard wheel on a non-slip surface. Fig. 103 shows the schematic and bond graph for a hard wheel for which the point of contact can slide relative to the surface. This relative velocity is a more realistic situation than no slip for most wheels. The state space model is ( ) J m+ 2 v c = F bvc . r

I:m w b r J 0 F-vcJ/r2-bvc Se:F

vc

vc

v J/r2 F v J/r 1 c TF:r c vc vc vc/r I:J bvc vc R:b

Figure 103: Schematic and bond graph for a hard wheel on a surface allowing slip. Fig. 104 shows the schematic and bond graph for a rubber wheel for which, at the the point-of-contact with the road, the tire can stretch and slide relative to the road surface. This stretching is modeled by a spring and damper, as some energy is lost in the stretching process. The state space model now has three states x = [vc , Fk , ] : b+d 1 1 rd m m m m k 0 kr x + 0 F x = 2 r r d 0 rd J J J
Fk vs dvs vs

C:1/k w b r vc J 0 F I:m

Se:F

Fk-dvs vs=vc-rw F+Fk-dvs-bvc vc Fk-dvs F -dv F 1 k s

R:d

vc

vc

0 rw

TF:r

r(Fk-dvs)

I:J

bvc vc

R:b

Figure 104: Schematic and bond graph for a rubber wheel on a surface allowing slip.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 128

27

SIMPLE MIXED SYSTEMS: LECTURE 29

March 5, 2014

27.2

Electric Water Pump

Modeling of the electrical pump depicted by the schematic in Fig. 105 requires a model coupling the electrical, rotational, and uid energy domains. Figure 106 shows the simplied bond graph labeled with the physical variables
a Lm

+ __

vs

em+ _

Pump

im

wm tm
J
Qp
Pp PT valve

g Rm

Fluid tank

Q1

Infinite Fluid Resevoir

Figure 105: Liquid pump schematic. from the schematic. Candidate state variables are labeled at the energy storage device that would determine their value using integral causality. We should notice that the I : Jp and I : Lp elements are not independent, which will result in one of them having derivative causality. The cause of this issue is that, as modeled, the rate of angular rotation determines the volume ow rate. The derivative causality could be remove by various means, including: modeling the ex of the vanes internal to the pump, modeling leakage past the vanes in the pump, or neglecting one of the two inertias. In this case, we choose to work the model through with the derivative causality. In doing this, we should clearly note our assumptions. Assumption 27.1 The uid leakage past the pump vanes is negligible. Assumption 27.2 The ex of the pump vanes is negligible. The other schematic variables em , m , Pp , and Q1 that are not candidate state variables, but are computable from the input and state variables, are labeled at the appropriate locations.

I:Lm se:vs
vs

R:Dp
K :

R:Rp TF
N Pp

im em

GY
:

tm

1
wm

1 I:Lp

Qp PT

Q1

R:Rv

R:Rm

I:Jp

C:Cf

Figure 106: Liquid pump bond graph labeled with physical variables.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 129

27.2

Electric Water Pump

March 5, 2014

Choosing the state vector to be x = [im , Qp , Pt ] , Fig. 107 shows the bond graph after walking the causality and state variables up to the element that determines their value.
tp=Kim-Dpwm-Jpwm R:Rp I:Lm em=Kwm R:Dp Q1=PT/Rv RpQp Qp Dpwm wm im e P vs tp Ki PT P TF Qp 1 Q 1 i m GY w m 1 w se:vs im 0 QT R:Rv m m p p 1 m K . N Qp PT Rmim im Jpwm wm wm=NQp R:Rm Pp =Ntp I:Lp C:Cf I:Jp :

Figure 107: Liquid Pump bond graph with state variables propagated through. The resulting state space model is Lm x 1 Leq x 2 Cf x 3 = vs Rm x1 KN x2 ( ) = N Kx1 N 2 Dp + Rp x2 x3 1 = x2 x3 , Rv (50) (51) (52)

( ) where Leq = Lp + N 2 Jp . The variables labeled on the schematic can be computed as model outputs: m em m = N x2 = KN x2 (53) (54) (55) (56) (57)

( and p = K 1

Jp N Leq

) x1 +

Jp N (N 2 Dp +Rp ) Leq

= Kx1 1 Q1 = x3 Rv Pp = N p ) ( ) Jp N Dp N x2 + L x3 . eq

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 130

27

SIMPLE MIXED SYSTEMS: LECTURE 29

March 5, 2014

27.3

Exercises

Exercise 27.1 1. Find the transfer function corresponding to Figs. 102 and 103. 2. In Figs. 102, repeat the bond graph analysis in terms of . This will have I : J in integral causality and I : m in derivative causality. Find the state space model and transfer function. Compare with Step 1. 3. In Figs. 103, repeat the bond graph analysis in terms of . This will have I : J in integral causality and I : m in derivative causality. Find the state space model and transfer function. Compare with Step 1.

Exercise 27.2 Derive a bond graph and state space model for the electric water pump system discussed in Section 27.2 for the case where the motor inductance and pipe inertance are suciently small that they can be neglected.

Exercise 27.3 Fig. 108 shows the schematic of a hydraulic dam DC electric power generation system. The net input ow is regulated so that the height of the uid in the reservoir is constant. Therefore, you can assume that the uid reservoir is a constant pressure source. 1. Find the state space model. The generator should be modeled in a manner similar to the approach used for the electric pump in Section 27.2. 2. How would the model change if the ow Qi was considered as the input and the reservoir was modeled as an energy storage device?
Qi

ig + eg Gen.

Lg RL
Q1

PT

Fluid reservoir
Figure 108: DC Voltage Generator.

Exercise 27.4 Fig. 109 depicts a very simple mechanical schematic for a front wheel drive car. The chassis moves parallel to the ground with velocity v (t). The front and back wheel have distinct rotational rates. Each wheel has radius R, rotational inertia as indicated, and can slip relative to the xed ground surface. Consider the attachment of the axles to the chassis to be rigid. The input is an applied torque at the shaft of the front wheel. The output is the velocity v (t) of the chassis. 1. Write the algebraic relation for the slip (relative velocity between the road and the bottom of the wheel) at each wheel. 2. Draw the simplied bond graph for the system. See Exercise 13.4 on p. 62. 3. Propagate the causality, inputs, and state variables through the bond graph. 4. Dene the state space model.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 131

27.3

Exercises

March 5, 2014

wb(t) M Jb

v(t)

wf(t) t(t) Jf

Figure 109: Mechanical schematic diagram for translational Exercise 27.4.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 132

28

STATE SPACE TO CONVOLUTION: INTERESTING LECTURE

March 5, 2014

28

State Space to Convolution: Interesting Lecture

The purpose of this section is to derive the convolution integral from the state-space model. Most texts just give the convolution integral without explanation. Many students have found the following explanation to be enlightening. Starting from the state-space equation for the time derivative of x, x ( t) x (t) Ax(t) At e x (t) eAt Ax(t) ) d ( At e x(t) dt t ) d ( A e x( ) d 0 d ( A )t e x( ) 0 = = = Ax(t) + Bu(t) Bu(t) eAt Bu(t) (58) (59) (60) (61) (62) (63) (64) (65) (66)

= eAt Bu(t) t eA Bu( )d = 0 t eA Bu( )d = 0 t At e x(t) Ix(0) = eA Bu( )d 0 t At At x(t) = e x(0) + e eA Bu( )d 0 t At x(t) = e x(0) + eA(t ) Bu( )d
0

Before going further, the reader should ensure that they know exactly what happened in the transition from one line to the next. If you do not, discuss with your peers or ask in class. Starting from the state-space equation for the output, assuming that D = 0, y ( t) = Substituting eqn. (66) to replace x(t), yields y (t) = Ce x(0) +
0 At t

Cx(t)

(67)

CeA(t ) Bu( )d

(68)

The rst term CeAt x(0) is the output response due to the initial condition. t The second term 0 CeA(t ) Bu( )d is the forced response due to the input u(t). Note that if we dene h(t) = CeAt B, then t y (t) = CeAt x(0) + h(t )u( )d. (69)
0

When the initial conditions are zero (i.e., x(0) = 0), y (t) =
0 t

h(t )u( )d

(70)

which is the convolution integral. It is important to realize that a practicing engineer rarely, if ever, actually computes a convolution integral. Instead, the practicing engineer uses important ideas related to the convolution integral:
X The system response is determined in part by the initial conditions and in part by the applied inputs. X The nature of the response is determined by the poles of the transfer function, which are identical to the eigenvalues of the A matrix. The transfer function zeros also aect the response. X The designer can choose the system parameters, redesign the system, or use feedback control to determine the eigenvalues of A. X When the eigenvalues of A are in the strict left-half-plane (real part less than zero), the system is stable.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 133

March 5, 2014

29

System Design and Analysis: Lecture 30

Once we have derived the model of a dynamic system, we are interested in analyzing the system so that we can select the system parameters to achieve some specied level of performance. The objective of this and the next few lectures is to present a few system design and analysis concepts that are indispensable to system design engineers. As engineers, there are a few dierent types of specications: stability, steady state, and transient.

29.1

Stability Specications

Almost always, the system is desired to be stable. The physical concept of stability and its dierent clarications is exemplied by a ball rolling on a surface subject to gravity, as depicted in Fig. 110. The gure shows three equilibrium points labelled by A, B, and C. Remember that an equilibrium point is a position in state space where the state derivative is zero. The equilibria indicated by B and C are each unstable, since a small disturbance from the

B A C

Figure 110: Physical depiction of the concept of stability. initial condition can cause the system to diverge from that equilibrium. The equilibrium indicated as A is (locally) stable because, assuming that there is friction, if the ball starts near or is slightly disturbed from this equilibrium, it converges back to the equilibrium. For more complicated physical systems it may not be straightforward to determine whether the system is stable by direct inspection of the schematic. In fact, we may be interested in determining the range of parameter values for which a system is stable. In such situations, we will determine the stability properties of the system by analysis of the model of the system. For linear systems, the main condition of the system to be stable is that the poles of the transfer function, or equivalently the eigenvalues of the A matrix, must be strictly in the left half-plane. In all problems in this class, we will consider stability to be a required specication. Example 29.1 The transfer function
2 Y (s) Gn = 2 . (71) 2 U (s) s + 2n s + n has two complex poles located at s = n n 2 1. Therefore, the system is stable as long as > 0 and n > 0.

Example 29.2 A third order system has poles at p1 , p2 , p3 . Therefore, the system characteristic equation must be (s + p1 )(s + p2 )(s + p3 ) = 0 s3 + (p1 + p2 + p3 )s2 + (p1 p2 + p2 p3 + p1 p3 )s + p1 p2 p3 = 0. For the system to be stable, the poles must be in the left half plane, which requires that p1 , p2 , and p3 each be positive. Therefore, if the system is stable, then all the coecients of the characteristic equation will be positive. If any coecient is negative, then the system is not stable. However, the converse is not true; there are (many) examples of unstable systems where all coecients of the characteristic equation are positive. Consider s3 + 0.1s2 + 0.2s + 0.2 = 0.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 134

29

SYSTEM DESIGN AND ANALYSIS: LECTURE 30

March 5, 2014

29.2

Steady State & Transient Specications

When we model systems, we can derive transfer functions from the input to the output. The typical procedure would use the following steps: 1. Draw and label the schematic. 2. Draw and simplify the bond graph. 3. Walk the causality and state variables through the bond graph, then write down the resulting state space model. 4. Use the state space model to derive the transfer function. From the design perspective, all of the above is performed symbolically, since numeric values for the system specic parameters are not yet known. The job of the designer is to analyze the model and select appropriate values for the system specic values to achieve a performance specication. Often the models written in terms of their system specic parameters appear very dierent when, in fact, the structures are very similar. Therefore, it is useful to think in terms of standard forms of models. The following two subsections will introduce the standard forms for rst and second order systems. It is important to note that an n-th order system can always be factored into products of rst and second order transfer functions. Therefore, knowledge of the behavior of rst and second order systems is a rst prerequisite for eective system design. 29.2.1 First Order Systems
1

The standard form for a stable, rst order system transfer function from input u to output y is Y (s) Ga = H (s) = U (s) s+a which has DC gain limt0 H (s) = G and a pole at s = a. The time 1 constant of the system is = |a |. For the system to be stable, the pole must be in the left half plane, which requires a > 0. The unforced (u(t) = 0) or initial condition response is y (t) = Ge
t

exp(-t/t)

0.37

0.14 0.05

x(0) for t 0.

(72)

1.5

2.5

3.5

t/t

For a stable system, the nal value of y for the unforced case is zero. Figure 111: Typical rst order system iniFigure 111 contains an example of a rst order initial condition response tial condition response with illustration of with Gx(0) = 1. Note the importance of the time constant in this plot. time constant. There are two graphical means to determine the time constant from the graph of the initial condition response of a rst order system. 1. In one time constant, y (t) will change 63% of the distance from its initial to its nal value. Therefore, the analyst can simply nd the time at which y ( ) = 0.63y (0).
(t) = G x(0). The line tangent to the graph of y (t) at t = 0 is 2. Corresponding to eqn. (72), y e
t

z (t) = y (0)

y (0) t

which is also sketched in Fig. 111. Note that z (t) = 0 at t = . Therefore, the time constant can be found graphically by drawing a line tangent to the initial condition response and measuring the time between the point of tangency and the intercept with the time axis. The step response (u(t) = 1(t)) is ) ( t t y (t) = Ge x(0) + G 1 e for t 0.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 135

29.2

Steady State & Transient Specications

March 5, 2014

29.2.2

Second Order Systems

Following are a few examples of second order systems. For each example, students should be able to ll in the steps that have been skipped in the modeling procedure dened at the beginning of this section. Example 29.3 Fig. 112 shows a system with state space model [ ] [ ] 0 k 0 x = x + u 1 1 d m m m [ 1 ] 0 x p = k where x = [Fk , v ] . The corresponding transfer function is
1 k P (s) = 2 kdm F (s) s + ms +

k m

(73)

An engineer designing this system would need to select values for the system specic parameters k , m, and d to meet
p
k d

I:M
.. . mp p

C:k

Fk . p

1
. Fd p

F . p

Se:F

R:d

Figure 112: Schematic and bond graph for a simple translational system. a given performance specication. Example 29.4 Fig. 113 shows a system with state space model [ [ 1 1 ] R1 C C x = x+ 1 R2 L [ ] L 0 R2 x y = ] u

1 R1 C

where x = [vc , iL ] . The corresponding transfer function is ( )( ) R2 R1 +R2 R1 +R2 R1 LC Y (s) ( ) . = 1 U (s) s2 + + R2 s + R1 +R2
R1 C L R1 LC

(74)

An engineer designing this system would need to select values for the system specic parameters R1 , R2 , L and C

R1
+ _ u_ +

L C
+ y_

R1

I:L vc-iLR2 iL vc 0 iL 1 vc i1-iL iLR2 iL C R2

R2

u-vc i1 u v Se:u i 1 ic 1 1 i1=(u-vc)/R1

Figure 113: Schematic and bond graph for a simple circuit. to meet a given performance specication. Example 29.5 Fig. 114 shows a system with state space model ] [ 1 ] [ R p L L x+ L u x = p 0 J 0 [ ] 0 1 x y = Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 136

29

SYSTEM DESIGN AND ANALYSIS: LECTURE 30

March 5, 2014

where x = [i, ] . The corresponding transfer function is ( )( ) p 2 1 p L (s) = ( ) ( )2 . U (s) s2 + R s + p


L L

(75)

An engineer designing this system would need to select values for the system specic parameters p, R, and L to meet a given performance specication.
R1 u_
+

L e_
+

R1 i u pw Se:u i 1 i GY u-Ri-pw i I:L Ri ip w I:J

i
+ _

t,w J

t=ip e=pw

Figure 114: Schematic and bond graph for a mixed electrical and rotational system.

Examples 29.329.5 each derived the state space and transfer function models for a second order system. The transfer function models in eqns. (7375) appear very dierent because they are each written in terms of their system specic parameters. However, the structures are in fact very similar. The objective of the remainder of this section is to dene the standard form of a second order system model and motivate its utility. The standard form for the transfer function of a second order system with input u and output y is
2 Y (s) Gn . = 2 2 U (s) s + 2n s + n

(76)

For [0, 1) the system has two complex conjugate poles located at s = jd where d = n = n 1 2 . (77) (78)

The parameters of the standard model have the following physical meanings: G DC Gain, n undamped natural frequency in radians per second, d damped natural frequency in radians per second, damping factor, decay rate. The denitions of the standard model parameters in terms of system specic parameters can be read o by comparing eqn. (76) with the transfer function of the system of interest. Following are three examples of the denition of the standard model parameters in terms of specic system parameters. The reason for doing this is that we can directly relate the standard model parameters to time domain performance specications. Example 29.6 For the system of Example 29.3 with transfer function
1 k P (s) = 2 kdm F (s) s + ms +

k m

(79)

the system specic parameters are related to those of the standard second order transfer function as follows: k d = n = m 2 mk 1 d G= = 2m k where computation of d is left as an exercise.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 137

29.2

Steady State & Transient Specications

March 5, 2014

Example 29.7 For the system of Example 29.4 with transfer function
2 1 2 Y (s) 1 LC ( R1 +R2 R) = R2 1 U (s) s2 + R1 s+ C + L

R +R

R1 +R2 R1 LC

(80)

the system specic parameters are related to those of the standard second order transfer function as follows: ( ) 1 1 R2 R2 1 +R2 = + n = R G= R LC 1 2 R1 C L R1 + R2 where computation of and d is left as an exercise. Example 29.8 For the system of Example 29.5 with transfer function ( )( ) p 2 1 p L (s) = ( ) ( )2 U (s) s2 + R s + p
L L

(81)

the system specic parameters are related to those of the standard second order transfer function as follows: n = 1 = 2 where computation d is left as an exercise. p L ( R 2p 1 G= p = R L )

Mp 1 0.9

1%

0.1 0 Tr Tp Ts

Figure 115: Typical second order system step response with denitions of parameters for time domain specs. The step response of a stable, low pass, unity DC gain, second order system with complex poles is )] [ ( sin(d t) for t 0. y (t) = G 1 et cos(d t) + d Students can derive this result for themselves by use of partial fractions. A typical response is shown in Figure 115 along with some time domain specications of system performance. Tr Rise Time Time to rise from 10% to 90% of nal value. Ts Settling Time Time to settle to and permanently stay within 1% of nal value. Tp Peak Time Time at which the rst peak occurs. Mp Overshoot Amount by which y (Tp ) exceeds its nal value for 0 1. Each of these time domain performance specications directly relates to one of the parameters of the standard second order low pass transfer function: Copyright 2000-2014, J. A. Farrell. All Rights reserved. p. 138

29

SYSTEM DESIGN AND ANALYSIS: LECTURE 30

March 5, 2014

Tr Tp =

1.8 n d

Ts =

4.6

Mp = exp

1 2

) for 0 1.

When performance is specied in the time domain by the shape of the step response, the designer can 1. translate the time domain specications into constraints on n , d , , and Mp ; 2. if possible, select pole locations that satisfy these constraints; 3. dene the corresponding characteristic equations; and 4. if possible, select the system specic parameters to achieve this characteristic equation. Note that two of the steps have been introduced with the phrase if possible. It is possible either for a set of time domain specications to be impossible or for a desired transfer function to be unattainable by a given physical system. When the designer encounters either of these situations, the designer must either renegotiate the specication or redesign the physical system. Following are a few examples that transform time domain specications into desired transfer functions. Example 29.9 If a system is specied to be stable, with unity DC gain, and the transient specication is Tp = s and Tr = 0.9s, then rad rad 1.8 = 2.0 and d = = 1.0 . n Tr s Tp s Therefore, using eqn. (78), we have 1 = 2 1 2 0.25 = 1 2 = 0.75 = 0.866 and = n = (0.866)(2) = 1.73. Therefore, the desired pole locations are s = 1.73 j 1.0. This yields the following desired transfer function 4 . s2 + 3.46s + 4 Based on a damping factor of = 0.866 we expect the overshoot to be almost imperceptible at Mp = 0.004(0.4%). Students are encouraged to simulate the step response of the system to verify that this transfer function does achieve the specication. Example 29.10 If a system is specied to be stable, with a DC gain of 5.0, and the transient specication is Tp 0.03 s with a 5% overshoot, then rad d = = 105 . 0.03 s Solving for with Mp = 0.05 yields = 0.69. We can now compute n = 145 1 2 = n = 100 = d

Therefore, the desired pole locations are s = 100 j 105. This yields the following desired transfer function 104690 . s2 + 200s + 20940 Students are encouraged to simulate the step response of the system to verify that this transfer function does achieve the specication. Often, the specications are given in terms of inequalities instead of equalities. The solution method is similar as shown in the following examples.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 139

29.2

Steady State & Transient Specications

March 5, 2014

Example 29.11 If a system is specied to be stable, with a DC gain of 0.5, and the transient specications 1 < Ts < 5, Tp 1.0 s and overshoot less than 5%, then we will have one equality and two inequality constraints. First, Tp d Second, Mp Finally, 1 Ts 5 < 0.05 > 0.69. 1.0 = = 3.14. 1.0

.6 1 4 5 4.6 5 4.6 5

which states that the real part of the pole location Re(p) = must satisfy Re(p) [4.60, 0.92].
Im s= 3.14j Re s=-3.14j

s=-4.6 s=-1.0

Figure 116: Constraints on the pole locations. To keep track of the constraints, it is often convenient to sketch the regions in the complex plane and then select the poles from the specied region. In Fig. 116, the complex conjugate pair of poles must be on the lines s = j to satisfy the peak time constraint, must be to the left of dashed dotted lines to satisfy the overshoot constraint, and the real part of the pole must be between the two dotted lines to satisfy the settling time constraints. The poles s = 4 j satisfy all three constraints. Therefore, a transfer function satisfying all three constraints is 12.94 . s2 + 8.00s + 25.87 Each of the above examples has specied a transfer function that achieves the time domain specication. The student should go back to the transfer functions in Examples 29.329.5 and, when possible, select the system specic parameters to achieve the specied transfer function. 29.2.3
11
11 Not

Higher Order Systems

Finished

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 140

29

SYSTEM DESIGN AND ANALYSIS: LECTURE 30

March 5, 2014

29.3

Exercises
[ ] x+ [ ] u

Exercise 29.1 For the state space system x = y = 0 1 a b [ ] 1 0 x 0 1

1. Find the transfer function from U (s) to Y (s). 2. Express each of the following as a function of the model parameters (a and b): DC gain, n , d , , and .

Exercise 29.2 For the electric water pump system discussed in Section 27.2 on p. 129, for the case where the motor inductance and pipe inertance are suciently small that they can be neglected, and the valve Rv is closed: 1. Derive the state space model with input vs and output PT . 2. Find the transfer function for the system. 3. Find expressions for n , , d , and as a function of the physical parameters. 4. Find an expression for the steady-state output when the input voltage is held constant.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 141

March 5, 2014

30

Extra Lecture - Diagram Models (w/ Simulink)

There are also various types of visual signal-ow models: Schematic Diagram: An illustration of the physical construction of a system.
X Useful for denition of sign convention. X Connections between subsystems transport power through eort and ow variables.

Each connection forces equality of one eort and one ow One subsystem determines the eort. The other determines the ow.
X The power ow is bidirectional. Discuss power ow in gure.
F is 1 N for t [0,5] 0.4 P 0.3 0.2 Power, Watts 0.1 0 0.1 0.2 P P P
k d M F

x
k d

0.3 0.4 0 2 4 Time, t, s 6 8 10

Figure 117: Schematic diagram of a mass, spring, damper system. Block diagram: A logical illustration of the decomposition of a system into subsystems, each of which is represented by a block containing a mathematical expression relating the block outputs to the block inputs.

F(s)

1 Ms2+ds+k

X(s)

Figure 118: Block diagram for a mass, spring, damper system.


X Arrows indicate how the system inputs and block outputs aect inputs to other blocks. X The arrows represent information ow, not physical ow. X The information ow is unidirectional. X Block diagram to state space is straightforward. X Block (subsystem) models must be determined by other means. X Useful for nding model of a system composed of several subsystems. X The analyst must be careful to consider loading eects. Fig. 119 shows two circuit schematics to illustrate the loading issue. The triangle in the circuit on the right represents a unity gain voltage amplier with very high input impedance. Before either circuit is 1 connected, the transfer function from u1 to y1 is G1 (s) = R+ sC and the transfer function from u2 to 1 y2 is G2 (s) = sL . When connections are made at the terminals indicated by the black dots such that y1 (t) = u2 (t), then the circuit on the left has the transfer function

GL (s) = Copyright

1 = G1 (s)G2 (s) RLCs2 + Ls + R p. 142

2000-2014, J. A. Farrell. All Rights reserved.

30

EXTRA LECTURE - DIAGRAM MODELS (W/ SIMULINK)

March 5, 2014

while the circuit on the right has the transfer function GR (s) = G1 (s)G2 (s) = 1 . (R + sC )sL

The transfer function for the circuit on the left is not the product of G1 and G2 because the derivation of G1 assumes that the current i1 is zero. This assumption is false once the two sub-circuits on the left are connected. The high input impedance of the amplier in the circuit on the right maintains the correctness of this assumption even after the sub-circuits are connected.
R u1
+ _

i1 C ic + + y1 u2 L iL=y2 u1
+ _

R iR C ic + + + vc y1 u2

iR

- -

L iL=y2

Figure 119: Loading example. Signal Flow: A special form of block diagram composed only of basic components: integrators, sources, summers, gains, delays, etc.
X This is a model representation, but model equations must still be found by other methods. X Signal ow to state space is easy. X The variables output by the integrator blocks dene a valid state vector. X Illustrate signal ow diagram for a state space model. X Simulink (part of Matlab) is a signal ow or block diagram simulation language.

F(t)

.. . x(t) 1 x(t) 1 x(t) + s s -d -k

Figure 120: Signal ow diagram for a mass, spring, damper system.

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 143

March 5, 2014

Bond graph: A diagram showing the power ow between the subsystems that compose a system.
X Components: R, L, C , 1, Se . The parameter is dened after the colon. X Port: Dened by each unique pair of eort and ow variables. X Bonds: Connect the ports of dierent components

represent the ow of power labeled with eort and ow dening power ow


X Half arrow: Denes sign convention for assumed positive power ow. X Causal stroke: Denes which component connected to the bond is determining (outputting) the ow variable.

I:M
.. . mx x

C:k

Fk . x

1
. Fd x

F . x

Se:F

R:d
Figure 121: Bond Graph for a mass, spring, damper system. Our main interest will be on the construction of state space models using bond graphs as a means to unify ideas from various energy domains. We will used schematics to dene variables and sign conventions. We will use block diagrams in Simulink for simulation implementation. examples

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 144

REFERENCES

March 5, 2014

References
[1] Wolfgang Borutzky, Bond Graph Methodology: Development and Analysis of Multidisciplinary Dynamic System Models, Springer, 2010. (Note: This text is available online as a downloadable pdf. However, the notation that it uses is slightly dierent than the standard notation that I try to follow in class.) [2] Dean C. Karnopp, Donald L. Margolis, Ronald C. Rosenberg, System Dynamics: Modeling and Simulation of Mechatronic Systems, John Wiley, 2006. (Note: This text establishes the standard notation that I try to follow in class.) [3] L. Ljung, T. Glad, Modeling of Dynamic Systems, Prentice-Hall, 1994. (Note: The notation that this book uses is slightly dierent than the standard notation that I try to follow in class.) [4] N. H. McClamroch, State models of dynamic systems : a case study approach, Springer-Verlag, c1980. [5] Shearer, Kulakowski, and Gardner, Dynamic Modeling and Control of Engineering Systems [6] R. L. Woods and K. L. Lawrence, Modeling and Simulation of Dynamic Systems [7] Vu and Esfandiara, Dynamic Systems: Modeling and Analysis [8] Close, Frederick, and Newell, Modeling and Analysis of Dynamic Systems,John Wiley and Sons

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 145

March 5, 2014

Vector & Matrix Review

This is a review of basic ideas from linear algebra. If you nd types or errors, suggestions for improvements, or would like to see additional items reviewed, please let me know.

A.1

Denitions

A matrix A nm is a tabular arrangement of real numbers with n rows and m columns. An example for n = 2 and m = 3 is [ ] 0.20 0.00 3.14 A= . 1.71 0.00 2.00 Sometimes it is necessary to name the elements of a matrix individually. In this case, we state that A = [aij ] for i = 1, . . . , n and j = 1, . . . , m. For example in the above example, a2,3 = 2.00. We will treat a vector as a special matrix that only has one column. For example, 0.00 v = 2.00 7.14 is an example of a vector in 3 . When we want to refer to the component in the i-th row of the vector v , we use the notation vi instead of vi1 .

A.2

Matrix and Vector Operations

There are several operations that facilitate system modeling. The transpose operation, which is indicated by a subscript , simply exchanges the rows and columns of a matrix. Therefore, for B = [bij ] nm , B = [bji ] mn . Two examples may clarify this operation. First, 0.20 1.71 0.00 A = 0.00 3.14 2.00 [ ] 32 is a matrix in . Second, v = 0.00 2.00 7.14 is a matrix in 13 which is often referred to as a row vector. The addition of matrices is straightforward and is dened componentwise. When we say that C = A + B for A, B, C nm we mean that cij = aij + bij for i [1, n] and j [1, m]. In order to add two matrices, their dimensions must be identical. Therefore, with the matrices given previously A and v cannot be added. Subtraction of matrices is dened similarly. If we dene 1.00 1.71 B = 0.03 2.00 0.14 2.14 then A and B cannot be added or subtracted, but 1.20 0.00 A + B = 0.03 2.00 . 3.00 6.14

Matrix multiplication is particularly important. When A nm and B mp , then their product m n p C = AB is dened as cij = k=1 aik bkj . Note that the number of columns in A and the number of rows in B , referred to as the inner dimension of the product, must be identical; otherwise the two matrices cannot be multiplied. Using the vectors and matrices dened above, you should be able to show the following: [ ] 9.2200 12.6576 AB = 4.2900 5.3559 A B Av Bv Bv Copyright = not a valid operation [ ] 22.4196 = 14.2800 [ ] 21.3600 = 25.5596 = not a valid operation p. 146

2000-2014, J. A. Farrell. All Rights reserved.

A VECTOR & MATRIX REVIEW

March 5, 2014

both by hand and in Matlab. Also, you should get comfortable with writing systems of linear equations in matrix notation. Using the above denitions, you should be able to show the following equivalences: 1. A summation can be written as a matrix product:
n

x1 . ai xi = [a1 , . . . , an ] . . i=1 xn

2. A set of linear equations can be written in matrix format. For example, 4 = 23x 4y 8s 8 = 42s + 15t + 16x 15 = 23s 23t 16 = 42y 8s is equivalent to 4 8 8 42 15 = 23 16 8 0 23 15 16 23 0 0 0 4 s t 0 0 x 42 y .

Equations of this form are easily solvable in programs like Matlab using matrix algebra. 3. A set of rst order ODEs can be conveniently written in matrix form. For example, v y z is equivalent to = 23v 4y 8z = 42z + 15y + 16v = 42y 8z

v 23 4 8 v y = 16 15 42 y . z 0 42 8 z

This has the standard form x = Ax where x = [v, y, z ] and 23 4 8 A = 16 15 42 . 0 42 8 Please ensure that you are comfortable with the above ideas. EE105 does use basic linear algebra. In Matlab there is a special matrix operation .* for element-by-element multiplication dened for matrices with the same dimensions. This means that for general matrices A, B, C nm , the operation C = A . B is computed as cij = aij bij . Using the specic matrices [ ] 1.00 1.71 0.20 0.00 3.14 A= and B = 0.03 2.00 , 1.71 0.00 2.00 0.14 2.14 the product C = A . B does not compute, due to the dierent dimensions. The product 0.20 1.71 1.00 1.71 0.20 1.00 1.71 1.71 0.00 . 0.03 2.00 = 0.00 0.03 0.00 2.00 . C = A . B == 0.00 3.14 2.00 0.14 2.14 3.14 0.14 2.00 2.14

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 147

A.3

Exercises

March 5, 2014

A.3

Exercises
a) A B c) A. B e) A + B [ b) B A d) B. A f) A

Exercise A.1 By hand (no electronics), compute the following:

where A =

1 1

2 4

] and B =

2 4 1 1

] .

Copyright

2000-2014, J. A. Farrell. All Rights reserved.

p. 148

Index
Biot number, 82 Bond graph to state space model, 36 Bulk modulus, 68 causality, 11 Causality propagation, 36 Characteristic equation, 104 Continuity equation, 68 Convolution integral, 133 Determinant, 98 Eigenvalues, 104 Exponential, matrix, 107 Exponential, scalar, 107 Heat capacity, 82 Matrix, Matrix, Matrix, Matrix, Matrix, identity, 99 inverse, 99 nonsingular, 98 Similarity, 106 singular, 98

Not nished, 106, 115, 140 Not nished., 110 Power supply, 63 Response, Forced, 133 Response, Initial Condition, 133 State space model, from bond graph, 36

149

Вам также может понравиться