None W03B_Modeling_PhysicsBased

Table of Contents

Challenge

This notebook's challenge is a continuation of the challenge you saw in Week 2 B and Week 3 A. In this assignment, you will continue on a path towards building a suitably predictive mathematical model of your friend's hydroelectric dam system, whose behavior is represented in the simulation below.

The Simulation has CHANGED

Note that the simulation included with this assignment has changed slightly. We have added a switch to allow you to disconnect the house from the turbine. This will allow you to scope the system such that the electrical dynamics of the system are not included in its behavior during a dynamic test. The self-latching button "Electrical Disconnect" disconnects the house and generator portions of the system when it is set to true. The button is in the "false" position when the simulator first loads, meaning that the electrical system is connected.

Recognizing that recording the pressure at the turbine inlet is somewhat confusing, we have also changed the format of the data file, and replaced the "turbine pressure" with a reading from a pressure sensor at the penstock valve that shows the hydrostatic pressure applied to the turbine system at the upstrem edge of the penstock valve at any moment. This is the quantity we will consider as the system's input for today's exercise. The data file's structure is now:

column 1 2 3 4 5 6
data time gauge height (ft) Pressure at penstock valve (kPa) turbine speed (RPM) generator volts house volts

Consider the behavior you've observed in the Dam over the last few days. In the last assignment, you were asked to drain the dam to collect as the turbine spun up from rest when the hydrostatic pressure was substantially lower than in your first test. You may have wondered:

"Why is the dam draining when the valve is open at 100% but not when the valve is only cracked?"

It's a good question. It begs another question about whether our 5-second tests really capture the full dynamic behavior (transients and 'steady state') for all possible valve positions. What if we wanted to upgrade the valve to have different properties? What if we determined that the turbine needed improvement, or we had the option to make the reservoir larger or smaller? Would we be able to predict the effects of these changes based on the models we've developed so far?

Using the purely empirical approach we took in W03A, we would have to make the change to the system and then re-build our model after running more tests. This means that we could not use our current models to help us improve the design of the dam itself, or make predictions of how changes to the dam's operating conditions would affect its behavior. This reality shows the limitations of limits of empirical (purely data-driven) models, because it means they can't be used as a design aid if system properties are expected to (or need to ) change.

If it is important to know the physical processes behind system behavior, or if changing physical properties inside of our system is a possibility, it is often useful to build a physics-based model of the system! Physics-based models contain information about physical properties of the system, and can thus be used to predict how changes in those properties might affect a system's dynamic behavior.

Constructing a model like this requires a slightly different approach to model scoping and model construction than we took in the last exercise.

The following sections summarize the process using tools that may be familiar to you from prior classes. You can use these sections as a reference. The approach we will use for developing physics-based models of dynamic systems in this course is called lumped-parameter modeling.

Dynamic Physical Systems

A dynamic physical system is a collection of interconnected, physical components. At least one of these components must store energy for the system to display dynamic (time-varying) behavior in the absence of a time-varying input.

Lumped Parameter Modeling of a Dynamic Physical System

Consider the following "electrical system." You probably recognize this as a "short circuit" that would heat up the wire and cause problems. But let's imagine for a moment that you're interested in creating a physics-based, dynamic model of this system and investigating how the voltage and current in the wire vary over time as a function of the properties of both the wire and the battery if I suddenly connect the wire to the battery's terminals. How would you start?

image.png

Accessing your enduring understanding from past courses such as ME331 (Instrumentaion) and ME352 (Systems), you might remember that all electrical conductors have electrical resistance, so while this appears to be a "short circuit," the wire itself acts kind of like a resistor, albeit one with a small value of resistance. You might also remember concepts from your electricity and magnetism physics course like Faraday's Law, Lenz's Law, and the Lorentz Force that might explain how current through coils of wire can induce a magnetic field, and vice versa. So maybe the coil of wire also has some inductance. What's worse, it's possible that this piece of wire may store excess electrons, giving it a small amount of capacitance.

So how on earth could we begin to figure out the values of the resistance, capacitance, and inductance of this wire are? How do we know if we could ignore some of those properties? How are these properties distributed along the wire's length? How could we possibly start to build a physics-based model when the wire's geometry, construction, and resulting physical properties are so complicated (who knew)?

