-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
1/289
2.141 Fall 2002Modeling and Simulation of DynamicSystems
Volume III
Neville Hogan
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
2/289
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
3/289
2.141 Fall 2002Modeling and Simulation of DynamicSystems
Neville Hogan
MIT OpenCourseWareCambridge, MAhttp://ocw.mit.edu/
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
4/289
2006 Massachusetts Institute of Technology
The material in this book is provided under a Creative Commons license that grantsyou certain privileges to use, copy, or adapt the contents for non-commercialeducational purposes as long as you give credit to MIT OpenCourseWare and to thefaculty author, and you make any derivative works freely and openly available toothers under the same terms as our license. Please refer to the full text of thelicense and other notices at the back of this book.
Printed and bound in the United States of America.
MIT OpenCourseWareBuilding 9-213
77 Massachusetts AvenueCambridge, MA 02139-4307USA
ISBN
2006XXXXXX
10 9 8 7 6 5 4 3 2 1
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
5/289
What is MIT OpenCourseWare?
MIT OpenCourseWare (OCW) is a remarkable story of an institution rallying aroundan ideal, and then delivering on the promise of that ideal. It is an ideal that flowsfrom the MIT Faculty's passionate belief in the MIT mission, based on the conviction
that the open dissemination of knowledge and information can open new doors tothe powerful benefits of education for humanity around the world.
Available online at http://ocw.mit.edu, MIT OCW makes the MIT Faculty's coursematerials used in the teaching of almost all of MIT's undergraduate and graduatesubjects available on the Web, free of charge, to any user anywhere in the world.MIT OCW is a large-scale, Web-based publication of educational materials.
With 1300 courses now available, MIT OCW delivers on the promise of open sharingof knowledge.
Educators around the globe are encouraged to utilize the materials forcurriculum development;
Self-learners and students may draw upon the materials for self-study or
supplementary use.
Course materials contained on the MIT OCW Web site may be used, copied,distributed, translated, and modified by anyone, anywhere in the world. All that isrequired of adopters of the materials is that the use be non-commercial, that theoriginal MIT faculty authors receive attribution if the materials are republished orreposted online, and that adapters openly share the materials in the same manner asOCW.
MIT OCW differs from other Web-based education offerings: It is free and open; It offers a unique depth and breadth of content; and,
It takes an institutional approach to online course publication.
MIT OCW is not a distance-learning initiative. Distance learning involves the activeexchange of information between faculty and students, with the goal of obtainingsome form of a credential. Increasingly, distance learning is also limited to thosewilling and able to pay for materials or course delivery. MIT OCW is not meant toreplace degree-granting higher education or for-credit courses. Rather, the goal is toprovide the content that supports an education, for use by educators, students, andself-learners to supplement their teaching and learning activities.
Truly a global initiative, the MIT OCW site has received users from more than 215countries, territories, and city-states since the launch of the MIT OCW pilot site onSeptember 30, 2002. Materials have already been translated into at least 10
different languages.
MIT is committed to this project remaining free and openly available. MIT OCW is not
a degree-granting initiative, and there will not be a registration process required for
users to view course materials now, or in the future.
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
6/289
Contents
Highlights of this Course ...................................................................... 1
Course Description.............................................................................. 1
Syllabus ............................................................................................ 2
Calendar............................................................................................ 4
Lecture Notes..................................................................................... 8
Assignments .................................................................................... 11
Assignment 3: Gas-charged Accumulator, Solution andCommentary
Assignment 4: Control through Singularities, Solution andCommentaryAssignment 5: Simple Convection and Throttling, Solution andCommentary
Projects ........................................................................................... 75
Suggested Term Project Topics
Sample Student Projects
Study Materials................................................................................135
Introductory Modeling NotesOld Quiz for Study
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
7/289
Highlights of this Course
This course features an extensive collection of lecture notesplus background study materials on modeling.
Course Description
This course deals with modeling multi-domain engineering systems ata level of detail suitable for design and control system implementation.Topics covered include network representation, state-space models;multi-port energy storage and dissipation, Legendre transforms,
nonlinear mechanics, transformation theory, Lagrangian andHamiltonian forms and control-relevant properties. Applicationexamples may include electro-mechanical transducers, mechanisms,electronics, fluid and thermal systems, compressible flow, chemicalprocesses, diffusion, and wave transmission.
Course Meeting TimesLectures:
Two sessions / week1.5 hours / session
LevelGraduate
This bond graph models the free-flight and contact behaviors of a ball bouncing off ofa another ball. (Image courtesy of Prof. Neville Hogan.)
1
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
8/289
Syllabus
Prerequisites
2.151 or equivalent exposure to physical system modeling -- see meto clarify.
Textbook
Required
Brown, Forbes T. Engineering System Dynamics.New York: MarcelDekker, Inc., 2001. ISBN: 0824706161.
Course Description
This course is aboutModeling multi-domain engineering systems ata level of detail suitable for design and control system implementation.It also describesNetwork representation, state-space models,Multiport energy storage and dissipation, Legendre transforms,Nonlinear mechanics, transformation theory, Lagrangian and
Hamiltonian forms, Control-relevant properties. Theapplicationexamples may include electro-mechanical transducers, mechanisms,electronics, fluid and thermal systems, compressible flow, chemicalprocesses, diffusion, and wave transmission.
2
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
9/289
Grading Policy
Homework
About 6 homework problems will be assigned throughout the term at
approximately two-week intervals.
Term project
Students will be required to select a term project by lecture 8. A briefinterim progress report will be required by lecture 16. Term projectsmust be completed by the last week of the term, at which time a finalreport will be due. A brief oral presentation of each term project willalso be required.
ACTIVITIES PERCENTAGES
Homework 60%
Term Project 40%
Ethics Policy
Collaboration
Collaboration on and discussion of homework assignments isencouraged but each student must submit an individual solution.Collaboration on term projects is encouraged provided some means forclearly identifying individual contributions is proposed and approved bythe instructor.
Use of Material from Previous Years
Use of material from prior offerings of this subject in preparinghomework assignments defeats the purpose of the assignments and isforbidden.
3
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
10/289
Calendar
LEC # TOPICS KEY DATES
Week 1
1
Introduction
Multi-domain Modeling
Syllabus, Policies and Expectations
Assignment 1out
Week 2
2
Review: Network Models of Physical System
Dynamics
Bond-graph Notation
3
Review (cont.): Equivalent Behavior inDifferent Domains
Block Diagrams, Bond Graphs, Causality
Week 3
4Thvenin and Norton Equivalent Networks
Impedance Control and Applications
5
Energy-storing Coupling between Domains
Multi-port Capacitor
Maxwell's Reciprocity
Assignment 1due
Assignment 2out
Week 4
6
Energy, Co-energy, LegendreTransformation, Causal Assignment
Intrinsic stability
4
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
11/289
7Review Revisited: Magnetism and Electro-magnetism
Week 5
8Electro-magnetic-mechanical Transduction
Use of Co-energy Functions
Term projectproposal due
9 Linearized Energy-storing Transducer Models
Assignment 2due
Assignmnet 3out
Week 6
10
Cycle Processes
Work-to-heat Transduction
Thermodynamics of Simple Substances
11
Causal Assignments and Co-energyFunctions
Second Law for Heat Transfer
Multi-port Resistors
Week 7
12Nonlinear Mechanical Systems
Modulated Transformers and Gyrators
Assignment 3due
Week 8
13
Lagrangian Mechanics
Coordinates, State Variables andIndependent Energy Storage Variables
14 Nonlinear Mechanical Transformations and Assignment 4
5
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
12/289
Impedance Control out
Week 9
15
Hamiltonian Mechanics
Stable Interaction Control
Canonical Transformation Theory
16 Term Project Progress Report DiscussionTerm projectprogressreport due
Week 10
17
Identification of Physical and BehavioralParameters
Model structure
18
(Internally) Modulated Sources
Non-equilibrium Multi-port Resistors
Nodicity
Assignment 4due
Assignment 5out
Week 11
19Amplifying Processes
Small-signal and Large-signal Models
20
Thermodynamics of Open Systems
Convection and Matter Transport
Lagrangian vs. Eulerian Frames
Week 12
21Power Conjugates for Matter Transport
Second Law for Non-heat-transfer Processes
6
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
13/289
Throttling and Mixing
22
Bernoulli's Incompressible Equation
The "Bernoulli Resistor" and "Pseudo-bond-graphs"
Assignment 5due
Week 13
23Chemical Reaction and Diffusion Systems
Gibbs-Duhem equation
Week 14
24
Control-relevant Properties of PhysicalSystem Models
Causal Analysis, Relative Degree,Passivity and Interaction Stability
25Transmission Line Models
Term Project Presentations
Week 15
26Wrap-up Discussion
Term Project Presentations (cont.)
7
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
14/289
Lecture Notes and Topics
Lecture # Topic
Lecture 1 Introduction; Multi-domainModeling
Lecture 2 Review: Network Models ofPhysical System Dynamics; BondGraph Notation, Block Diagrams,Causality
Lecture 3 Review (cont.): EquivalentBehavior in Different Domains
Lecture 4 Thevenin and Nortan EquivalentNetworks; Impedance Control andApplications
Lecture 5 Energy-storing Coupling betweenDomains; Multi-port Capacitor;Maxwells Reciprocity
Lecture 6 Energy, Co-energy, LegendreTransformation, Causal
Assignment; Intrinsic stability
Lecture 7 Review Revisited: Magnetism andElectro-magnetism
Lecture 8 Electro-magnetic-mechanicalTransduction; Use of Co-energyFunctions
Lecture 9 Linearized Energy-storingTransducer Models
Lecture 10 Cycle Processes; Work-to-heatTransduction; Thermodynamics ofSimple Substances
8
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
15/289
Lecture 11 Causal Assignments and Co-energyFunctions; Second Law for HeatTransfer; Multi-port Resistors
Lecture 12 Nonlinear Mechanical Systems;
Modulated Transformers andGyrators
Lecture 13 Lagrangian Mechanics;Coordinates, State Variables andIndependent Energy StorageVariables
Lecture 14 Nonlinear MechanicalTransformations and ImpedanceControl
Lecture 15 Hamiltonian Mechanics; StableInteraction Control; CanonicalTransformation Theory
Lecture 16 Term Project Progress ReportDiscussion
Lecture 17 Identification of Physical andBehavioral Parameters; Model
Structure
Lecture 18 (Internally) Modulated Sources;Non-equilibrium Multi-portResistors; Nodicity
Lecture 19 Amplifying Processes; Small-signaland Large-signal Models
Lecture 20 Thermodynamics of Open Systems;Convection and Matter Transport;Lagrangian vs. Eulerian Frames
Lecture 21 Power Conjugates for MatterTransport; Second Law for Non-heat-transfer Processes; Throttlingand Mixing
9
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
16/289
Lecture 22 Bernoullis IncompressibleEquation; The Bernoulli Resistorand Pseudo-bond-graphs
Lecture 23 Chemical Reaction and Diffusion
Systems; Gibbs-Duhem equation
Lecture 24 Control-relevant Properties ofPhysical System Models; CausalAnalysis, Relative Degree, Passivityand Interaction Stability
Lecture 25 Transmission Line Models; TermProject Presentations
Lecture 26 Wrap-up Discussion; Term ProjectDiscussions (cont.)
10
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
17/289
Massachusetts Institute of TechnologyDepartment of Mechanical Engineering
2.141 Modeling and Simulation of Dynamic Systems
Assignment #3 Out: 10/3/02Due: 10/17/02
Gas-charged accumulator
Gas-charged accumulators are commonly used in hydraulic systems, primarily to reduce themagnitude of the pressure transients resulting from abrupt changes in flow rate. The attachedpaper considers the energy-dissipating effects of work-to-heat transduction and heat transfer in a
gas-charged accumulator. The authors point out that the common polytropic model (PVn=constant) used to characterize the pressure-volume relation in the gas fails to account for"thermal damping" and present a nonlinear model, a linear model and experimental data tosupport their point. You are to critique this paper by modeling and simulating the accumulator
system.
Background reading: A. Pourmovahed & D. R. Otis (1984) "Effects of Thermal Damping on theDynamic Response of a Hydraulic Motor-Accumulator System", J.D.S.M.C., 106:21-26.
1. Formulate a model of the thermofluid capacitive subsystem of P. & O. '84, fig. 5 andrepresent it by a bond graph. Assuming the flow rate Qaas an input and that nitrogen may be
modeled as an ideal gas, derive nonlinear dynamic equations suitable for simulating figs. 1, 3& 4 of P. & O. '84.
2. P. & O. '84 devote much of their paper to a linear analysis.
2a. Linearize your model about similar operating conditions. Comment on the usefulness ofthe "anelastic model" of P. & O. fig. 2.
2b. Develop a bond graph corresponding to your linearized model using single-port storageand dissipative elements and idealized transducers (e.g. gyrators, transformers) and showthat it yields the same linearized equations.
2c. Does your linearized model describe entropy production? Is entropy production anessentially nonlinear phenomenon?
3a. Using the two models developed above, determine parameters for simulations corresponding
to P. & O.'s experimental results and simulate the accumulator to obtain cross plotscorresponding to P. & O. '84 figs. 1, 3 & 4.
3b. Comment on the degree of (dis)agreement between these models and P. & O.'s experimentsand simulations; that is, how plausible is the ideal gas assumption in this case? (Bear inmind that your nonlinear model is different from the one P. & O. used -- see their reference#3.)
2.141 2002 page 1 assignment #311
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
18/289
4. Develop a model of the complete hydraulic system of P. & O. '84, fig. 5 and represent it by abond graph. Assuming the flow rate Qsand the force F as inputs and that nitrogen may be
modeled as an ideal gas, derive nonlinear dynamic equations suitable for simulating thetransient response of the system. Hint: Keep in mind that your choice of state variables caninfluence the complexity of your equations.
5. Assuming that both inputs are zero (Qs= 0, F = PoAm) simulate the pressure in the
accumulator in response to an initial velocity of the mass in the direction which wouldcompress the gas and large enough to cause a volume change comparable to that of P. & O.'84 fig. 1. Assume the gas is initially at equilibrium with ambient conditions. Chooseparameters so that the undamped natural frequency of the system is 0.01Hz (as in figs. 1, 3 &4.) Given an accumulator volume of 2 liters, the piston diameter of a corresponding linearactuator would probably be on the order of a couple of centimeters (i.e., a half to one inch).
Simulate three cases:
5a. isothermal conditions gas temperature constant at ambient temperature
5b. adiabatic conditions no heat transfer from the gas
5c. the conditions corresponding to P. & O.'s experimental data.
5d. Now choose parameters so that the undamped natural frequency of the system is ten timeshigher (i.e., 0.1Hz) and repeat 5c. above.
Based on this analysis, what would you conclude about the importance of the "thermal damping"phenomenon?
2.141 2002 page 2 assignment #312
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
19/289
Massachusetts Institute of TechnologyDepartment of Mechanical Engineering
2.141 Modeling and Simulation of Dynamic Systems
2.141 Assignment #3: GAS-CHARGED ACCUMULATOR
The figure below (after Pourmovahed & Otis, 1984) is a schematic diagram of the hydraulic andmechanical system.
gas
oil
motor
mF
ypiston or
diaphragm
QmQsAm
P
Qa
P
P, v
accumulator
Our first goal is to model the thermofluid subsystem assuming the flow rate Qaas an input. The
following bond graph is the simplest representation of the accumulator subsystem.
RTw
dSw/dtC
P
dV/dt dS/dtSf SeQa(t):
hydraulic domain thermal domain
T:Tw
The two-port capacitor on the left represents the reversible energy storage and work-to-heattransduction in the ideal gas in the accumulator. The two-port resistor on the right representsirreversible heat conduction through the wall of the accumulator with the concomitant entropyproduction. The outside of the wall is assumed to remain at a constant temperature (i.e., ambienttemperature).
The direction of the power bonds has been chosen to follow the usual convention that power ispositive into the storage element. However, the sign convention for the two-port resistor followsa more intuitive power in = power out convention but assumes for convenience that positiveheat flow is from the wall to the gas.
Nonlinear equations
Causal assignment indicates that both ports of the capacitor may be given the preferred integralcausal form. Note that the two-port resistor assumes its preferred causal form with temperaturesas inputs. Thus we may be confident that the model will properly reflect the second law.
We must choose state variables. There are many possible choices, but they are not equallysimple.
Gas-charged accumulator solution page 1 Neville Hogan13
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
20/289
Hydraulic side:
We could choose either pressure, P, or volume, V, as state variable but volume seems to be themost sensible choice as the corresponding state equation is simply
V = Qa(t)
The negative sign is due to the fact that positive flow rate compresses the gas.
Thermal side:
We might choose the energy variable, total entropy, S, but temperature, T, is more common. Wecould also use total internal energy, U, as a state variable. To choose between these, consider theavailable information.
Two-port capacitor constitutive equations are derived assuming nitrogen may be modeled as anideal gas. The ideal gas equation is
PV = m RT
where m is the mass of the gas and R is the gas constant for nitrogen (not the universal gas
constant). The second constitutive equation is derived by assuming
dU = m cvdT
where cvis the specific heat at constant volume. Integrating:
U - Uo= m cv(T To)
where subscript o denotes reference state.
The two-port resistor equations assume Fouriers-Law (i.e., linear) heat conduction.
Q = h Aw(Tw T)
where h is a heat transfer coefficient and Awand Tware the area and temperature of the wall.Consider using S and V as state variables.
T S = Q = h Aw(Tw T)
hence
S = h Aw(TwT 1)
However, I need T = T(S,V) and P = P(S,V) to form state equations. From class notes,
T = To VVo
R
cv exp S Somcv
P = Po
V
Vo
R
cv+ 1
exp
S So
mcv
These are output equations. State equations are
Gas-charged accumulator solution page 2 Neville Hogan14
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
21/289
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
22/289
T = h Awm cv
T +h Awm cv
Tw+Rcv
TV Qa
V = Qa
These state equations are still coupled and nonlinear, but look a little simpler. Note that the
thermal time constant is again obvious but now the choice of reference temperature is lessimportant. The output equation for pressure is
P =m RT
V
The equations using energy as a state variable are similar to those using temperature as a statevariable. That shouldnt be surprising given the simple relation between temperature and internalenergy for and ideal gas. The point to remember is that the integral causal form does notconstrain your choice of state variables. State variables should be chosen for convenience and tomaximize insight. I will use temperature and volume as state variables.
Linearized equations
The second task is to linearize the model and compare to P&Os linearized model. Linearizingthe state equations is always helpful. In this case it can provide insight into the physical systemand the model and parameters used by P&O.
The two-port capacitor constitutive equation is derived from the ideal gas equation PV = m RT.To linearize, we need to write this in a causal formany of the four causal forms will serve. Usethe causal form with temperature and volume as (integrated) inputs, i.e.
CP
dV/dt dS/dt
T
P = m RTV
Denote the operating point by subscript o and linearize.
P Po m RVo
(T To) m RTo
Vo2(V Vo)
Write V = V Vo, T = T Toand P = P Po
m RVo
T +m RTo
Vo2(V)
Remember that the positive work compresses the gas, hence V is the appropriate displacementvariable on the hydraulic side.
This indicates that the hydraulic side of the linearized model may be represented by atransformer between thermal and hydraulic domains connected to a fluid capacitor by a 1-junction (common flow).
transformer modulus:m RVo
Gas-charged accumulator solution page 4 Neville Hogan16
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
23/289
(inverse) fluid capacitance:m RTo
Vo2
The second constitutive equation is in the form S = S(T,V) It may be derived from the internalenergy equation and the first law.
dU = m cvdT = T dS P dV
dS =m cv
T dT +m RV dV
S =m cvTo
T m RVo
(V)
Again, remember that V is the appropriate flow variable of the hydraulic side given the powersign we have assumed.
This indicates that the thermal side of the linearized model may be represented by a thermalcapacitor connected to a transformer between thermal and hydraulic domains by a 0-junction
(common effort).
transformer modulus:m RVo
(as before)
thermal capacitance:m cvVo
A bond graph of the linearized two-port capacitor is as follows.
TFdV/dt T
1 0
CC : m cv/To
m R/Vo
: Vo2/m R To
Notethat this linearized model indicates that the strength of the coupling between the thermaland mechanical domains is proportional to the mass of gas and inversely proportional to thevolume it occupiesa useful insight.
The two-port resistor equations describe entropy flow as a function of temperature. For the gas
S =Q
T = h A
w
Tw
T 1
Linearizing
S S o
h AwTw
To2(To T)
S h Aw
Tw
To 1
h AwTw
To2(To T)
Gas-charged accumulator solution page 5 Neville Hogan17
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
24/289
Assume the operating point (and also the reference thermal state) is at equilibrium with the walltemperature.
To= Tw
S
h Aw
To(To T)
Under the same operating conditions, the entropy flow rate from the wall is identical
S w=QTw
S w
h Aw
To(To T)
A bond graph of this linearization of the two-port resistor is as follows.
Se
dS/dt
1
R: To/h Aw
:Tw
Notethat this linearizedmodel does NOT reflect the second law of thermodynamicslinearization has eliminated entropy production due to heat transfer. This is due to the particularchoice of operating point. By choosing To= Twwe make the entropy flow from the wall
identical to the entropy flow to the gas.
S net= S S w= 0However, entropy production is notan essentially nonlinear phenomenonits the choice ofoperating point that matters. Linearization about equilibrium eliminates entropy production; amodel linearized about a non-equilibriumoperating point will describe entropy production.
A bond graph of the complete linearized system is as follows.
Se
dS/dt
1
R: To/h Aw
:TwTFdV/dt T
1 0
CC m cv/To:
m R/Vo
Vo2/m R To:
SfQa:
Using the causal assignment shown, linearized equations may be read from the graph.
T =To
m cv
S m RVo
V
Gas-charged accumulator solution page 6 Neville Hogan18
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
25/289
S =h Aw
ToT
State equations
V = Qa
T = h Awm cv
T +Rcv
ToVo
Qa
Output equation
P =m RVo
T m RTo
Vo2 V
To compare with P&Os linearized equations, take the Laplace transform.
T
s +1
=Rcv
ToVo
Qa
V = Qas
P =m R To
Vo2
Rcv
+ s +1
(s +1
s) Qa
Substitute
m R To
Vo2 =
PoVo
Rcv
+ 1 =R + cv
cv =
PQa
=PoVo
s + 1s (s +1)
This is the same as derived by P&O.
The complete hydraulic system
Adding the rest of the system is straightforward. The piston can be modeled as a transformerlinking the fluid domain with the mechanical domain. The piston itself is simply a mass with a
force acting on it (though with an unusual sign convention). A bond graph is shown below.
Gas-charged accumulator solution page 7 Neville Hogan19
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
26/289
Se
dS/dt
R
: F
:Tw
TFP
T
0 1
IC : 1/M
Am
SfQs:
Se
dV/dt
vm
The translational inertia is an ideal linear element. It makes little difference whether momentumor velocity is used as its state variable. For clarity I will use velocity with temperature andvolume as the gas state variables. State and output equations for the complete system are asfollows.
V = Amvm Qs
T =h Awm cv
( )Tw T +Rcv
TV ( )Amvm+ Qs
v m=1M
m R AmTV F
P =m RT
V
where Amis the piston area, vmis the velocity of the inertia and M its mass.
Gas-charged accumulator solution page 8 Neville Hogan20
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
27/289
Parameters for simulation
For P&O fig. 1:
Po= 1014.5 psia (operating pressure in the accumulator)
Vo
= 103 cu. in. (operating volume of the accumulator)
m = 0.293 lbm (mass of gas)
V/Vo= 0.25
For P&O fig. 3:
Po= 438.5 psia
Vo= 122 cu. in.
m = 0.15 lbm
V/Vo= 0.05
For P&O fig. 4:
Po= 436.7 psia
Vo= 122 cu. in.
m = 0.149 lbm
V/Vo= 0.01
In all cases:
Tw= 540R (room temperature)
R = 660 in-lbf/lbm R (gas constant)cv= 1900 in-lbf/lbm R
=m cvh Aw
= 15.3 seconds
For the complete hydraulic system
To estimate the effective mass I assumed isothermal conditions and used the linearized model.Isothermal conditions keeps things simple because it essentially eliminates the thermal domainfrom participating in the dynamics. The undamped natural frequency is given by
n=P
oA
m
2
M Vo
hence the estimated mass is
M =PoAm2
Von2
Gas-charged accumulator solution page 9 Neville Hogan21
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
28/289
Assuming a piston diameter of 0.75 inches, Amis 0.44 inches squared. Using the pressure and
volume of P&O fig.1 and an undamped natural frequency of 0.01 Hertz yields
M =1014.5 x 0.442
102.97 x (2 x 0.01)2 = 487
lbf
in2in4
in3sec2
rad2
Convert to more meaningful units:
1lbf sec2
in = 386.4 lbm
M = 1.88 x 105lbm.
Thus the mass required to yield an undamped natural frequency that low is unbelievably large84 tons!
However, the mass required to yield an undamped natural frequency of 0.1 Hz is a little morereasonable1,880 pounds.
To choose an initial velocity I assumed undamped oscillations and used
vm=V
Am
V = V sin nt
vm(0) =Vn
Am
Simulations
Nonlinear simulations of P&O figs. 1, 3 and 4 are as follows.
-0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5P&O fig. 1, nonlinear
normalized volume
no
rmalizedpressure
Gas-charged accumulator solution page 10 Neville Hogan22
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
29/289
-0.05 0 0.05410
420
430
440
450
460
470P&O fig. 3, nonlinear
normalized volume
pressure(psi)
-0.1 -0.05 0 0.05 0.1380
400
420
440
460
480
500P&O fig. 4, nonlinear
normalized volume
pressure(psi)
Note that in all cases these simulations are quite close to P&Os even though those authors useda much more elaborate model of the gas. For 10% volume changes, the ideal gas model isessentially identical to their data. For 5% volume changes the ideal gas model is essentiallylinear.
Gas-charged accumulator solution page 11 Neville Hogan23
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
30/289
Transient responses
Simulations of the transient responses for the large mass assuming thermally damped, adiabaticand isothermal conditions are as follows.
0 50 100 150 200 250 300 350 400-4
-2
0
2
4
Transient response of complete nonlinear system
time (seconds)
velocity(inch/sec)
-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25-0.4
-0.2
0
0.2
0.4
normalized volume
normalizedpressure
The plot shows the velocity of the piston mass. Note that the oscillation is steadily losingamplitude as time increases. Also note that no mechanical losses such as friction have beenincluded in our model. This loss in energy is due to the irreversible entropy production due toconduction in the gas-charged accumulator. Assuming only a reversible work storage in the gasaccumulator would not predict this behavior. Just like a bicycle pump, compression of the gasgenerates heat that flows through the walls of the chamber. Not all of this heat energy isrecovered when the gas expands, so energy is lost and we have thermal damping.
The adiabatic case was modeled by adding an ideal flow source on the thermal side of the two-port capacitor. Setting this flow source to zero sets the entropy flow to zero, i.e. zero entropyflows which in this case means no heat flow. The result of this simulation shows oscillations asin the previous case. However, the amplitude of the oscillations does not decrease. We haveessentially removed the heat lost through the wall leaving only the reversible work storage incompressing the gas. The system without thermal damping behaves like an undamped spring-mass system.
Gas-charged accumulator solution page 12 Neville Hogan24
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
31/289
0 50 100 150 200 250 300 350 400-4
-2
0
2
4Adiabatic transient response
time (seconds)
velocity(inch/sec)
-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25-0.4
-0.2
0
0.2
0.4
normalized volume
normalizedpressure
The isothermal case was modeled by setting dT/dt = 0 and setting the initial gas temperatureequal to Tw. This is equivalent to assuming no thermal resistance across the wall of the
accumulator. Hence there is no entropy production and again, no thermal damping.
0 50 100 150 200 250 300 350 400-4
-2
0
2
4Isothermal transient response
time (seconds)
velocity(inch/sec)
-0.3 -0.2 -0.1 0 0.1 0.2 0.3-0.4
-0.2
0
0.2
0.4
normalized volume
norm
alizedpressure
The isothermal and adiabatic cases are undamped, as expected. Note that the isothermalfrequency of oscillation is lower than the damped case which in turn is lower than the adiabaticcase. This is also as expected.
Gas-charged accumulator solution page 13 Neville Hogan25
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
32/289
Finally, a simulation of the transient response for the smaller (more reasonable) mass is asfollows.
0 20 40 60 80 100 120 140 160 180 200-40
-20
0
20
40Transient response for reduced piston mass
time (seconds)
velocity(inch/sec)
-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25-0.4
-0.2
0
0.2
0.4
normalized volume
normalizedpressure
Note that even though the normalized pressure-volume plot shows very little evidence of energydissipation (i.e., the area inside the loop is small) the effect on the transient response issubstantial. I conclude that thermal damping is likely to be a real phenomenon in practicaldynamic systems.
Gas-charged accumulator solution page 14 Neville Hogan26
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
33/289
Not used:
U = mcvTo
VVo
Rcvexp
S Somcv
1 + Uo
Choose an operating point at thermal equilibrium with the environment. Assume no forcing, i.e.,Qa= 0
To= Tw
For P&O fig. 4:
Po= 69.95 bar = 1014.5 psia (operating pressure in the accumulator)
Vo= 1687cc = 103 cu. in. (operating volume of the accumulator)
Gas properties of nitrogen @ 300K (room temperature):
cp= 1041 Joules/kg K (specific heat at constant pressure)
= 1.399 (polytropic index)R = 297 Joules/kg K (gas constant)
Remember: cv=cp
= cp- R
cp= 2560 in-lbf/lbm R
= 2560/1900 = 1.35
Gas-charged accumulator solution page 15 Neville Hogan27
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
34/289
MEMORANDUM
To: 2.141 classFrom: Professor Neville HoganDate: November 26, 2002Re: Assignment #3
All of you did well on this assignment. Maybe Im making them too easy...
One common difficulty was to conclude that entropy production is an essentially nonlinearphenomenon. This is a subtle problem: if you did the obvious (as I didsee my solution) andlinearized the two-port resistor about conditions with the same (ambient) temperature on bothsides, you linearized about equilibrium. That corresponds to assuming a reversible process andhence the linearized model will not describe entropy generation. However, if you linearize aboutnon-equilibrium conditions (i.e., different temperatures on the two ports of the resistor,corresponding to a non-zero heat flux) the resulting linearized model will describe entropy
production.
Class statistics on this part: mean 93%; standard deviation 4%.
28
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
35/289
Massachusetts Institute of TechnologyDepartment of Mechanical Engineering
2.141 Modeling and Simulation of Dynamic Systems
Assignment #4 Out: 10/24/02Due: 11/7/02
Control Through Singularities
Motivation: One common and productive use of modeling and simulation is to study andunderstand proposed engineering designs. In this assignment you will test the behavior of aproposed robot controller.
A common form of robot motion control specifies a workspace position or trajectory (e.g., adesired time-course of tool position in Cartesian coordinates) and transforms that specification toa corresponding configuration-space position or trajectory (e.g., a time-course of joint angles).
However, most robot mechanisms have kinematic singularities, configurations at which therelation between workspace and configuration-space becomes ill-defined. As a result, most robotmotions controllers do not operate at or near these singular points.
However, an energy-based analysis of mechanics shows that the transformation of positions andvelocities is well-defined in one direction while the transformation of efforts and momenta iswell-defined in the other. This implies that a controller that takes advantage of these facts shouldbe able to operate at and close to mechanism singularities. A simple impedance controllerattempts to impose the workspace behavior of a damped spring connected to a movable virtualposition.
JxBLxKJ oot
where is a vector of generalized coordinates, a vector of (conjugate) generalized efforts, xand xoare vectors of actual and virtual Cartesian tip coordinates, L() and J() are linkagekinematic equations and Jacobian respectively, and Kand Bare stiffness and dampingrespectively. Note that this controller requires neither the inverse of the kinematic equations northe inverse of the Jacobian.
In this assignment you are to test whether this simple impedance controller can operate at andclose to mechanism singularities.
Tasks:
Assume a planar mechanism open-chain mechanism with two links of equal length L = 0.5 m,operating in the horizontal plane (i.e., ignore gravity) and driven by ideal controllable-torqueactuators, one driving the inner (shoulder) link relative to ground, the other driving the outer(elbow) link relative to the inner link. Sensors mounted co-axially with the actuators providemeasurements of joint angle and angular velocity.
2.141 2002 page 1 assignment #429
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
36/289
1. Write kinematic equations relating generalized coordinates to the position coordinates of thetip, expressed in a Cartesian coordinate frame with its origin at the axis connecting the innerlink to ground.
2. Find the corresponding Jacobian (to relate generalized velocities to tip Cartesian velocities).
3. Identify the set of singular configurations for this linkage (at which the relation between tipCartesian coordinates and joint angles becomes ill-defined) and show that they include thecenter of the workspace as well as at the limits of reach.
4. Formulate a dynamicmodel of the mechanism relating input actuator torques to outputmotion of the tip in Cartesian coordinates. Assume the links are rods of uniform cross sectionand mass m = 0.5 kg and that the joints are frictionless. (Hint: be careful in your choice ofgeneralized coordinates.)
5. Simulate the behavior of this mechanism under the action of a simple impedance controller.Assume uniform tip stiffness and damping (i.e., the stiffness and damping matrices have the
form: and where kandbare constants).
10kK 01 01
10bB
5.a Choose the stiffness and damping matrices so that when the mechanism is making smallmotions about a configuration with the inner link aligned along the Cartesian x-axis andthe outer link aligned parallel to the Cartesian y-axis the highest-bandwidth transferfunction between virtual and actual position has critically-damped poles with anundamped natural frequency of 2 Hz. (Hint: it may be easiest to first transform thestiffness and damping to generalized coordinates.)
5.b Simulate the response to the following virtual trajectories and plot at least the path of the
tip in Cartesian coordinates:
1) Starting from rest at {x = L, y = 0} ending at rest at {x = 2L, y = 0}; trapezoidal speedprofile with acceleration to peak speed in 250 ms, constant speed for 1.5 sec anddeceleration to rest in 250 ms.
2) Starting from rest at {x = -L, y = 0} ending at rest at {x = L, y = 0}; trapezoidal speedprofile with acceleration to peak speed in 250 ms, constant speed for 1.5 sec anddeceleration to rest in 250 ms.
3) Starting from rest at {x = -L, y = L/20} ending at rest at {x = L, y = L/10}; trapezoidalspeed profile with acceleration to peak speed in 250 ms, constant speed for 1.5 sec and
deceleration to rest in 250 ms.
6. Repeat the simulation of 5.b.3 with kand bchosen to yield critically-damped poles with anundamped natural frequency of 20 Hz.
7. Repeat the simulation of 5.b.3 with the outer link 10% shorter than the inner link. How doesthis change the set of singular configurations?
2.141 2002 page 2 assignment #430
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
37/289
8. Comment briefly on (a) whether and (b) how well this controller operates nearmechanism singularities.
Tent-Pole Instability
The complex behavior of multi-body mechanical systems stems from kinematically modulatedtransformation of energy. It can give rise to some highly counter-intuitive phenomena, one ofwhich you are to explore in this assignment.
A tent-pole is to be supported in the upright position by guy-ropes. However, the support is notcompletely rigid as the guy ropes inevitably have some elasticity. It may seem natural to increasethe tension in the ropes to stiffen the support but in fact, this can have the opposite effect. Togain insight you are to develop a model and numerical simulation to explore this phenomenon.
Assume the tent pole is a rigid rod of height, h = 2 m, and that it is mounted on a hinge at its baseso that it can only move in a plane. Assume that two elastic cords are attached to its top and tothe ground in the plane of motion at a horizontal distance, w = 1 m, on either side. Assume the
cords have negligible mass, linear elasticity (i.e., obeying Hooke's law) with stiffness, k, andpretension, Fp.
1. Develop a model to describe the mechanical system comprised of the pole and the twocords.
To understand this system, simulate the following cases:
2. Assume the cords have pretension but zero stiffness; assume the pole starts in the uprightposition; and assume no gravity (for now). Show thatthis mechanical system is unstablefor any value of Fpeven in the absence of gravity.
3. Assume the cords have non-zero stiffness but no pretension; assume the pole starts in theupright position; and assume no gravity. Test whetherthis system is stable for (a) smallperturbations (e.g., initial conditions 1 from upright) and (b) large perturbations (e.g.,initial conditions 45 from upright).
4. Now that you understand what is going on, include both stiffness and pretension in thecords and include gravity and any other physical behavior relevant to system stability.Using the numerical simulation,show thatfor a given cord stiffness there is a maximumpretension for stable behavior and find how it varies with stiffness (a few representativevalues will suffice).
This system is simple enough to be amenable to symbolic (rather than numerical) analysis.
5. Derive an algebraic expression for the relation between the maximum pretension forstable upright behavior (i.e., corresponding to 4. above).How well do your numericalsimulation results agree with your analytical results?
2.141 2002 page 3 assignment #431
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
38/289
Thomas A. Bowers2.141 Fall 2002
Assignment 4: Kinematics
Two-Link Planar Robotic Mechanism
1. The configuration being analyzed in this problem is shown below in Figure 1.
2
1
L1
L2
(x,y)
(xc1,yc1)
(xc2,yc2)
Figure 1: Cartesian and Generalized Coordinates of 2-Link Robotic Mechanism
The equations relating the Cartesian coordinates to the generalized coordinates, 1and 2,are as follows:
xL1 cos1L2 cos2yL sin L2 sin21 1
L1c1 cos1
2
L1y sin12
c1
L1 cos L2 cos2
2xc2 1
y L1 sin L2 sin22
c2 1
The kinematic equations relating the generalized and Cartesian coordinates can be foundfrom derivation.
x L sin L2 sin1 1 1 2 2 yL cos L cos1 1 1 2 2 2
32
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
39/289
L11x c1 sin12L11y cos1c1
2L22x
c2
L1
sin sin21 1 2
2y L1 cos
L2 cos2c2 1 12
2. The Jacobian matrices for the tip and the centers of mass of the mechanism can befound directly from the kinematic equations:
L1 sin L2 sin2 Jtip L1 cos
1
L2 cos2
1
L
2
1
sin1 0 L1 cos1 0
2 0 J 1
L2 cm L1 sin sin2 1 2 L1 cos1
L2 cos2
2 0 1
3. To find the singular values, the determinant of the Jacobian for the tip of the
mechanism is set to zero. For these angles the inverse of the Jacobian is not defined sothere is no transformation from Cartesian to generalized coordinates.
detJ LL 2sin cos2 sin 2 cos1 sin 2 01 1 1 ,0....k1 2
This corresponds to all configurations where the links are parallel or anti-parallel.
4. To formulate the dynamic model of the system the inertances of the links must bedetermined. The links each have a translational and rotational inertia:
I m
mL2J
12
The mass matrix for the system is then:
33
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
40/289
2
m1 0 0 0 0 0
0 m1 0 0 0 02Lm 10 0 1 0 0 0
12
M0 0 0 m2 0 0
0 0 0 0 m2 0Lm 220 0 0 0 0 2
12
This can be converted to the generalized inertia of the system.
TMJJI
T
L1 L1 sin 1 m1 0 0 0 0 0 sin 1 0 0
2
2
2 2
0 1 0 0 0 0L1m L1
21
1 0
cos 10 0cos 2Lm 110 0 0 0 0
1 0120 0 0 m 0 02
0 0 0 0 m2 0
1
L2
21
L2
2sin 2L1 L1 sin sin sin
L LLm 222
2
2
2
21
0 1
1
0 1
cos 2L1 L1cos cos cos0 0 0 0 0 12
2 2 L1 Lm 11 LL 21 sin 1sin
2 2 sin 2 2 21 1LL1 2 sin 1
1 m1 sin 2 1
Lm 22
cosLm 12
m1 cos cos cos24 12 2 2L2
4sin 2 22
LL1
cos 1
2 2
LL1
cos 2sin m cos m2 22 12
2 2
Lm 11 Lm 11 1
2 22m cos 2m cos 2 2 Lm 12Lm 12
2 23 2 3 2
2222LL1 Lm2
3
LL1 Lm2
22
3 1 2
2 cosm22m cos2
2
This expression of the generalized inertance is used to find the co-energy of the system:
1 T* )( E Ik2
2Lm 1 LL1 1Lm
2 2m cos 2
2
1
2
1
2
2 1 2
1 3 2
2
2LL1 Lm2
22
3
2 cosm2
2 2
1
2 2
1 Lm13
m2
LL 21
2
LL 21 Lm2
3
1
2
2
1
21 Lm 12 cos 2 cos 2
2
m 22
2 2
2
1
2
2
2 Lm1
3
Lm2
3
1 LLm 22 1
21 Lm 12
2 cos 1 22
2
2
34
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
41/289
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
42/289
T T FJ xKJ
L1 sin1 L1 cos1k
L2 cos 0 L1 L2 0 L
2
21
22
2 L sin2 L2 cos2 L1 sin
L2 0
k
L11
2
kL1 0 2
2 1
2 L2K kL
0
1
2 0
Similarly, the damping matrix is transformed to generalized coordinates using the
Jacobian.
T T T L1 sin1 L1 cos1L1 sin L2 sin2
2 0 FJ xBJ J BJ b
L sin2 L2 cos2 L1 cos
1
bL1
2L2 cos2 2 1 0 L2 2 0
B bL1
2 0 L2
The desired natural frequency for the system is 2 Hz. This allows the stiffness constant, k,to be evaluated:
1
n K I1
2 2 L2k I
L
0
1
2 0 n
Lm 12
m 2L1 m 2LL 2 1 2 1
I cos2 6
0 1
3
LL 22
2 1
m 2 cos2m 2L 2 0 1
2 3 24
1 2 0 3 2k I
02
L22
1
16 6
0 0 4 164 2
L1 0 01
4 0
2
1 0
24 6 8 2k max3
If the stiffness coefficient is larger than kmax then the system will oscillate faster than 2Hzin the horizontal direction, which is the lower impedance direction for this configuration.
The damping coefficient must be found to provide critical damping to the system in thisconfiguration. The critical damping coefficient is found from the following expression:
36
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
43/289
B 2 K I
1 2 0 L22 6
0 2b
L1 02
2
4 8
L1
2 0 0 0 L2 3
1 24
11 1 1
1b 2
322 0 460 16
0 322 0 6 1 1 3 2 3
100 0 0
4 24 16 3
b4
critical3
5b. The system is driven by a simple impedance controller with the following
characteristic:
T 0 J XK L VB J0
These torques are the torques corresponding to changes in the angles 1and 2, which arenot the same as the motor torques on the links. If the motor torques are needed in order tocontrol actual hardware, the following relationships are used. The equivalent torque
acting on each of the links is depicted below in Figure 2.
1-21
L1 L2
1
2
2
Figure 2: Uncoupled 2-Link Mechanism Indicating Torque Input
From this figure it is evident that the torque corresponding to 1 is the difference between
the motor torques: 2 . Also, the torque corresponding to 2is the torque1corresponding to 1minus the torque corresponding to2, which results in 1.
1) The first simulation describes the motion of the two link mechanism from theCartesian position (L, 0) to (2L, 0) with a trapezoidal speed command. Figure 3 shows
the position of the mechanism at 50ms intervals during its translation.
37
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
44/289
0 0.2 0.4 0.6 0.8 1-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
x position (m)
yposition(m)
Time Plot of Mechanism Position for First S imulation
Figure 3: Time Plot of Mechanism for Virtual Trajectory from (L,0) to (2L,0)
2) The second simulation describes the motion of the mechanism as it passes through the
singular point (0, 0). The virtual trajectory of the robot is from (-L, 0) to (L, 0). Figure 4demonstrates the behavior of the mechanism for this input.
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-0.1
0
0.1
0.2
0.3
0.4
0.5
x position (m)
yposition(m)
Time Plot of Mechanism Position for Second Simulation
Figure 4: Time Plot of Mechanism for Virtual Trajectory from (-L,0) to (L,0)
38
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
45/289
It is clear from this plot that the compliance in the system allows the outer link to rotatearound its pivot since there is less inertia in this direction than in the direction of the
virtual trajectory. This is seen as the mechanism begins to move and again after it passesthe singular configuration. There is some overshoot at the end of the movement due to the
inertance of the mechanism.
3) The third simulation attempts to pass the tip of the mechanism near the singularconfiguration at the origin. The virtual trajectory is from (-L, L/20) to (L, L/10). This
results in the following behavior for the mechanism.
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
x position (m)
yposition(m)
Time Plot of Mechanism Position for Third Simulation
Figure 5: Time Plot of Mechanism for Virtual Trajectory from (-L,L/20) to (L,L/10)
Figure 5 demonstrates that the mechanism passes through the singular configurationinstead of following the virtual trajectory. In order for the mechanism to pass near the
singular configuration without actually passing through it, the links of the mechanismwould need to quickly rotate through 180
oas the mechanism approached the singular
configuration. This requires very large torques on the mechanism as it passes near thesingular point.
6. The natural frequency of the controller is now adjusted to 20Hz to determine theimpact this has on the system. The corresponding kand bare found as follows:
2
max
2
3
800
06
13
20
1600
k
k
39
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
46/289
340
03
26
10
3
3200
16
10
016
1
24
10
06
1
04
14
10
3
3200 2
1
22
criticalb
b
Incorporating these into the model of the controller, yields the following output for the
conditions specified in the third simulation.
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
x position (m)
yposition(m)
Time Plot of Mechanism Position for Third Simulation with 20Hz Natural Frequency
Figure 6: Time Plot for Trajectory from (-L,L/20) to (L,L/10) with 20Hz Critically Damped Poles
Figure 6 demonstrates the need for the mechanism to rotate 180oas it passes near the
singular configuration if it is stiffly linked to the virtual trajectory.
7. Finally, simulation three is repeated with the outer link 10% shorter than the inner link
(.45m instead of .5m). With this discrepancy in the link lengths the mechanism can nolonger reach points within .05 meters of the origin. Additionally, it cannot reach beyond a
circle of radius .95 meters. The resulting behavior of the mechanism is shown below in
Figure 7.
40
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
47/289
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
x position (m)
yposition(m)
Time Plot of Mechanism Position for Third Simulation with 20Hz Natural Frequency
Figure 7: Time Plot for Trajectory from (-L,L/20) to (L,L/10) with Uneven Link Lengths
This figure shows that the low rotational inertia of the outer link again causes it to rotate
away from the virtual trajectory. As the mechanism approaches the origin in thissimulation it is unable to pass within .05 meters. This causes it to rotate away from the
origin and the prescribed virtual trajectory. After passing through the singularconfiguration at (0,.05) it converges back onto the virtual trajectory and overshoots its
final destination again due to the inertance of the rotating links.
8. Despite the fact that the Jacobian of the mechanism is undefined at its singularconfigurations, the simple impedance controller allows the mechanism to operate at its
singular configurations. In the first simulation, the final desired position of themechanism was the singular position corresponding to both links fully extended to the
maximum attainable radius. With the impedance controller the mechanism was able toreach this configuration. However, due to the low translational inertance that corresponds
to this position and relatively high rotational inertance the mechanism rotated beyond thedesired position pulling the tip of the mechanism back towards the origin. If the time
scale is extended, it is seen that the mechanism continues to oscillate around this positionwith decreasing frequency. At 200 seconds the mechanism still has 1
ooscillations with a
period of 36 seconds. The actual trajectory and virtual trajectory of the mechanism areshown below in Figure 8, which includes only the 2 second command interval.
41
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
48/289
Actual Trajectory and Desired Trajectory for First Simulation0.1
0.08
0.06
0.04
VerticalPosition(m)
0.02
0
-0.02
-0.04
-0.06
-0.08
-0.1 0.5 0.6 0.7 0.8 0.9 1
Horizontal Posit ion (m)
Figure 8: The Actual and Virtual Trajectory for Desired Movement from (L,0) to (2L,0)
For the second simulation, the mechanism was commanded to pass directly through the
singular position at the origin. Because the impedance controller does not require theinverse of the Jacobian, the mechanism was able to pass through this point. Indeed the
mechanism prefers to pass through this point, as shown below in Figure 9, since it is thelowest energy path through the origin.
Actual Trajectory and Desired Trajectory for Second Simulation
0
i
l
i
(m)
-0.1
-0.08
-0.06
-0.04
-0.02
0.02
0.04
0.06
0.08
0.1
Vertca
Postion
-0.4 -0.2 0 0.2 0.4 0.6
Horizontal Posit ion (m)
Figure 9: The Actual and Virtual Trajectory for Desired Movement from (-L,0) to (L,0)
42
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
49/289
This is also seen on the third simulation, which attempts to pass the mechanism near theorigin. Rather than follow the virtual trajectory, which passes just above the origin, the
mechanism deviates from the virtual trajectory to pass through the lowest energy path:directly through the origin. This is clearly evident in Figure 10, which shows the virtual
trajectory passing through (0, .0375) and the actual trajectory passing through (0, 0).
0
l i i i l ion
i
l
iti
(m)
-0.1
-0.08
-0.06
-0.04
-0.02
0.02
0.04
0.06
0.08
0.1Actua Trajectory and Des red Trajectory for Th rd S mu at
VertcaPos
on
-0.4 -0.2 0 0.2 0.4 0.6
Horizontal Position (m)
Figure 10: The Actual and Virtual Trajectory for Desired Movement from (-L,L/20) to (L,L/10)
When the stiffness of the virtual linkage was increased, the mechanism was constrained
more closely to the virtual trajectory. This is seen clearly in Figure 11.
Actual Trajectory and Desired Trajectory for High Stiffness Simulation
0
i
l
iti
(m)
-0.1
-0.08
-0.06
-0.04
-0.02
0.02
0.04
0.06
0.08
0.1
VertcaPos
on
-0.4 -0.2 0 0.2 0.4 0.6
Horizontal Position (m)
Figure 11: Actual & Virtual Trajectory from (-L,L/20) to (L,L/10) with Increased Stiffness
43
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
50/289
While the increased stiffness resulted in better performance away from the singularposition, near the singular position the mechanism required quick rotations and huge
torques in order to maintain the desired trajectory. This was seen previously in Figure 6.The mechanism performs well, but requires much more energy to reach the same desired
end state.
VerticalPosition(m)
The final simulation demonstrated how a larger singular region around the origin affected
the behavior of the robot. With unequal link lengths the robot could not attain anyposition within .05 meters of the origin. However, the desired trajectory of the robot was
through the point (0, .0375). Because this configuration could not be attained, themechanism passed through the closest point with the least resistance, (0, .05). This is seen
in Figure 12, which shows the virtual trajectory and actual trajectory of the mechanism.This figure also demonstrates that when the singular configuration is closer to the desired
trajectory, the mechanism can more accurately follow the desired path. This is especiallyapparent when comparing Figure 12 to Figure 10.
Actual Trajectory and Desired Trajectory for Uneven Link Simulation0.1
0.08
0.06
0.04
0.02
0
-0.02
-0.04
-0.06
-0.08
-0.1-0.4 -0.2 0 0.2 0.4 0.6
Horizontal Posit ion (m)
Figure 12: Actual & Virtual Trajectory from (-L,L/20) to (L,L/10) with Uneven Link Lengths
44
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
51/289
Tent Pole Instability
1. The mechanical system of a tent pole and guy-ropes is shown below in Figure 13.
1 m 1 m
k kl1 l2
2 m
Figure 13: Tent-Pole & Guy-Rope System
The relationship between the variables l1, l2and can be determined from the Law of
Cosines:
l1 5 cos4
l2 5 cos4
The Jacobian for the transformation between coordinates is found by differentiating each
of these terms with respect to .
sin2 l1 5 cos4 sin2
l2
5 cos4
sin2
5 cos4 J
sin2
5 cos4
The inertia of the pole is simply mL
2
/3. The co-energy, therefore, is dependent only on .This results in the following relationship between torque and angular acceleration:
32mL
The torque on the pole is proportional to the forces from each of the guy-ropes, according
to the following equation:
45
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
52/289
FJT
The forces from the guy-ropes are found from the next equation, where kis the elasticity
of the rope and F0 is the pretension.
0FlkF
There is also a torque component due to gravity, which results in the final expression fortorque:
cos2
mgLFJT
2. The first simulation is intended to show the mechanism is unstable for any pretension
if there is no elasticity in the guy-ropes. Gravity is also not to be considered. With these
assumptions and a pretension of only 10N the following behavior is exhibited.
-1 -0.5 0 0.5 1 1.5 2 2.5-1
-0.5
0
0.5
1
1.5
2
2.5
Horizontal Posit ion (m)
V
erticalPosition(m)
Tent-Pole Simulation 2
Figure 14: Time Plot of Tent-Pole with 10N Pretension and Zero Elasticity
As the pretension increases in the guy-ropes the system becomes more unstable due to thehigher torques generated.
3. The next simulation removed the pretension in the guy-ropes and added in theelasticity. Gravity effects were again omitted in order to emphasize the effect of the
elasticity on the system. Initially, the system was only perturbed 1oto show that it was
stable. This produced the following result where the pole oscillated between 1o.
46
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
53/289
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2-1
-0.5
0
0.5
1
1.5
2
2.5
Horizontal Posit ion (m)
VerticalPosition(m)
Tent-Pole Simulation 3a
Figure 15: Time Plot of Tent-Pole with Elasticity and No Pretension for 1oPerturbation
The next task was to see if the tent-pole was still stable for perturbations up to 45o. Figure
16 demonstrates the stability of the pole with an initial perturbation of 45o.
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2-1
-0.5
0
0.5
1
1.5
2
2.5
Horizontal Posit ion (m)
VerticalPosition(m)
Tent-Pole Simulation 3b
Figure 16: Time Plot of Tent-Pole with Elasticity and No Pretension for 45oPerturbation
47
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
54/289
4. With stiffness, pretension, and gravity all considered in the model of the system, thefollowing behavior is witnessed. Figure 17 shows the case where the system is stable, and
Figure 18 demonstrates the unstable case.
Tent-Pole Simulation 4 with F02.23607k
-1
0
1
2
i
l
i
(m)
-0.5
0.5
1.5
2.5
Vertca
Postion
-1 -0.5 0 0.5 1 1.5 2 2.5
Horizontal Posit ion (m)
Figure 18: Time Plot of Complete Tent-Pole System with Unstable Behavior
48
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
55/289
5. To analytically solve for the stability of the tent-pole system the equivalent stiffness ofthe joint is found. The expression for the joint stiffness is:
K JT
F kJTJ
The system becomes unstable at the point where there is no restoring torque on the
system for a small displacement . For this analysis the mass of the system is neglected.This yields the following equation for the torque on the tent pole.
TJ kl1
JTF 0
l2
sin2 sin2 sin2 5 cos4
sin2 sin2 F0 5 cos4 5 cos4
k
sin2 5 cos4 5 cos4 F0
5 cos4
4k
sin4 2 sin4 2 F0
sin2 sin2
5 cos4 5 cos4 5 cos4
5 cos4
For stability about the vertical position, = /2, where there are small displacements, ,this expression becomes:
2 2
4kcos cos
F0
cos2 cos2
5 4 5 4 5 4 5 4
10
2F0 cos
5 4 5 44kcos 2 2 2
25 16 25 16
F0 20cos 2k 25 16 5 4 5 4
Using LHopitals Rule:
cos20 20sin 20lim 5
x 0 2 2 4 16 2 5 4 5 4 25 16
5 4
5 4 5 2 5
Therefore, the maximum value for the pretension is k 5 or 2.23607k. This result can becompared to the ratios found through simulation, which are shown in Table 1:
25 16
Table 1: Ratio of F0to k for MATLAB Simulation of Tent-Pole System without Gravity
F0 k F0/k % error
50 N 22.36 N/m 2.23614 -0.003
100 N 44.72 N/m 2.23614 -0.003
150 N 67.08 N/m 2.23614 -0.003
2000 N 894.43 N/m 2.23606 -0.0003
49
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
56/289
It is clear from the simulation data, that MATLAB accurately predicts the stability pointfor the system. The precision on the ratio becomes greater as the value of the pretension
is increased. When the mass is considered as well, the stability point decreases as theangle from vertical increases. The mass has a larger effect on the stability of the system
for lower values of pretension.
50
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
57/289
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
58/289
2.141 2002 page 1 assignment #5
Massachusetts Institute of TechnologyDepartment of Mechanical Engineering
2.141 Modeling and Simulation of Dynamic Systems
Assignment #5 Out: 11/7/02
Due: 11/21/02
Simple convection and throttling processes
The main point of this assignment is to give you experience with modeling transportprocesses in a simple thermofluid system. A secondary purpose is to show you that evensimple systems involving matter transport can exhibit interesting behavior.
Two air cylinders are connected by a valve, which is initially closed. One cylindercontains air at 20 psi, the other, air at ambient pressure, 14.7 psi. Both cylinders are
initially at ambient temperature, 70F. You are to model and simulate the transient thatfollows when the valve is abruptly opened.
70F,20 psi
70F,14.7 psi
Assume air may adequately be described as an ideal gas. Assume each cylinder is 10inches in diameter and 30 inches long. Assume the valve orifice has diameter 0.1 in.Model the heat transfer between the cylinders and their surroundings, but you mayneglect any heat transfer across the valve or between the valve and its surroundings. Varythe heat transfer coefficient over a range of values to represent adiabatic conditions,
isothermal conditions and at least one value in between. I suggest K (BTU/secR) = 0,0.0001, 0.001 and (or, more realistically, 1).
1a. Draw a bond graph of your system model, clearly identifying key quantities andpower fluxes.
1b. Choose state variables and develop (nonlinear) state equations.
2a. Simulate the transient changes in (a) pressure (b) temperature and (c) mass flowrate into the right cylinder.
2b. An interesting aspect of this problem is that since thermal systems are composed
only of capacitors and resistors, and we might intuitively expect their transientresponses to exhibit no overshoot. You should be able to show that this is notalways true. Comment and explain.
2c. Check the veracity of your simulation by computing the equilibrium conditions ineach tank after the transients have expired. (Calculating equilibrium states beforeand after is standard engineering thermodynamics.)
52
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
59/289
2.141 2002 page 2 assignment #5
3. A much more common situation (as any SCUBA diver knows) is to fill a cylinderfrom a (nominally) constant-pressure supply. One way to model this situation is toassume the left-hand cylinder in the diagram above is extremely large (so thatwithdrawing air from it changes its pressure very little). Use the model youdeveloped to simulate this situation. What is the minimum set of properties needed
to specify the air supply?
4. Modify your model to include heat transfer across the valve due to any temperaturedifference between the two cylinders. (Just show me a bond graph. Equations andsimulation are optional.)
5. The pressure difference above was chosen to keep valve flow in the non-chokedflow regime. Of course, realistic pressure differences are much higher. (A typicalSCUBA tank is routinely filled to 3,000 psi.) Revise your model and simulation tocover this situation. In this case, how valid is the assumption of no heat transfer atthe valve?
53
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
60/289
2.141, Assignment#5 21 November, 2002
Matter-Transport and Convection
Will Booth
54
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
61/289
W. Booth
08/18/04
1
1 Nomenclature
Arabic
A1 [in2] Surface area of tank 1
A2 [in2] Surface area of tank 2
At [in2] Valve (throat) cross-sectional area
Cd none Coefficient of discharge for air expansion on valve exit
Cv_air [ft-lbf/lb-mol-R] Specific heat of air at constant volumeD1 [in] Diameter of tank 1
D2 [in] Diameter of tank 2
Dt [in] Diameter of valve (throat)
h [ft-lbf/sec-in2-R] Heat transfer coefficient (tankenvironment)
L1 [in] Length of tank 1
L2 [in] Length of tank 2
Mair [1/mol] Molecular weight of air
N1 [lb-mol] Mass of air in tank 1
N2 [lb-mol] Mass of air in tank 2
P1 [psi] Pressure in tank 1
P2 [psi] Pressure in tank 2
Ru [ft-lbf/lb-mol-R] Universal gas constant
S1 [ft-lbf/R] Total entropy of tank 1S2 [ft-lbf/R] Total entropy of tank 2
dSenv1/dt [ft-lbf/sec-R] Entropy flux to the environment from tank 1
dSenv2/dt [ft-lbf/sec-R] Entropy flux to the environment from tank 2
dSvlv/dt [ft-lbf/sec-R] Entropy flux across valve
T1 [R] Temperature of tank 1
T2 [R] Temperature of tank 2
Tamb [R] Ambient temperature
V1 [in3] Volume of tank 1
V2 [in3] Volume of tank 2
Greek
none ratio of specific heats (cp/ cv)
1 [lb-mol/in3] density in tank 12 [lb-mol/in
3] density in tank 2
55
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
62/289
W. Booth
08/18/04
2
2 Results
Part 1 Bond graph and state equation derivation
The bond graph for the two-tank / valve system is shown below. State variables S1, N1, S2, N2are chosen.
C R
0
0
0
0
C
R R
0
Se
su
.sd
.s2
.s1
.
senv2
.senv1.
N1
.N2
.Nu
.Nd
.
T1 T2
Tamb
::
1
2
: :
: hh :
Sf: 0Sf: 0P1 P2
Figure 2-1: Bond graph for 2-tank system with throttling through a valve and heat transfer to environment.
State equations are derived as follows:
Looking at the throttling process with respect to the throat, relative to the upstream
conditions:
Following the logic outlined in the notes, the non-bulk flow terms can be neglected, because
we are satisfying continuity with:
tm
in
d
d tm
throat
d
d
i.e. no leakage. Therefore, the remaining terms in a power balance are the "flow work rate",
and the "kinetic energy transport rate", to use the suggested terminology.
Thus, a power balance from input to throat is:
Pu
Mair u
vu2
2
tmu
d
d
Pt
Mair u
vt2
2
tmt
d
d
56
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
63/289
W. Booth
08/18/04
3
where the units of are [lb-mol / in3] and the units of M airare [1 / mol]. Subscript ' u' denotesupstream parameters, and subscript 't' denotes parameters at the throat.
Cancelling mass flow rates, and assuming there is negligible upstream velocity, re-arranging,
gives:
vt2
Mair
Pu
u
Pt
u
i.e. in terms of molar mass, the mass flow-rate at the throat is:
tmt
d
d tMairN
d
dMair t At
2
Mair
Pu
u
Pt
u
and making the suggested assumption that all the flow work goes into speeding up the flow,
and not compressing the air:
where the units of N are [lb-mol] and the units
of P are [psi]
t
Nd
d
At
2 u
Mair
Pu Pt
A problem arises, since from the ideal gas law:
Pu
Pt
Tu
Tt
Therefore, to get mass flow, we require Pu> Pt, which implies Tu> Tt, and therefore, uu>
ut, and hu> htwhich disagrees with the common assumption that throttling is isenthalpic.
To reconcile this inconsistency, it is recognised that we measure the flow, pressure and
temperature downstream of the throttle, therefore mixing will occur between throat-flow and
the downstream gas. If this mixing is assumed to occur at constant pressure, and continues
until Tu= T
dthen, the process will be isenthalpic, as commonly assumed.
To determine equations for entropy flux, per the definition of specific entropy:
sS
Ntherefore
The entropy flux in a particular tank is, given the sign conventions in the system bond graph
tS
d
d
S
N tN
d
d
tSenv
d
d (in terms of total entropy)
i.e. the entropy flux is equal to the specific entropy multiplied by the mass flux minus the
change in entropy due to heat transfer to the environment.
Specifically:
tS1
d
d
S1
N1 tN1
d
d
tSenv1
d
d
and
tS2
d
d
S2
N2 tN2
d
d
tSenv2
d
d
57
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
64/289
W. Booth
08/18/04
4
PN
VRu T
and since the volume of each tank is fixed:
(where Ruis the universal gas constant)P Ru T
The pressure in the chamber can be calculated from the ideal gas law, since we are
assuming that we can model air as an ideal gas, therefore:
(where Tiis the initial temperature, and S iis the reference
entropy)
T
Ti
expS Si
M N cv
Therefore:
M N cv dT T dS
So:
(where M is the molar weight, and N has units of lb-mol)U M N cv T
From the definition of internal energy:
(since the tank is of fixed volume)dU T dS P dV T dS
Therefore, in terms of total quantities:
(specific quantities)du T ds Pdv
Recalling the expression of the 1st law from assignment 3:
But, to determine the heat lost to the environment and the pressure in each tank, we need an
expression for the temperature of each tank, which can be derived as follows:
since all the mass which leaves tank 1 arrives in tank 2 (assumption of no leakage)
tN1
d
d tN2
d
d
Choosing state variables, S1, N1, S2, and N2, the above equations are 2 of the state
equations, and the other 2 are the equations for mass flowrate through the throttle above,
where
An attempt at linearization of the equations for the 3-port capacitor with the mechanical work port closed, is shown
in Appendix A. This system could then be coupled with the linearized four port resistor model shown in the class
notes, to provide some insight to the system. I could not successfully linearize the capacitor model, however,because the cross-partial terms representing the couple between domains werent equal, therefore not satisfying
Maxwells reciprocity conditions.
Part 2a Simulation results
Matlab m-files for all the simulations are contained in Appendix B. Results for simulations with h=0, 0.0001, 0.001,
0.01 and 1 ft-lbf / sec-in2-R are shown in Figure 2-2. I used values for h suggested in the problem statement
(directly in ft-lbf/sec-in2-R as opposed to BTU/sec-R), but when multiplied by the surface area of the tanks, theresult is approximately equivalent hence the results show the range of responses intended by the suggested values.
58
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
65/289
W. Booth
08/18/04
5
Figure 2-2: Simulation results for part 2a with various values of h
One aspect of note, regarding the simulation, came about in discussion of this problem set with Tom Bowers. He
had found that the solution of the problem was more efficient and less noisy when using a stiff ODE solver, likeode15s, rather than a non-stiff solver like ode45. Matlab does not offer a definition of stiffness, so I went looking
on the web for a definition of a stiff vs. non-stiff system. One reference indicates there is no exact definition of
stiffness, but that when using Runge-Kutta solvers of order 4 or 5, symptoms of stiffness are non-efficient numericalsolution (small time steps) and oscillations in the response. In addition, if I had been able to linearize my system
equations, I could have plotted the eigenvalues for the initial time, and then at some later time, and looked to see that
they move significantly, indicating the system is stiff.
When I solve my system equations with no heat transfer (h = 0) and using ode45, and vary the relative tolerance I
get the following results:
RelTol time (sec) successful steps failed attempts
1.e-3 1.1 57 1
1.e-5 8.74 565 71.e-7 93.21 5587 8
whereas with ode15s solver:
RelTol time (sec) successful steps failed attempts
1.e-3 0.44 23 5
1.e-5 3.57 245 152
1.e-7 1.54 110 55
59
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
66/289
W. Booth
08/18/04
6
These results, suggest symptoms of a stiff problem, and the plot of ode45 results for the first two values of relativetolerance shows that when the tolerance is large, the response is oscillatory, whereas if the tolerance is much
reduced, the solver is less efficient, but produces a smooth response.
Figure 2-3: Simulation results for ode45 solver with different relative tolerances
The initial conditions of the system are shown in the Table 2-1, with corresponding units given in section 1.
N1(init) T1(init) P1(init) S1(init) N2(init) T2(init) P2(init) S2(init)
0.0048 529.67 20 174.5244 0.0035 529.67 14.7 129.9494
Table 2-1: Table of initial conditions
For the adiabatic process (h=0), by definition there is no heat loss to the environment, therefore, the initial pressuredifference between the two tanks drives mass flow from left to right, until the pressures are in equilibrium, at which
point there is no further changes. The mass of air in tank 1 remains greater than the mass in tank 2, whereas the
temperature in tank 2 is greater than the temperature in tank 1, i.e., N1> N2, and T1< T2. What tank 1 loses inpressure, it must also lose in temperature, from the ideal gas law. Comparing the equilibrium conditions in Table
2-2 with the initial conditions in Table 2-1, the total entropy decrease in tank 1, is equal to the total entropy increasein tank 2. As expected, the ideal system conserves entropy.
Part 2b & 2c Transient Overshoot and Tank Equilibrium Conditions
Figure 2-2 shows that as the heat transfer between the tanks and the environment increases, the following occurs:
1. Settling time of pressure transient increases
2. Temperatures settle to ambient (if h 0) and settle faster as h increases.3. Total entropy of the tanks return to their initial values (while the entropy of the environment increases)4. Mass of air in the two tanks equalizes, as the tank temperatures reduce to ambient
60
-
8/13/2019 2 141 Fall 2002 Modeling and Simulation of Dynamic Systems Volume III
67/289
W. Booth
08/18/04
7
I had not expected results 1,3 or 4. I expected the pressure transients to settle independent of the heat transfercoefficient. The reason this is not the case, is because of the coupling between the pressure, temperature and mass
flowrate, i.e. the fact that this is a 3-port capacitor. The pressure difference between the tanks dominates the initialresponse, but thereafter, it is the heat transfer to the environment, which governs the settling time of the system.
Some of the initial entropy produced is lost to the environment, therefore the temperature of tank 2 does not initially
increase as rapidly as in the adiabatic case, nor does tank 1s temperature decrease as rapidly. Therefore, thepressure difference between the two tanks is maintained for longer, until the response is governed primarily by the
heat transfer to the environment, and thus, the pressure difference can only decay as quickly as the pressure
difference (see settling times for h=0.001 and h=0.01 in Table 2-3.
The pressure difference between the two tanks is plotted in Figure 2-4.
Figure 2-4: Pressure difference between tanks 1 and 2
Given that the R elements all have temperature in, entropy flow rate out (i.e. conductance) causality on both
ports, and through-power flow, these elements guarantee satisfaction of the 2ndlaw of thermodynamics. It is not theabsolute value of entropy which can never decrease, it is the rate of entropy production that must never decrease,
therefore my initial surprise that the entropy of tank 1 initially decreases and subsequently returns to its initial value
is expected. This is due to the fact that when T1> Tambthen the entropy of tank 1 will decrease (disregarding mass
transfer for the time being), but if T1< Tambthe entropy of tank 1 will increase.
An interesting result occurs when the heat transfer coefficient is low, i.e. h=0.0001 ft-lbf/sec-in2-R. The pressuredifference decays to the adiabatic equilibrium condition of ~17.5psi almost as quickly as the adiabatic case itself, i.e.
the settling time for the initial temperature/entropy and pressure/mass transients is 22sec. After which, the heatdrain to the environment causes the pressure in both tanks to decay to the isothermal equilibrium conditions (for
h=1) over a much longer timer (>600sec). At first glance, there is no pressure difference to cause this final mass