Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Degrees of Freedom

To determine the degrees of freedom (the number of variables


whose values may be independently specified) in our model
we could simply count the number of independent variables
(the number of variables which remain on the right- hand side)
in our modified equations.

This suggests a possible definition:

degrees of freedom = # variables - # equations

Definition:

The degrees of freedom for a given problem are the


number of independent problem variables which must
be specified to uniquely determine a solution.

In our distillation example, there are:


16 equations
16 variables (recall that F and XF are fixed by
upstream processes).

This seems to indicate that there are no degrees of freedom.

© Fraser Forbes, 1997 dof 1


Degrees of Freedom

Consider the three equations relating QC, QR, and qvapour:

Q R - QC = 0
QR - DHvap qvapour = 0
QC - DHvap qvapour = 0

Notice that if we subtract the last from the second equation:

QR - DHvap qvapour = 0
- QC - DHvap qvapour = 0

Q R - QC = 0

the result is the first equation.

It seems that we have three different equations, which contain


no more information than two of the equations. In fact any of
the equations is a linear combination of the other two
equations.

We require a clearer, more precise definition for degrees of


freedom.

© Fraser Forbes, 1997 dof 2


Degrees of Freedom

A More Formal Approach:

Suppose we have a set of "m" equations:

h(v) = 0

in the set of variables v ("n+m" elements). We would like to


determine whether the set of equations can be used to solve for
some of the variables in terms of the others.

In this case we have a system of "m" equations in "n+m"


unknown variables. The Implicit Function Theorem states that
if the "m" equations are linearly independent, then we can
divide our set of variables v into "m" dependent variables u
and "n" independent variables x:

u
v =  
x 
The Implicit Function Theorem goes on to give conditions
under which the dependent variables u may be expressed in
terms of the independent variables x or:

u = g(x)

© Fraser Forbes, 1997 dof 3


Degrees of Freedom

Usually we don’t need to find the set of equations u = g(x), we


only need to know if it is possible. Again the Implicit Function
Theorem can help us out:

if rank [∇vh ] = m , all of the model equations are


linearly independent and it is possible (at least in theory)
to use the set of equations h(v) = 0 to determine values
for all of the "m" dependent variables u given values for
the "n" independent variables x.

Alternatively we could say that the number of degrees of


freedom in this case are the number of independent variables.
(Recall that there are "n" variables in x).

We know that:
rank [∇vh ] ≤ m.

What does it mean if:


rank [∇vh ] < m?

© Fraser Forbes, 1997 dof 4


Degrees of Freedom

Let’s investigate a simple set of equations:

 v1 - v1v 2 - αe v 3 
h( v ) ≡   = 0
 v1 - v 2 - v 3 
with a=1/e. (This could be the material balances for a reactor.)
A three dimensional plot of the equations looks like:

v3

v2 v1

The solution of the equations lies at the intersection of the two


surfaces, each described by one of the equations.

How many degrees of freedom does this problem have?

© Fraser Forbes, 1997 dof 5


Degrees of Freedom

Take a closer look:

v3
.

v2 v1

Examine the neighbourhood of the point:


v1=1,
v2=0,
v3=1.

What is happening here?

© Fraser Forbes, 1997 dof 6


Degrees of Freedom

The Jacobian of the equation set h(v) = 0 is:

1 − v 2 - v1 - αe v 3 
∇vh =  
 1 -1 -1 

When a=1/e at the point v=[1,0,1]T, then:

1 - 1 - 1
∇vh =  
1 - 1 - 1

What is the rank of this matrix?

Note that:

rank [∇vh] = 1 <m=2.

This tells us that, at the point v=[1,0,1]T, our system contains


only one linearly independent equation.

© Fraser Forbes, 1997 dof 7


Degrees of Freedom

Then:

degrees of freedom = 3 variables - 1 equation


= 2.

∴ at the given point two variables must be specified to


uniquely determine the solution to the problem.

This example was chosen because it was very easy to see the
occurrence of linear dependence within the equation set. Of
course the situation can be much more complex for real
problems with many more equations and variables. So,
clearly we cannot determine degrees of freedom by counting
the number of equations in our problem.

As a result, we must modify our definition:

degrees of freedom = number of variables -


number of linearly independent equations

© Fraser Forbes, 1997 dof 8


Degrees of Freedom

In summary, determination of the degrees of freedom for a


specific steady-state set of equations requires:

1) determination of rank [∇vh].

2) if rank [∇vh] =number of equations (m), then all of


the equations are linearly independent and:

d.o.f. = # variables - # equations.

3) if rank [∇vh] <number of equations (m), then all of


the equations are not linearly independent and:

d.o.f. = # variables - rank [∇vh].

Remember:
For sets of linear equations, the analysis has to be performed
only once. Generally, for nonlinear equation sets, the analysis
is only valid at the variable values used in the analysis.

© Fraser Forbes, 1997 dof 9


Degrees of Freedom

Degrees of freedom analysis tells us the maximum number of


variables which can be independently specified to uniquely
determine a feasible solution to a given problem.

We need to consider degrees of freedom when solving many


different types of problems. These include:

i) plant design,
ii) plant flowsheeting,
iii) model fitting,

and, of course, optimization problems.

© Fraser Forbes, 1997 dof 10


Degrees of Freedom

Consider the example isothermal reactor system:

FA

k
A B

V XA , XB
FR

The material balances are:

mass FA - FR = 0
component A FA - kXAVr - XA FR = 0
component B kXAVr - XB FR = 0

What other information do we have?

By definition, we also know:


1 - XA - XB = 0.

© Fraser Forbes, 1997 dof 11


Degrees of Freedom

If we know the feed-rate (FA = 5 kg/min.), reactor volume


(V =2 litres), density of the reaction mixture (ρ=1 kg/l), and
reaction rate constant (k=7 min-1), then the material balances
can be re-written:

5- FR =0
5 - 14XA - XA FR =0
14XA - X B FR =0
1 - XA - XB =0

Is this set of equations linear or nonlinear?

In our problem, there are:

3 variables (XA , XB ,FR )


4 equations (1 mass balance
2 component balances,
1 other equation).

What does this mean?

© Fraser Forbes, 1997 dof 12


Degrees of Freedom

Consider what happens if we add:

-1×mass balance -5 + FR = 0
+component A 5 - 14XA - XA FR =0
+component B 14XA - X B FR = 0

FR - XA FR - XB FR = 0
or:
FR (1 - XA - XB ) = 0

and since FR ≠ 0, then:

(1 - XA - XB ) = 0

which is our fourth equation. Thus our four


equations are not linearly independent.

Caution:

Care should be taken when developing a model to avoid this


situation of specifying too many linearly dependent equations,
since it often leads to difficulty in finding a feasible solution.

© Fraser Forbes, 1997 dof 13


Degrees of Freedom

We need to eliminate one of the equations from our model. I


would suggest eliminating:

(1 - XA - XB ) = 0

This equation could then provide an easy check on any


solution we find using the other equations.

Thus our model is reduced to:

5- FR = 0
5 - 14XA - XA FR =0
14XA - XB FR = 0.

How many degrees of freedom are there in this model?

© Fraser Forbes, 1997 dof 14


Degrees of Freedom

For our reactor model:

 -1 0 0 
∇ v h = - X A - 14 - FR 0 
 
 - X B 14 - FR 

What is the rank of this matrix?


(Suppose FR = 0 or FR = -14.)

We could determine the rank by:


1) using software (Maple, Matlab, Mathcad, ...)

2) examining the eigenvalues (which are displayed on


the diagonal of a triangular matrix.
rank [∇vh] = 3 FR ≠ 0 or -14
rank [∇vh] = 2 FR = 0 or -14

3) using the determinant:


 ∇vh  = -FR (14 + FR)
rank [∇vh] = 3 ( ∇vh  ≠ 0, FR ≠ 0 or -14)
rank [∇vh] = 2 ( ∇vh  = 0, FR = 0 or -14)

© Fraser Forbes, 1997 dof 15


Degrees of Freedom

Then for our reactor problem and realistic flowrates, we have:

3 variables (FR, XA, XB)


3 linearly independent equations
(1 mass and 2 component balances).

Therefore:

degrees of freedom = 3 - 3 = 0

This says there are no degrees of freedom for optimization and


the reactor problem is fully specified.

In fact the unique solution is:

FR = 5 kg/min.
XA = 5/19 wt. fraction
XB = 14/19 wt. fraction

© Fraser Forbes, 1997 dof 16


Degrees of Freedom

Until now, we have specified the feed-rate (FA) in our reactor


problem. Suppose we decide to include it as an optimization
variable:

1) how many degrees of freedom are now available


for optimization?

d.o.f = 4 variables - 3 equations


=1

2) Can we re-introduce the fourth equation:


1 - XA - X B = 0
to reduce the degrees of freedom?

No, using FA as an optimization variable


does not change the linear dependence
among the four equations.

© Fraser Forbes, 1997 dof 17

You might also like