Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 34

Electronics:

Integrals and RMS Signals


Background
The average or mean of a set of numbers is found by adding up the numbers and
dividing by the number of numbers. The mean value of a function is the
generalization of this idea. The mean value of any function f(x) is defined as the mean
height of the function. It can be found by calculating the area under the function and
dividing by the width of the function. We will denote the mean value of a
function f using angle brackets like this:

Then using calculus notation the above statement can be written as:

(We are assuming that the function runs from a to b, so integrating from a to b gives
the area under the function and dividing by b - a divides by the width of the function.)

If the function is periodic (i.e. if the function repeats itself exactly after a certain
amount of time, called the period, T) then we can replace the above formula by this
formula:

In other words we only have to find the area for one cycle and divide by the width of
one cycle.

The RMS value of a function is related to the idea of the standard deviation of a set
of numbers. The RMS value of a function is defined as the square root of the mean
value of the square of a function. In other words to get the RMS value of a function
we follow these three steps:

1. Square the function (i.e. draw a new function whose height everywhere is the
square of the original function),
2. calculate the Mean of this new function (This can be done using the above
formula, namely, finding the area under the new function, and dividing by the
width of the function),
3. taking the square Root

We will denote the RMS value of a function f like this:

Then using calculus notation the above procedure can be written as:

(Again we are assuming that the function runs from a to b, so integrating


from a to b gives the area under the squared function and dividing by b - a gives the
mean of the squared function.)

If the function is periodic with period T then we can replace the above formula by this
formula:

Problem

Find the mean value and RMS value of the triangular waveform shown to the right. It
represents the current i flowing in a circuit as a function of the time, t.

Solution
The mean value of the current. Use the formula:

The period is T = 4. The integral from 0 to 4 must be broken into 3 separate integrals
because the function has a different form in each section. The result is:

Thus the mean value of the current is zero. We could have gotten this result much
more easily using symmetry rather than integration. The picture to the right shows the
"area under the curve" shaded in grey. It is clear that the area from 0 to 2 is positive
and the area from 2 to 4 is negative and that the two areas cancel out.

The RMS value of the current. Use the formula:


The lower picture shows the area under the i2 curve shaded in grey. Notice that
the i2 curve has the period T = 2. In fact, notice that the area from 0 to 1 and the area
from 1 to 2 are equal. Thus we will save work if we find the area from 0 to 1 and
double our answer.

The picture to the right shows the region from t=0 to t=1 enlarged. Notice that in this
region i = 10t, so i2 = 100t2

The result is:


Notice that the final answer is the peak value of the current (namely 10) divided by
the square root of 3. In fact the RMS value for triangular waveforms with triangles of
any shape turns out to always be the peak value divided by the square root of 3.

Mechanical: A Hemispherical Tank of Water


and Integrals
A hemispherical tank with radius R is filled with water.

1. Find the volume of the water.


2. Find the y-coordinate of the centroid of the water.
3. Find the moment of inertia about the y-axis.
4. Find the work needed to pump all the water to a height of  H metres above the
top of the tank.

Solutions

1. The volume 

We consider the hemisphere as the solid obtained by rotating the fourth


quadrant of the curve x2+y2=R2 about the y-axis. Through a point (x, y) on the
curve we draw a circular disk perpendicular to the y-axis as our volume
element dv . The radius of the disk is x and the thickness is dy, and
consequently,
Therefore, the total volume of the hemisphere is:

2. The y-coordinate of the centroid

We can use the same infinitesimal volume element dv in (a). Since dv is a disk
perpendicular to the y-axis, the y-coordinate of any point in the disk is y.
Therefore,

3. The moment of inertia about the y-axis.

To find the moment of inertia about the y-axis, we need to choose another


volume element dv such that the distance from the y-axis to any point in dv will
be the same. A convenient choice is a thin-walled cylindrical shell centred at
the y-axis, as shown in the figure below. From the figure we can identify the
radius, the height, the thickness and the volume of the cylindrical shell:
radius = x ;

thickness = dx .

The moment of inertia of the shell is:

where k is the density of water. Therefore, moment of inertia of the water in the
hemispherical tank is given by:
4. The work needed to pump all the water to a height of H metres above the top of

the tank. 