One possible answer is that this "real" object, which has physical properties that vary in space (and perhaps time), might be reasonably broken into an interconnected set or "system" of idealized elements that have one constant, lumped physical parameter each. Whether this is a good approximation or not depends on the details, but this approach is called "Lumped Parameter Modeling" of dynamic systems:

Lumped parameter modeling is the act of approximating a real, physical system comprised of interconnected real, physical components, each of which may have spatially or temporally varied physical properties as a system of interconnected idealized components that each have one "lumped," spatially-and-time-invariant physical property.

This is the approach to physics-based modeling we will use in ME480.


Model Construction: Idealized, Lumped-Parameter Elements

The First Law of Thermodynamics

When we go to construct dynamic, physics-based models for lumped-parameter, idealized elements (which are themselves one-element systems), we can start building our model by thinking about how the element stores and/or dissipates energy when work is applied to it.

You have seen the law of conservation of energy for a system, also called "the first law of thermodynamics," in your thermodynamics course. It states that a change in a system's internal or stored energy from energy state "1" to energy state "2" $E_{1\rightarrow 2}$ must be caused by either heat transfer $Q_{1\rightarrow 2}$ into our out of the system boundaries, or by work $W_{1\rightarrow 2}$ done to or by the system.

$$E_{1\rightarrow 2} = Q_{1\rightarrow 2} - W_{1\rightarrow 2}$$

For this discussion, we will use the "Mechanical Engineering" convention for signs, in which heat transfer into the system is defined positive and work done by the system is defined positive. Note that this means that if a system is doing "positive work" on its surroundings, its stored energy will decrease in the absence of heat transfer. If positive heat transfer occurs at the system boundaries, the system's stored energy will increase. Other sign conventions are possible, and they vary from field to field.

The form of stored energy $E$ and the work done to or by the system $W$ will vary based on whether we are discussing a mechanical, electrical, fluid, thermal, or mixed system or element, but as you are probably aware, the units of all of these types of energy are dimensionally consistent with $\frac{kgm^2}{s^2}$ or "Joules."

When we approximate the physical construction of a system using idealized, lumped-parameter elements, we often say that these elements fall into one of the following categories:

  1. Idealized Sources: Deliver power to the system by providing a known value of one of the two variables in the system's power equation, regardless of how much power is required.
  2. Energy Storage Elements: store energy without heat transfer
  3. Dissipative Elements: dissipate energy without storing any
  4. Power Tranducers: transform the energy's type without storage or heat transfer

All of the commonly used lumped parameter elements we will discuss fall into one of these three categories. If a system or component does more than one of the three things mentioned above, it can often be split up into idealized elements that only perform one job.

Power Form of the First Law of Thermodynamics

Because we are working towards building physics-based dynamic models of a system, and are interested in how our system's behavior evolves over time rather than just between two energy states "1" and "2," we can shrink the duration over which our first law equation is applied, and look at the rate of energy change in smaller and smaller time intervals. In the limit of $\Delta t \rightarrow 0$, we end up taking the derivative of the first law of thermodynamics. Because the derivative of energy is power, with SI units of Joules/second, we call this the power form of the first law, and it can be applied to a system at any arbitrary moment in time:

$$\dot{E} = \dot{Q} - \dot{W}$$

Power comes in many forms-- in this course, we will focus mainly on electrical, mechanical, and incompressible fluid power (flow work), which are the products of two key variables in each case:

  1. Electrical Power $\dot{E}_{elec} = V\cdot i$, a product of Voltage $V$ and current $i$
  2. Translational Mechanical Power $\dot{E}_{mech,t} = v\cdot F$ with velocity $v$ and force $F$
  3. Rotational Mechanical Power $\dot{E}_{mech,r} = \Omega \cdot T$, with angular velocity $\Omega$ and torque $T$
  4. Incompressible Fluid Power $\dot{E}_{fluid} = P \cdot \dot{\mathcal{V}}$, with pressure $P$ and volumetric flow rate $\dot{\mathcal{V}}$.

Power Variables: A-Type and T-Type

