In this screencast we'll go through a step by step process of how to handle a mathematical
model which A, requires linearization, and B requires the analysis of something that
is not a pure step function. So to show this we will go through the example shown on the
screen where we have a tank of two streams with different concentrations of sugar being mixed
together to get a desired final concentration. Note the fact that when the system is at steady
state we have the values that are provided on the right. We note the fact that we have
a step increase in f1 based on an operator error, but fortunately the fact that in this
problem we see that we have a step change which happens in f1 by two liters a minute.
However, this only lasts for five minutes and then the system is restored back to its
original steady state. So the question is asking determine how the exiting concentration
changes as a function of time using Laplace transforms. So to start with, we will develop
a mathematical model for this process, an important point to note here is the fact that
changes in the inlet flow rate are automatically compensated by altering the outlet flow rate.
So in other words a total mass balance is conserved, so in other words f will always
equal f1 plus f2. But if we were to do a sugar balance here what we would find is that the accumulation
of sugar equals in minus out, there is no reaction term going on, and we don't have
to worry about any thermal properties of the system. So coming in will be f1 times c1 plus
f2 times c2. As a units check, f1c1 has units of liters per minute multiplied by kilograms
per liter. So therefore we have a mass, so that checks out. Coming out will be the flow
rate f, which here we'll write as f1 plus f2 multiplied by our concentration c, the
accumulation, the derivative of the mass of sugar present as a function of time. That
will simply just be our volume multiplied by some sort of density, which in this case
can be represented by concentration. So we multiply V, here we are going to multiply
by times c because since the tank is well mixed the concentration exiting the tank is
the same as the concentration inside the tank. so you have dVc dt. We can factor the V out.
So now what we want to do for simplicities sake is put this into deviation variables,
as we put this into Laplace transforms. This is not a necessary step, but it makes some
of our solution processes a little easier. So here the things that can vary are c and
f1. Note if we were doing this in terms of f, that would also vary, but in this case
we specifically wrote f as f1 plus f2 to make it a little easier to solve. So our deviation variables
would obviously be c prime and f1 prime. Remember that the generic definition for a deviation
variable is just the variable at a given time, minus the steady state value. As we look at
our final equation in an attempt to get it into a Laplace domain, although everything
is first order an important point to note here is the fact that f1 and c are both variables,
so we multiply them together that is no longer a linear term, and there is no Laplace transform
for that, so therefor that requires an overall linearization. Here we will use the equation
to handle a differential equation that needs to be linearized, which is provided below.
So here are two variables, our c prime and f1 prime, so the left hand side would just
be V times dc prime dt, and that will equal, first our derivative with respect to f1, the
second term goes to zero, and the third term will be minus c. Put this in parenthesis because
we multiply everything by f prime, but note the c1 minus we have to evaluate it at the
steady state value, so therefore c1 is a constant so there is no bar necessary, but c is not,
so we are going to have to put a bar there. And for the c term we only have to look at
the third term on the right hand side where the derivative for that will be f1 plus f2,
multiplied by c prime. Once again we evaluate at x bar y bar, or in the case of the steady
states, for c and f1. So we have to have a bar to f1, f2 is a constant so we don't have
to concern ourselves with it. Now we take the Laplace transform and we end up with V
c prime s equals c1 minus c bar multiplied by f1 prime minus f1 bar plus f2 multiplied
by c prime. If we move the c prime terms over to the left hand side, and after a little
bit more rearrangements we end up with our transfer function in standard form. So we
end up with a generic first order transfer function where this term is our gain, which
has units of concentration divided by flow rate. This is our value for the time constant,
where tau has units of minutes. Next, we'll evaluate the value of the gain and the time
constants, so we will have to go back to the information we have at the beginning of the
problem. So if we look at what we have at the top we have the values for f1, f2, c1.
However, we do not have the value for c bar. C bar can be obtained by using an entire mass
balance at steady state. So to find c bar we'll use the same balance we had before,
except the left hand side is zeroes. And that will leave us with zero equals f1 c1 plus
f2 c2 minus f1 plus f2 multiplied by c. So in other words, c will equal f1 c1 plus f2
c2 divided by f1 plus f2, which equals six kilograms per liter, which is our value for
c bar. So now we can solve for the gain as three over five. And then for tau we can solve
for V over f1 bar plus f2, and that will just be two. So this means that our transfer function
is c over f1 prime equals three fifths divided by two s plus one. But the next thing we have
to do is we have to evaluate f1 prime in the Laplace domain, so to do this we have to recall
what was going on with our flow rate. So what we see here is the fact that the operator
flipped a switch and instantaneously increased the stream by two liters per minute, but then
after five minutes the original flow rates are restored. So if we are to put this into
mathematical form what that would be saying is that f1 prime equals two for times between
zero and five, and that f1 prime equals zero for all else, for all other times. If this
were to be graphed, it would represent what is known as a rectangular pulse, with the
time axis from zero to five, and this being f1 prime going from zero to two. So we will
use the definition of Laplace transforms, which is the fact that the Laplace of the
function is known as the integral from zero to infinity of the function the time domain
e to the negative s t dt. So for our case here that will be the integral from zero to
five of two e to the negative st dt, plus the integral from five to infinity of zero
e to the negative st dt. The second integral quickly goes to zero, and what we're left
with for our Laplace is the integral will be negative two over s e to the negative st
evaluated from zero to five. You can rewrite this as two over s multiplied by one minus
e to the negative five s. And this is what we'll substitute in for f1 prime, so when
we substitute into f1 prime and rearrange, we can restate the concentration, c prime,
as three fifths over two s plus one multiplied by two over s times one minus e to the negative
five s. What this represents is a first order response minus a FOPTD response. So there
are tables in which you can evaluate it explicitly. C prime, our deviation variable will equal.
So the first order responses of the form KM times one minus e to the negative t over tau.
The FOPTD will be of the form KM multiplied by one minus e to the negative t over tau, but
this t has to be replaced by the dead time, t minus t naught, and the second term is only
valid when t is greater than t naught. So if substitute all of these things in our gain
here is three fifths, the magnitude of our step is two, and then we have one minus e
to the negative t over tau, which in this case is two, minus the same three fifths multiplied
by two, multiplied by one minus e to the negative t minus our dead time, which is t naught,
five, over two. So what it means is the fact that our concentration will obey the first
term only for when t is between zero and five, and that c prime will equal. And this is valid
for all other times. If we plot the data based on the functions provided we'll get the graph
shown below. If we look at this graph it makes sense, because initially by increasing the
flow rate of the more concentrated stream, our concentration will go up. Eventually it
will go back down and reach its old steady state once the switch has been flipped back
because we have now regained the original flow rate, which would mean the fact that
over time we would regain the initial steady state. Note the fact that we could also graph
this as our y axis as c, without the deviation variable by starting at our steady state,
so we go from six all the way up to seven point two. So here we showed how to solve
a dynamic system by going through all the steps of developing the mathematical model,
putting in deviation variables, linearizing, taking Laplace transform, and then solving
our Laplace transform. Here we used knowledge about the fact that we had very common transfer
functions, a first order process and a FOPTD, to conduct our analysis. However these answers
could have easily been obtained by using partial fractions, or the heavy side method.