None Reading_18

Challenge

In this challenge, you will be building a model of a galvanometer, which is an instrument used to measure voltages and other quantities that can be represented by voltages. Here is a video of how a galvanometer is constructed and how it works.

This device converts electrical power (albeit small amounts) into mechanical power to move the indicator needle against a torsional spring. This requires electrical-mechanical transduction of power, like a motor, but where a motor can spin its rotational inertia freely, the galvanometer moves against a torsional spring, which stores potential energy. We haven't talked about springs at all this semester, so we'll need to lay down some quality thermodynamic assumptions about springs, and talk about how they store energy. This will allow us to use them when building a model of the galvanometer.

Mechanical Springs

Mechanical springs come in all shapes and sizes. If the spring is linear, which many are (at least for small values of spring deflection), it follows Hooke's Law, which states that there is a linear relationship between force (for a translational spring) or torque (for a torsional spring) and the spring's deflection.

A diagram representing an "ideal" spring, which has negligible mass and dissipates negligible heat to the environment when it is deformed, is often drawn as follows. Both a torsional (rotational) spring and a translational spring are represented in the diagram below. Use the right hand rule to imagine the torques, angles, and angular velocities exerted upon the rotational spring.

image-3.png

As drawn, Hooke's Law can be written for the translational spring as:

$$F_k = K(x_1-x_2) = Kx_{12}$$

If you imagine the scenario in which $x_{12}>0$, or $x_1>x_2$, it is clear that the spring would be in compression as shown. If the sign of $x_{12}$ were to flip, Hooke's Law would predict a negative force, meaning that the spring would be in tension with $F_k$ pointing outwards from each end. For a translational spring, spring constant "K" can be represented in SI units of $\frac{N}{m}$.

The expression of Hooke's Law for a torsional spring is similar:

$$T_k = K(\theta_1 - \theta_2) = K\theta_{12}$$

For a torsional spring, the spring constant $K$ can be expressed in base SI units of $\frac{Nm}{rad}$.

The picture above shows a free-body diagram on each type of spring. If a spring's mass is negligible, Newton's second law for the spring indicates that the force on each end of the spring must be an equal $F_k$ for a translational spring, and $T_k$ for a torsional spring.

From an energetic perspective, if a spring is considered massless, it ONLY stores elastic potential energy, and stores no kinetic energy. If it is also assumed that the spring does not, by itself, dissipate significant energy across the system boundaries through heat transfer, and has a constant mass, then the first law tells us that any work done on the spring will cause it to store potential energy.

$$\require{cancel}$$$$E = W_{net} + \cancel{Q_{net}}+ \cancel{E_{m,net}}$$

Similarly, for a torsional spring, we can write: $$E = W_{net} + \cancel{Q_{net}}+ \cancel{E_{m,net}}$$

because mechanical work is $F\cdot x$ for a translational system and $T\cdot \theta$ for a rotational system, the spring's energy storage can be expressed for a translational spring as: $$\require{cancel}$$ $$E = W_{net} + \cancel{Q_{net}}+ \cancel{E_{m,net}} = \int F_k dx_{12} = \frac{1}{2} K x_{12}^2$$ Similarly, for a torsional spring, we can write: $$E = W_{net} + \cancel{Q_{net}}+ \cancel{E_{m,net}} = \int F_k d\theta_{12} = \frac{1}{2} K \theta_{12}^2$$

These equations represent the stored Elastic Potential Energy in the spring. However, the issue with both of these forms of the energy storage equation for springs is that they don't include a power variable. This means that writing the first law of thermodynamics for the spring in power form doesn't produce a clean statement about power variables. Without a direct statement about how the spring's power variables interact, applying continuity and compatibility equations to a mechanical system with a spring would be difficult.

For this reason, the energy in a translational spring is often re-written as:

$$E = \frac{1}{2K} F_k^2$$

and for a torsional spring as:

$$E = \frac{1}{2K} T_k^2$$

A quick algebraic substitution of $F_k= K x_{12}$ for the translational spring or $T_k = K \theta_{12}$ for the torsional spring will show that the two types of expressions for stored energy are equivalent.

Th expression for stored spring energy in terms of power variables shows us that unlike a mass, which stores kinetic energy by accumulating the across type power variables $v$ or $\Omega$, a spring stores energy by accumulating the through type power variables $F$ or $T$. For this reason, springs are often called "Through Type" energy storage elements.

Using the power-variable form of the energy storage equation, we can write the first law of thermodynamics in power form for a translational spring as:

$$\dot{E} = \frac{1}{K} F_k \dot{F}_k = \dot{W}_{in}-\dot{W}_{out} = F_k v_{12}$$

and for a torsional spring, we find a similar relationship:

$$\dot{E} = \frac{1}{K} T_k \dot{T}_k = \dot{W}_{in}-\dot{W}_{out} = T_k \Omega_{12}$$

Cancelling the extra appearance of the through-type variables in each of these equations, we find that for a translational spring, we have:

$$\dot{F}_k = Kv_{12}$$

and for a torsional spring, we have:

$$\dot{T}_k = K\Omega_{12}$$

Where "1" and "2" represent the two "ends" of each spring. With these equations, springs are easy to include in equivalent-circuit representations of mechanical systems.

As it turns out, springs are not the only common "idealized elements" that store energy in terms of the T-type power variable. There are analogs to springs (in this framework, at least) in both fluid and electrical systems too! For completeness, we will summarize those briefly here.

Fluid Inertors

One of the things you may have noticed when we've dealt with fluid systems in the past is that we had to assume that elements in our fluid systems did not store a significant amount of kinetic energy, and thus we did not include kinetic energy in our derivations of fluid capacitors and/or fluid resistors.

Well as it turns out, this is a poor assumption for many pipes with high volumetric flow rates carrying incompressible fluid, especially if the pipes carry a large volume of fluid. Imagine a long pipe as shown in the diagram below with length $L$ and cross-sectional area $A$. EVEN IF the pipe does not lose significant energy to heat, it may show a pressure drop from one end of the pipe to the other!

image-2.png

To understand why, Let's consider the kinetic energy of the fluid that is flowing inside the pipe, and how it might change. To do this, we need to know just a little bit about fluid mechanics. For the purposes of modeling, fluid flow in a pipe is usually characterized as either laminar or turbulent.

Laminar flow in a pipe features a parabolic distribution of flow velocity as a function of distance from the pipe walls. The fluid velocity profile for laminar flow is parabolic both instantaneously and on average.

Turbulent flow is much more chaotic, so the velocity of any one fluid particle at any one instant is difficult to know. However, on average over time, the flow velocity is often decently approximated by a uniform distribution all through the pipe. Note that "on average" is a little unsettling-- however, the variations in flow stream velocities in turbulent flow happen very quickly compared to the changes in overall stored energy that we are tracking at the element and system level, so we can ignore temporal (with time) variations and look only at average velocities.

image-5.png

If we were to assume that the flow in the fluid is uniform, we can write the total mass of the fluid inside the pipe as $m = \rho A L$, with $A$ the cross sectional area, $\rho$ the density, and $L$ the pipe length. Then, the kinetic energy inside the pipe can be written $E = \frac{1}{2}mv^2 = \frac{1}{2}\rho A L v^2$. Replacing $v$ to expose our T-type power variable $\dot{\mathcal{V}}$, we can write $v = \frac{\dot{\mathcal{V}}}{A}$. Then, our kinetic energy equation becomes:

$$E = \frac{1}{2} \frac{\rho L}{A} \dot{\mathcal{V}}^2$$

We can group the constants to uncover what is commonly called "fluid inertance" $I = \frac{\rho L}{A}$ for uniform flow in a pipe. We can then write:

$$E = \frac{1}{2} I \dot{\mathcal{V}}^2$$

Note that this formula for $I$ will over-predict stored kinetic energy for non-uniform flow, but it is a decent first approximation.

So, to capture kinetic energy storage in a pipe, system modelers will often include an "idealized fluid inertor" as part of their model. It is a fictitional element that has no losses, so it is often combined in series with a resistor to represent heat loss due to friction in the pipe flow. For an "idealized fluid inertor," we say that energy carried in by mass transfer is the same as energy carried out by mass transfer, so $\dot{E}_{m,net}=0$, and we say that pipe flow losses are negligible, so $\dot{Q}_{net}=0$. Then the first law in power form becomes:

$$\dot{E} = \dot{W}_{net} + \cancel{\dot{Q}_{net}}+ \cancel{\dot{E}_{m,net}}$$

Which, when rewritten with $\dot{E} = I \dot{\mathcal{V}} \ddot{\mathcal{V}}$ and $\dot{W}_{net} = (P_1-P_2)\dot{\mathcal{V}}$, becomes:

$$\dot{W}_{net} = (P_1-P_2)\dot{\mathcal{V}}=I \dot{\mathcal{V}} \ddot{\mathcal{V}}$$

Which can be simplified to:

$$P_{12} = I \ddot{\mathcal{V}}$$

Once again, idealized fluid inertors are fictitious-- they are almost always combined with some kind of idealized resistor to represent losses in pipe flow.

Electrical Inductors

Like a fluid inertor and a mechanical spring, an idealized electrical inductor is an element that stores energy in a T-type power variable; for electrical systems, this means current!!

Coils of wire tend to produce magnetic fields when current passes through them, as we have already learned in Reading 16. If the coil of wire is big enough, this magnetic field stores energy! For example, the "transduceyness" of electric motors relies on magnetic fields interacting with current to transform power from mechanical to electrical and back. However, most small motors and generators do not produce enough of a magnetic field for their "inductance" (capacity to store magnetic field energy) to be relevant in a system model. You will also rarely find motor inductance on a specification sheet unless the motor is very large.

An introduction to inductors, which are specially designed electrical components that have a known capacity to store energy in magnetic field, is given in the YouTube video below. Note that in the water analogy, the author uses a "water wheel" to describe the energy storage-- you could easily replace this analogy with "fluid inertance" instead of the needlessly complex mechanical energy storage associated with a water wheel.

Inductors that are commercially available are sold with a certain "inductance," which represents its capacity to store energy. Their electrical symbol is shown below. image.png

Magnetic field energy stored in an inductor is commonly written:

$$E = \frac{1}{2}Li^2$$

If we consider an "idealized inductor," which only stores energy in this way, and loses none, we can write the first law in power form as follows, considering that there is no mass flow across the boundaries of the inductor:

$$\dot{E} = \dot{W}_{net} + \cancel{\dot{Q}_{net}}+ \cancel{\dot{E}_{m,net}}$$

Subbing in the derivative of our energy equation $\dot{E} = L i \dot{i}$ and our electrical power equation $\dot{W}_{net} = (V_1-V_2)i$, we obtain a power-form energy balance of:

$$V_{12}i = Li \dot{i}$$

Which can be simplified to:

$$V_{12} = L \dot{i}$$

Like fluid inertors, "real" electrical inductors are often represented in a system model by a combination of an idealized inductor and an idealized resistor, since true inductors often have a significant amount of electrical resistance (they are just wires, after all).

ES103 Final List of Standard Elements and Assumptions

With our last three energy storage elements taken care of, we can produce a complete list of all of ES103's standard assumptions and elements for physical systems.

image.png

As you move through your career as an engineer, you will find all sorts of ways to improve these models-- many resistors (especially fluid) and dampers are nonlinear, but if you know their physical behavior and can fit a model to it, you can do really, really well with this set of standard elements!

Assignment

Using the description from the video above, develop a differential equation model for the galvanometer in either state space or input-output form. Consider your system's input to be the voltage applied to the galvanometer's coil. The galvanometer is designed to measure voltages in the range of 0-10Volts by moving the needle from a minimum of 0 degrees to a maximum of roughly 120 degrees.

Ultimately, you would like to produce a plot of the galvanometer's ANGLE when subjected to a constant, sudden input voltage. This means that a good power variable to use as (at least one of) your system's dependent variable(s) is torsional spring torque $T_k$... because we can always use Hooke's law to compute $\theta = \frac{1}{K} T_k$ after the model is constructed and simulated.

What you know

Based on the specifications you can find for the galvanometer, you have found the following approximate specifications:

  • The galvanometer coil's inductance is small.
  • The transducer constant of the galvanometer coil is $k_t = 0.175 \frac{Nm}{A}$.
  • The inertia of the galvanometer needle and shaft is approximately $J = 7.4E-4 kgm^2$
  • The approximate resistance of the galvanometer coil is $R=4\Omega$.
  • The galvanometer's torsional spring has a spring constant of roughly $K=0.2 \frac{Nm}{rad}$
  • Friction in the galvanometer's bearings is approximately linear viscous friction with a damping coefficient $b=0.2E-3\frac{Nms}{rad}$.

Deliverable: Scope and Construct a model relating source voltage $V_s$ to pointer position $\theta$ over time.

YOUR ANSWER HERE

Deliverable: Evaluate your model for correctness

Below, develop an Euler integration code that simulates galvanometer angle $\theta$ for a 5-volt constant input $V_s$. Compare your simulation with data to evaluate your model. The data columns in the file reading18data.txt are time in seconds and needle angle in degrees.

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

Deliverable: Explore the effects of changing model parameters on the galvanometer's response.

Below, perform another simulation of your galvanometer model, but change ONE parameter to get rid of the slight oscillation and overshoot that the galvanometer experiences. A "good" meter will quickly and accurately arrive at a value with little to no overshoot. Then, in the markdown cell below, discuss which parameter you chose to change and why. Also discuss whether there are any negative consequences to making this change, given the galvanometer's intended use.

DO NOT change the steady-state ratio of voltage to needle angle! Satisfying this requirement may require you to calculate the theoretical steady-state needle angle as a function of input voltage. you can include this calculation in your discussion.

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

YOUR ANSWER HERE