In each of the cases above, the variables in the power equation can be grouped into categories based on how they are measured. these two categories are "across" and "through."

  • Across-type (A-type) variables must be measured relative to a reference. Only differences in these quantities between two points can be measured. These variables are pressure $P$, velocity $v$, angular velocity $\Omega$, and voltage $V$.
  • Through-type (T-type) variables must be measured by placing an instrument in series with a system element. Examples include current sensors, load cells, and flow rate gauges. The T-type variables in incompressible fluid, mechanical, and electrical systems are volumetric flow rate $\dot{\mathcal{V}}$, force $F$, torque $T$, and current $i$.

These categories will help us draw analogies between idealized, lumped parameter elements in each class of system (mechanical, fluid, electrical) as we learn to build models for each type of system.


Idealized Sources

It is sometimes safe to assume that the input to a dynamic, physical system is "ideal" in an energetic sense. Idealized sources provide power to the system, and can change its energetic sense.

Assumptions

Idealized sources can provide a known input to a system, which is usually a power variable, regardless of how much power is required to maintain that known input. For example, if the input to a system is force, then we might say that an "idealized force source" is able to provide a as much power as is required to the system to maintain a known input force. These infinite power sources are not real, but many times are a good approximation for systems that operate in a relatively small range of energetic states.

Because power is the product of a T-type and an A-type variable, idealized sources are often classified as either "T-type" sources, which provide a known T-type input regardless of what A-type variable is required, or "A-type" sources, which provide a known A-type variable regardless of what T-type variable is required.

image-2.png

Note that in the figure, a line representing the possible behavior of a "real" power source, which only has a finite available power, is also included. Many real power sources can be approximated as ideal T-type or A-type sources if the power required by the system is low relative to the power source's capability.

List of Common Idealized Power Sources

Common idealized T-type sources include:

  • current sources in electrical systems
  • force or torque sources in mechanical systems
  • volumetric flow rate sources in fluid systems

Common idealized A-type sources include:

  • voltage sources in electrical systems
  • velocity or angular velocity sources in mechanical systems
  • Pressure sources in fluid systems

Idealized Lumped-Parameter Energy Storage Elements

$$\require{cancel}$$

Idealized energy-storage elements are a useful approximation of many real objects that store energy. Stored energy comes in many forms: mechanical kinetic and potential energy, chemical energy, and thermal energy are all examples. If an object primarily stores only one type of energy, it may be a good candidate to treat as an idealized energy storage element.

Assumptions

Idealized energy storage elements (except those that store thermal energy explicitly) are assumed to have no heat transfer in or out. The net work done on or by the element must balance with its stored energy, which can be written formally using the first law of thermodynamics by ignoring heat transfer.

$$\dot{E} = \cancel{\dot{Q}} - \dot{W}$$

Further, the lumped-parameter, idealized energy storage elements used to construct dynamic physical models are assumed to store only one type of energy, and to exchange energy with their surroundings using only one type of work.

For each particular type of energy storage element, these assumptions have different consequences. For fluid capacitors, any kinetic energy due to fluid entering or leaving the capacitor is ignored. For springs, the mass of the spring is ignored. For idealized rotational inertias, any material elasticity that could store potential energy is ignored. The list goes on, but the key thing to remember is that while no real object is actually an idealized, lumped-parameter energy storage element, many real objects are well-approximated by these assumptions because one form of energy storage vastly dominates any other relevant terms in the first law equation above.

Energy Storage Element Types

Energy storage in fluid, mechanical, and electrical systems is usually accomplished by accumulating either the T-type or the A-type variable in the power equation (not both). In mechanical systems, a spring stores potential energy as $E = \frac{1}{2}K x_{12}^2$, where $x_{12}$ is the spring deflection. Substituting Hooke's law into this equation yields $E = \frac{1}{2K} F ^2$, where $F$ is the force in the spring. Because the energy equation can be written in terms of the T-type variable $F$, the spring is considered a T-Type energy storage element. Conversely, an electrical capacitor, which stores energy as $E = \frac{1}{2} C V_{12}^2$, is considered an A-type energy storage element because voltage is an electrical system's across-type power variable.

Classifying energy storage elements this way allows us to draw analogies between different system types. It allows us to treat mechanical springs similarly to fluid inertors, capacitors similarly to masses, and so on.

Elemental Equations for Idealized Energy Storage Elements

An idealized energy storage element's "elemental equation" is a restatement of the first law of thermodynamics in power form. An elemental equation uses an empirical relationship, e.g. Hooke's Law in the case of a mechanical spring, and combines that relationship with the first law to tell us how the element's energy is accumulated in terms of the element's lumped parameter, or dominant physical characteristic.

