We started off the past 10 lectures or so with a reasonably detailed model of synchronous machine. In fact, we considered several windings on the rotor. I mean in fact, one can imagine that the simplest model which could give most of the correct information, most correct information of how a synchronous machine behaves especially in steady state etcetera can be got without considering damper windings because eventually the current goes down to 0. Of course, during transient conditions as well, one it would be useful to work out some simple models of a synchronous machine. So, that well there are three reasons why one can look for simplified models. One of course, is that the data for detailed models may not be available. We may not get all the standard parameters sometimes in our studies. These this kind of data is not available. On the other hand, one would like to have all this data and use a detailed model. In some cases of course, you will find that you can model a generator by a simple more simple model than what we have considered. For example, hydroturbines it turns out can be represented by one less damper winding on the q axis. So, one can actually work with a simple simplified model which is suitable for a hydroturbine. Of course, if you one wants to do a theoretical analysis and try to get information about phenomena without worrying too much about you know getting a great deal of accuracy. In that case, one may wish to work with lower order models. They seem to give better insight. Right now of course, if we look at our synchronous machine model, it contains a large number of equations. So, you have got in fact, if you consider the zero sequence equations as well, you will have seven flux equations, seven differential equations of flux in addition to the electromechanical equations. And as we shall see later in this course, when you consider an integrated power systems, you have got lots of synchronous machines and so on. So, what you will find is that the number of equations becomes quite large and one may not be able to do you know any kind of theoretical or kind of insightful analysis into a synchronous machine without invoking fairly detailed and sophisticated numerical tools. So, I think it is a worthwhile to look at somewhat simplified synchronous machine models which ignore one or the other damper winding. In fact, actually we have already worked out one simplification which is okay when we study slow transients that is you know replacing d psi d by dt and d psi q by dt is equal to 0 and converting the corresponding equations into algebraic equation. That was one simplification which we did which was justifiable in case one used one was really interested in only slow transients. So, that is one thing which you have already done, what we will do now in this in today's lecture come up with more simple models in which we will be neglecting one or the other damper winding or even we may neglect all the damper windings and come up with a simple model. Now, one interesting thing which I want to do by the end of this lecture is using the you know the model which we have derived using two damper windings on the cube axis and one on the d axis along with the field winding. I want to come to a point where I can show you that you can get what is known as the classical model of a synchronous machine which we have used to derive or rather understand some important phenomena right in the beginning of the course. So, what are the approximation involved approximation involved in getting such a simplified model of a synchronous machine. So, that is something we will try to you know try to understand by the end of this by this lecture. Now, so today's lecture is titled simplified synchronous machine models just a one small point about the kind of terminology we will be using. We have derived what is known as or we shall call as the 2.2 model of a synchronous machine. A 2.2 model of a synchronous machine involves two damper windings on the cube axis this of course refers to the rotor windings and one damper winding and one field winding on the d axis. This is a fairly detailed model it is a quite a respectable model to use especially for steam turbine driven generators round rotor generators normally we would use such a full blown model. Now, what if we want to get a simplified model. In fact, before I go ahead with trying to reduce the number of rotor windings and getting simplified models with lesser number of rotor windings. Let us look at one of the approximations we have already made just for the sake of revision. So, let us just first look at the q axis per unit model. So, we will just look at what we have so far in the 2.2 model. We have got different two differential equations corresponding to the two damper windings in the q axis. We have an algebraic relationship relating psi q to the current and psi k and psi g and we have of course, a differential equation in psi q d psi q by d t. Now, in the d axis with an assumption that T d c double dash is equal to T d double dash we have a similar model. But of course, one of the windings here is you know is the field winding. The field winding is of course, affected by what voltage you apply to the field. So, that field the effect of the field winding in in this per unit equations is captured by E f d. So, if you look at what E f d is it is of course, related to the field voltage which is applied at the field winding. Of course, we have 0 sequence equations as well which you may require to use in case you are doing unbalance analysis. And we have the torque equation in per unit that is relating the rate of change of the speed of the synchronous machine with the electromagnetic torque which is a function of course, of the fluxes and currents. So, this is where we are this is the kind of mountain average of synchronous machine modeling. Now, we look we slide down mountain average and look at approximate models. One of the models which you have already kind of beaten to death or rather one approximation which you have considered fairly in the past 2 or 3 lectures was replacing the d psi d by d t and d psi q by d t differential equation by algebraic equations. This was done simply by setting d psi d by d t equal to 0 and d psi q by d t equal to 0. So, in that equation we just just replace d psi d by d t equal to 0 and d psi q by d t equal to 0. So, this is an approximation which is valid in case we are talking of slow electromechanical transients slow electromechanical transients the swings which we were discussing in some of the lectures. Now, while operating near the nominal speed we could if we are all our electromechanical transients. In fact, R if R taking place if we are near the nominal speed we could in this particular equation replace omega by omega b. So, that becomes kind of a constant multiplication factor. Now, this kind of approximate model can be used if you are of course, near the nominal speed you cannot use this approximation of omega approximately being equal to omega b. If you are trying to simulate or you know you know understand the synchronous machine right from the process of synchronization that is starting rolling our rolling the generator and getting it near the synchronous speed. When this speed is not too close to the synchronous speed we cannot make that approximation of omega being approximately equal to omega b in this particular equation. But, as I mentioned if you are talking of transients in which you are not going to deviate too much from 50 hertz or 60 hertz whatever your nominal speed may be then of course, this equation is valid if one is starting slow transients. So, this is one of the approximations that we have made and we saw that it did not make much of a difference during our short circuit study. In fact, it made some difference alright, but it did not affect the modes associated with the slow transients. So, that was the basic effect of this approximation. Do not make this approximation if you are going to study fast transients say which occur in time scales of 1 or 2 cycles of course, that would not be correct it would not be right to set d psi d by d t and d psi q by d t equal to 0 in that case. So, this is one approximate model which we have done we move on to making approximations not in the stator coils psi d and psi q of course, are stator coils. What we will do is making makes a few approximations as far as the rotor coils are concerned. So, the simplest thing we can do is one of the damper windings we the effect of it is neglected. So, for doing that what we need to do is consider one less damper winding in our original you know derivation of the synchronous machine model, but rather than of course, redoing the whole derivation again a simple thing which can be done is of course, open the particular damper winding. So, suppose you have of course, got the d and q winding. So, in the q axis rotor windings are of course, 2 the g and the k winding and there is a field winding and a damper winding on the d axis. What I need to do is in this particular model in order to simplify it is get rid of this effect of this winding. So, what you can do of course, is set the resistance of this winding for example, this winding r k if the winding r k I set the resistance to be a very large value. In that case it is as good as opening the damper winding in which case of course, no current will flow in the damper winding that particular damper winding and its effect is in would get nullified. Now, important point which you should note is that when I said r k tending to infinity, what effectively happens to the time constants that is something I leave as an exercise to you, but you can show that in such a case t q double dash tends to 0. So, if r k tends to infinity t q double dash tends to 0, how do I know that? Well I know the equations relating the time constants, time constants in the standard parameter model, standard parameters with the original inductances and resistances of the winding. Recall this we have done it somewhere in the between the 10th and the 20th lecture, where we were modeling synchronous machines. Now, so setting r k tending to infinity would mean that you are setting t q double dash tending to 0. Now, if you do that what happens? So, if you look at the basic equation which is there, you can write this in fact as t q double dash is equal to minus i k plus psi d. So, this is the equation which is there of the flux of this particular winding and if t q double dash tending to 0, you can roughly say that this term here becomes 0 and as a result of it psi k becomes equal to psi d. So, from this you get this. Now, if psi k is equal to psi d, you can replace psi k by psi d in the algebraic relationship which relates psi d sorry psi q i q psi g and psi k. So, do you recall that equation? We will just have a look at it right away. So, what I am trying to say is of course that you get psi k is equal to I am sorry yeah it should be psi k equals to psi q this some small error which I made while writing this should have been psi q this should have been psi q. So, getting back to this slide which I have you get psi k is equal to psi q. So, you can substitute psi k by psi q here in this algebraic equation. The third equation is an algebraic equation and then if you do that you can write psi q as a function of psi q. Is a function of i q something into i q plus something into psi g. So, the effect of psi k gets subsumed in psi q. So, what are these coefficients here and here? You can work it out I will just write down what you get eventually what you will get eventually is if you look at the slide your equations of the 2.1 model 2.1 because now we have got just 1 damper winding on the q axis will be given by one differential equation corresponding to psi g. One of course is corresponding to psi q and the algebraic equation relating psi q i q and psi g becomes much simpler and you notice that x q double dash no longer appears in this equation. So, for this particular model 2.1 model you do not require one set of time constraints and one set of one basically you not require one time constant and one reactance. So, it does not figure in the equations any longer. If you look at the slides again the last equation of course is still the differential equation in the flux psi q remember that you can make an approximation that you can replace d psi q by d t equal to 0 and get back to the approximation which we mentioned right at the beginning of this lecture that would be if you are studying slow transient. So, the last equation also could be simplified in case you are talking about slow transients. Now, one of the things which I should mention at this point is that the model 2.1 model which I have just discussed so far is found to be adequate in the sense that it can represent the transients which occur in hydro driven hydro turbine driven synchronous generators. So, hydro turbine synchronous generators are often represented by 2.1 model and do not be surprised if the data sheet of a hydro turbine generator has one less time constant and one less reactance. So, that particular data will not be given because it is adequate to model hydro turbine just by 2.1 model. So, this is something you ought to keep in keep in mind. Now, an interesting observation here which you may have noticed is that if you look at the algebraic equation relating psi q and psi g and i q of course, it does not contains x it does not contain x q double dash there is no need of having x q double dash, but if you look at the algebraic equation so I will just write it down here psi q is equal to x q dash i q plus x q minus x q dash upon x q into psi g if you look at this particular equation and compare it with the algebraic equation which we had for 2.2 model. So, if you look at the screen here you will see that the equation which was there before I will just write it a bit quickly out here well it looks pretty complicated, but something you will probably able to suggest is that if I had directly set x q double dash is equal to x q dash in this equation in that case you would have directly got this equation. Note that this whole this term would have disappeared this is in fact that. So, this would be 1 so we will be really getting back to this equation. So, an interesting observation here is that if I want to go from 2.2 model that is the original 2 dampers on the q axis model to 1 damper winding on the q axis then what you can do actually is simply set simply set simply set x q double dash is equal to x q dash in the 2.2 model equations. Now, why am I telling you to do this well you may have already written a program or you know kind of a tool which does Eigen value analysis or synchronization the simulation numerical integration of the differential equations in the 2.2 model and somebody tells you suddenly well a particular generator has to model not by 2.2 model, but it has to model by 2.1 model in that case you do not have to rewrite your program with lesser number of equations you would need to tinker with your program instead of doing that you just set x q double dash is equal to x q dash in the data. So, just look at these equations again you will find that because of doing this you will get rid of the effect of psi k. Of course, this equation would still be there, but it would be kind of decoupled from every means the effect of psi k would not be effectively seen by a synchronous generator state of windings at all. So, the there is no harm in just setting x q dash is x q double dash is equal to x q dash and removing the coupling which psi k has with the rest of the equations. So, this is a pragmatic way of using a program or a tool which is program for 2.2 model directly make it suitable for use to directly make it suitable for use with 2.1 model just set x q double dash is equal to x q dash. Of course, you need not do it you can actually even do another thing that is reprogram everything for a lower order model that is also possible. So, in case you do that you will have to use these equations the lesser number of equations in your programming. So, this is what basically is you do when you neglect the effect of one damper on the q axis. Now, before we go ahead let us just see what happens in case we try to simulate a system with a lower order model of a synchronous machine. So, what we will do is take the data which we have been using for studying the synchronization transient. In fact, the data is for a round rotor machine, but all the same will still use it for you know just comparing what happens in case you take a simplified model. So, what I will do is I have programmed the program for 2.2 model, but I will simply make the simplification x q double dash is equal to x q dash and effectively get 2.1 model. So, I will just do that. So, we will get back to a silap program and what I will do is of course first of all show you the original speed transient under synchronization. We have been doing this in the past few lectures. So, I need not explain everything right from scratch. It is basically a transient which shows the synchronization of a synchronous machine to an infinite bus followed by torque and field voltage increases. So, this is increase in torque and field voltage. So, these are the transient which you see. Now, in case you take this program and in that set x q double dash which is here equal to x q dash. So, if you do that how does it affect. So, let us just try if we can do it of course we have to hope and pray that. So, the program runs without any problem it is just we have just change the data we are not really change anything in the program. So, if I plot this now and look at what we get well you notice something well the original program the damping was much higher. Whereas, now in all the transient which are considered one thing you can notice is that the transient takes a longer time to die down. In fact, in a synchronous machine with one damper winding less it appears that the damping has reduced this is not very surprising. In fact, you know one may say that the damper winding derives its name in some sense from the damping effect that it has. So, if you actually reduce the amount of damping in that case that is by removing one damper it is not surprising that we get this larger time for decay of the transient. So, this is something which is not at all surprising this is effectively the response will get the top one which you see here the one which is taking a long time to die is effectively the response without a damper winding one of the damper winding. So, let us go back and also do the Eigen analysis you do exactly the same thing and do an Eigen analysis Eigen value analysis using a linearized model which we discussed in the previous class. So, now I will just run the program. So, I just take out the Eigen values and the Eigen values are these well not much can be understood from this unless we compare it with the Eigen values with the 2.2 model. So, what I just now showed you were the Eigen values with 2.1 model I will rerun the program to see the Eigen values with 2.1 model. So, what you notice here of course, is that there is significant change in the real part of the Eigen value corresponding to the electromechanical oscillation which is seen in the speed transient. So, this is consistent with what we have seen before in fact of course, we need to just check out the operating point which we are talking of here. So, what we see here is of course, that if I take 2.2 model the real part of the Eigen value is 1.4 roughly whereas, the Eigen value here is 1. So, you see that with 2.1 model the damping of the swing mode is slightly lower. So, this is something we see it seems to be consistent with what we see here we see a slower rate of decay when we consider a lower order model. Now remember here that we are not doing any closed loop feedback control of the field voltage the field voltage is practically a constant we are either giving step changes or we are keeping it a constant. We shall see later in the later part of this course that the feedback control of the field voltage in a synchronous machine can again affect the damping of the electromechanical or what is known as the swing mode that oscillatory mode which is has a frequency of around 10 around 10 radian that is 12 radians per second here. Now, let us go one step ahead let us go to a model now what I will do is go a bit faster and talk about what next can be done you can in fact go to what is known as the 1.1 model. In 1.1 model we have done the corresponding thing with the damper winding H. So, what I have done is set R H tending to infinity and therefore, got rid of the differential equation corresponding to psi capital K and as a result of which we get a simplified model with just one differential equation and as I mentioned last time the same thing can be done here you can get this lower order model directly by setting x d double dash is equal to x d dash. So, if you have already programmed 2.1 model or 2.2 model to get to 1.1 model you all you need to do in that program is to set x d double dash is equal to x d dash alternatively you can program a lower order model. So, both of the thing both these things can be actually done we can go one step further we can actually you know get rid of the last remaining winding damper winding on the q axis that is the g winding, but at this point let us just take a small diversion not a very big one if from this 1.1 model 1.1 model means you will be using these equations on the q axis and these equations on the d axis. So, that is 1.1 model I will show it to you again to be using these equations in the q axis and these equations in the d axis. Now, one question which I would like to ask you is can we can we get the equations of an induction machine from 1.1 model of a synchronous machine. The answer is yes from the 1.1 model equate x d dash and x q dash and induction machine can be modeled a simple induction machine model could be by considering one damper winding on the d axis and one damper winding on the q axis remember induction machine does not have any field winding. So, what you can do is of course, these windings are absolutely symmetric if you look at a normal synchronous induction machine both the d and q axis appear similar there is nothing to distinguish at d and q winding. So, you need to set this I will call it x dash and what you need to do is of course, do this equate effectively what I have done is got from 1.1 model simply by setting x d dash is equal to x q dash and t d dash is equal to t d dash is equal to t dash is equal to t q dash you can in fact, from the 1.1 model get a induction machine model. So, 1.1 model of a synchronous machine get directly yield to you the induction machine model you will of course, have to set e f d is equal to 0 this is something you need to do and effectively equate the d and q axis parameters set e f d also equal to 0. So, these are the things you would need to do in case you wanted to derive an induction machine model directly from 1.1 model of a synchronous machine. So, this is a interesting diversion which this is apt at this point. Now, we can go ahead and get rid of even the remaining damper winding on the q axis. So, what we are going to do now is talk about a simplified synchronous machine model which does not have any damper winding at all. So, this is the what you will get effectively what you have done is set t q dash tending to 0 basically if you have r g tending to infinity that is opening the last winding remaining winding of the q axis in that case t q dash tends to infinity and in that case we can kind of convert the differential equation corresponding to the g winding that is d psi g by d t t q dash is equal to psi g plus psi q and if you do that if you set d q t q dash tending to 0 in that case you will get psi g is equal to psi q and if you use this fact in the algebraic equations which you have seen earlier say if you look at it to 2.1 model if you look at this algebraic equation here if you set psi g is equal to psi q a few manipulations will get you to psi q is equal to x q i q. So, what you have in the q axis is just one algebraic equation and one differential equation corresponding to the stator winding that is psi q. So, one differential equation and one algebraic equation in fact the differential equation also can be removed by setting d psi q by d t is equal to 0 in case you are studying slow transients. So, this is what you get as 1.0 model in fact 1.0 model equations will have the d the d axis equations looking like this and the q axis equations looking like this. So, that effectively tells you what is the 1.0 model of a synchronous machine in fact this is you can say the last or the most basic of synchronous machine model where here now you have just the field winding and the stator winding and all the damper windings have been got rid of. Now, if you look at the behavior of a 1.0 model synchronous machine. So, what I do is in this generators program I set to get 1.0 model what will I what I need to do is set first x d double dash is equal to x d dash that is what I have done first. The second thing you can do directly something which I have not mentioned here is that in the 2.1 q axis equations if I directly set x q dash is equal to x q you can get rid of you can really come directly to this algebraic equation and 1.0 model. So, that is what I will do right now what we will have here is I will set x q dash equal to x q and of course, I also need to set x q double dash is equal to x q. So, that we get 1.0 model. So, this is 1.0 model x q double dash is equal to x q dash is equal to x q. So, by doing this we are directly modifying a program we are not without modifying the program of 2.2 model we can effectively get the response of the simplified generator model and I have also set x q double x d double dash is equal to x d dash. So, let us try to simulate this in psi lab and if I plot this now you get a totally different response. In fact, what you are seeing is that the system is losing synchronism. So, in case you and this the response is completely different. So, of course, one of the reasons why this could be happening let me just expand this view is a numerical reason. One of the reasons which why this could be happening is a numerical reason that is see if you look at the first curve here it is a 2.2 this one is with 2.1. Now, we have gone to 1.0 and you see growing oscillations. Now, is this correct or not that we can say by actually finding out the Eigen values of the system. For example, we try to try to find out the Eigen values of the system for 1.0 model. So, I modified the data. So, that we will take out the Eigen values of the system.  Now, one of the things you should remember here is that we are using Euler method to simulate the system. And if the damping that the real part of an Eigen value is low Euler method may actually show it to be not a damped oscillation, but an increasing oscillation and this is what exactly is happening here. So, although Eigen analysis shows that the system is in fact stable what you get here is a growing oscillation. So, growing oscillation of course, will eventually cause a loss of synchronism. So, this is kind of spurious, but remember one thing that if we neglect the effect of all damper windings in 1.0 model, the damping of the swing mode may come down to a low enough value not necessarily to make the system unstable as is seen in this Eigen analysis, but which may cause misbehavior or other wrong information to be displayed in case we do a simulation using Euler method. Recall in the first 10 lectures of this course we have discussed numerical integration techniques and there we did find, we did discuss this that in case you use Euler method on a poorly damped system with a poorly damped oscillation in that case you can in fact get wrong information. Now, the solution of this of course is to keep on reducing your time step of the simulation till Euler method starts giving reasonably correct results, but of course that will take a long time to simulate if I really go on reducing my time step. So, one thing which you should remember now it is important as a student to distinguish between two issues we are talking here. One is that with a lower order synchronous machine model 1.0 model the amount of damping or the amount of rate of decay of the swing mode has come down substantially that is one aspect that is the physical aspect. One more aspect is about the analysis the damping has really come down to such an extent that if you try to simulate Euler using Euler method with a time step of we will just I just forgot what the name of the variable is for time step I will just get that with the time step of 0.005 a system with poorly damped oscillation like this one is likely to show. So, let us just see this again t step a system which has poor damping is likely to show is likely to cause incorrect information being shown in a simulation in which Euler method is used with a time step of this kind. So, really what you need to do as I mentioned some time back is go on reducing the time step or use a better numerical integration method, but of course we have been using Euler method simply because it is an easy method to use it is sacrilegious to use Euler method for any realistic or you know practical or industry grade program I mean because of this particular problem that is not very accurate it can give wrong information. So, this is another illustration of this. So, although the system is stable remember all the Eigen values for all operating points is of course the Eigen values for a particular operating point the Eigen values have negative real parts. So, it is a stable system, but simulating it may result in problem if you are using methods like Euler method. So, that is the summary of what we have been discussing so far. Now, 1.0 model in some sense is the limit of what simplification we can have in a synchronous machine if you want to you know get even you know a realistic picture in steady state you have to use at worst you will use this simplified model. Of course, for theoretical studies involving the swing mode we can use a simplified model which includes no differential equation no electrical differential equation no equation differential equation corresponding to the flux how do we get to that model well this is not a very respectable model because. So, I will just tell you how you can get to what is known as 0.0 model which is what is known as the classical model a classical model is not a respectable model for getting realistic and quantitatively correct answers as far as synchronous machine behavior is concerned for example, you cannot use classical model to understand the nuances of what happens during a short circuit in a synchronous generator. So, there are very great limitations in applying this classical model, but all the same I will just tell you what it is and how it is obtained and what kind of assumptions are inherent when you get to classical model. Remember that right in the beginning of the course when I was talking about introducing you to things like loss of synchronism and the you know the origin of swings power swings or rotor angle swings in a power system I had used in fact the classical model it is not a respectable model I called it toy model then I will call it toy model even now, but let us just see what really was involved in getting to this classical model what you need to do is from 1.0 model you can look at the screen again from 1.0 model 1.0 modeling requires these equations on the d axis and these equations in the q axis what you do is you assume that the field winding resistance is very small as a result of which you can show using the basic equations which relate the standard parameters and the resistance and inductance parameters of a synchronous machine you can show that t d dash becomes a very large value it becomes tending to infinity. If t d dash tends to infinity you are in effect saying that the field winding flux does not change. So, psi f here is 0 d psi f by d t is equal to 0. So, psi f becomes a constant so what you have is you have got rid of the differential equation the last remaining differential equation of the rotor field winding you have effectively said that psi f is simply a constant. Now, a further simplification of course which we have been which I talked to right in the beginning was you set d psi d by d t equal to 0 as well if you are going to study slow transients this is an approximation to make. So, what you have eventually is for the classical model setting d psi d by d t and d psi q by d t we have got this model. So, this is a classical model of a synchronous machine which does not have any differential equation no electrical differential equation. We have got the mechanical differential equations, but there is no electrical differential equation and a further simplification which you can make is r a is equal to 0 and x q dash x q is equal to x t x t dash. Now, this is a absolutely an ad hoc assumption this is no you know kind of justification which I can give you. So, classical model is obtained by a large number of approximation. So, if you want to get from 2.2 model to classical model you have really made a huge a large number of approximations. So, what you will get of course, if you just go ahead with what you have got psi d is equal to x t dash i d plus e dash e dash is that is actually proportional to psi f which is assumed to be a constant. So, e dash is also a constant and you also have psi q is equal to x t dash i q this is got by approximating x q is equal to x t dash and absolutely ad hoc assumption. We also from we also have 0 is equal to this is by neglecting d psi d and d psi q by d t terms this is by neglecting d psi d by d t we also make r a equal to 0. So, we will have minus omega b v d and psi q we will also have is equal to omega b psi d minus omega b psi q and what you can do is effectively substitute for psi d and psi q in these equations. So, what you will have eventually is if you do that you will have omega b v. So, what you will have 0 is equal to minus of x t dash i q minus of b d and what you will have here is x t dash i d minus of b d and what plus e q dash minus v q. Now, we also have d omega by d t 2 h into d omega by d t by omega b into d omega by d t is equal to t m minus psi d i q minus psi q i d. Now, if you look at. So, you have got these two algebraic equations and this differential equation. Now, if you are talking of a synchronous machine connected to an infinite bus or a stiff voltage source as the one which you have used for all our studies. So, far in that case v d is equal to v line to line r m s of that source into sin delta minus of it. So, this is the source whose characteristics I have discussed in the previous lectures. So, if this is true then it is easy to show it is quite easy to show that psi d i q minus psi q i d from psi d i q minus psi q i d from all the equations which we have got from these equations and these equations. What you will get eventually is this is the electromagnetic torque is nothing but v line to line r m s by x t dash e dash sin delta. So, from this and this this is what we have.  This is the transient reactance of the generator we can call it just x dash. Now, another interesting thing is of course from these algebraic equations we look at these algebraic equations you can write this very compactly we will have e dash minus v q plus j v d this is just multiplying the second equation by the complex number j e dash minus this is equal to j x dash x dash is nothing but x d dash we need not apply the subscript any longer because we have equated the d a and q axis completely this is what we get. And you know from what we have here we have v q plus j v d can be written compactly as v line to line r m s into e raise to it is simply that and just have a look at it.  So, what we have here is effectively a synchronous machine model in which the electrical equations are simply given by this or effectively an electrical circuit. So, what we have effectively is an electrical circuit.  So, this is exactly the toy model which we used in this in fact, right in the second lecture with the kind of model which we have used here. In fact, this model predicts an oscillatory response for delta and omega whenever there is a disturbance. So, what we have with 2.2 model is not only this electromechanical swing in fact, if you recall whenever you use a higher model with damper windings the Eigen values the Eigen values are these. So, there are many many modes here amongst them we have got what is known as the swing mode. If you take the classical model directly what you will have is simply just because there are 2 differential equations just one mode and that will really represent as we have seen right in the beginning where we have we did analyze this toy model we do get the electromechanical oscillation. So, classical model is just to theoretically highlight the fact that you do have such a mode which is mainly associated with the electromechanical variables delta and omega. So, just have a look at this classical model again this should have been x dash here these are the differential equations. So, this is the classical model which is just for theoretical studies, but please do not it probably will give you fairly it will probably give you wrong quantitative answers wrong in the sense highly imprecise answers in case you try to use it for practical studies, but nonetheless just using the classical model we can in fact show that a phenomena called swings occurs which is also evident in the 2.2 model, but the 2.2 model will also bring into picture many other modes which are present. So, this brings to an end practically an end our discussion of synchronous machines we will just revisit a few minor points tomorrow in the next lecture and thereafter we will move on to another physical subsystem which is of importance in a power system that is the excitation system of a synchronous machine. We will discuss its modeling and also discuss how it looks physically.


