Tuesday, January 24, 2017

IAM Search

Mathematics for Industrial Instrumentation

Mathematics is the investigation of an artificial world: a universe populated by abstract entities and rigid rules governing those entities. Mathematicians devoted to the study and advancement of pure mathematics have an extremely well-developed respect for these rules, for the integrity of this artificial world depends on them. In order to preserve the integrity of their artificial world, their collective work must be rigorous, never allowing for sloppy handling of the rules or allowing intuitive leaps to be left unproven.

However, many of the tools and techniques developed by mathematicians for their artificial world happen to be extremely useful for understanding the real world in which we live and work, and therein lies a problem. In applying mathematical rules to the study of real-world phenomena, we often take a far more pragmatic approach than any mathematician would feel comfortable with. The tension between pure mathematicians and those who apply math to real-world problems is not unlike the tension between linguists and those who use language in everyday life. All human languages have rules (though none as rigid as in mathematics!), and linguists are the guardians of those rules, but the vast majority of human beings play fast and loose with the rules as they use language to describe and understand the world around them. Whether or not this “sloppy” adherence to rules is good depends on which camp you are in. To the purist, it is offensive; to the pragmatist, it is convenient.

I like to tell my students that mathematics is very much like a language. The more you understand mathematics, the larger “vocabulary” you will possess to describe principles and phenomena you encounter in the world around you. Proficiency in mathematics also empowers you to grasp relationships between different things, which is a powerful tool in learning new concepts.

This book is not written for (or by!) mathematicians. Rather, it is written for people wishing to make sense of industrial process measurement and control. This chapter of the book is devoted to a very pragmatic coverage of certain mathematical concepts, for the express purpose of applying these concepts to real-world systems.

Mathematicians, cover your eyes for the rest of this chapter!

 

Introduction to calculus

Few areas of mathematics are as powerfully useful in describing and analyzing as calculus: the mathematical study of changes. Calculus also happens to be tremendously confusing to most students first encountering it. A great deal of this confusion stems from mathematicians’ insistence on rigor and denial of intuition.

Look around you right now. Do you see any mathematicians? If not, good – you can proceed in safety. If so, find another location to begin reading the rest of this chapter. I will frequently appeal to practical example and intuition in describing the basic principles of single-variable calculus, for the purpose of expanding your mathematical “vocabulary” to be able to describe and better understand phenomena of change related to instrumentation.

Silvanus P. Thompson, in his wonderful book Calculus Made Simple originally published in 1910, began his text with a short chapter entitled, “To Deliver You From The Preliminary Terrors1.” I will follow his lead by similarly introducing you to some of the notations frequently used in calculus, along with very simple (though not mathematically rigorous) definitions.

When we wish to speak of a change in some variable’s value (let’s say x), it is common to precede the variable with the capital Greek letter “delta” as such:


Δx = “Change in x

For example, if the temperature of a furnace (T) increases over time, we might wish to describe that change in temperature as ΔT:

 

The value of ΔT is nothing more than the difference (subtraction) between the recent temperature and the older temperature. A rising temperature over time thus yields a positive value for ΔT, while a falling temperature over time yields a negative value for ΔT.

We could also describe differences between the temperature of two locations (rather than a difference of temperature between two times) by the notation ΔT, such as this example of heat transfer through a heat-conducting wall where one side of the wall is hotter than the other:

 

Once again, ΔT is calculated by subtracting one temperature from another. Here, the sign (positive or negative) of ΔT denotes the direction of heat flow through the thickness of the wall.

One of the major concerns of calculus is changes or differences between variable values lying very close to each other. In the context of a heating furnace, this could mean increases in temperature over miniscule time intervals. In the context of heat flowing through a wall, this could mean differences in temperature sampled between points within the wall immediately next to each other. For such applications, we use a different notation instead of the capital Greek letter delta (Δ); instead, we use a lower-case Roman letter d (or in some cases, the lower-case Greek letter delta: δ).