List of Idealized Lumped-Parameter Elemental Equations

A list of the elemental equations for the lumped-parameter energy storage elements we may encounter in ME480 is shown below, along with the equation for the element's stored energy. image-3.png

Idealized Lumped-Parameter Energy Dissipation Elements

$$\require{cancel}$$

Idealized energy-dissipation or "dissipative" elements are a useful approximation of many real objects that do not store significant energy, but for which the net work done on or by the object is not zero. In order to satisfy the conservation of energy, this type of idealized element must transfer energy as heat to the environment, which is why they are called dissipative elements. They result in energy leaving the system boundaries as heat.

All real systems dissipate energy. If they did not, we would have perpetual motion machines! Idealized, lumped-parameter dissipative elements are often used to model the major dissipative processes and components in real systems.

Assumptions

Idealized dissipative elements are assumed to store no energy. The net work done on or by the element must balance with the heat transfer at the element's boundary. This can be written formally using the first law of thermodynamics by ignoring all energy storage.

$$\cancel{\dot{E}} = \dot{Q} - \dot{W}$$

Further, the lumped-parameter, idealized energy dissipation elements used to construct dynamic physical models are assumed to exchange only one type of work with their surroundings. This could be electrical work, flow work, etc., but not a combination of these types.

Elemental Equations for Idealized Energy Dissipation Elements

An idealized energy dissipation element's "elemental equation" is a restatement of the first law of thermodynamics in power form. An elemental equation uses an empirical relationship, e.g. Ohm's law in the case of an electrical resistor, and combines that relationship with the first law to tell us how the element transfers heat outside of the system boundary in terms of the element's lumped parameter, or dominant physical characteristic.

List of Idealized Lumped-Parameter Elemental Equations

A list of the elemental equations for the lumped-parameter energy dissipation elements we may encounter in ME480 is shown below, along with the net power consumed by each element, which all must be transferred to the element's surroundings as heat. image-4.png

Idealized Lumped-Parameter Power Transducers

$$\require{cancel}$$

Idealized, lumped-parameter power converting transducers are often used to represent physical objects in a system that transform energy from one form to another. Motors convert electrical work to mechanical work. Pumps convert fluid flow work into mechanical work. Gears convert mechanical work at one angular velocity to mechanical work at another angular velocity. The key characteristics of power-converting transducers are that the input work and the output work are the same, meaning that the idealized transducer neither stores nor dissipates energy.

Assumptions

The power-converting transducer only does "one job," and that is power conversion. Therefore, if something can be said to be adequately modeled as a power-converting transducer, it cannot store energy or transfer it to the system's surroundings. In other words, its first law of thermodynamics equation in power form looks like this:

$$\cancel{\dot{E}} = \cancel{\dot{Q}} - \dot{W}$$

These simplifications mean that the net work on the transducer must be zero-- in other words, the power into the transducer and the power out of the transducer must be the same.

$$\dot{W}_{in} = \dot{W}_{out}$$

For a gear train, the assumption of no energy storage would mean that the gears must be massless. The assumption of no heat transfer would mean that the gears have no friction or damping in their bearings. For a motor, the assumption of no energy storage would mean that the motor shaft has no inertia. The assumption of no heat transfer would mean that the motor's armature has no electrical resistance, and that its rotating assembly has no damping. Are these reasonable assumptions?

Probably not. Approximating real transducers using only an idealized transducer element is often a mistake-- most real motors, pumps, and gears have losses and/or intrinsic inertias that store energy. These "extra" pieces of a real power transducer can be represented by breaking the real power transducer into a couple of lumped-parameter idealized elements. Often, the full set of elements needed to fully describe a real power transducer include energy storage and/or dissipative elements along with an idealized transducer. This separates each of the real energy storage, conversion, and dissipative processes in the transducer into "chunks."

List of Idealized Lumped-Parameter Elemental Equations

image-5.png

Model Construction: Interacting Idealized, Lumped Parameter Elements in a Physical System

Model Construction Tools: The Linear Graph Method

You will almost never scope a physics-based model for a system using only one idealized lumped parameter element. However, as the number of elements in your model increases, it can be increasingly difficult to keep track of how the elements influence one another and transfer energy to each other or to the environment.