I'm really pleased to have this opportunity to tell you a little bit more about some very interesting results that I obtained during my PhD. And this is just a small part of the overall project that was looking also at contemporary animals like the previous presentation. And we were looking at the isotopic variability in these contemporary animal tissues across the environmental gradients of South Africa. And we were doing this to better understand the paleo data sets. And the piece of research that I'm going to be presenting today is more about the methodological aspects of our tooth position and isotopes. So as most of you probably know, stable isotope analysis of animal tissues is a major tool in ecological and environmental studies. And this is because carbon can tell us about whether or not animals are eating C3 or C4 food and oxygen. As we've just heard, we'll tell us about the body water in an animal, the drinking water and the water found in food. And each of these is influenced by climate or by dietary preference. But researchers working on fossil assemblages are often constrained by the limited number of teeth found and then are available for analysis. So we don't often find the whole manual, we're often constrained by isolated teeth. So it becomes very important to know whether the isotopic composition along different teeth in the tooth flow of an individual are consistent, so that different measurements are directly comparable. And if they're not consistent, then are there systematic differences between the teeth so that we can apply a correction factor before making these comparisons? So here's an example of a tooth flow of an ungulate. This is the spring buck and didocus mossupialis. So tooth formation takes place very early on in the life of mammals, as most of you probably know. That isn't species that don't have continuously growing teeth. So this means that the isotopic composition of teeth therefore reflects the diet of this early part of the individual's life. And the sequence of tooth formation from initial mineralization, crown completion and root development and finally emergence. He's very similar across all mammals. So here you can see a table. I have the eruption sequence of various species. There we've got antidocus that we were just looking at, but also giraffe, aqueous. And what you can see is consistent is that the M1 consistently erupts before the M2 and then finally the M3 is the last of molars to emerge. So this sequence can then be used to construct a life history of each animal. So this slide, this publication shows quite nicely how the different molars form and erupt over a period of time. So here's the birth of the animal with the M1 crown and root formation followed by the M2. Then we've got the premolars and so on. And so changes in isotopic value of these teeth might then reflect residential mobility or change in diet. So for this reason, the inter-tooth variation within individuals can be used as a valuable source of information. So as I mentioned, the stable isotope composition of tooth enamel reflects this early part of the time when the tooth was forming. So compared with plants, milk tends to be enriched in 180 and depleted in 13C due to the presence of depleted 13C lipids. So teeth that formed early on in life like the M1, like we just saw, which typically mineralizes while the animal is still sucking from its mother might therefore be expected to have higher Delta 18O values and lower Delta 13C values when you compare it to teeth that formed post-weaning. Of course, the lipid content of the milk might also play a role. For example, the lipid content of ungulate milk, as we know, is about 3.7%, so the effect of Delta 13C might be negligible. But the effect will be much higher in animals like marsupials, kangaroos, because the lipid content is much higher. There aren't many studies that have done actual inter-tooth analysis, most have done serial sampling and a lot of serial sampling teeth. And these are some of the studies that have investigated inter-tooth differences in carbon and oxygen, and we'll just look quickly at them. The first one is Gadbury, who is investigating fossil bison. He found quite a nice pattern. This is the expected pattern. Here we've got the molar running along here and the Delta 13C value. You can see that the M1 is lower as a lower Delta 13C value, which is as we expected. Oxygen is not nearly as clear with a lot more variation. Again, you've got the molars and it isn't a systematic offset. Zaza was also working on fossil bobbins, so they did serial sampling, but they also did it along the molars, which is why I've included it here. Here you can see these are the boxes for the M1s, the boxes for the M2s and the M3s, with the Delta 13C running along here. So you can see that the Delta 13C starts at a lower value, and then there isn't much variation for the M2 or M3. The oxygen, funnily enough, also seemed to have quite a nice pattern across the five specimens. They only looked at five specimens, but you can see that the Delta 18C started higher in the M1 and then some variation in the M2s and the M3s. Two studies that found the pattern to be less clear for oxygen is Murphy and Wang, and this is the Delta 13C for Wang. They were looking at modern goats, horses and yaks, and you can see that for the key pre-molars and remolars, the Delta 13C is rather stable. Then finally DeAmbrios was working on equids, and they found quite variable patterns, which they attribute to varying birth seasons, and particularly for oxygen, which is up here. So here you can see the Delta 18O of the precipitation running along here. They fitted their Delta 18O of the two individuals as examples over this timeframe. And in both of these examples, you can see the M1 has the same value, but in the example A, if they say that if the M2 has a lower value than the M1, then it's most likely following this pattern, and the animal is most likely born in autumn. And here if the M2 has a higher value, then it's most likely following this pattern, and the animal was born in spring. So the Delta 18O of the individual teeth will correspond with the time of the year, so it can be quite complex. And this is just a summary, and what the bottom line about this slide is that what's in the literature seems to be quite inconsistent. So we wanted to test what the situation was in our region. So here is the African continent, and there you've got South Africa in the southern tip of Africa. Our study focuses on larger mammals from areas of near and natural vegetation. And here are the collection sites in green, and they extend across the winter rainfall zone and near-round rainfall zone of South Africa. South Africa, as many of you probably know, has a lot of national parks, which means we could collect animals from relatively undisturbed natural environments. And since the region is predominantly a winter rainfall region, it's characterized by C3 plants, and that will include the grasses. So all the plants are C3. In some areas around wetlands you might get some C4 grass within this winter rainfall zone. And then in the year-round rainfall zone, the trees and the shrubs are C3, but the grasses are both C3 and C4. So the animals included in this study are the arid-adapted spring work, some two rotissera species, two gator species, and the true browser, the kudu. And we sampled as many teeth as were present, usually three to five teeth, and the teeth were drilled along the line extending from the occlusal surface down to the cervix. And this ensured that the enamel collected was representative of the entire period of crown formation, and this was to average out any possible seasonal variation. I should mention this was a conscious decision not to do serial sampling, because we wanted to see if we could pick up these broad environmental or mobility changes between teeth. So these are the charts for the four groups of species. You can see the delta-13C running along here, and the teeth, P3, P4, M1, M2, and P3, and each of these lines is a different individual. And for those of you who don't know these species, I've just included a little picture. So the first thing to note is that M1s are not always more depleted in 13C than other molars. But there are differences between species, which we're going to look at now. And the amount of variation along the tooth row will depend on factors such as whether the food sources were available throughout the year or not, and how much C3 versus C4 plants are being consumed during the year as well. So the spring buck is an example of fluctuations along the tooth row probably being explained by fluctuations in the amount of C3 food sources that are available throughout the year. You can see this is a tree, it's eating mainly browse. So this animal is living in quite a dry area, and so that's probably why it has these rather larger variations. The stem buck, which eats both grass and browse, has quite a large delta-13C range, and this is probably because of fluctuations in the amount of C3 and C4 plants that it's eating throughout the year. So it's more of a mixed feeder. For both of these wrapper series species, you can see that the M1 are consistently lower than the other molars. Other animals that strongly prefer browse like this kudu and to a lesser extent the deca are going to show less variation, and that's because their food source is available throughout the year. Then looking at the oxygen variation, this will reflect the seasonal variation in the delta-18I of food and drinking water. Looking at the species individually, there doesn't seem to be any systematic differences between the delta-18I of the molars. So the M1 is not consistently higher as we would have expected, and this may be because wild animals suckle less than these domesticated animals where good seasonal patterns have been shown. Season of birth is also playing a role. So any seasonal changes in delta-18O of the available water are possibly bigger than the weaning signal in these animals, and so the weaning signal is undetectable. The variation within the individuals is also quite large. It's much larger than you see in carbon. Here is the largest range. It's a six-part per mole between the P3 and the M3. And of course the range of delta-18O of rainfall in Cape Town has been shown to vary up to 11 parts per mole. So this would contribute to this larger amplitude that we see when we compare it to carbon. Of course the delta-18O of faunal tissues will average out this precipitation signal to some extent. Not only because of the averaging during tissue synthesis, but also because there's octoduses not only being derived from water, it's also being derived from the food. So our study showed that there's limited systematic offset for carbon along the tooth row, but it's quite specific, so some species show a more systematic offset than others, but almost none for delta-18O. And for animals with tightly constrained birth seasons, it will depend on whether or not there are seasonal fluctuations in the oxygen. And also it will depend on seasonal fluctuations in the availability of food and water. Thank you, and I'd just like to thank our funders.


