 lecture, we will simulate the generator with an AVR. In the last class, we had of course discussed various transfer functions which could be used with an AVR. We now integrate the system. In fact, this is our kind of first experience of trying to simulate a control system, the power apparatus and the external power system. So, that is what we will do today. Recall that in the previous class, you can look at this paper. We had discussed the model of a simple static excitation system. We have chosen a static excitation system because it is the model of the excitation power apparatus is very simple. The only complexity so to speak is the limits of the static exciter which are dependent on the terminal voltage. Recall that if we normalize the field voltage and the control voltage to their corresponding values, when we get 1 per unit at the terminal of an open circuited generator running at rated speed, then the gain of this converter can be is effectively 1 because everything is normalized. The control signal also is normalized and the output also is normalized. If we have v ref minus v, the summing junction, v ref and v are expressed in per unit, then a typical or rather a transfer function which we can use, the simplest one one can say is a proportional type static excitation system. T a is very small. The gain k a when we use the normalized control output and also the per unit values of voltage here. In that case, k is typically around 200, 300 or you know that it is in that range. So, coming back to what we will be doing this lecture is to actually mathematically write down these equations. I will just show you a simple simulation and we shall also try to study the behavior of a synchronous machine connected to a infinite bias or a voltage source through a reactance and with the a we are regulating the terminal voltage of the generator. So far, we have been considering constant field voltage or the field voltage you can say manually increased in steps, but now we will have an automatic continuously acting feedback control system. So, today's lecture will be focused on the simulation of a generator connected to a infinite voltage source with the a we are in action. So, this is of course, the starting point of our discussion yesterday. The only thing we will be simulating today at least in the beginning would be the regulator function. We will not of course, be talking about the limiter and protective circuits or the power system stabilizer although I hope to give you a motivation for its use today itself why we need a stabilizer. As I mentioned sometime back, we will be using a simple model of an excitation system that is a static exciter and a generator which is connected to a power system and of course, as I mentioned couple of lectures back we will be simply trying to regulate the voltage that is the terminal voltage is measured and compared with the reference. We will not be putting any compensation for the load on the generator. So, we will not be having in the summing block any component corresponding to the current output of the generator. So, simply we will be having V ref minus V at the summing junction of the AVR. So, this is our static excitation system and as I mentioned sometime back. So, this is the model we will be using for the system. Now, when we want to simulate synchronous generator connected to an infinite bus, we will again have to use the equations which are given here. The fluxes of course, are something we have defined earlier. These are the fluxes of the synchronous machine. I D and I Q are the currents going out of the machine. V D and V Q are of course, the voltages at the terminal of the machine and E F D is the per unit value of the field voltage as defined earlier. Now, remember that currents and fluxes are related by an algebraic relationship as given here and A 1 is of this form. Remember you can notice the omega dependence of A 1. That is an important thing you should remember and A 2 of course, which relates the derivative of the flux to the current is given by this. B 1 and B 2 are given by these matrices and A 3 which relates the current to the fluxes is a matrix. It is a 2 into 6 matrix. Now of course, we are not considering zero sequence. The implicit thing in all our discussion so far have been that we are having a balanced system. So, we do not actually have to model the zero sequence. The thing is that the zero sequence variables do not appear in the D Q variable equations. So, there is a complete decoupling that coupling will occur in case if the synchronous machine is connected to an unbalanced network. But otherwise these equations are completely decoupled and the zero sequence equations can be separated out. Zero sequence equations have no source of excitation in case you have got a balanced system. So, you can practically say that all the zero sequence variables are zero and they are not coupled with the D Q variables. So, that is the reason why we are not considering zero sequence variables, but in case you do study unbalanced systems you should remember to take into account the zero sequence equations. Now, coming to the system we are going to study. Now, in the last simulation which I had shown you, I had got a synchronous machine which is synchronized directly to a voltage source and that was the kind of simplest system I could have shown you the synchronization. In order to show AVR action of course, it does not make sense to connect synchronize a generator to a voltage source because if you have connected a generator to a voltage source which is a stiff or constant voltage source, there is no question of voltage regulation because the voltage is maintained by the voltage source itself. So, voltage regulation makes no sense in case you have got a generator directly connected to a voltage source in this fashion. Of course, this is a symbolic representation of the generator. The generator itself is not a voltage source it is represented by the equation which I have already shown you. Now, the aim of the AVR is trying to maintain the voltage of this constant. So, constant is near constant. In fact, if you are using a proportional gain it is near constant not perfectly constant. Now, as I said this does not make any sense if you have got a perfect voltage source here to which this generator is connected. What makes sense of course, to you know show the action of a AVR is to connect it to a infinite bus or a large grid. It is connected to a large grid it is also called an infinite bus or a constant voltage source whose magnitude, frequency, phase angle all are all remain constant. What we are going to do is connected via a what would you connected via a transmission line or a transformer a transformer and a transmission line. So, this is a transmission line. Now, we have not gone into the modeling of a transmission line. So, we will not really delve deeply into this modeling of the transmission line itself, but you will know that well kind of a simple model of a generator connected via a transmission line and a transformer a very simple model could be a lumped reactor. This is the simplest model let us you know which one can have you know in a in a laboratory you could actually make the setup you could actually connected via a reactor, but right now we will assume that you have got a three phase inductance L which connects the generator to the perfect voltage source that is the infinite bus. Now, the generator now can you know maintain the terminal voltage try to maintain the terminal voltage because it tends to vary. How does it vary the how does the terminal voltage vary for example, if the power output of this generator changes in that case the current through this will change and you will find that the voltage here changes. Now, the only way you can maintain this voltage here at a near constant value is to have a close loop feedback system which changes E f d the field voltage. Now, in of course, in steady state the steady state representation of a non salient pole generator is simply like this please refer to a fairly early analysis of a steady state steady state analysis of a synchronous generator which was done roughly six or seven lectures back quite time quite at some time back. So, a steady state representation of a non salient pole synchronous generator is this. So, this is a steady state not of course, please do not use this under transient conditions under transient conditions you will actually have to use the differential equation model of the synchronous machine. So, do not use this for a transient representation of a machine, but we can see that if you have got a system like this infinite bus at least in steady state it is easy to see that if I change E f d I will be able to control or change the voltage here. So, this is the basic principle of course, of the AVR itself that you change E f d now coming to the model of this transmission line. Now, this is a simple you know a reactor whose inductance is L then the equations are given as shown in this slide that is L d I a by d t is equal to V a minus E a E a is of course, E a and V a are in fact, the phase two neutral voltages of the balanced infinite the generator as well as the infinite bus. So, remember that E a E b E c actually represent the phase two new neutral voltages of the infinite bus and the synchronous generator. For simplicity we will of course, assume that your infinite bus is simply E a is nothing, but so for simplicity we will assume E a the phase two neutral voltage of the infinite bus is nothing, but root 2 by 3 V line to line RMS the line to line RMS of rather I should call it E that would be notationally more easy to remember this is E sin omega 0 t. So, we will assume that you are seeing the infinite bus is of course, this is 120 degrees this plus 120 degrees now. So, omega naught is the constant frequency of the infinite bus. So, this is what E a means now if you look at what will happen in case you try to transform this into d q 0 variables. Now, transforming the d q 0 variable is quite simple in this case you know the d q transformation we have talked about the d q transformation or the Parkes transformation. So, if you use the Parkes transformation it transform I a I b I c into I d I q and I 0 and by doing that the equations are quite straightforward, but remember that you get these speed terms you know or rather I should say omega dependence omega remember is d theta by d t where theta is the position instantaneous position of the rotor of the machine. So, if you do the d q analysis of this system you can express this equation in this fashion it is also in per unit. So, what you see as x here is omega b l by z base. So, the best thing would be of course, you use a common base which is the base of the synchronous machine itself. So, the impedance base of the synchronous machine is used we have defined the basis sometime ago in our course. Now, one small an interesting point which we have here is the current through the this reactor which is interconnecting the synchronous machine to the infinite bus is the same as the current through the synchronous machine. So, actually if you look at the synchronous machine this is your synchronous machine this is not this is only a symbolic representation this is not a electrical circuit remember a synchronous generator cannot be represented simply as a voltage source this is your reactor and this is here. So, your current output of the machine i d i q is the same as the current through this i d and i q i 0 also is there which the neglect of which the neglect of which I have already explained sometime back. Of course, if you have got some load here for example, if you have got a resistive load here or any kind of load here this will not be true. So, if I have got something here then i d and i q are not the same for the generator and the inductor. Now, one of the interesting points which you have here is this is an interesting theoretically also is and also as practical consequences when you are trying to program the simulation of this system is that since i d and i q are effectively determined are a function of the fluxes the algebraically related to the fluxes we have seen that, but you also see that i d and i q are also determined by this differential equation. So, obviously there is a kind of a interesting situation here you have got two sets of one algebraic equation one differential equation which are with both are trying to define the current. So, this is a actually you have to be consistent you cannot have this differential equation for example, telling you that the current is something else and algebraic equation is telling you something else. Remember the algebraic equation relate the current to the fluxes which are again independently determined by differential equations. So, this so the issue here is that in some sense we have got these two differential equations here they are quite redundant in the sense that i d i q is already determined by that by an algebraic relationship with the fluxes. So, you really do not need to define two you know this extra set of differential equations and if we do use these differential equations as well we have to be really care to be consistent in the sense you cannot give i d and i q here for example, the initial conditions for this differential equation which are inconsistent with what you would obtain when you get the currents algebraically related to the fluxes. So, all the initial conditions would need to be absolutely consistent. Now, a situation like this could arise this is of course, like diversion from a main theme of power system dynamics, but it would be nice to just chew on this suppose I have got two capacitors which are in parallel. So, you can have this is suppose the current here is i. So, you have got d v by c c 1 c 2 is equal to i 1 i 2. So, we will call this v 1 and v 2 the voltage is v 1 v 2. So, we will have c 1 d 1 v 2 by d 1 by d t is equal to i 1 and c 2 d v 2 by d t is equal to i 2 and i 1 plus i 2 is equal to i and v 1 should be equal to v 2. So, actually this in some sense you can say that you know by choosing v 1 equal to v 2 why do we require a differential equation again why do we need another law to define v 2. So, this in some sense v 2 is again a redundant state in such a situation. So, when you are actually trying to simulate such a system it is better to remove the redundant states you know of course, that v 2 is dependent on v 1 it is equal to v 1 and v 2 are equal. So, you only need to determine the current through this whatever voltage you have here will be the same as the voltage here. You can have another situation when an inductor is connected to another inductor. So, there to you know the question is how many states are there you know you can if you write two differential equations this could be even you could take even a one inductance split it into two and get into this problem. So, this is something which this is a similar situation which you encounter here of course, this problem is solved in case you have got something connected in shunt which is not an inductor for example, a resistor or a capacitor you connected then these two states become distinct you can have two differential two sets of differential equations which really for these inductors which define give you separate and important information. So, this is one interesting point which you know you should chew upon if you look at something about the infinite bus itself we are kind of progressing to finally, getting our equations we have not actually solved this earlier problem of redundant states I have just told you that there these states are in actually redundant because I d and I q are obtained by algebraic relationships with the states. So, how do you use this information usefully. So, that is something which you need to chew upon the infinite bus itself remember its frequencies omega naught and the phase angle since e a e b and e c are defined to be these. Now, if the rotor angle position theta that is the position of the rotor theta is defined like this if omega naught is the frequency of the infinite bus rotor position is omega naught t plus delta which also means which also means that if you have got a say a two pole machine we will just talk about two pole machine here the a phase winding the axis of the a phase winding and the axis of the rotor winding the field winding that is is delta whenever there is a negative to positive zero crossing. So, if I at every negative to positive zero crossing of this sine wave if I take a snapshot of a synchronous machine of the synchronous machine I will see that the rotor is at an angle delta. So, that is what delta means now if that is the case e d will be e sin minus e sin delta this something we have defined before this is just obtained by applying the d q transformation to e a e b and e c and d delta by d t from by differentiating theta d theta by d t is nothing but the speed of the machine the instantaneous speed of the machine which which is nothing but omega naught plus d delta by d t and that is how I get d delta by d t is equal to omega minus omega naught. Let us assume that e is equal to 1 and the frequency of the infinite bus is equal to the base frequency. So, this is a simplify our math our analysis. So, what we have now is the synchronous machine and plus the equations of the external network. Now, what remains to be done of course, is the exciter equations themselves the excitation system essentially takes a feedback of the voltage the terminal voltage v d and v q and the set point is what is given by us and this is how your system looks like. Now, one of the things is that for the excitation system we really require to know the magnitude of the voltage and that is something we will spend little bit of time on now. What is the terminal voltage magnitude in fact, I have been using this somewhat nebulous kind of concept of a voltage magnitude this this is the voltage magnitude of the terminal you know. What is v? v is the magnitude of the voltage at the terminal of a synchronous machine, but you will immediately recognize is the fact that voltage magnitude in transient what do we mean you know if you have got a pure sinusoid then getting the magnitude is very simple you know you can for example, take the peak value and you can you know kind of from the peak value you can find out the line to line RMS value of the voltage. So, we got balance three phase sinusoid you can get the peak value of any phase and then get the line to line RMS magnitude. Now, magnitude of course, is in some sense a coefficient of the sinusoidal term when we write down the time relationship. So, when I say magnitude I usually mean something like this if I want the magnitude of a sinusoid I mean that I usually mean that the coefficient here is the magnitude, but this assumes that you got a sinusoid. Now, if I give you a waveform which is like this and I tell you well find out the magnitude of the sinusoid here in this case that is a bit of a bit of a question mark because this is no longer a sinusoid. So, what do I represent this as and how do I get the magnitude as a coefficient of a sine function you know when this is a transient kind of behavior where you cannot represent it as a pure sinusoid. So, this is an interesting point in practice whenever I am getting the magnitude of V what could I do one of the things I could do is you take the three phase voltages V a V b V c. So, for example, you have got V a is the voltage across the winding of a synchronous machine I could connect them in star and I could take the phase to neutral voltage is the voltage across the winding give it here sense it. So, I will get three well in steady state I will get three sinusoids, but otherwise of course, I will get simply the instantaneous values V a n V b n and V c n. Now, one of the ways you could you know define magnitude of a voltage is to take the Fourier component of V a V a n V b a n and V c n. For example, of course, your data is just coming in you know it is not a fixed signal, but you know your kind of continuously getting if this is a digital signal system for example, you will be continuously getting samples of V a n V b a n and V c n. So, how do you actually take out the magnitude or you can say Fourier coefficient of this fundamental Fourier coefficient of this well. So, I could define V a bar as something like this T minus T to T. So, this is one way of defining it. So, you try to get the magnitude of V a in this fashion you know as you get the instantaneous values you evaluate this integral using some kind of function you know you will have to actually implement this using for example, digitally you can implement a numerical integrator using the discrete samples of V a n. So, this is what you could do and get you know the kind of a Fourier coefficient of course, during transients you know you will get something which seems reasonable to assume what you will get is the Fourier what you call the magnitude of V a. So, this is one way of doing it in fact, you will have to get a sin component as well as a cosine component and then you know whatever you get you know let us call this the sin component and this is the cosine component this is of course, a real number and then you can use this root of V a s square plus V a c square to get what we can call or define the magnitude. So, if you you should remember that when it comes to transients you have to kind of you know define what is voltage magnitude there is no you know there is no definition by definition you cannot have a magnitude of rather naturally or inherently there is no meaning to having a magnitude of a non sinusoidal wave. So, another easy way of doing things is you take this V a, V b and V c and you compute root of V a square plus V b square plus V c square. Now, this also I can you know call as the magnitude of the voltage remember that if V a, V b and V c are balance sinusoids I leave it to you to prove that V will be a constant and equal to the line to line RMS magnitude. So, if V a and V b and V c and we take evaluate this you know instant by instant. So, this is an instantaneous value if V a, V b, V c are pure sinusoids balance sinusoids balance set of sinusoids you can show that V is a constant and equal to the line to line RMS voltage under these circumstances. So, what one extension I can do is that even during transients even during transients treat this V as if it is a voltage magnitude. So, this is one way of doing things and this is a simple way of doing things. So, you can either use this kind of method of finding the Fourier components even during transients by using this kind of numerical integration or you can take the instantaneous values of V a and V b and V c and square them and square and add them up get this value of V and treat it as if it is the voltage magnitude even during non sinusoidal and transient conditions. Of course, V is not a constant in case the system is not balanced or during transient conditions, but eventually we settles down to a constant value if the transient dies down and we reach a balanced sinusoidal steady state. So, this is one important point. So, if V is equal to root of V a square plus V b square plus V c square you can show that this is equal to. So, you can actually actually it is plus V 0 square, but we are of course, assuming we are using a absolutely balanced system. So, V naught is 0. So, V can be defined as root of V d square plus V q square. In fact, what it means really is that we can use our equations in the d q form and model the summing junction of an A V R the inputs of the summing junction of the A V R by simple d q variables themselves. Now, can you prove this I leave it to you to prove one of the things I can just hint to you is V is equal to V a V b V c into V a V b and V c and of course, the square root of it. So, raise to half and remember that V a V b V c into this can be treated as identity into V a V b V c. This identity matrix can be written as C p transpose into C P the box transformation and that is how you will get this particular relationship you can just work it out. There are some other interesting points in this stage which I must tell you is that what is real power real power in terms of you know at a bus you know injected at a bus what is the real power in terms of the d q variables. Now, instantaneous power is defined as in three phase balance setup is this instantaneous power. Now, you can show that this is nothing, but if you use the transformation which you have used sometime back that is the box transformation with the appropriate values of k d and k q this is in fact equal to this. Remember of course, that in sinusoidal steady state this product is a constant balance sinusoidal steady state this product is a constant. Reactive power what is the definition of instantaneous reactive power well now we have to be a bit careful reactive power probably makes no sense at least I cannot make much sense out of reactive power defined on an instantaneous basis. But if you for example, you can show that q q t this the reactive power instantly can be defined. So, it can be defined as and a balance situations of course, you will you can show that this in fact boils down to a normal definition of reactive power. So, this is something please think over if you have got a three phase sinusoidal circuit with a you know you can just take a simple star connected circuit and prove these things that at least in sinusoidal steady state this is true. This matches with sinusoidal balance steady state this particular expression matches with our classical expression of q, but q instantaneous reactive power can be defined in such a fashion. Remember that it does not really make sense to define means reactive power is a kind of a steady state concept it is a sinusoidal steady state concept. So, again it is a bit you know you should remember that whenever you say instantaneous reactive power is this this is only a mathematical artifice and it is not really have does not have any physical meaning, but in steady state of course, this boils down to what is our classical definition of reactive power which indeed has physical make some physical sense. So, please this is something you should just think over it is an interesting problem in itself. Now, if I am measuring v as root of v d square plus v q square I am getting instantaneous values of magnitude or this is the definition of the instantaneous value of magnitude which is consistent with what we get in steady state. So, this will be equal to the line to line RMS voltage magnitude in steady state. So, this is a nice definition of course, if you are under unbalanced conditions it is not difficult to show that v d square plus v q square square root of that is not a constant. So, whenever we are making for example, we could have v ref and we could be calculating the magnitude say by taking v a, v b, v c from v a, v b, v c we may be getting square root of v d square plus v q square as the magnitude normally we will not use this without any kind of filtering we will normally pass it through some low pass filter. So, this is something which you should remember, but this low pass filter would be basically designed only to reject high frequency transients not the slow transients high frequency noise or unbalance which will cause v d square plus v q square to keep varying will be removed by this low pass filter. So, this is how a summing junction would look like. Now, another interesting point is that if I do not use this d q definition of voltage magnitude, but instead use the square root of v a square plus v a c square this is for the a phase square root of as the magnitude and this is how I define and compute this from the instantaneous values. In that case remember that since we are doing an integration here the moving kind of integration from t minus t. So, it is over a window of t then in this case there is a kind of inherent you know filtering effect which is there because of this integration. So, just think over it it is an interesting problem of computing instantaneous magnitudes and so on. So, in this particular course we shall assume that this is when I say magnitude it is this root of v d square plus v q square the square root of it. So, that is what is what we have. So, if I want to write down the model of a AVR and exciter this is what we need to do. So, if we take a simple static exciter model which is suitable for slow transients slow transients I mean typically associated with electromechanical phenomena like swings or you know low frequency transients of around 1 between 1 or 2 hertz which involve oscillations of 1 or 2 hertz. That is what I will define as a slow transient in that case this is a simple model that is the AVR is k 1 plus s t a then you have got this limit and you have got E f t. So, the differential equations which you get are let us call this state associated with this transfer function is x c. We have already seen in the previous class that 1 upon 1 plus s t a can be written down in terms of state equations. So, in such a case what we have effectively is d x c by d t is equal to minus 1 upon t a into x c plus k a into the input which is nothing but the error v ref minus v and as I have defined sometime back the voltage magnitude is root of v d square plus v q c the terminal voltage of the generator. Now, x c itself is not E f d well not always x c is equal to E f d only if the value of x c lies in the limits. For example, we could have plus as I mentioned in the previous class we could have plus 7.0 v and minus 7.0 v this is essentially modeling the limits of the converter in the sense that it is the output of the converter will be limited by the a c input to it. So, x c will be equal to E f d only if x c is between minus 7 times minus 7 times minus v and plus 7 times v this is not volts this is the voltage magnitude of the terminal voltage. So, this is what we get if we had used a brushless excitation system remember that we would get much more complicated equations for the excitation system. So, if I used a brushless exciter in fact the output would depend there would be dynamical equations associated with the excitation power apparatus as well. So, as I mentioned in the previous class you need to look at the IEEE standard or several books which really describe a brushless excitation system modeling in detail, but if you are talking about static excitation system it is practically only the limit which has to be modeled. The AVR of course is a simple transfer function it is a simply a proportional controller in practice you may have something more complicated you may have lead lag blocks also in series with it, but we will not really go into modeling that much in detail we will just do a simple simulation to show you the effect of the static excitation system. If studying slow electromechanical transients while operating near the nominal speed we can as an approximation set d psi d by d t is equal to 0 and d psi q by d t equal to 0 and omega approximately equals omega base. So, this is of course if you are operating near the normal speed and we are interested in the slow transients as we have just discussed in our previous treatment of this system. Now, one more so we have now two algebraic equations here instead of differential equations on the other hand our model of the interconnection I have mentioned some this sometime back in the context of the presence of redundant states the model of the interconnection is given by this differential equation. Now, as a logical extension to the approximation which you have just made that is d psi d by d t is equal to 0 and d psi q by d t is equal to 0 omega approximately equal to omega b it makes sense to set d i d by d t is equal to 0 and d i q by d t is equal to 0 as well in these equations. So, if you do that of course the differential equations get converted to algebraic equations the differential equation which I just showed in the previous slide gets converted to the algebraic equation which is shown here. So, of course what is the logic for doing this remember that in case we are neglecting fast transients by setting d psi d by d t is equal to 0 and d psi q by d t is equal to 0. There is really no point in retaining rather describing i d and i q by a differential equation because if I do retain this differential equation then we are not really getting rid of a fast transient you can show this is something which I am not proving here, but you can show that if I retain this differential equation while setting d psi d by d t equal to 0 and d psi q by d t equal to 0 I am not really getting rid of the fast transients because of this differential equation you will still have fast transients and the system will be still stiff. So, in case you are studying slow electromechanical you know phenomena it makes sense not only to set d psi d by d t equal to 0 and d psi q by d t equal to 0, but also d i d by d t equal to 0 and d i q by d t equal to 0 as a result you get these algebraic equations. So, now we have in fact if you have noticed got rid of four differential equations and have algebraic equations in their place now let us look at the other differential equations of the system. Incidentally before we go ahead remember that the redundancy of states which I was just discussing sometime back in this lecture that problem in some sense gets also solved because once you set d i d by d t equal to 0 and d i q by d t equal to 0 d psi d by d t and d psi q by d t equal to 0 they are no longer states and then we do not have to give initial conditions to them and if we do not give initial conditions to them we do not have to worry about giving consistent initial conditions to these variables. Now in fact to some extent you will notice that rather I should say that since you have got i d i q psi d psi q as algebraic variables which are really dependent on other variables of the system we do not have to bother about the redundancy in the states problem anymore. Looking at the differential equations let us just scan through all the equations again this is a torque equation in per unit these are the rotor flux equations remember that psi d psi q no longer being states we do not have to write the differential equation for psi d and psi q. So, the only differential equations as far as the you know flux equations are concerned are the rotor flux equations. So, let us just so we have got one differential equation of the rotor speed four differential equations corresponding to the rotor flux equations later on we shall also see that there is one differential equation corresponding to the rotor angle delta a 1 dash 8 1 double dash and b 2 dash are given by these equations there is also an algebraic relationship which relates i d and i q to psi d psi q psi f psi g and psi k. So, there are two algebraic equations that two algebraic equations which really relate i d and i q to the rotor and stator fluxes. So, these are algebraic equations not differential equations. So, overall incidentally a 3 is given by this. So, in this equation a 3 is given by this we also see that e d and e q which appear in these equations. In fact, e d and e q appears in the algebraic relationship of i d and i q which we discussed sometime ago. So, e d is nothing but e sin delta minus e sin delta and e q is equal to e cos delta this is by applying path transformation to e a n e b n and e c n which are the phase 2 neutral voltages of the infinite bus. This is one differential equation here remember that in this system we assume this data is equal to 1 and the frequency of the omega of the infinite bus is equal to the nominal frequency or the base frequency. This is of course data which is given to us or rather I am giving it to you this could be this is this for example, e could be 1.1 also or the frequency of the infinite bus could be slightly higher or lower than the nominal speed. But let us first simplicity let us assume e is equal to 1 and omega naught is equal to omega b. So, we are assuming that the infinite bus frequency is the nominal bus frequency nominal frequency for the synchronous machine. The static exciter is modeled by a first order differential equation. Now, x e is not the same as e f d. In fact, x e is the same as e f d only if x e is within the limits of the excitation system. Of course, if it exceeds the limits then x e is clipped to the maximum or the minimum value of e f d as defined by the exciter model. So, actually this is a simple static exciter plus voltage regulator model. So, in fact, I should write here static exciter plus automatic voltage regulator. So, it is just if defined by one differential equation v is equal to square root of v d square plus v q square as discussed sometime previously in this lecture. So, the number of states are the 6 in fact, there are 6 differential equations corresponding to these 6 states. The other variables i d psi q i d and i q v d and v q are really not states. We have set d psi d by d t and d psi q by d t d i d by d t and d i q by d t equal to 0 because of which we have got got rid of differential equations and redundancy of states. There are 6 algebraic equations of course, and the inputs to the system are t m and e f d. e is of course, the infinite bus voltage which also has to be given to you and the speed of the infinite or the frequency of the infinite bus also has to be given to you. Remember that the 6 others other variables psi d psi q i d i q v d v q which are no longer states can be obtained in terms of the states. The states are delta omega psi f psi g psi h and psi k by using these 6 linear algebraic equations. Linear simplifies our job because the solution can be got in one shot without any numerical iterative procedure. So, you can directly write psi q and psi d i d and i q and v d and v q in terms of delta omega. Omega in fact, does not appear here because we have taken omega approximately equal to omega b, but delta appears in this e d and e q term and of course, psi f psi h psi g and psi k appear here. So, this is how we obtain all the equations or mixture of 6 differential equations and 6 algebraic equation. The algebraic equations allow us to get rid or rather a better word would be to get to write v d v q i d i q in terms of the states. So, in fact, v d v q is required by the differential equation psi d psi q i d i q are required by the differential equation. These are in fact, in terms of the states itself themselves psi f psi h psi g psi k delta and omega. So, it is a fairly trivial matter to write psi d psi q i d i q v d v q in terms of the states and in some sense, you know eliminate them from the differential equations. So, before we close today, let me just give you a flavor of a simulation. We will not be able to explain all the aspects of the simulation today. What I will do is I will synchronize the generator right at time t is equal to 0. It will be a bumpless synchronization. Thereafter, I will increase the torque of the synchronous machine. I will load the synchronous machine and I will show you that the terminal voltage remains more or less constant in case you have got an A V R. And after 15 seconds, of course, the step in real power will be given at 5 seconds. After 15 seconds, we will give a step change in the reference value of the A V R. So, that is what we will simulate and close this lecture thereafter. So, if I simulate this, I am simulating for 25 seconds with Euler method with a time step of 5 milliseconds. So, that is why it is taking a fairly large amount of time. Remember, one more problem which is encountered with Euler method is that one problem which is encountered with Euler method is not a very numerically stable way of simulation. I have just used it for simplicity of simulation. So, it is often said that Euler method is only taught. It is never used really in practice. So, anyway by making the time step very small and removing the stiffness or nonetheless I am able to use Euler method in this particular situation. I encourage you to try to use some other method. Now, let us plot how E F D looks. Now, remember at 5 seconds, I have increased the torque and at 15 seconds, I have increased the reference value of the A V R, V ref. In both situations, you will notice that whenever there is a change in the loading of the machine at 5 seconds, E F D changes from 1 which is the value under no load conditions. It changes automatically to around 1.5 and if I change the V ref, that is the reference voltage of the synchronous machine, again E F D changes. Now, E F D is able to take on values as high as 7 because the limits are very high. Excitation system of this kind is high ceilings. So, we are able to force the field to a very high value. That is of course, as I mentioned sometime back because the field winding is a very slow acting system and you really need to push it a lot in order to make it work faster. So, this is the way how field voltage changes. Remember field voltage is no longer constant because it is being changed by the automatic voltage regulator and if you look at V itself, it is V gen, I have changed the reference value initially was 1 per unit, near about 1 per unit. As I loaded the machine, the reference value went down slightly, rather the terminal voltage magnitude went down slightly. Initially, it was 1 per unit. If I load the machine, it goes down. Now, the question is why does the voltage magnitude of the synchronous machine go down if it is regulated? Here, remember at 5 seconds, I have applied a load. Now, while if I applied a load, why should the terminal voltage magnitude change if it is being regulated by the AVR? That is one question which we need to ask ourselves. We will try to answer that question the next time. Of course, if I give a step change in the automatic voltage regulator at 10 seconds, of course, it was 10, not 15 seconds. At 10 seconds, the terminal voltage of the machine goes up. So, it regulates it. It changes the value according to the set point. So, it has gone to around 1.045, roughly. So, this is how the AVR behaves. There are many, many interesting points which I need to discuss with you. There is no time for that in this lecture. So, we will revisit this point in the next class. So, redo the simulation and try to bring out some of the nice interesting points which come out of the simulation. So, for that, we will meet again in the next class.