One convenient and powerful way to help visualize how power (and thus energy) flow in a network (system) of interconnected lumped-parameter elements is to represent a system as a kind of "circuit," regardless of whether the system in question is electrical, mechanical, fluid, or mixed.

This creates a problem, in that it is hard to draw masses, tanks, or viscous dampers as "circuits" in the traditional sense. To make this operationally easier, system dynamicists have come up with several systems for drawing generalized circuit-like networks for use in understanding how a system's components interact. We will explore such a "universal" method to help operationalize model construction in ME480.

The approach we will use is based on prof. Seeler's system dynamics textbook. The methodology is called the Linear Graph method, and it was developed at MIT in order to treat all systems of one-dimensional, idealized, lumped-parameter elements in a consistent way. The law of the land in the linear graph method is "no special symbols," so while everything is represented as a circuit-like network of elements connected by "nodes" (points of constant across-type variable), the symbol for an electrical resistor looks the same as a symbol for a mechanical damper.

Elements in Linear Graphs: Sources

In a linear graph, idealized sources are represented as lines coming from "ground," which represents the zero reference point for the Across-type variable relevant to the type of system in question (velocity, pressure, or voltage). The source can be either an idealized Through (T) type source or an idealized Across (A) type source. image.png

Elements in Linear Graphs: Dissipative and Energy Storage Elements

Lumped parameter energy storage and energy dissipating elements in linear graphs are drawn as simple arrows. These elements can all be thought of as having an "input port" and an "output port" for the through-type variable. Why?

Think about a spring or a damper, which both physically have two connections, one at each end. A section analysis and free body diagram of an idealized, massless spring or damper would show that the net force is the same throughout the element, so force is thought of as flowing through the element from one connection, or "node," to the next.

Any two-port element in a linear graph is drawn this way. Some examples are shown below.

image-3.png

The only time a lumped-parameter "two port" element is drawn differently is in the case of an A-type energy storage element that really only has one physical connection. For example, fluid capacitors store energy in pressure that is always measured with respect to the surrounding pressure, which is the "ground node" or zero reference point for the A-type variable in the system. Similarly, translational masses and rotational inertias store energy in velocity, but this velocity must be referenced to an inertial frame in order for Newton's laws to apply. Therefore, they too must always be connected to "ground." The tricky part is that these elements aren't physically connected to the ground reference, so we draw them with a dotted line to show that they are referenced to ground but not physically connected. Examples are shown below.

image-2.png

Elements in Linear Graphs: Idealized Transducers

In a linear graph, idealized transducers connect portions of the diagram that represent different power types-- for example if we are talking about a motor, the power into the motor has an across type variable of voltage and a through type variable of current. The power out of the motor has an across type variable of angular velocity and a through type variable of torque. The generic symbol for an idealized transducer is shown below:

image.png

Note that the "ground" reference is not connected between the two "sides" of the transducer. This is to symbolize that the A and T type variables on each "side" of the transducer might have different units. It's also worth mentioning that a transducer is the only type of element we will use in a linear graph that has four "ports" rather than two-- it has two ports for its "input" power, and two ports for its "output" power.

As you have seen, drawing elements in a linear graph requires connecting "nodes" to our elements. But what are these "nodes?" What do they mean? How can I recognize them?

Model Construction: Nodes

In system dynamics, a "node" is a fictitious element in your system through which power is transferred without energy storage or "losses" (energy transfer to outside the system boundary). In electrical, fluid, and mechanical systems, a "node" represents a fictitious place where no heat transfer occurs from the system to its environment and no energy is stored.

In terms of the first law of thermodynamics, these assumptions result in the following:

$$\require{cancel}$$$$\cancel{\dot{E}} = \cancel{\dot{Q}} - \dot{W}$$

This means that the net work on the node must be zero.

We often imagine that idealized, lumped-parameter elements in our system model are connected to one another through this type of lossless interface. the node "splits" the through-type variable in the power equation, distributing it to the elements to which it is connected. A single node will by definition be a place in your system where the across type variable in the power equation is constant. Jumper wires and breadboard rows are examples of "nodes" in electrical circuits. Rigid connections between a mass and a spring could be conceived of as "nodes" in a mechanical system. A short section of pipe with negligible fluid resistance where multiple flows split or come together in a fluid system also might be well approximated by a "node" of constant pressure.