What's up everybody, Jason here for JaspysCaseBrakes.com. We just sold out the only filler we needed to help sell the last nine spots in the hip parade dual caster break with this 2021 Mosaic football hobby one pack break number 62 guys. And first we'll do the break, we'll randomize the question names, team to shoot the hits out then at the end we'll re-randomize the original list and the top nine get into the break guys. So let's do the randomizer first here for the break of the pack and it's roll, six out of four, 10 times. One, two, three, four, five, six, seven, eight, nine, 10. Matt, down to mark. 10 times. Two, three, four, five, six, seven, eight, nine. 10 times. Got rams out of the Steelers. All right, again guys, of course, that's what you got here. It's got four update on the log, two left. Yeah. Four update on the log, two left. Yeah. Four update on the log, two left. Yeah. Four update on the log, two left. Yeah. Four update on the log, two left. Three, three, two, so three in the flocks. Three in the flocks. Back up, right to the center, Frank. All right, here we go guys. All right, maybe something here. Hopefully we got an auto. Amir Smith, Marsetti, look at that. Gold autograph. I'm not even sure he's on the wagon anymore, but. Can I sit here for the bikes? Four to 10. Alex with that one. All right, well we did get a gold autograph. I actually gotta put it in the trash can. All right, now let's switch scenes and let's do the giveaway guys. Top nine, get in, roll it. Three to six, nine. Here we go. One, two, three, four, five, six, seven, eight, nine. Nine times. Three to six, nine, nine. Chad Rout, you're squeaking in there and getting in. Tim, Eugene, Matt, Alan, Alex last but not the most. Chris, Tim, and Matt L, congratulations. Unfortunately, the rest are not in guys, but they've been given it a shot. We still have a few couple straight up spots. I think like three left. That's basically what's keeping us from doing the break. So if you wanna get in for sure, grab your spots. Jasper'scasebakes.com guys, thank you.