Thus, a change in furnace temperature from one instant in time to the next instant could be expressed as dT (or δT), while a difference in temperature between two adjacent points within the heat-conducting wall could also be expressed as dT (or δT). We even have a unique name for this concept of extremely small differences: whereas ΔT is called a difference in temperature, dT is called a differential of temperature.

The concept of a differential may seem useless to you right now, but they are actually quite powerful for describing continuous changes, especially when one differential is related to another differential by ratio (something we call a derivative).

Another major concern in calculus is how quantities accumulate, especially how differential (extremely small differences in) quantities accumulate to form a larger whole. If we were concerned with how hot the furnace would become over time (T), we could express its eventual temperature as the accumulation, or sum, of temperature differences measured over time (ΔT). Supposing we measured the furnace’s temperature once every minute from 9:45 to 10:32 AM:

 
T = ΔT9:45 + ΔT9:46 + ・ ・ ・ΔT10:32 = Accumulated temperature rise over time, from 9:45 to 10:32

A more sophisticated way of expressing the summation of differences is to use the capital Greek letter sigma (meaning “sum of” in mathematics) with notations specifying which temperature differences to sum:


However, if our furnace temperature system sampled at an infinite pace, measuring temperature differentials (dT ) in rapid succession, we could express the same accumulated temperature rise as a sum of infinitesimal (infinitely small) quantities. Just as we used a different mathematical symbol to represent differentials (d) instead of differences (_), we will use a different mathematical symbol to represent the summation of differentials (R) instead of the summation of differences (P):


This summation of infinitesimal quantities is called integration, and the elongated “S” symbol () is the integral symbol.

These are the two major ideas in calculus: differentials and integrals, and the notations used to represent each. Now that wasn’t so frightening, was it?

 

The concept of differentiation

Suppose we wished to measure the rate of propane gas flow through a hose to a torch:


Flowmeters appropriate for measuring low flow rates of propane gas are quite expensive, and so it would be challenging to measure the flow rate of propane fuel gas consumed by the torch at any given moment. We could, however, indirectly measure the flow rate of propane by placing the tank on a scale where its mass (m) could be monitored over time. By taking measurements of mass between intervals of time (Δt), we could calculate the corresponding differences in mass (Δm), then calculate the ratio of mass lost over time to calculate average mass flow rate () between those time intervals:



Where,

  = Average mass flow rate within each time interval (kilograms per minute)

  Δm = Mass difference over time interval (kilograms)

  Δt = Time interval (minutes)

Note that flow rate is a ratio (quotient) of mass change over time change. The units used to express flow even reflect this process of division: kilograms per minute.

Graphed as a function over time, the tank’s mass will be seen to decrease as time elapses. Each dot represents a mass and time measurement coordinate pair (e.g. 20 kilograms at 7:38, 18.6 kilograms at 7:51, etc.):


We should recall from basic geometry that the slope of a line is defined as its rise (vertical interval) divided by its run (horizontal interval). Thus, the average mass flow rate calculated within each time interval may be represented as the pitch (slope) of the line segments connecting dots, since mass flow rate is defined as a change in mass per (divided by) change in time.

Intervals of high propane flow (large flame from the torch) show up on the graph as steeply pitched line segments. Intervals of no propane flow reveal themselves as flat portions on the graph (no rise or fall over time).

If the determination of average flow rates between significant gaps in time is good enough for our application, we need not do anything more. However, if we would like to be able to infer mass flow rate at any particular instant in time, we need to perform the same measurements of mass loss, time elapse, and division of the two at an infinitely fast rate.

Supposing such a thing were possible, what we would end up with is a smooth graph showing mass consumed over time. Instead of a few line segments roughly approximating a curve, we would have an infinite number of infinitely short line segments connected together to form a seamless curve. The flow rate at any particular point in time would be the ratio of the mass and time differentials (the slope of the infinitesimal line segment) at that point:

 

 

Where,

  W = Instantaneous mass flow rate at a given time (kilograms per minute)

  Δm = Mass differential at a given time (kilograms)

  Δt = Time differential at a given time (minutes)