To explore the theoretical idea of a "node," we will look to electrical circuits.

Example: Nodes in electrical systems

The easiest place to look for an almost literal representation of a node is in an electrical schematic, where two or more "ideal wires" (wires with negligible resistance) join together at a point. See the example below for a node joining three wires.

image.png

With our assumptions of no heat transfer and no energy storage in place, Writing the First Law of Thermodynamics for the electrical node yields:

$$\require{cancel}$$$$\cancel{\dot{E}} = \cancel{\dot{Q}} - \dot{W}$$

Rewriting, we see that the net work on the node, must be $\dot{W} = 0$. If our "node" represents an infinitesimal junction between wires with negligible resistance, the voltage that exists at each "end" of the node cannot be different. Therefore, we can make the assumption that at an electrical node, there can be only one voltage, $V_1$.

Then, Adopting the sign convention that currents flowing out of the node correspond with work flowing 'out' of the node, we can then write our first law of thermodynamics as:

$$ V_1 i_1 = V_1i_2 + V_1 i_3$$

Because we have only one voltage at the node, it is common to cancel it and write:

$$ i_1 = i_2 + i_3$$

Which is simply a re-statement of the first law of thermodynamics under specific conditions and assumptions. Because there is only one voltage, the currents must "split" in a way that conserves energy. Here, the conservation of energy boils down to a conservation of charged particles that can neither be created nor destroyed via the law of conservation of mass. The equation above, in electrical systems, is often called "Kirchoff's Current Law" or "KCL."

KCL is the electrical-systems version of a more general principle called the Principle of Continuity.

Model Construction: The principle of Continuity: Conservation at a Node

The principle of continuity is a re-statement of the first law of thermodynamics with specific assumptions. For many types of systems, the assumptions boil the first law of thermodynamics down to a simple statement about conservation of mass. In these cases, the principle of continuity states:

"flows into a node must balance with flows out of a node,"

Where the definition of "flows" depends on the type of system at hand. For electrical systems, the principle of continuity at a node boils down to a "conservation of current," or Kirchoff's Current Law:

$$\sum i _{node} = 0$$

With currents into a node considered positive, and currents out of a node considered negative.

For a mechanical system, Force is the quantity that "flows through" elements via Newton's 3rd law (making an imaginary cut anywhere along a rigid body and drawing a free body diagram will confirm this). Thus, a "node" in a mechanical system is a rigid, imaginary element with "no" mass. Often, a node is superimposed on top of a translating or rotating idealized mass, and we imagine that the inertial reaction force from that idealized mass flows into or out of the node as appropriate. This is similar to the use of the D'Alembert principle which conceives an "inertial reaction force" exerted by a mass rather than thinking about the familiar form of Newton's second law, $\sum F = m\dot{v}$. The D'Alembert vs. Newtonian viewpoint is probably responsible for the war against "centrifugal force" waged in many high school physics classrooms across the U.S.

Writing the first law of thermodynamics for a node in a mechanical system, and canceling that its (single) velocty from the first law equation, one obtains:

$$\sum {F}_{node} = 0$$

For a fluid system (incompressible), a "node" might represent an infinitesimal junction between two pipes or valves, or a junction between a valve and a tank. Writing the first law of thermodynamics for this "infinitely thin" element in which only one pressure exists (and can thus be canceled), one obtains:

$$\sum \dot{\mathcal{V}}_{node} = 0$$

With volumetric flows into the node being considered positive, and flows out of the node negative.