From physics we know that the work needed to lift a particle by a vertical
distance h is mgh, which is the increase in potential energy. Then, the element
of volume should be chosen such that all the points in the element are at the
same height. Therefore, we can choose a horizontal disk as our volume
element, same as that used in (a):

This volume element must be lifted a vertical distance (H - y), and the work for
it is

Then, we can integrate dW and find the total work needed to pump all the
water:

Or,
Nuclear Medicine: Using Integration to
Determine the Drug-Time Relationship in a
Patient
A drug is excreted in a patient’s urine. The urine is monitored continuously using a
catheter. A patient is administered 10 mg of drug at time t = 0 which is excreted at a
RATE of -3t1/2 mg/h .

1. What is the general equation for the amount of drug in the patient at time t >
0?
2. When will the patient be drug free?

Solution:

1. The solution involves solving a simple differential equation through

integration. 

Therefore the amount of drug in the patient at time t>0 is

2. The patient will be drug free when A=0 


The patient will be drug free in 2.9 hours.

Mining: Determining the Volume of a


Support Pillar Using Calculus

To avoid stress concentrations, tunnels and support pillars should be rounded. Find
the volume of the square cross-section pillar shown to the right.

Solution:

We will use the geometry shown to the right. We will place the parabola forming the
left edge of the pillar with its axis of symmetry on the y axis and its vertex at y = 3.
The first step is to find the equation of this parabola. The parabola must have the
form:

y = a x2 + b,

where b is the y intercept (= 3) and a is a negative number.

a can be found by using the fact that the point (1,0) is on the parabola:
y = a x2 + b,

y = a x2 + 3,

0 = a (1)2 + 3,

a = - 3,

Thus the equation of the parabola is:

y = - 3 x2 + 3.

The second step is to use this formula to find the dimensions of the elemental
rectangular slab shown in gray in the picture above. The slab has its edge located at
(x, y). To find x, solve the above equation for x:

Thus the volume of the rectangular slab element shown in gray is:

Integrating over all the elemental slabs from y = 0 to y = 3 gives the entire volume of
the pillar:
The volume of the pillar is 66 m3

Chemical Science: Differential Equations


The problem is to find the rate of change of the reactant in a 2nd order chemical
reaction which can be modelled by the given by the differential

equation,  , where [A] is the concentration of the reactant at time t in


minutes, and k is the reaction constant.

If [ A ] = 0.500 M when t = 0 minutes, and [ A ] = 0.435 M when t = 38.5 minutes,
find k .

Solution:

We need to solve the differential equation: 

Separate the variables, [ A ] and t , to get:

Then integrate over the given limits for each variable, to get:
∴ And k ≅0.00776

Electronics:
Circuit Analysis Using Differential Equations

Problem:
Find the current in the circuit to the right after time t=0. The switch is closed at t=0,
and the initial current in the circuit is zero.

Solution:
Using Kirchoff’s Voltage Law:

vL + vR = E

Express the voltage equation in terms of current.

Put the above equation in differential form.


L di = (E-Ri) dt

Separate the variables.

Integrate both sides of the equation.

Solve for the current i. First isolate the logarithm.

Express in exponential form.

Substitute the initial conditions into this equation to evaluate the constant A. The
initial conditions are i=0 at t=0.

Thus the equation becomes


Evaluate the expression for the values given in the circuit diagram.

A graph of this function is shown below. Note that if the inductor were absent the
current would rise instantly to 5 amperes, the value given by ohms law, i=E/R. The
presence of the inductor causes the current to rise exponentially to 5 amperes, with
the characteristic time being 1/2000 s.

Nuclear Medicine: Determining Waste


Radioactivity
In the September 1986 edition of the Journal of Nuclear Medicine Technology an
article appeared on "An Integration Technique for Rapid Estimation of Activity of
Waste in Storage". One of the problems hospitals face is disposing of radioactive
wastes. An increasingly popular method is to allow radionuclides with short half-lives
to decay at the hospital until they can be disposed of as nonradioactive waste (after
about 10 half-lives of the radioactive nuclide have elapsed.). This is a cheaper method
of disposal and reduces the volume of low-level radioactive waste sent to shallow-
land burial sites.

However, radioactive wastes held in storage contribute to the overall activity which is
in the user’s possession. Since there are limits on the amounts of various radioactive
nuclides that can be possessed, a method for determining the activity of radoactive
wastes held in storage is needed. The following method overestimates the activity in
storage which results in a conservative restriction on activity on hand in the
laboratory.

In a facility where the usage rate of a radionuclide is well defined and relatively


constant, the total activity, A, of this radionuclide held in storage at any time, t, can
calculated. The rate of change in activity as a function of time, dA/dt, is expressed as
the difference between the rate at which waste is placed in storage and the rate of
decay:

where:

 R is usage rate of the radionuclide (its units are activity/time),

 f is the fraction of the used activity in the facility which is transferred to storage
(no units)

 λ is the decay constant of the radionuclide (its units are 1/time)

Problem:
1. Determine an equation for the activity A in terms of the time t if initially A = 0.
2. The activity accrued in storage increases as a function of time. However, as
time becomes large, the activity approaches an equilibrium value Ae. Find this
equilibrium value Ae that A approaches.

Solution:
1. This differential equation can be solved using the method of separation of
variables. Isolate A on the left and t on the right side of the equation, and

integrate: 

To carry out the integration, make the change of variable u = f R - λA. Calculate
its differential:
These substitutions give:

Both sides can now be integrated to give:

Substituting back for u gives:

We are interested in the case where the activity in storage grows, ie. in the case
that f R > λA. Therefore we can drop the absolute value symbol. Next isolate
the logarithm and put the equation in exponential form:

Substituting the initial condition that the activity A = 0 at time t = 0 into this
equation implies the following condition on the integration constant C:

Using this to replace the integration constant in the equation gives:

Solving this for A finally gives the desired equation for the activity A as a
function of time t:

2. To find the equilibrium value Ae that A approaches, use the fact

that: 
This means that the equilibrium activity is given by:

The graph below shows the approach to equilibrium:

Mechanical: Solving an ODE for a Block on a


Spring
An Example of Using Maple™ to Solve Ordinary
Differential Equations
1. Setting up the Equation

A metal block of mass, m=1.00 kg, is attached to a spring having a stiffness k=4.00


N/m as shown in Figure 6.1. When the block is displaced from the equilibrium
position o to a position x, it will experience a restoring force that is proportional to the
displacement x and the spring constant k. i. e.,
The negative sign means that the restoring force always points to the origin which is
the equilibrium position of the block.

When the system vibrates in a medium such as water, oil, or air, the block will
experience a resistance. In fact, all the vibrations die out in time because of the
presence of damping forces. Provided the block moves slowly, the damping force is
proportional to the block’s velocity:

where c is called the coefficient of viscous damping and the negative sign means that
the damping force always points to the opposite direction of motion (velocity). In this
example, we assume c= 1.00 N·s/m .

Therefore, according to Newton’s law of motion, F=ma , the motion of the vibrating


block, in the presence of a viscous damping force, can be described by

This is a second-order ordinary differential equation. Here "order" refers to the highest
order of derivative in the equation.

2. The General Solution

When we solve a differential equation, our goal is to find the unknown function, x(t),
i.e., how x depends on t. Now let us use Maple™ to solve the differential equation
(6.3).

First of all, we set up the differential equation in Maple™ and name it as "ode1":
> restart;

> ode1:=- k*x(t)-c*diff(x(t),t)=m*diff(x(t), t$2);

Caution:To indicate that x is a function of t, we have to use x(t) rather than simply x.


Otherwise, Maple™ would treat x and t as two unrelated variables.
The command for solving ordinary differential equations is " dsolve":
> dsolve ({ode1}, x(t));

This is a general solution for the vibrating block with damping. Since we have not
used any initial conditions, the solution contains two arbitrary constants _C1 and _C2.
In general, the solution of an nth order differential equation may have n arbitrary
constants. When all the arbitrary constants are not determined, the solution is called
a general solution. When at least one of these constants are determined, the solution is
called a particular solution.

As we know, to determine the arbitrary constants _C1 and _C2 in x(t) we need two


initial conditions, for example, the initial displacement x(0) and the initial velocity x
′(0). When we use Maple™, we can include the initial conditions in the " dsolve"
command and find the particular solution.
dsolve({deqn, cond1, cond2}, x(t), option);

Please refer to the on-line help for details.

3. A ParticularSolution

Now we pull the block to a position   metres from the equilibrium position
as shown in Figure 6.2 and then release it. If we define the time when we release the
block as   sec, find the displacement of the block as a function of time.

The differential equation is the same as that in example 6.1:


> restart;

> ode1:=-k*x(t)-c*diff(x(t),t)=m*diff(x(t), t$2);


The initial conditions are:

when t = 0,

> cond1:=x(0)=A;

cond1 := x(0) = A
> cond2:=D(x)(0)=0;

cond2 := D(x)(0) = 0

Attention:"D(x)(0)=0" is the way (probably the only way) to represent x′(0) = 0 as an


initial condition. In Maple™, the Differential operator " D" is used for representing
derivative functions. For example, D(f)(a) is the derivative of the function f at a,
i.e., f′(a); while (D@@3)(g)(b) would be the third derivative of function g at b, i.e., g′′′
(b).
> s62:=dsolve ({ode1, cond1,cond2}, x(t));

This is the particular solution that satisfies both the differential equation (6.3) and the
initial conditions. Now let us substitute the specific values of m, k, c and A into the
solution and plot it out:
> a62:=subs(m=1, k=4, c=1, A=2, s62):

> plot(rhs(a62), t=0..10);


From the graph we can conclude that the metal block will vibrate with a decreasing
amplitude and basically die out in about 10 seconds.

4. The "laplace" Option

The "dsolve" supports several options such as the " laplace" option and the "series"
option, with which sometimes we can obtain the solution in a more understandable
form. In fact, as shown below, with the "laplace" option, the physical meanings of the
solution become more understandable.
> restart;

> ode1:=-k*x(t)-c*diff(x(t),t)=m*diff(x(t), t$2);

> cond1:=x(0)=A;

cond1 := x(0) = A
> cond2:=D(x)(0)=0;

cond2 := D(x)(0) = 0
> s64:=dsolve ({ode1, cond1, cond2}, x(t), laplace);
Each term in the solution is a sinusoidal function with an exponentially decaying
amplitude, which exactly represents a dying-out vibration. Furthermore, it is
straightforward to investigate how the parameters m, k, A and c affect the nature of the
vibration.

5. The Damping Constant

For simplicity, we will substitute the value of the constants m, k, and A and investigate
the meaning of the damping constant c by plotting the solution with different c values
(c=1.00, 0.00, and 5.00).
> a64:=subs(m=1,k=4, A=2, s64);

> a641:=subs(c=1, a64);


> a640:=subs(c=0,a64);

> a645:=subs(c=5,a64);

> plot([rhs(a641), rhs(a640), rhs(a645)], t=0..10, thickness=[1,3,4]);

Also, we can use "plot3d" to have a complete view of the displacement x as a function
of time t and the damping constant c:
> plot3d(rhs(a64), c=0..5, t=0..10);
From the two graphs above we can draw the following conclusions about the damping
constant c: When c = 0, there is no damping, the block vibrates in a simple sinusoidal
form, which is call undamped vibration. When c=1, the block vibrates with an
exponentially decreasing amplitude, which is called damped vibration or
underdamped vibration. When c=5, the block will not vibrate at all. Instead, it will
approach the equilibrium position obeying an exponential function, which is called
overdamped vibration. It is fairly straightforward to show that the value of c to
distinguish underdamped and overdamped vibrations is given by  which is
called the value of critical damping.

Electronics Statistics Example


Background:
You are to design a new multi-channel temperature data logging system for use in the
hospital in which you are working. The specifications given for its design are:

 it is to be implemented around the Series 400 thermistor as a temperature


probe,(such as YSI Series 400, or Thermometrics MA400)
 it must provide temperature data to within 0.1°C from -40 to 100°C
 it must have at least 6 independent channels each of which must be updated
at least once every second
 the data must be accessible to IBM/PC or compatible computers, via a
standard RS-232 interface
To convert the resistance, R, of the thermistors to a proportional voltage a constant
current source is used. However, the problem that you immediately encounter is that
the thermistors have an exponential response curve which makes direct digitization
over the entire temperature range of interest difficult. You decide to linearize the
voltage, as a function of temperature, prior to digitization by taking the double
logarithm of the voltages measured across the thermistors, (the result of which is
shown in Fig. 1).

   

Fig. 1: Plots of a) resistance, R, b) logarithm of the resistance, ln(R), and, c) double


logarithm of the resistance, ln(ln(R)), as functions of temperature, T.

The process of taking the double logarithm of the analog signal is accomplished by
the use of a pair of TL441AM logarithmic amplifiers (from Texas Instruments). The
output voltage is then amplified and level shifted to give appropriate levels for the
subsequent A/D converter. This being done, you collect the following data to see if
your efforts have been justified:

Table 1: Thermistor Voltage and Temperature readings (after signal conditioning).

Temperature, T
-40 -20 0 20 40 60 80 100
(°C)

Resistance, R (Ω) 75773.0 21862.1 7352.90 2813.11 1199.72 560.34 282.64 152.78

Output from log- 4.579 3.970 3.369 2.775 2.185 1.594 0.999 0.399
amplifiers, (V)

The Problem
a. Find the equation of the best fit line (temperature as a function of voltage).
b. Determine 95% confidence intervals for the slope and y-int.
c. By looking at the results of (b) does it appear that the simple linear relation
found in (a) is adequate to meet the specification of accuracy to within 0.1°C?

Solution
a) First find some intermediate results, (letting temperature be represented by 'y' and
voltage by 'x').

Now using these results one can determine estimates for the slope, m, and the y-
intercept, b.

yielding the following equation for the best fit line,

b) First determine some further intermediate results,

SSE = Syy - Sxy2/Sxx ≅16800-(-500.3)2/14.8990775 ≅ 0.2961257


where n=8, is the number of data points, and

t α/2, ν = t 0.025, 6 ≅ 2.447 (from table)

Now,

and,

c) As can be seen from the 95% CI for the y-intercept the simple linear relation found
is not adequate to meet the specification of accuracy to within 0.1 ° C, (i.e.
considering the y-int as an arbitrary predicted value, one cannot state with a
reasonable degree of confidence, say 95% in this case, that the maximum error is
less than ±0.4 °C).

FINAL NOTE:
The actual final design of the project discussed in this question was implemented
using a single logarithmic amplifier to partially linearize the data (see Fig.1b) and a
cubic spline curve fit to account for the remaining non-linearity. This approach not
only met but exceeded the design specifications by providing temperature data to
within 0.05 °C from -40 to 150 °C using a 12 bit plus sign serial I/O A/D converter.
This method also allowed for simple calibration so as to account for the
interchangeability tolerances of different probes. The reduced hardware and
software associated with this method also allowed for increased speed making it
possible to update each channel 60 times per second with real-time display via the
RS-232 interface.

Nuclear Medicine: Planar Thallium Stress


myocardial Imaging and False -Positive Test
Results
Planar thallium stress myocardial imaging is a nuclear medicine diagnostic technique
for predicting the presence of coronary artery disease.

Non-smoking hypertensive women in their forties with atypical chest pain have about
a 10 % prevalence of significant coronary artery disease. This thallium stress test has
a sensitivity of 80 % and a specificity of 90 % for coronary artery disease.

Questions:
1. What are the false-positive and false-negative rates for thallium stress tests as
defined above?
2. Determine the Predictive Value Negative for this test.

Solution:
First some terminology:

 Specificity is the probability that the test results are negative for a person that
does not have the disease.
 Sensitivity is the probability that the test results are positive for a person that
does have the disease.
 Predictive Value Negative is the probability that a person does not actually
have the disease if this person’s results for the test are negative.
 False Positive is the probability that a person who does not have the disease
will get positive test results. In this case, the false positive rate is 10 %.
 False Negative is the probability that a person who does have the disease will
get negative test results. In this case, the false negative rate is 20 %.
1. To find these rates it is helpful to draw a tree

diagram: 
2. This is an application of Bayes’ Rule, a theorem of probability, which can be
used to revise the probability a patient does or does not have the disease based
on additional information being introduced ... in this case, a positive or negative
result on a this

test. 

If the test results are negative, then there is now a 98 % chance that the woman
does not actually have the disease. This is a revision of the original
probabilities based on the information given by the test.

Mechanical: Predicting Probability of


Manufacturing Flaws
Question
An inspection sampling plan is set up to randomly sample 4 meters from a roll of 220
meters of plastic coated wire and to accept the wire roll if no flaws are found in the 4
meter length. What is the probability that a wire roll with an average of 0.8 flaws per
meter will be rejected by the plan?

Solution
The solution to this problem requires a knowledge of the Poisson Probability Model
and of the rules of probability:
 The Poisson Probability Model says that the probability of finding

exactly x flaws in a fixed length of wire is given by : 

In this formula, μ= the mean number of flaws = 0.8 flaws / meter = 3.2 flaws /
4 meters,
and x! denotes the factorial function.

 The complement rule for probability says:

P(A will happen) = 1 - P(A won’t happen)

Applying the Poisson Probability Model:

P(0 flaws) = P(accept the roll using the sampling plan) = 

Applying the complement rule:

P(reject the roll using the sampling plan) = 1 - P(0 flaws) = 1 - 0.0408 =0.9592

There is a 96% chance that a roll with as many as 0.8 flaws/meter will be rejected by
this sampling plan.

Forestry: Statistical Estimates of Number of


Trees

Goober Island has an area of 109 hectares. Logging and conservation concerns
require that we know how many trees are on this wooded island. The island is much
too large to count every tree. What can we do?
Solution:
One solution is to count the trees on a small portion of the island and then estimate the
total for the whole area. For example, suppose the count of trees on an 8
hectare section of the island is 621. Then the number of trees per hectare is 621/8 =
77.625. An estimate of the number of trees on the entire island is 77.625 x 109 =
8461.

In mathematical terms, let

 x= number of trees counted on the small portion of the island


 a = area of the small portion
 A = area of the entire island

Let the actual number of trees on the whole island be T. This won’t be known exactly
unless we count every tree on the whole island. However, T can be estimated by

We first compute   to estimate the number of trees per hectare, and then multiply this
by A to estimate the number of trees on the whole island.)

This raises some questions. How accurate will our estimate,  , be? In other words,
how close will   be to T? For example, if we happen to count in an area which is less
heavily treed than the rest of the island, then   would be too low. Is there a better
way?

Better Solution
Instead of counting all the trees in one area, we can divide the entire island into small
rectangular plots as in the diagram on the right. Then choose some of the plots and
count the trees only on those plots. Suppose each of our plots is 1.30 hectares.

In the above diagram, we have chosen 8 plots on which to count trees. The plots must
be chosen in a random manner, i.e. every plot on the island must have the same
chance of being chosen. By doing this we distribute the area where we are going to
count over the island, and this leads to the sample being more representative of the
whole island. In fixmewith a symbols, we signify the number of plots on which trees
are counted by the letter n. This is called the sample size. Let

 a = area of each plot where counts were made (In this example we will forget
about the fact that some plots on the edge of the island will be smaller since
part of them will be in the water. This is another problem).
 A= area of the entire island
 xi = count on plot i (i takes on values 1 through n).

We write Σxi to indicate the sum of the xi’s on the n sampled plots.

We write  to indicate the average of these xi’s, given by the formula:

Each plot has an area a, so the number of trees/hectare on the sampled plots is  .A
good estimate ,  , of the total number of trees, T, on the entire island (which has
area = A) is

We still have the question: How accurate is this estimate?

The accuracy involves the computation of a quantity called the standard deviation,

The smaller the value of s, the more accurate the estimate will be. Statistical theory
tells us that for large samples, we can be about 95% sure that the difference between
the mean count on all plots on the island, μ (includes both those which were sampled
and those which were not), and the mean on the sampled plots,  , will be less
than  , i.e. that μ will be between   and  .

Since our estimate of T is  , we are 95% sure that T is between

and  .

Worked Example:
On Goober Island, the count of trees on the 8 one-hectare plots are as follows:

362, 422, 486, 513, 368, 405, 334, and 289.

The results of the analysis of this data are:

 A = 109
 a=1.30
 n = 8

 s=75.37

Our conclusions are: The best estimate of T, the number of trees on the entire island,

is   or 33,000 (rounded to the nearest thousand).

We are 95% sure that T is between   and  ,


or between 29,000 and 38,000 (rounded to the nearest thousand).

The above analysis is approximate. We have not allowed for the facts that:

 The plots on the edge of the island will be of different sizes,


 A sample of 8 items is not considered large, so the result stated above is only
approximate.

You might also like