Pete Buttigieg finally revealed the work that he did for the notoriously evil consulting firm known as McKinsey, but to be fair to him, he actually wasn't legally allowed to talk about it because he signed an NDA, he asked to be released from said NDA and thankfully they obliged. Now this is detailed in the Atlantic in an article by Edward Isaac Dovier and essentially a lot of the work that Pete Buttigieg did was downplayed, it was described in a way that made it seem like it was seemingly innocuous and it wasn't actually that problematic. For example, his campaign also revealed to me his clients from his time at McKinsey, Blue Cross Blue Shield of Michigan, Loblaws, a Canadian supermarket chain, Best Buy, the Natural Resources Defense Council, the Environmental Protection Agency, the Department of Energy, the Energy Foundation and Environmental Non-Profit, the US Postal Service and the US Department of Defense. Now look, admittedly some of these are less problematic, like the work that he did for the EPA or the USPS doesn't necessarily concern me as much, but when you do work for these multi-billion dollar companies like Best Buy who exploit the labor of their workers, when you work for the Department of Defense, that I think should be a red flag for anyone who is going to be participating in this Democratic Party primary and on top of that he worked for Blue Cross Blue Shield of Michigan. This is a for-profit company that profits off of denying people coverage and raising insurance premiums. So what did he do at Blue Cross Blue Shield? Well, he said that while working with Blue Cross Blue Shield of Michigan he remembered going along with his manager to a few meetings with people on staff, but he couldn't remember any meeting he'd been able to attend on his own. Mostly I was with fellow consultants in a room working on a spreadsheet, he said, understanding that the analysis had focused on rent, travel costs, mail and printing, but nothing having to do with policy or premium costs. He insisted that none of his work could have led to people's insurance changing or being taken away. Sure, Dan. Right. Now as we'll learn, that's actually not entirely true. It's fairly misleading because the way that he describes it is, look, I was just, you know, punching numbers into a spreadsheet. My job was to math, if I could use math as a verb, but that's not true. That is not true in actuality. But I mean, think about this. This individual worked for a private health insurance company, and all of a sudden he enters the 2020 race and becomes the number one Democratic Party recipient of health industry contributions, more so than anyone in this field, including the former vice president, the only person who outraised people to judge with regard to health industry donations is the sitting president. But he raised more than everyone else, and he explicitly created a health care proposal that would protect the private insurance industry. It would leave them intact. Now let me remind you, he previously supported Medicare for All ostensibly. I don't think he was ever really serious about that. But once he started to take their money, he reversed course and opted for the policy proposal that wouldn't actually get rid of them. That is not okay. Now the thing that I think should bother a lot of people, which should turn heads, is the work that he chose to do for the U.S. Department of Defense, because he participated in what a lot of people call disaster capitalism, where these private companies exploit countries who were ravaged by war or a natural disaster. And as you're going to see, this is precisely what Naomi Klein talks about in the shock doctrine. Now, here's what he reportedly did. Quote, when someone asked whether he'd be interested in a project working for the Defense Department studying economic development in Afghanistan and Iraq, he said yes. Quote, in Iraq, it had to do with a lot of state-owned enterprises that were learning to function in the post-Saddam world, helping them with basic stuff like business planning that just hadn't been done in the style of international business norms, because it was a quasi-socialist system over there, but a judge told me. In Afghanistan, they knew how to do business, but then there was a lot of trouble scaling it. So we were working more on figuring out how to help businesses grow. In other words, you're helping private companies become more profitable in post-Saddam Iraq. This is quintessential disaster capitalism. Now the way that it's kind of portrayed here is he helped a lot of state-owned enterprises, but then he kind of moves the goalpost as he explains what he did there and talks about how he helped businesses grow and they were having trouble with scaling because this was new and they were quasi-socialist at least in Iraq. So he kind of contradicts himself and that's not even pointed out by the author of this article, but what I love is that sludge writer, Alex Koch, he went over this in great detail and he kind of broke this down in a matter-of-fact way and really in a no-bullshit way and he told us exactly what Pete Buttigieg did in a way that just strips away that you know, centrist-friendly veneer. He tweeted, The way the author portrays it, most of the work sounds fairly innocuous, but Dover is one of the last reporters I would trust to report seriously on a centrist Democratic candidate. If you haven't read Naomi Klein's shock doctrine, it is essential to understanding American economic opportunism in Afghanistan. What government contractors and consultants were doing there was not good, but a judge downplays his work for Blue Cross, but regardless, this matters. A candidate who attacks Medicare for All and the candidate who truly believes in it worked for a private health insurer makes you think. See, like I said, Dover is about the last person you want, honestly, assessing a centrist and he then links to an article from The New York Times that is pretty devastating to this narrative about Pete Buttigieg doing seemingly innocuous work at McKinsey for Blue Cross. It reads, last week, Mr. Buttigieg's campaign said his time in Michigan included analytical work as part of a team identifying savings in administration and overhead costs Blue Cross of Michigan announced in January 2009 that it would cut up to 1,000 jobs or nearly 10 percent of its workforce and request rate increases. Now, the article claims his work didn't actually lead to job loss or rises in monthly premiums, but this New York Times article makes it clear that that's a lie. So in other words, quote, Buttigieg helped Blue Cross save money on administration and overhead costs, i.e. laying people off and increasing insurance premiums. Cool. Now, he was asked about this in an interview with Rachel Maddow on MSNBC, and he tried to play dumb and made it seem like he didn't really know if his consulting with McKinsey led to that loss of jobs at Blue Cross Blue Shield, but watch what he does in order to deflect. He basically throws Bernie Sanders under a bus randomly when when you did that sort of cost and overhead assessment for Blue Cross Blue Shield of Michigan a couple of years after that they laid off like a thousand people. Was your work part of what led to those last? I doubt it. I don't know what happened in the time after I left that was in 2007 when they decided to shrink in 2009. Now, what I do know is that there are some voices in the Democratic primary right now who are calling policy that would eliminate the job of every single American working at every single insurance company in the country. So just pause for a moment and reflect on what he just said in order to defend the consulting work that he did with McKinsey and the loss of jobs that his consulting facilitated. He is saying that Bernie Sanders essentially wants to do the same because if you opt to Medicare for all, then what's going to happen? Well, that will lead to the collapse of the entire for-profit health insurance industry and everyone in that industry will lose jobs. First of all, a loss of jobs is preferable to a loss of life due to a lack of health insurance. Second of all, that assumes that Bernie Sanders isn't actually going to establish a just transition so that way people who currently work in the health industry and they're just low level secretaries and what not wouldn't be able to get jobs in Medicare. So this is one of the most disgusting deflections I've ever seen. And again, this is all to defend the work that he did at McKinsey. So, you know, in spite of Edward Isaac Dover's attempt to portray his work at McKinsey as something that wasn't really that big of a deal. This was seemingly benign. That's not actually true. His work at McKinsey was problematic.  And really, you know, when it comes to disaster capitalism, as Parker Malloy puts it, he is the shock doctrine candidate. And that's exactly it. This really tells you a lot more about Pete Buttigieg, but this isn't surprising to people who already vetted Pete Buttigieg and knew what he was. This is a ghoul. He doesn't care about policy. He cares about his own career and attaining power. That's it. That's all he cares about. That's all his career has been about up until this point. You know, he's running for president as a mayor, not even qualified to be president. And the history that we see is that he failed as a mayor and his work at McKinsey proves that he is the ghoul we all suspected he was. So if this doesn't turn voters off to Pete Buttigieg, then the media has not been doing their job because if you are participating in a Democratic party primary and you care about the issues, you cannot support Pete Buttigieg. But yet he's polling in first in Iowa and New Hampshire. If that continues to be the case and he ends up winning these two states, which are crucial, early primary states, it will be specifically because the media did not do its job at vetting him like they vetted all the other candidates. But maybe, you know, this is the beginning of the end because we've seen candidates before rise and then fall. At first, it was Beto O'Rourke who had his moment in the spotlight and the media loved him, didn't properly vet him. But with time, people saw that he was hollow and wasn't really standing for anything. And he just fell off a cliff and dropped out. The next was Kamala Harris. She had a moment in the sun where she took down Biden at a debate. Turns out she backed away from, you know, progressive policy proposals like Medicare for all. And then she plummeted and now she dropped out. We then saw Elizabeth Warren, who seemed to be the unstoppable candidate who the media loved temporarily, but then she started to back away from Medicare for all, lost the support of the left, tried to, you know, appease both sides at once. And all of a sudden, you know, Pete Buttigieg is the one who's getting the rise and Elizabeth Warren is failing. Maybe he'll also see, you know, that decrease as people like Beto O'Rourke, Kamala Harris and Elizabeth Warren saw. I'm not sure it's, you know, getting close to the Iowa caucus. But what I do know is that if he does win, it's because people are uninformed about him, because anyone with that horrible of a record, not just at McKinsey, but in South Bend, Indiana, there's no way they would win if voters knew about that candidate. So the media has got to do their job. And if they don't, we've got to come in and educate our peers about Pete Buttigieg. This is not someone who is your friend. This is a ghoul who must be defeated.