Model Construction: The Principle of Compatibility (Kirchoff's Voltage Law)

The principle of continuity states that the sum of the voltage drops around any closed "loop" in a circuit-like network must be zero. This is a direct consequence of the first law of thermodynamics. Consider the following circuit, for which 3 closed loops exist. The circuit diagram and the linear graph are shown side by side for comparison. They contain exactly the same information.

image-2.png

For Loop 3, the principle of compatibility states: $$\require{cancel}$$ $$ V_{g1} + V_{12} + V_{23} + V_{34} = 0$$

Which, given the definition of $V_a - V_b = V_{ab}$, could be re-written as:

$$ \cancel{V}_{g} - V_1 + V_1 - V_2 + V_2 - V_3 + V_3 - \cancel{V}_{g} = 0$$

Similarly, for Loop 1, the principle of compatibility states:

$$V_{g1} + V_{12} + V_{2g} = 0$$

And for Loop 2, the principle of compatibility states:

$$V_{g2} + V_{23} + V_{3g} = 0$$

Compatibility can also be appled to fluid systems (replacing voltages with pressures) and to mechanical systems (replacing voltages with velocities).

Model Construction: Building a Linear Graph Model of a System

The aim of the linear graph method is to take a diagram showing physical components of a system and to turn it into a circuit-like network of idealized, lumped-parameter elements. The model must be properly scoped before a linear graph model is constructed. This means that the model's inputs, outputs, and its list of constitutive idealized elements must be known before a linear graph is constructed.

An example of a gear-driven syringe system and a possible corresponding linear graph model are shown below

image.png

To construct a linear graph, you can follow the general procedure below.

  1. Draw a ground reference for each type of power in the system (rotational mechanical, translational mechanical, electrical, or fluid)
  2. Draw and label all of the nodes in the system. Look for unique nodes by looking for places in the system with a unique value of the A-type power variable for each respective element (velocities, angular velocities, pressures, and voltages).
  3. Connect the nodes using your idealized, lumped parameter elements, including transducers. Ensure that each end of each element has the correct A-type variable value.
  4. Annotate the model with unique values of the T-type power variables in the system (currents, forces, torques, flow rates). Assume directions for these T-type variables according to your best guess of the direction of power flow from input to output.

Once your linear graph representation of your system is complete, you are ready to continue with model construction. The linear graph can be treated like an electrical circuit. The principles of continuity (KCL) and compatibility (KVL) will be helpful in building a differential equation or set of differential equations describing your system.

Model Scoping Disciplined Process: Lumped-parameter Dynamic Physical Systems

Model scoping for a dynamic, lumped-parameter model can start similarly to model scoping for a purely empirical model.

  1. Begin by choosing an input and output for the system. Determine whether an idealized A or T type input is most appropriate. The units of the system's input and output will often tell you if power transduction must occur inside the system. For instance, if an input is electricity, and an output is fluid flow, these represent two different types of power, so conversion must take place inside the system.
  2. If possible, a step response, initial condition response, or other dynamic test should be performed on the system to get an idea of the system's order.
  3. The apparent order of the system will be equal to the number of independent energy-storing elements that are required for inclusion in the system. Two energy-storage elements are independent if their energy storage equations cannot be written in terms of the same across or through-type variable.
  4. Look at the physical components in the system. Determine which of these components are likely to store significan energy, and represent the energy storing processes in your system as idealized energy storage elements. In mechanical systems, look for masses and inertias. In electrical systems, look for components that may have significant capacitance or inductance. In fluid systems, look for reservoirs or tanks to model as capacitors, and consider modeling long pipes with significant fluid mass inside them as fluid inertors. Start simply and allow yourself to be guided by your conclusions about model order above.
  5. Look at the physical components in the system. Determine where there are likely to be dissipative processes in the system, and represent these as idealized dissipative elements. In mechanical systems, look for damping or friction between two elements, or between an element and ground. In electrical systems, look for resistors or elements that may have resistance. In fluid systems, look for valves, long pipes, or orifices that may significantly resist flow.
  6. Guided by step 1, determine whether any power transduction takes place. Choose idealized power transducers to include in your system as appropriate.

Model Construction Disciplined Process: Lumped-parameter Dynamic Physical Systems

After you have scoped your lumped-parameter dynamic model, it is time to move on to model construction. What follows is one possible process you could follow. There are others, but this is the one we will refer to in ME480. You have followed a similar process in ME352, so we will not provide exhaustive, detailed examples here.

  1. Describe the behavior of each element in your model (write its elemental equation and energy storage equation if appropriate)
  2. Determine if the number of independent energy storing elements in your model matches your expectations from model scoping. If it does not, you may want to reconsider your scoping choices.
  3. Draw your system of interconnected, lumped-parameter, idealized elements as a circuit-like network using a tool like the Linear Graph method. This will show how each idealized, lumped-parameter element in your model is connected by "nodes" of constant across-type variable.
  4. Write the equations of continuity for each node in your model.
  5. Write the equations of compatibility for each independent "loop" in your model.
  6. Using algebra, treat the set of elemental, node, and loop equations as a system of coupled equations. Reduce this set of equations to a suitable form so that they can be solved and/or simulated. "A suitable form" is your choice, but may be an input-output differential equation, a transfer function, or a set of coupled differential equations in "state space" form.
  7. Confirm that your final model (in the form of a differential equation) has the correct order, is stable for your elements' parameter values, and that the units of each term in your differential equation(s) are consistent.

This list of steps is general, but it should be a roadmap for the disciplined process of model construction when considering physics-based, lumped-parameter dynamic models.


Exercise 1: Due Monday, September 20 by MIDNIGHT

Model Development and Validation: Build a Physics-Based Dynamic Model of the Hydroelectric Dam

Recognizing that understanding how the physical properties of the dam system affect its dynamics may help you design your friend's charging station control system, you wish to take a small step towards building a full, physics-based, lumped-parameter model of the dam system. A NEW VERSION of the simulator is shown below for your use.

The Simulation has CHANGED

Note that the simulation included with this assignment has changed slightly. We have added a switch to allow you to disconnect the house from the turbine. This will allow you to scope the system such that the electrical dynamics of the system are not included in its behavior during a dynamic test. The self-latching button "Electrical Disconnect" disconnects the house and generator portions of the system when it is set to true. The button is in the "false" position when the simulator first loads, meaning that the electrical system is connected.

Recognizing that recording the pressure at the turbine inlet is not the same as the hydrostatic input pressure from the dam's water column height, we have also changed the format of the data file, and replaced the "turbine pressure" with a reading from a pressure sensor at the penstock valve that shows the hydrostatic pressure applied to the turbine system at the upstrem edge of the penstock valve at any moment. This is the quantity we will consider as the system's input for today's exercise. The data file's structure is now:

column 1 2 3 4 5 6
data time gauge height (ft) Pressure at penstock valve (kPa) turbine speed (RPM) generator volts house volts

Model Scoping: Fixed Assumptions

Scope a physics-based, lumped parameter model for the dam system. You can use the following two fixed assumptions:

  1. We will only model the system's behavior when the electrical portion of the system is disconnected for this exercise
  2. You will consider the "pressure at the penstock valve" in pascals as the system's input, and the turbine angular speed $\Omega$ as your system's output.
  3. The damping between the turbine shaft and ground is aproximately 2,000 $\frac{Nms}{rad}$
  4. The turbine's rotational inertia $J$ is approximately 4250 $kgm^2$
  5. The turbine's displacement $D$ is approximately $1.0 \frac{m^3}{rad}$

In the markdown cell below, follow the system scoping procedure outlined above and provide a list of elements you will include in your model with justification below.

YOUR ANSWER HERE

Model Construction: Construct a lumped-parameter, physics-based model for the dam system

Using the model construction procedure outlined in this notebook, develop a physics-based, lumped-parameter model of the dam system as a single linear differential equation that only includes terms multiplied by the input, terms multiplied by the input, and terms multiplied by the derivative(s) of output. Leave all physical parameters as letters, and present your derivation and final answer in the markdown cell below.

YOUR ANSWER HERE

Model Construction: Use your model to determine the fluid resistance $R$ of the penstock using a step response test

One thing we do not know is the value for the resistance of the penstock valve and tube, which you can call $R$. Collect a 5-second step response test on the dam system with the electrical components disconnected. Begin with the dam overflowing and the penstock valve open position set to 50%.

Then, using the known physical quantities above, and solving your physics-based lumped parameter differential equation, determine a value for $R$ that results in the best possible fit between model and data. Present any hand calculations in the markdown cell below, and any computations using Octave in the code cell below. you must show agreement between model and data on a single set of axes using the octave cell below

YOUR ANSWER HERE

In [3]:
% YOUR CODE HERE
error('No Answer Given!')
error: No Answer Given!

Model Validation: Predict performance at a different input pressure

Run a new step test at a lower dam height (and thus, a lower penstock valve input pressure). Start with the turbine at rest. Without changing your calculated value for $R$, comment on how well your model generalizes to the new scenario. Your answer must include a plot showing the comparison between model and data on a single set of axes in the octave cell below.

YOUR ANSWER HERE

In [4]:
% YOUR CODE HERE
error('No Answer Given!')
error: No Answer Given!
In [ ]: