 In this lecture, we will be looking at stability analysis of exothermic stirred tank. So, our system looks like this. Let us look at a stirred tank. Scott, let us say a cooling system. You have feed coming in and products going out. Feed is V naught, C naught and T naught is the temperature. We have C naught becomes C A T and let us say V is the outlet flow. And T c temperature at which the cooling is coming and the flow of the coolant is considered to be quite large. So, that the T c does not change all that much. So, as far as our analysis is concerned, we will assume it is reasonably the same. There is a stirrer which keeps the fluids well mixed so that you have a C S T R. So, we write the mole balance. So, our reaction let us say is A goes to B, single independent reaction or even if it is A in this form also there is only one independent reaction. So, we do the treatment for the case of one independent reaction say A goes to B. So, the system we consider is A going to B. So, we have mole balance which is input output plus generation equal to accumulation. Let us say a variable X defined as C A 0 by C A divided by C A 0. This variable X has a meaning of conversion at steady state. During the unsteady state it should be treated as a variable defined by this relationship. So, suppose we say that the volumetric flow is V equal to V naught means what we are saying is if V equal to V naught this equation can be written as V naught C A naught minus V naught C A minus of R 1 V because R A the rate of formation of A is given as minus of 1 times R 1 the rate intensive rate of the reaction A going to B. So, that this becomes equal to V times D by D T of C A V is consumed constant V constant. What are we saying is that the equipment where we conduct the reaction that volume does not change during the reaction. So, we can simplify this and write it as minus of tau D X D T equal to X minus of R 1 tau divided by C A 0. Let us just check if this is correctly done. So, if you divide throughout by V 0 this becomes tau that is fine and then C A naught minus of C A divided by C A naught becomes X. So, this X is correct minus R 1 tau by V and C A equal to it is fine the relationship is fine. So, I will just put it in this form D X D T equal to minus of X plus R 1 tau by C A 0. So, this is our equation 1 material balance. So, this is the mole balance equation our next equation is the energy balance equation which we will write energy balance equation looks like this we have written it before. So, let us V times C P volumetric specific heat D T D T. So, the rate of change of temperature this is volumetric specific heat V naught C P T naught minus of T plus minus of delta H 1 star plus Q minus W. We say this is not important and then if you divide throughout by V naught C P we get V divided by C P divided by V naught C P D T D T that is the first term equal to T naught minus of T plus R 1 V divided by V naught C P plus Q I will denote Q as H A times T C minus of T divided by V naught C P. So, essentially dividing throughout by V naught C P. So, the first term on the left hand side becomes D T D T equal to T naught minus of T and this term H A by V naught C P notice here H A by V naught C P is dimensionless we can easily check that. So, I will put this as beta T C minus of T plus R 1 sorry R 1 V minus delta I have forgotten the term minus delta H 1 star here. So, you have R 1 tau and this I will call it as J 1 where minus delta H 1 star by C P volumetric is J 1 and beta equal to H A by V naught C P these are the two. So, our energy balance equation this energy balance equation we can simplify this further and put it in slightly more convenient form which we will do now. So, what we write this as tau D T D T that is the first term please notice here our first term this is tau D T D T I have not changed this I want to combine this term with the second term. So, I am combining the first and the second term and writing it as 1 plus beta times T C star minus of T plus R 1 tau J 1 where 1 plus beta times T C star equal to T naught plus beta T C. What we have done please notice here please notice here what we have done is we can see here we cannot see we cannot see very well cannot see very well what I am saying here is the following. So, I am combining these two terms and writing it as 1 plus beta T C star minus of sorry sorry I am combining this and then writing this as 1 plus beta T C star minus of T where 1 plus beta T C star is equal to T naught plus beta T C. So, essentially you know putting it in a slightly more convenient form this whole term as 1 plus beta T C star minus of T where T C star is defined as this by this relationship the advantage of looking at it like this is that given T naught and beta you know what is T C star. So, this is equation number I have denoted it as 3 alright. So, this is decal our equation number 1 is this tau D X D T is this our equation number 2 equation number 3 is this essentially our stirred tank is described by these two equations equation 3 and equation 1. Now, what happens at steady state at steady state we have tau D T S by D T equal to 0 tau D X S by D T equal to 0 showing that at steady state the value of X at steady state X S value of T S does not change this is what the definition of steady state is all about therefore, that must be equal to 1 plus beta times T C star minus of T S plus R 1 S tau J 1 and then D X S D S equal to D T equal to minus X S plus R 1 S tau divided by C 0. So, we call this as 5 we call this as 4 showing that the steady state that you will see in our system is now described by equations 5 and equation 4. The unsteady state is described by equation 1 and equation 2. So, that we have already said. So, equation 1 is this equation which tells you what is the unsteady state of description and equation 2 or equation 3 is this talks about temperature. So, equation 1 and 3 describe the unsteady state equation 4 and 5 describe the steady state. Now, by stability what we mean is that the difference between the steady state number or steady state values and the values that is obtained during the unsteady state or during the period when there is some disturbance that X minus of X S and T minus of T S. These are the variation changes from the steady state values. We want to understand if there is a disturbance to the process what happens to this difference X minus of X S T minus of T S. In other words we want to know whether these disturbances X minus of X S T minus T S whether they would grow and become unbounded. So, the process becomes out of control or they are small enough. So, that it remains within limits that you and I have specified or you also would like to know what is the trajectory of motion of a variation of a disturbance from an initial point of X S and T S. So, various things like this which you would like to know this is what this analysis is all about which we are about to embark upon. So, we have equation 1 and 3 and then we get 4 and 5 describing the steady state and then steady state. Now, what happens now to understand this deviation from steady state we what we do is what is called as find you subtract equation 1 minus equation 2 and equation 3 minus of equation 5. So, we do 1 minus 2 correct 1 minus 2 is it correct 1 is 1 minus 4 1 minus 4 and 3 minus 5. Suppose you do this what we get is D by D T of X minus of X S D by D T of X minus of X S that is equal to minus X minus of X S plus R 1 minus of R 1 S tau by C 0. Similarly, D by D T of T minus of T S equal to minus 1 plus beta T minus of T S plus R 1 minus of R 1 S multiplied by tau times J 1. So, what we have done we have equation 1 and equation 3 let just run through this once again the equation 1 which is the material balance. Then we have equation 4 whereas, equation 4 we have equation 4 you can see here this equation 4 and this equation 1 you can see both these equations now equations 1 and equation 4. So, you are doing 1 minus 4. So, you get tau times D of X minus of X S minus of X minus of X S and then R 1 minus of R 1 S tau by J C is 0 multiplied. So, 1 minus of 4 essentially talks about D by D T of the deviation X minus of X S. In the same way if you can look at the other 1 1 and 3 and 5. So, you can look at 3 and 5 see 3 is the unsteady state 3 and 5 what is 3 and 5 you can see here D by D T of temperature and then D by D T of steady state temperature. So, T minus of T S we can do T minus of T S tau times that becomes what 1 plus beta is common you have T C star cancels of T minus of T S with the minus sign. So, that is we will get a T minus of T S with the minus sign and then you can see here R 1 J tau and then you have R 1 J tau. So, it will be J times tau multiplied by R 1 minus of R 1 S. So, this is what we have written here. So, what we have written is this. So, both these equations is what we have written D minus D D by D T of X minus of X S D by D T of T minus of T S. So, they represent the deviation from steady state. I will call this equation 6 and equation 7. Now, we want to understand what is what happens to X minus of X S with time what happens to T minus of T S with time. Now, to be able to do this of course, since we know the initial state we should be we can solve the unsteady state equations using an appropriate numerical procedure and then find out what happens. But, our interest is just to get some criteria by which we can understand the system without having to go through all these mathematical calculations. So, what we are looking at is to see whether this R 1 minus of R 1 S this R 1 minus of R 1 S which appears in both the material balance and the energy balance whether we can look at this difference R 1 minus of R 1 S by looking at the Taylor series expansion of this term R 1 minus of R 1 S keeping in mind that the deviation X minus of X S and T minus of T S is not very large. On other words what we are trying to say is that we can get an understanding of the stability of the system by doing small perturbations from the steady state. If the perturbations are very large our mathematics may not be satisfactory we may have to do a numerical procedure to handle all these. But, for small disturbance from steady state that means when X minus of X S is small T minus T S is small we can expand R 1 minus of R 1 S in Taylor series and get a linear approximation to the problem. The advantage of this procedure is that we can get answers to our stability questions without having to solve the non-linear problems that is a big advantage. Of course, how small is small when you say X minus of X S is small or T minus T S is small the question of how small is small still remains is something that we will learn only when we deal with actual situations to make a distinction between small and how small is small. So, now what we want to do is that we want to do as what is called as a linear stability analysis by linear we mean we will linearize this function R 1 about R 1 S and then see what is the best estimate of R 1 minus of R 1 S we can get. So, that we can get an approximation to what happens to this unsteady state problem. So, let us expand for example, expanding by Taylor series expanding R 1 at X T by Taylor series. So, we say R of X T equal to R of X S T S plus X minus of X S del R by del X at S plus T minus of T S del R by del T at S this is the first order terms. Second order terms are X minus of X S whole square by factorial 2 del square R by del X square. Now, then become X minus of X S T minus of T S divided by factorial 1 factorial 1 del square R divided by del X del T plus T minus of T S whole square del square R by del T square. So, this is an expansion that we all have studied in early school. So, there is nothing new about this if you have a function X T we can expand it this way and. So, that if the second order terms are all these terms are you know very small then we can delete these terms assuming they are small. So, that our expansion of X T versus about X S T S only involves X minus of X S and T minus of T S and therefore, it is linear in X minus of X S and T minus of T S. What is del R del X at steady state or del R del T at steady state since the rate function is known del R del X S del R del T S is also known at the steady state point. Therefore, all these can be calculated having said this let us see how we can. So, what we are saying now is. So, we have R of X T equal to R of X S T S plus you have X minus X S del R del X at S then you have T minus of T S del R del T at S therefore, R 1 X T minus of R 1 S X T S X S T S is simply X minus of X S del R del X at S plus T minus of T S del R del T at S. So, what we have found here is that by Taylor series expansion the difference between R X T and R 1 X S T S is given by this linear relationship which is simply X minus X S multiplied by the rate of change in that direction. So, now we can substitute we can substitute for R 1 minus of R 1 S in our equations. So, you have here we notice here that our steady state the deviations from steady states given by two equations 6 and 7 where R 1 minus of R 1 S is occurring. Therefore, using this relationship that you derived just now that R of X T minus of R 1 at X S T S is given by this relationship X S minus of X minus X S times del R del X plus T minus T S del R del T. So, we can use that and take it forward. Let us put these. So, our equations D by D T of X minus of X S divided by D T equal to minus of X minus of X S plus you have R minus that is X minus of X S del R del X at S plus T minus of T S del R del T at S. What we have got here? X minus of X S del R del X is what is the term that is coming here. So, R 1 minus of R 1 S. So, the right hand side we have R 1 minus of R 1 S is to replace by this equation X minus of X S del R del X T minus of T del R del T. Now, if I denote X minus of X S as small x. So, the left hand side becomes D X D T. There is a tau here which I have forgotten I will put it again now that is equal to first term is minus of X. The second term is what plus X del R del X at S then plus Y del R del T. What is our equation? Where is our equation here? Our equation is R 1 minus of X multiplied by tau by C A 0. So, we will have to multiply R 1 minus of R 1 S R 1 minus this whole term should be multiplied by tau by C A 0. So, this also we should multiply by tau by C A 0. I hope we understand what I am saying. Let us just go through this once again. So, that there is no confusion. What we have done? We have expressed in the form of a differential equation X minus of X S and T minus of T S. The right hand side they involve a term R 1 minus of R 1 S in both material balance and energy balance. Then we said that R 1 minus of R 1 S this can be understood from looking at the Taylor series expansion for function R times R X which we have done here. So, this gives us R X T minus of R 1 X S T S. Therefore, that difference between R 1 and R 1 S it is given by this relationship X minus of X S del R del X and X T minus T S del R del T. So, we have to substitute for that here. Therefore, R 1 minus of R 1 S has to be multiplied by tau by J C A 0. This is what we have done here. So, our relationship for the variation of X with time is given by this relationship which involves all the terms that we have talked about. Now, let us do the same thing energy balance. What is our energy balance? So, we are doing the same thing for our energy balance. So, we say tau where are we? So, equation 7 is our energy balance. So, which I am writing it as T minus of T S let us say is Y. So, becomes d by d T of Y equal to 1 plus beta T minus of T S is Y plus R 1 minus of R 1 S. Let me write it down in the form in which we want which is within brackets of X minus of X which is small X del R del X at S plus Y T minus del R del T at S. Is that clear? So, our balance now looks like. So, this is R 1 minus of R 1 S you have to multiply it by tau times J 1. So, we have two equations now. So, we have the material balance equation giving you tau d X d T equal to on the right hand side. And you have the energy balance equation giving you an equation of the form d by d T of 1 plus 1 plus beta and so on. And then 1 plus beta must have a negative sign. I forgot the negative sign. So, we have these two equations tau d X d T equal to this and d by d T tau is missing here tau also is missing here. Now, we can put this in a nice form. The nice form is taken from Rutherford Harris book and the forms in which these equations are available. I will write the final forms because these are not very difficult to do. These are all available in this form in the lit. So, what we are saying is that the differential equations that is with us to be solved in the literature it is available in terms of l m and n where l is defined like this m is defined like this n is defined like this. So, that our equation tau d X d T can be written like this. So, n Y divided by J 1 C H 0 and tau d Y d T equal to minus of Y times m minus of n plus J 1 C H 0 1 minus of l times X. So, I mean you might ask how I got this is some very elementary manipulation you have to put all these things in terms of l m and n and simplify these two equations and it is nothing very complicated it will come very nicely. So, what are we saying what we are saying now is that X and Y represent the deviation from steady state. And then this differential equation I will call it equation 7 8 9 10 let us say it is 9 10. These equations 9 and 10 describe how X and Y change with time as the process is disturbed because of some external disturbances. So, our interest is now to solve this of course this can be solved numerically that is not a big problem, but we can get answers to this by looking at the matrix of the variations that we have talked about let us do that now. So, let us represent this equation tau within brackets of X dot and Y dot what is X dot and Y dot X dot is d X by d T Y dot is d Y by d T X represents deviation in conversion Y represents deviation in temperature with respect to steady state. So, in this form we can write our matrix which is X and Y. So, this matrix looks like this. So, it is minus of L N by J 1 C A 0 J 1 C A 0 times 1 minus of L M minus of N. So, this is fairly straight forward there is nothing much in it. So, this is just written in the matrix form that is all X dot Y dot represent d Y d T and d X d T and then X and Y taking common and all that you will get what you are saying. Now, if you have a matrix differential equation where the coefficient matrix here consists of terms which are constant. So, the coefficients L M and N they are all constants therefore, this coefficient matrix tells us something about the system which is undergoing a transient change. The linear stability theory says linear stability theory states that if coefficient coefficient matrix has negative Eigen values has negative Eigen values. Then the disturbance the disturbance as measured by X dot and Y dot will slowly decrease and ultimately becomes 0. What are we saying? What we are saying is that if the Eigen values are negative then the disturbance X dot X and Y will slowly die and eventually it will reach the previous steady state from where it started. Now, how do you impose the condition that these values of the Eigen values are negative. Suppose, you want to make the Eigen values negative that means what is the condition that we can impose? The condition that we can impose is that if you have a matrix which is minus of L N by J 1 C A 0 J 1 C A 0 times 1 minus of L M minus of N this matrix must have negative Eigen values. How do you find? That means how do you find the Eigen values of a matrix A minus of lambda i equal to 0 that determinant tells you the. So, you have to find the determinant I will say determinant of minus of L minus of lambda N by J 1 C A 0 M minus of N minus of lambda. So, this determinant must goes to 0. So, this must be equal to 0. Then these Eigen values these Eigen values should become negative or if it is complex the real part must be negative. If that is the case then the disturbance that is measured by x dot and y dot we tend to become smaller and smaller and in long periods of time completely disappear. So, our criteria for stability of our steady state is that Eigen values of this matrix must be negative. So, how do we impose that condition on this matrix? The condition we impose on this matrix is that the determinant must have negative Eigen values. So, let us find the determinant. So, you have minus of lambda. So, we have I am writing the determinant please see if it is. So, minus of L minus of lambda multiplied by M minus of N minus of lambda equal to N by minus J 1 C A 0 J 1 C A 0 divided by 1 minus of L. This must be equal to determinant must be equal to 0. What are we saying? To find the Eigen values we have to say A minus of lambda I equal to 0. That is what we have done. So, that A minus of lambda I equal to 0 specifies that this characteristic equation. This is the characteristic equation must be 0. So, this tells us what are the values of lambda? Let us solve this. So, when you solve this let me write down minus of L N plus L M plus L lambda minus of lambda N plus lambda M plus lambda squared minus of N plus L N equal to 0. This is there is a minus sign here which I did notice. It is minus lambda. So, it is minus M plus N that is why. See I have put it in the matrix. So, this is the numerator. So, 1 minus of N. I am sorry. That is why J 1 C A 0 1 minus of L divided by N by J 1 C A 0. That is better. So, this is correct. So, we can simplify this and write this as our characteristic equation looks like this lambda squared plus lambda times L plus M minus of N plus within brackets L M minus of N equal to 0. L M minus of L M minus of N L N some terms to N. So, lambda squared. So, this is correct lambda squared L M L M minus of N this term is taken. Now, lambda times L lambda. So, this term is taken minus of lambda N this term is taken this term is taken and then L lambda M this term is taken. So, all the terms are taken. So, only term these two cancels off. This is fine. Therefore, solution is minus L M L plus M minus of N minus of B minus of plus or minus of root of L plus M minus of N whole squared minus of 4 times L M minus of N divided by 2. So, this is the Eigen value and we must put the condition that these Eigen values are negative. Now, if it turn out to be complex the real part must be negative. So, this is the condition that we must impose and then it stands to reason simply to recognize that L plus M minus of N must be greater than 0 and L M minus of N greater than 0. So, for lambda negative that is just understand whether this is satisfactory from our first principles. We want lambda to be negative when we lambda to be negative the left hand side L plus M minus of N must be greater than 0. So, that this term is always negative and the term inside L plus M minus of N. So, this must be L plus M minus of N must be this whole thing has to be such that if you see if you make L M minus of N greater than 0. So, if this is greater than 0 you find that this whole term becomes less than L plus M minus of N. Therefore, all the both the roots become negative this is what you have to recognize you want both the roots to be negative. So, this nice condition L plus M minus of N is greater than 0 L M minus of N greater than 0. So, there could be a situation when the second term is very large compared to the first one. So, that the whole term becomes what is called as complex. So, moment becomes imaginary the second term which means what the real term Eigen values real part is negative, but it has a complex part which only means there is an oscillation involved in the process. Now, just quickly look at what we are saying what are we saying what we are saying is we have time or x or y that is say. So, this is an instance when lambda 1 and lambda 2 are negative. So, when lambda 1 and lambda 2 are both negative what you find is that this both x and y this is 0. So, it starts at some value it starts to decay and it takes certain amount of time to become 0. Now, this can this can also be like this or this can also be like this. So, a b c. So, this instance of a b c are 3 types of values of lambda 1 and lambda 2, but such that they are all the because lambda 1 and lambda 2 are negative the deviation x and y goes to 0 in various ways. But these are all instances of stable steady state because both x and y become 0 in infinite time that is the meaning of asymptotic stability. So, there could be instances where you know it sort of runs away. So, this e and f are values of lambda 1 and lambda 2 positive or positive. So, this is e and f e and f is when lambda 1 and lambda 2 are positive the process runs away which means that there are instances of unstable situation. That means, when there is a disturbance under conditions of e and f it does not return to the same steady state. Therefore, instances there are unstable. Let us look at one more instance what is that instance is when the lambda has a complex. That means, lambda is a complex which means that this is a real part, but there is an imaginary part as a result of which there is oscillation. So, there are two types of oscillations. So, time x and y what we are saying is that the there is negative real part, but there is oscillation which means what you have that means it oscillates yes, but because the lambda is negative real lambda 1 and lambda 2 are negative real part is negative real. So, that the complex part starts to decay. So, there is one more instance which you will see that is you have lambda 1, lambda 2 are 0 the real part is 0 real part is 0 and then the imaginary the other part is complex showing that you see you can have what is called as a stable oscillations. When the real part is 0, but there is a complex part which means the stable oscillations. So, a stable oscillation can be seen as steady as long as the oscillations are within the limits that you would specify. So, what we have done is that we have formulated the problem in terms of deviations from steady state. We have looked at how to make these deviations the Eigen values of this matrix should be negative real we put the conditions for that. We said the conditions are l plus m minus of n greater than 0 l m minus n greater than 0. If these two conditions are satisfied the steady state is stable provided the lambdas have negative real part. Now, there is another way by which we can look at all this let us do this quickly. So, what we are saying is that let us just write down the equation once again our equation is d x d t equal to minus of x plus r 1 minus of r 1 s tau by c 0 tau d y d t to minus of 1 plus beta plus r 1 minus of r 1 s multiplied by tau j 1 plus r 1 minus of r 1 s multiplied by j 1. Is that clear? We want to understand stability in the context of a process. Now, in a process our variables x which is deviation from steady state, variable y which is deviation from steady state in temperature all these will change it will not be at the steady state that you and I have specified. Therefore, when you run a process we accept certain variations. Now, within the limits if these variations are within limits that we specify we are still willing to accept. So, suppose I say that q equal to x by x s comma y by t s suppose I define a quadratic form which is x by x s comma y multiplied by this this vector. So, what we are saying is that x square by x s square and y square by t s square equal to some number. Suppose, I say that as long as this q is within my limits I am willing to accept the process. Suppose, we do that what it means? What it means is that if I expand this q equal to x square by q x s square by x square by x square by x square plus y square by q t s square equal to 1. So, if I put this in this form that means I can suppose I say that in my process I am willing to accept q as the as the value of the objective what is that objective that x by x s comma y by t s this quadratic form should be equal to q at best or expressed in this form this ellipse x this is the equation to an ellipse. Suppose, I make a plot I make a plot of y and x. So, I get an ellipse and this is the point of steady state as long as my x and y stay within this ellipse I am willing to accept the process. So, in other words what we are trying to say by looking at the stability analysis of an exothermic stirred tank is that x and y will change it will change depending upon how well we run the process. But, if you define a quadratic form and if you can run the process within that ellipse we are willing to accept and say that it is a stable process we are willing to accept whatever variations and this is one way of trying to run a process because it is very difficult to keep the values of x and y at the points where we would like to be. Thank you very much.