Flow is calculated just the same as before: a quotient of mass and time intervals, except here the intervals are infinitesimal in magnitude. The unit of flow measurement reflects this process of division, just as before, with mass flow rate expressed in units of kilograms per minute.

Such a ratio of differential quantities is called a derivative in calculus2. Derivatives – especially time-based derivatives such as flow rate – find many applications in instrumentation as well as the general sciences. Some of the most common time-based derivative functions include the relationships between position (x), velocity (v), and acceleration (a).

 

Velocity is the rate at which an object changes position over time. Since position is typically denoted by the variable x and time by the variable t, the derivative of position with respect to time may be written as such:


The units of measurement for velocity (meters per second, miles per hour, etc.) betray this process of division: a differential of position (meters) divided by a differential of time (second). Acceleration is the rate at which an object changes velocity over time. Thus, we may express acceleration as the time-derivative of velocity, just as velocity was expressed as the time-derivative of position:


We may even express acceleration as a function of position (x), since it is the rate of change of the rate of change in position over time. This is known as a second derivative, since it is applying the process of “differentiation” twice:


As with velocity, the units of measurement for acceleration (meters per second squared, or alternatively meters per second per second) betray a compounded quotient.

It is also possible to express rates of change between different variables not involving time. A common example in the engineering realm is the concept of gain, generally defined as the ratio of output change to input change. An electronic amplifier, for example, with an input signal of 2 volts (peak-to-peak) and an output signal of 8.6 volts (peak-to-peak), would be said to have a gain of 4.3, since the change in output measured in peak-to-peak volts is 4.3 times larger than the corresponding change in input voltage:


This gain could be expressed as a quotient of differences (), or it could be expressed as a derivative instead:


If the amplifier’s behavior is perfectly linear, there will be no difference between gain calculated using differences and gain calculated using differentials (the derivative), since the average slope of a straight line is the same as the instantaneous slope at any point along that line. If, however, the amplifier does not behave in a perfectly linear fashion, gain calculated from large changes in voltage () will not be the same as gain calculated from infinitesimal changes at different points along the amplifier’s operating voltage range.

 

The concept of integration

Suppose we wished to measure the loss of mass over time in a large propane storage tank supplying a building with heating fuel, because the tank lacked a level indicator to show how much fuel was left at any given time. The flow rate is sufficiently large, and the task sufficiently important, to justify the installation of a mass flowmeter3, which registers flow rate at an indicator inside the building:

 

By measuring true mass flow rate, it should be possible to indirectly measure how much propane has been used at any time following the most recent filling of the tank. For example, if the mass flow rate of propane into the building was measured to be an average of 5 kilograms per hour for 30 hours, it would be a simple matter of multiplication to arrive at the consumed mass:


Expressing this mathematically as a function of differences (in mass as well as time), we may write the following equation:

 

 

Where,

  = Average mass flow rate within the time interval (kilograms per hour)

  Δm = Mass difference over time interval (kilograms)

  Δt = Time interval (hours)


It is easy to see how this equation is nothing more than the quotient-of-differences equation used in the differential calculus section to define mass flow rate:


Inferring mass flow rate from changes in mass over intervals of time is a process of division. Inferring changes in mass from flow rate over time is a process of multiplication. The units of measurement used to express each of the variables makes this quite clear.

The task of inferring lost mass over time becomes much more complicated if the flow rate changes substantially over time. Consider the following graph, showing periods of increased and decreased flow rate due to different gas-fired appliances turning on and off inside the building:


Here, the propane gas flow rate does not stay constant throughout the entire time interval covered by the graph. This obviously complicates the task of calculating total propane mass used over that time.

In order to accurately calculate the amount of propane mass consumed by the building over time, we must treat each period of constant flow as its own interval, calculating the mass lost in each interval, then summing those mass differences to arrive at a total mass for the entire time period covered by the graph. Since we know the difference (loss) in mass over a time interval is equal to the average flow rate for that interval multiplied by the interval time length (_m = W _t), we may calculate each interval’s mass as an area underneath the graph line, each rectangular area being equal to height (W) times width (_t):