Okay, welcome back, Extraiters, and we're going to dive right into ThinkScript, because in the previous video we actually looked at some pre-made or already created scripts, which were the S&P sectors and the S&P labels. So now we're actually going to jump into looking at how to plot things, how to create not just column scripts, but how to actually create some of these chart scripts that we created up here, and we'll even dive into a strategy one. So let's get right to it. We're going to start off, let me switch over here, start off with the Extraids column script. Okay, so the Extraids column script is a breakout script, okay, and the whole idea behind the breakout script as is denoted here in the comments is we want something to alert us to a breakout. Now the way breakouts normally work, just in case, or just to be clear, just to be clear, the way breakouts work is what we want to be looking for is something like this. We have a bar, right, that does that, and then we have another bar that does something similar and maybe it has like a wick, right, and then we have another, we might have like a down bar here, right, the next day, which might even have wicks up there and down here, and then eventually it tries to go again. And so you get this sort of, you know, pattern where it's knocking on the door, it's knocking again, it's knocking again, it's knocking again, and it creates, obviously, a sort of resistance, right, up against which it keeps bumping in. Eventually, eventually, it might garner enough support to break above that level, right, and then eventually, not just close above, but it will actually open and close above, right, and then we can do one of two things. We can take a riskier trade, and this would be the riskiest one of all, because we would, well actually, let's say that this would be risk B, right, and why do I say, whoops, that's a big fat B, why do I say this is risk B, because we would actually want this to do something like come back down and test this level, right, before it actually takes off, right. This is what we would want to see, so this would be the risk, or the type A trade, right, the type A trade, grade A is when it actually retested support and then bounced up, and the breakout is confirmed and completed. The riskiest, which would be grade C, would be if we actually take it somewhere here, or even here, we might decide that it's going to, because it broke above, then that's enough. We definitely don't want to do a D, which is it keeps bumping up against the support level, right, it bumped once, bumped twice, bumped three times, bumped a fourth time, this looks like it's going to break. Let's go ahead and take the trade. That would be the riskiest, because this could just as well wick down the next session, and then keep wicking lower and then just dive down, right, it could end up being like some sort of a double or triple or multiple top or whatever, or just simply a failed breakout, right. That would definitely be something that we do not want to do, that would be extremely risky and actually imprudent, right, on our part. C would be the first acceptable risk level trade, which would be okay, it broke above and it actually closed above the support level, yeah, they might do that, but then they might also open up immediately at this level, right, let me see if this will do or undo, it might open up here and then just dive back right down below that supposedly broken support and then, you know, you're back down below here, which is no good, so this would still be a risky trade, but some people still go for that, I would consider that a lotto if I did do that, because that is still very high risk, this is least risky or less risky, sorry, because it already closed above here and then it opened, well, this could be seen as one of two candles, either green or red, it either opened here and then took off, right, but it never actually touched the support line, so it never really tested the support, or it opened here and then bullishly, you know, skyrocketed back up, if it did that then that's a little bit better, but it's still not grade A, grade A would be that you actually want to retest that before it takes off, the problem is that some people don't want it to do that, because instead of retesting it just might rock it, right, so, but regardless, the safest grade A trade would be after a retest breakout and retest of support, then it takes off, so this is what we kind of want to be alerted, or this is what we want to be alerted to, all right, so this is what we're going to start looking at today and we're going to do, we're going to do it with a column script first, and eventually we're going to do it with a chart script, all right, so, okay, so let's get started with this script, so first we want to define a length, a period length, so we define it 15, so that would be, you know, 15 bars, whatever, and we're defining the price, you know, as close, so whatever the closing price was for that bar then that's going to be our price variable, so we have two variables, all right, and now what we want to do is we want to define a high price, so at some point, actually, oh, let me see, can I get this drawing back? Oh, I don't think I can get that drawing back, at some point, right, we want to be able to find what the highest price was, so if we had, let me have to draw this back again, so let's say that we had the one bar here, all right, and then maybe it had another bar here, and then another one started down here, all right, and then over there, all right, and eventually it broke out, well, that's pretty bad, eventually it does break out above what we consider to be our support level, which is going to be somewhere in here, okay, try to do that again, all right, so that's what we have, okay, so if, oh, that's still working, okay, I have to end the drawing but not erase it, there we go, okay, so what we would want is to find some sort of a high price, right, so we're actually going to be moving backwards in time from whatever today is, and we're going to be looking at whatever the high price from back then was, now remember this candle has not happened yet, right, so we're going to define a variable, we'll call it high price, and we're going to set a counter to number two, okay, remember where, how we normally set this to zero, well, here's one of those cases where you want to set it to two, and we'll see in a little bit why, because it's going to serve as an offset, all right, and it's going to go, that counter is going to count from two to whatever the length was, which is 15, okay, so it's actually going to count 13 periods back, so that's 13 candles, right, okay, and we're going to, again, we're using, we're introducing this idea of with, which means that every time that it counts, it's going to carry something with it, okay, and it's going to be a holder, a placeholder value, which we started zero, okay, so every time that it counts backwards, every time that it does that, it's going to do something with this holder variable, okay, what is it going to do, okay, if whatever the high, remember it's green, so it's a reserve word, whatever the high closing price, obviously, sorry, whatever the high, not the closing price, whatever the high was for that day, okay, for the counter, which is going to start, again, at two, so we're going to start looking for the high on counter equal to two, so that means that we're not going to look for the, remember this one hasn't happened yet, okay, let me kind of cross that out to see if that helps, this one hasn't happened yet, okay, so this is the one that is current, so this is zero, this is one previous, so that's one, this is two previous, so this is two, and this is three previous, and so on, so this candle is three, so what's going to happen here is it's going to start counting or looking for the high of counter two, which means it's going to go zero, one, two, okay, so it's going to start from here, so it's going to omit these two recent candles, all right, so it's going to start at two, and it's going to check to see if that high is greater than the holder, so obviously holder is zero, so whatever the high for that first day, it's going to be greater than the holder, which is zero, if it is, then it's going to take that high counter, right, else it's just going to keep the holder, all right, which would have been zero, okay, so that's what it's going to do, all the way from two, it's going to go back, checking to see for whatever the high was on each day, and if that high is greater than whatever holder was, then it's go ahead and replace it with that new high, otherwise it's just going to keep whatever holder was, all right, now we've defined this high price, what it's going to be, and that's actually going to use that fold function that we talked about, and it's going to go backwards in time, now that's great, it's going to be storing, it's going to be searching through the past 13 days, actually 15, because the first two don't count, right, but the past 13 days, looking for the high, and sticking whatever that high is in holder, so at the end, holder is going to have the high of the past 13 days, okay, now that's great, what are we going to do with that, okay, so we're going to define a trigger, I just happened to call it trigger, okay, if the close on day one is less than the high price, all right, which we defined, let's say that the high is 70, if the close on day one, okay, is less than 70, less than the high price, and the close today is greater than the high price, all right, so that's like if this, if high price is somewhere up here, 70, and today the close on minus one is less than that 70, right, and also today's close, which would be some day in the future, which might be this one, is greater than that high price, whatever that level was, then assign, trig the value of one, else if close two is less than high price, and close one is greater than high price, so it's the same thing, we're just moving close back from one to two, right, and we're moving this one from today to one, right, and the close is greater than the high price, then we're gonna assign it a value two, now this will make a little bit more sense in a little while, else if, and this is the final, else if, this is the final if, the close on day three is less than the high price, and the close on day two is greater than the high price, and the close today is also greater than the high price than three, okay, now let's take these, let's see if I can break these down for you a little bit clear, here's the first one, starting at if, then one, okay, and I do this, I'm probably gonna get an error, else if, then two, else if, and you leave another space here, okay, so this is what's actually, I could even add this here, just to make this a little bit cleaner for you guys to see, all right, so here we go, we have, we're gonna do this, right, else if we're gonna do this, else if we're gonna do this, all right, oh, and then else zero, so we, trig is gonna end up with either a zero, a one, a two, or a three, okay, and think about this, if today, if yesterday's close is less than the high price, and we're assuming that the high price is whatever the support level is, right, because it's the highest that it's been in the past, if yesterday's close is below that price, and today's close happened to be above that price, then that could be a breakout, so let's give it a number one, else if, the day before yesterday is below the high price, and today's, or sorry, yesterday's, because this is the day before yesterday, is below the high price, and then yesterday is above the high price, which means that it already broke out, right, so that's similar to that first condition, but also today's close is also higher than the high price, and that means that you have two candles above the high price, today's close and yesterday's close, okay, see, yesterday's close above, today's close below, right, and only the day before yesterday's below the low, then this is going to be given a number two, it's still a breakout, it could still be a breakout, right, but it has a better probability of being a breakout, why, because here we're saying that this one is below and this one is above, here we're saying that this one is below and this one is above and this one is above, so there's two of them above that support line, that makes it a better quality indicator, so we're going to sign it a number two, okay, so you might want to pick number ones if you're risky, I'll take a lotto, you might pick number twos if you're being a little bit safer, now else if, right, if the close on the day before the day before yesterday is below, the day before yesterday is above, and the day, and then yesterday is also above, so below, below, and then above, below, right, above, sorry, above, and then above, so how many are above, two, this one, and this one, right, and this one was below, so then we're going to sign it a number three, because it's an even better indicator of a breakout, so else zero, which means definitely don't take that, not even if it's, you know, not even if it's a lotto, you don't want to do that, okay, so we're basically assigning trig zero, one, two, or three, and we're saying zero is no trade, one is, it's an okay trade, it's risky, two, it's less risky, it's pretty good, three, that's the best, that's what we're looking for, okay, so let me just bunch this back up, I actually don't know if it would have worked if I left it like that, it might, okay, let's see, else, okay, so there's, oh, and then this one, okay, so there's our trig, okay, so we're defining the trig here, and now we have a value, either zero, one, two, or three, okay, so what do we do with that, we're going to add a label, okay, and yes, it's going to be visible from the get go, and if trig is greater than zero, then it's a breakout, right, it's a different quality breakout, depending on whether it's one, two, or three, but it is a breakout, so that label is going to have the text breakout, and we're going to give it the number right next to it, it's either a breakout of grade one, grade two, or grade three, else, okay, if trig is not greater than zero, which means it's less than zero, or equal to zero, then nothing, and just blank, it's not a breakout, right, and we're going to give it some color, just, you know, for show, so it's going to be color plum, and then we're going to assign a background color to that label, right, just to make it stand out some more, so if trig, which means if we have a value for this, which we should, then color yellow, else just leave a white space, right, there's no, there's a text that's going to say breakout zero, or breakout blank, but it's got a white background, so that's not going to be a trigger, so let's go ahead and see this in action, X trades column script, so we go over here to market watch, right, and we pick now, here's something important, market watch is looking at the Russell 1000, the Russell, the main Russell is 3000, so that's a lot of stocks to sift through, because it has to calculate everything that we just did, you know, it's got to go back 15 candles, only count 13 of them, and then store the values, and then compare it against yesterday's close day before yesterday, and day before day before yesterday, and that's a lot of stocks to go through, so remember you don't want to get rate limited by the thinkorswim service, so let's do it with smaller sample size, let's do it with the S&P 500, all right, and let me get rid of this, because this is a clear screen, okay, all right, oh, I didn't turn off the drawing, there we go, okay, so what we're going to do, and we're going to remove this one, because remember when we did this script on the video way back when, I'm actually going to link to it here, it was called the monthly yearly return script or something like that, we actually had some issues, because we had another M percentage column next to it, and then some of them were appearing up as we're showing up as loading or they weren't loading properly, you don't want to have too many of these scripts calculating at the same time, so let's go ahead and remove the three month script, okay, we'll just do that, and let's go ahead and look for the x-ray column script, let's see if we can find that, go to, I guess we can't sift through, okay, so let's just go and look for x-trades, oops, trades, okay, breakout column, that's what I called it, all right, wait, is that what I called it? Yeah, that's it, that's the one I called it, okay, all right, so let's go ahead and put that one on, add items, right, and okay, here we go, so we removed the one that was here, and we got this one, let's actually move wherever that is, let's move it up, so you can either just drag it or you can use the move up or down buttons over here, and there we go, x-trades breakout column, okay, so what does that mean? It means that these guys are not breaking out, they have a white background, and these are, this one does have a breakout, so let's go ahead and take a look at the chart of Comcast, so let's go to Comcast, add charts, CMCSA, and boom, there we go, oh yeah, that's that's pretty clear, so it went back two candles, right, not this one, not this one, it went back at least two candles, so starting here it started to find whatever the high was, and whenever it found the high, which looks to be this one right here, where the high is 43.53, right, as given by the pie right there, that's 43.53, oh wait, it's 43.38, this one is 43.53, this one is 43.11, so definitely 43.53 is the high, right, that it's going, that it found in the past 13 or 15 candles, you can clearly see, and then it has a breakout, right, and it has a breakout because these candles broke above whatever that resistance was, let's go real quick to, okay, right, and remember that it was above zero, so we gave it the breakout text, right, and we assigned it a color plum, but we also said that if the trigger had been given, then it would be, it would have a yellow background, so that's why we see, right, a plum color text with the yellow background, and right next to it, you can see is the actual trigger number, right, let me see if, okay, we're gonna say it's a breakout, if it's greater than zero, and what level of a breakout is it, well we're gonna add, trig, the value itself, right, we concatenated or appended that to the breakout, so that's what that means, it means that this is a two breakout, that this is also a two breakout, which is Boeing, which is actually one that I was looking at really recently, okay, Boeing, again, it found the high, which is probably that one, and look at that, it's got three candles now above that, okay, and let's go over to, let's find a one, one, there it is, the Dow, Dow, I think that's the actual Dow company, not Dow Corning, that's the actual Dow, as in the Dow Jones, it's also a company, let's go over here, or it could be Dow Corning, let me see, no that's Dow Inc, yeah that is Dow Corning, okay, so this one has, this is the high here, it only has one candle above, right, that resistance, so it is a one, all right, that's why it's a one, Procter and Gamble, P and G, or PG, that is also one, and this is the high right there, and it has one candle above, now let me just check, because I just kind of noticed something, these are both twos, Boeing and Comcast, but it seemed to me that Boeing had three candles above, so something happened, let me see, that would be the high, that does have three candles above, so I'm not, I'm not quite clear what happened there, but you see the point, it's a very, very powerful script, because you can get the breakout, and let me see if there is a three one, doesn't seem to be one, at least not in, you know what, probably not in the S&P 100, but we could probably find one in the NASDAQ 100, which should be here, or sorry here, because these guys rallied more, here we go, NASDAQ 100, and breakout ones, ones and ones, okay, we're at the bottom of the list, can we find a three, no, not in the NASDAQ, today was not a very good, ugh, it wasn't a very good day, I mean it was a good day, it ended up positive, but let's go see the sectors, I believe I have a watch list for the sectors, watch list, top watch list, top 21 losers, S&P 500 sectors would be here, all right, the highest was, it's not going to give me, are you serious, it's not giving me a, okay, let me fix that real quick, customize, let me get the description here, symbol is no good, there we go, oh, there is no description, all right, well that's no good, that's odd, there we go, description, let's put that in, and we probably don't even need the symbol, we're gonna need it for a different list, but okay, okay, utilities and real estate, okay, those were, wait, oh sorry, those were actually the lowest ones, the highest ones, information technology, okay, that's cool, let's see, IT, where were we, charts, I believe, no, market watch, okay, so let's look in here, and information technology, sector disease rate by industry, here we go, information technology, let's just get all the sector, that's a lot, but okay, there it goes, it's sort of working, yeah, that's probably a lot of stocks, so we have a breakout two, one, one, actually we're not seeing a three here, well we'll leave it at that because it seems like it's gonna be a little bit, oh, you know what, what am I doing, I can just sort this there, breakout two, here we go, one, two, yep, no three, all right, well we couldn't find any in here, so the other one was real estate, let's see if we can find anything in real estate, if we can find any threes, there's all the ones, the twos, and no threes, all right, well you get the picture, there's the script, and I believe that's a wrap for today's video because it's already 27 minutes long, so we, again, what did we look at, we basically covered a very quick and dirty version of the fold command, but I did really want to get into that one, okay, and I kind of gave you an explanation of how it works using a graphical, I'm gonna try to post an image of what I mean, have on an index card of how it goes back and looks for the high of the day, right, of the previous days, and how it assigns those values zero, one, two, three, and then from there on it's, you know, it's pretty simple, and in the next video we'll look at some plotting, okay, all right, so I hope this was clear enough, I hope this was clear enough, and if you have any doubts or questions, go ahead and drop a comment, if you liked the video, go ahead and drop a like, and drop a comment as well, if you have any particular subject you want me to cover pertaining to either ThinkScript or Thinkorswim or anything else, and I will see you guys in the next video, so have a great one!