Each rectangular area underneath the flow line on the graph (W _t) represents a quantity of propane gas consumed in that time interval. To find the total amount of propane consumed in the time represented by the entire graph, we must sum these mass quantities. This sum may be mathematically expressed using the capital Greek letter sigma, summing repeated products (multiplication) of mass flow and time intervals:


The task of inferring total propane mass consumed over time becomes even more complicated if the flow does not vary in stair-step fashion as it did in the previous example. Suppose the building were equipped with throttling gas appliances instead of on/off gas appliances, thus creating a continuously variable flow rate demand over time. A typical flow rate graph might look something like this:


The physics of gas flow and gas mass over time has not changed: total propane mass consumed over time will still be the area contained underneath the flow curve on the graph. However, arbitrary curve shapes do not lend themselves well to calculation of geometric areas.

We can, however, approximate the area underneath this curve by overlaying a series of rectangles, the area of each rectangle being height (W) times width (Δt):


It should be intuitively evident that the strategy of using rectangles to approximate the areaunderneath a curve improves with the number of rectangles used. The more rectangles (the narrower each rectangle), the better approximation of area we will obtain:


Taking this idea to its ultimately realization, we could imagine a super-computer sampling mass flow rates at an infinite speed, then calculating the rectangular area covered by each flow rate (W) times each infinitesimal interval of time (dt). With time intervals of negligible width, the “approximation” of area underneath the graph found by the sum of all these rectangles would be perfect – indeed, it would not be an approximation at all:


If we represent infinitesimal intervals of time by the notation “dt” as opposed to the notation “Δt” used to represent discrete intervals of time, we must also use different notation to represent the mathematical sum of those quantities. Thus, we will dispense with the “sigma” symbol () for summation and replace it with the integral symbol (), which means a continuous summation of infinitesimal quantities:

 

This equation tells us the total change in mass (Δt) from time 0 to time x is equal to the continuous sum of all products (multiplication) of mass flow rate (W) over infinitesimal intervals of time (dt).

An extremely important detail to note is that this process of integration (multiplying flow rates by infinitesimal time intervals, then summing those products) only tells us how much propane mass was consumed – it does not tell us how much propane is left in the tank, which was the purpose of installing the mass flowmeter and performing all this math! The integral of mass flow and time (RWdt) will always be a negative quantity4, because a flow of propane gas out of the tank represents a loss of propane mass within the tank. In order to calculate the amount of propane mass left in the tank, we would need to know the initial value of propane in the tank before any of it flowed to the building, then we would add this initial mass quantity (m0) to the negative mass loss calculated by integration.

Thus, we would mathematically express the propane mass inside the tank at time x as such5:


This initial value must always be considered in problems of integration if we attempt to absolutely define some integral quantity. Otherwise, all the integral will yield is a relative quantity (how much something has changed over an interval).

The problem of initial values is very easy to relate to common experience. Consider the odometer indication in an automobile. This is an example of an integral function, the distance traveled (x) being the time-integral of speed (or velocity, v):

 

 

Although the odometer does accumulate to larger and larger values as I drive the automobile, its indication does not necessarily tell me how many miles I have driven it. If, for example, I purchased the automobile with 32,411.6 miles on the odometer, its current indication of 52,704.8 miles means that I have driven it 20,293.2 miles. The automobile’s total distance traveled since manufacture is equal to the distance I have accumulated while driving it (Rvdt) plus the initial mileage accumulated at the time I took ownership of it (x0):


 

 

How derivatives and integrals relate to one another

To review, let us consider some of the properties of derivatives:

A derivative is always a quotient of two differential quantities – it is fundamentally a process of division

The units of measurement for a derivative always reflect this process of division

Geometrically, the derivative of a function is its slope on a graph

 

Let us also consider some of the properties of integrals:

An integral is always a product of some variable and a differential quantity – it is fundamentally a process of multiplication

The units of measurement for an integral always reflect this process of multiplication

Geometrically, the integral of a function is the area bounded by a graph

Just as division and multiplication are inverse mathematical functions (i.e. one “un-does” the other), differentiation and integration are also inverse mathematical functions. The two examples of propane gas flow and mass measurement highlighted in the previous sections illustrates this complementary relationship. We may use differentiation with respect to time to convert a mass measurement (m) into a mass flow measurement (W, or ). Conversely, we may use integration with respect to time to convert a mass flow measurement (W, or ) into a measurement of mass gained or lost (Δm).

Likewise, the common examples of position (x), velocity (v), and acceleration (a) used to illustrate the principle of differentiation are also related to one another by the process of integration. Reviewing the derivative relationships:


 

Velocity is the derivative of position with respect to time


 

Acceleration is the derivative of velocity with respect to time

 

Now, expressing position and velocity as integrals of velocity and acceleration, respectively6:

 

    Position is the integral of velocity with respect to time
 
Velocity is the integral of acceleration with respect to time

 

Differentiation and integration may be thought of as processes transforming these quantities into one another:

 

It is a relatively simple matter to build a computer (either analog or digital) capable of applying differentiation or integration to a real-world signal, which means these calculus techniques afford us the opportunity to infer multiple variables from a single measured variable. The measured position of a machine, for example, may be differentiated by a computer to yield the machine’s velocity, and that velocity signal differentiated again to yield acceleration. Conversely, a signal taken from an accelerometer may be integrated to yield a velocity signal, and integrated again to yield a position signal. To be sure, there are practical limits to these processes7, but they are at least possible.

 

References

Keisler, H. Jerome, Elementary Calculus – An Infinitesimal Approach, Second Edition, University of Wisconsin, 2000.

Stewart, James, Calculus: Concepts and Contexts, 2nd Edition, Brooks/Cole, Pacific Grove, CA, 2001.

Thompson, Silvanus P. and Gardner, Martin, Calculus Made Easy, St. Martin’s Press, New York, NY, 1998.

 

 

1The book’s subtitle happens to be, Being a very-simplest introduction to those beautiful methods of reckoning which are generally called by the terrifying names of the differential calculus and the integral calculus. Not only did Thompson recognize the anti-pragmatic tone with which calculus is too often taught, but he also infused no small amount of humor in his work.

2Isaac Newton referred to derivatives as fluxions, and in Silvanus Thompson’s day they were known as differential coefficients.

3Most likely a thermal mass flowmeter or a Coriolis flowmeter.

4Although we will measure time, and differentials of time, as positive quantities, the mass flowmeter should be configured to show a negative flow rate (W) when propane flows from the tank to the building. This way, the integrand (the product “inside” the integration symbol; W dt) will be a negative quantity, and thus the integral over a positive time interval (from 0 to x) will likewise be a negative quantity

5According to calculus convention, the differential dt represents the end of the integrand. This tells us m0 is not part of the integrand, but rather comes after it. Using parentheses to explicitly declare the boundaries of the integrand, we may re-write the expression as R x0(W dt) + m0

6To be perfectly accurate, we must also include initial values for position and velocity. In other words, and

7The major problem facing differentiation of real-world signals is noise. Noise superimposed on any measurement signal will be interpreted by a differentiator circuit as extremely high rates of change, thus becoming amplified at the output of that differentiator. Integration has its own unique problem: offset. The calibration of any sensor whose signal is to be integrated must be nearly perfect, for if the sensor’s signal is offset by any amount at all (e.g. the sensor produces a slight signal when it should output no signal) the integrator circuit will continue to integrate this offset over time, producing an output that slowly ramps until saturation is reached.

Go Back to Lessons in Instrumentation Table of Contents


Comments (0)Add Comment

Write comment

security code
Write the displayed characters


busy

Related Articles

Promotions

  • ...more

Disclaimer

Important: All images are copyrighted to their respective owners. All content cited is derived from their respective sources.

Contact us for information and your inquiries. IAMechatronics is open to link exchanges.

IAMechatronics Login