 Today, what I am going to do is to give you an overview, give you a motivation as to why do we need to look at this advanced process control, what is advanced, what do we really mean by advanced process control, why what are the different techniques that we need to use to develop an advanced process controller and finally, of course I will end up with what is the outline for the course, well this course is going to be more of a control theory course. So I know that the classroom is mixed, we have students with different background not just from chemical engineering, so we have students from systems and control, we have students from E and mechanical engineering, chemical engineering, so most of my course is going to be generic in some sense and I will try to pick up examples which are appearing to every branch does not matter which, so I will take up some simple example to teach, I am going to use some theme example and this theme example will be used to teach concepts and in assignments you can pick up specific examples to a domain and do an assignment. So the course will consist of of course exams and quizzes but major component is going to be programming assignments or a project, this is because this is an advanced course and everything that I teach cannot be done in an exam, you know you need to program and understand the concepts, I will be giving you programming assignments I will also be giving you sample programs which I have developed, so that you have some reference as to how to develop programs for these kind of things and then the idea is that these, we will take some toy problems and this toy problems we are going to use throughout the course to implement the concept that we learn in the course, so whatever you study on board we also solve some problems in the class but we also do simulations and you know try to understand the concepts through actually implementing it, actually doing it, okay. So the course is going to be intense, it is advanced versus control, it is advanced course and at the end of the course I expect you to know how to, if you just land up in an industry, how will you do this advanced control, how will you, now my course is going to be having three modules and then explain them soon, what are these three modules, why are they required, what is the relationship and so on. So these three modules form three pillars of advanced control and we will try to have roughly two or three assignments in which you actually implement, you actually solve you know a toy advanced control problem in simulation. We are going to start from data, so the situation I am considering is you will end up in an industry where you have been asked to develop advanced controller, you know you open a control book they will say that well you can develop an advanced controller, I have a model, mathematical model. In reality when you go to a company and if you ask them where is the mathematical model for this, they will just laugh at you, there is no mathematical model developed by company people, they are too busy you know doing their stuff or they do not know how to do it, they have not attended our course. So you should start from scratch, you should start from where you know you have no information about the system, you just are given some system and said that now okay develop an advanced controller for this system. So we will start from data, we will develop models which are called as control relevant models okay, these will be developed either from data or from physics, we will learn how to do both ways. So this will be about one month and half month I will spend on how to do model development which is control relevant. Then I will move to something called state estimation or a simple word for this would be soft sensing okay or software sensing or whatever you want to call it, we will look at it what it means today itself and then using the soft sensing how do I develop advanced controller, how do I go ahead. So let us begin this with a model plant, a chemical plant or a manufacturing plant or a power plant, it consists of you know controllers which are led and this is the hierarchy which is shown here, you have variety of controllers, the simplest one which you study in your first course is regulatory or PID controllers, these PID controllers form the backbone of most of the control schemes and they are in majority the large number of PID controllers. This is what how do you know how do you understand behavior of a PID controller, how do you come up with its tuning parameters, all this is covered in your first course in control and I assume that most of you who are doing this advanced control have at least exposure to first course in control. So you know what is a PID controller, you have heard these names. The next level is what I am calling as advanced control, advanced control consist of two blocks, first block is multi variable and non-linear control, what is multi variable, what is non-linear, I will go into that step by step. Then there are two layers here, one is called as control layer, the other is called as online optimization layer. The online optimization layer is where you see a model based system that actually guides the multi variable controller. So you have an online optimization scheme that keeps telling you what is the best way to operate the plant and then there is one more layer which is sitting on the top of it which is called as long term scheduling and planning. This is also a control layer and control companies like Honeywell or Rosemont or ABB they provide solutions in all four segments that is well of course the bread and butter is regulatory control PID controllers, they provide hardware and software for PID controllers. They also provide software and hardware required for implementing multi variable controllers, they have types with specialized companies which can do online optimization and they also provide these companies today advanced control also provide long term scheduling and planning solutions. Scheduling and planning solutions deal with a range of issues like market demands. Let me take a specific example, it will become easy even though it is from domain which is from chemical engineering. Let me consider an example of refinery, in the refinery what you do is you take crude oil and get different products like gasoline and LPG and kerosene and so on. What happens is in the first step you actually do distillation, separate these products and then you get heavy tar which is not so much useful for running the vehicle. So what we do is we have something called as a fluidized catalytic cracker, we actually break down this heavy material into lighter products, we create more gasoline, we create more petroleum, more aviation turbo fuel and this process is called as fluidized catalytic cracking. Now the question is how do I run a fluidized catalytic cracker? When I am running this there could be different operational goals. For example, operational goal could be I only run catalytic cracker such that I produce maximum gasoline or I produce maximum it is month of December, there is lot of people travelling all over the country and I need to produce more aviation turbo fuel. In let us say month of October we have Diwali and you need more kerosene for political reasons or whatever. So in some other time I want to run the reactor such that I maximize the profit or someone might say well I want to run the reactor such that you minimize the energy consumption. So there are all kinds of operating goals. To meet these operating goals you have to make decisions as to what should be the operating point, what should be the temperature, what should be pressure inside, what should be the cooling flow rates, all kinds of things. How do you decide this? You cannot decide it just based on experience. What is done is you have a model for this reactor system. It is a complex model consisting of differential algebraic partial differential equations. This model is then used online periodically let us say every 8 hours or every 16 hours to decide what should be best operating point under the given conditions of operations and what should be under the given target. Oil company might receive a target that this month produce more aviation turbo fuel. So how do I change the operating conditions such that I maximize aviation turbo fuel production? It also has to react to many of the things. For example, plan conditions keep changing. You have a catalyst doing this and the catalyst can degrade. It can start malfunctioning or your heat exchangers and heat exchangers have fouling problem and heat transfer reduces. So you have to keep actually an eye, you have to be watchful and you have to keep moving the plant in such a way that you maximize or minimize whatever is your operating goal. So a modern plant will consist of multiple layers. Those of you who have a distance and control background will probably recognize some of the blocks that you hear. PLC stands for Programmable Logic Controllers. So these are distributed digital control systems which actually control a complex plant. They use multiple PID controllers. They use logic blocks like if this happens do this, if that happens do this and all kinds of things. Very ad hoc but a practical way of handling problems. The modern way of doing it is through what is called as Model Predictive Control. So this Model Predictive Control is a practical version of so-called classical optimal control and you have optimizer sitting on the top of this Model Predictive Controller or on the top of the local PLCs and you have a plant-wide operation-based control which is overlooking entire plant, different subunits. The overall optimizer looks at what is best way of operating the plant. Let us say over one month period or over two months period. What should be done? Should the first 15 days should it be profit maximization? Next 15 days could be energy minimization, whatever. So what is the best way to operate this plant is a high level task. What is it that we are going to look at? Advanced control. So what I am going to say here is that advanced control today actually is multi-level problem. It is a very complex problem and it requires expertise of different people from hardware to control engineers to domain experts to optimization experts, skeleton planning, IEUR. It is no longer just managing some PID controllers. It is very, very complex business. Whatever I am going to teach it is all implementable in real systems is actually implemented and probably what they do is probably much more complex than what we teach. So it is not that this is something academic which I am going to talk about. Whatever I am going to do in this class next four months, everything is going to be useful in industry when you go for a plant. This is just a cartoon for online optimization. What you do is you have a steady state optimization package and you have some operational goals. These operational goals are given to the plant new set points as they are called. The plant keeps changing. So you have to keep updating the model online, a very difficult task but this model which is used for online optimization is actually updated online every one day, every two days. Model parameters are tuned adjusted and then it is used for online optimization. We are not really going to get into online optimization layer. This course will not permit us to get there. I will just talk about the model predictive control or multivariable control, state feedback controllers. So in this entire hierarchy I am just going to cover the layer just above the PID controllers. I do not have time to cover the entire hierarchy of advanced control but you should have a picture, global picture. The global picture is that you will look at entire plant optimization, optimal control. In that we are going to look at let us say one unit control. We are not right now bothered about entire plant advanced control. We are just looking at optimal control of one single unit and now why is unit control a difficult problem? One thing that we are going to look at makes it difficult is what are called as complex multivariable interactions. Multivariable interactions are any system, any real system that any engineering system that we encounter has many variables that need to be kept at a desired levels. For example, let us take a boiler. In a boiler we are generating steam and it is in a boiler drum in which you have some way of heating the liquid water and you generate steam and the steam is supplied to variety of units. A very simple look, seemingly simple system. Now what is critical here is that I should get the steam of certain quality. I should get steam of certain temperature pressure in order to operate certain things in my plant. So it is important that temperature pressure of the steam is very well maintained. Now it depends on variety of factors. One thing that changes in a boiler is demand for steam. Suddenly I have some three sub units operating and I take fourth one in operation. I need more steam. There is a sudden demand for the steam. When there is a sudden demand for the steam, the boiler has certain level of water inside in it. The level starts dropping because you are drawing more steam. Level starts dropping. The vapour space starts expanding and you know temperature and pressure and volume are related. So all these variables start changing and they start changing in a coupled manner. The level change, pressure change, temperature change are coupled. You cannot say that one factor which is changing independently. Everything changes together. How do I control? Now well I can add, if the level is dropping I can add more water. If the temperature is dropping I can start heating more. I can add more fuel. I can start heating more. If I start heating more, more evaporation will occur and again level will start dropping. So again temperature, pressure, both of them and level are related to how do you heat the system? So I just cannot say that just temperature and you know change the heating. If I start changing heating to control temperature, it will have effect on the level. It is not going to be separate. Same thing is there for let us say feed water. You will say that okay the level is dropping add more feed water. You add feed water level will change but the temperature will change. It is not going to happen that only level will change. Temperature will change, pressure will change, weapon liquid equilibrium will change. All complications will come up. So real problem has multivariable interactions. Everything affects everything and it is important that we understand these multivariable interactions and then develop advance controller. Otherwise it is not possible to develop an advance controller. So understanding modeling this multivariable interactions is a key to developing controllers. There are all kinds of operational constraints. For example you have safety limits, you have input saturation, you cannot heat more than certain amount. The amount of fuel you can inject is limited. The least you can do is close the fuel. You cannot have negative fuel flow. So there are product quality constraints. I want a steam of certain quality. If it drops, my downstream processes will get affected. When you are operating a system over a wide range of operation, what becomes critical is the dynamics of the system over a wide range and the dynamics of a system over a wide range is typically highly non-linear. And when you want to do a good optimal control you have to worry about process non-linearities. Operating conditions change. I have a boiler and there is a heat transfer from the side walls to the atmosphere. The temperature of the atmosphere keeps changing by 15 to 20 degrees. The heat loss keeps changing. That has an effect on what happens inside. So operating conditions keeps changing. Well now conventional way of handling such systems is using multiple PID controllers. I will give you another example which will tell you what is the difficulty with using multiple PID controllers. Let us say these students who are attending would know this example. I have given the example of a motorcycle. I want to control a motorcycle or a car. In a car what are the control outputs? Speed and direction. What are the manipulated variables available to you? Accelerated, brake and steering. Now you can turn this way that way. What are the safety limits? You cannot leave the road. You cannot go on right side or left side of the road depending upon which country you are driving. There are input constraints. You have maximum fuel injection. You cannot inject fuel infinitely. And you have minimum fuel injection of course. So you cannot go below certain values. So there is a... Now let us say you have to control two things. One is speed and a direction. I decide that direction is to be controlled only using steering. Speed is to be controlled only using accelerator. Now if I turn, that obviously has an effect on the speed. I am just looking at not velocity. I am just looking at speed control. And when I am accelerating I can have a speed attached to my accelerator. So there is a controller which measures speed and manipulates accelerator. There is one PID controller which looks at the direction and then manipulates the steering. You have two PID controllers or PID controllers. You can imagine this will be a disaster because it is like two drivers who do not know about each other. One is only looking at steering manipulation and direction. The other person is only looking at acceleration. So having two drivers in a car, one only looking at one aspect. Other looking at other aspect only. And both having no coordination is a disaster. You cannot run the car like that. You need one controller. You need one multi variable controller which simultaneously measures speed and direction and which simultaneously changes decides to change three things. Steering, brake and accelerator. This is what we are going to do in this course. We are going to have one controller which simultaneously changes multiple inputs to the plant by simultaneously considering multiple measurements. That is the key thing. So if you have multiple, I am just giving you an example of multi variable interactions. This is a simple system which we have in the lab. This demonstrates what is multi variable interaction. You can look at this is a full time system which is called this is a benchmark system which has appeared in one of the IEEE journal article and I will be sharing this article with you. So this is a simple system which demonstrates what is multi variable interactions. If you look at this, there are two control walls. There are two control walls and this one is here and the other one is here. And in these two control walls, if I change this control wall, the level in this tank will change because the flow in this flow will change but simultaneously the flow to tank 4 will also change. So if I change this control wall, this level in tank 1 will change, the level in tank 4 will change and level in tank 4 will have effect on tank 2 level. So there is no way I can change wall 1 without affecting level in tank 2 and tank 1 simultaneously. Same thing about the second control wall. This is a control wall. If I open or close this, the level in tank 2 will change but through this link, tank 3 level will change which will have effect on tank 1 level. So effectively, you know it is coupled. This is just a prior problem which we will use to understand most of the concepts. Very simple problem to four tanks in series and the model you will understand very easily and we will use this to understand very complex things. Now just look here. The question is if I want to put 2 PI controllers, what should I measure and what should I manipulate? Should I measure H1 level 1 in tank 1 and manipulate wall 1 or wall 2? Because everything affects everything. So now what? How do I go about picking up 2 PI controllers? A difficult problem. You know industrial processes are much more complex and then you know what happens is and I will just show you a chemical plant, typical chemical plant. There is a reactor here. Do not worry about if you do not understand chemical plants. Just understand them from a systems view point. There is a reactor here to be controlled. So some reactants are being pumped in. You know you have the product is being cooled here then it is sent to weapon liquid separator. The liquid is a product which is again refined here and the product is drawn and some of the reactants which do not get used during the process are then again recycled into this. Okay. The typical chemical plant. This is some process given by Tennessee Eastman Company. Well this particular system has about 54 measurements available and you can manipulate about 12 inputs to this plant. Now I have 54 measurements and I have 12 inputs. So I can put 12 PID controllers. Now how do I pair? Which measurement should be used and which variable should be manipulated and without having to know anything about chemical engineering you can just tell that well. If you change one thing it will have cascading effect on everything. Everything is connected. If you change one thing other thing will get affected. So if I decide to change some cooling water here in the reactor the temperature and pressure of the reactor will change but then that will change the dynamics of this condenser of the weapon equilibrium here and then you know. Then there is a recycle which is coming back to the reactor. So whatever I am doing is again being fed back. So complex business. How do you control this? What we are going to learn is how do I control these kinds of plants? Through some toy examples finally you should at least get ideas how will you do it for this kind of a plant. So when you put multiple PID controllers they can help each other they can fight and then you know they can destabilize the plant because so how do you tune them? The difficult control problem. I am not going to get into that. I am going to do more about multivariable controllers. I am going to say that multiple PID controllers are anyway difficult to tune. Even for a car two drivers who do not like each other you know are you know difficult to handle. So just to show you what are the control problem here. There are some six control outputs to be six variables to be controlled and some ten inputs that can be manipulated simultaneously and there are constraints on how do you change these variables. You cannot for example reactor level cannot go beyond 90% cannot drop below 10%. Certain flow rate cannot be more than 45, cannot be less than 0.1. At a time you cannot change more than plus 1 or minus 1. All kinds of constraints are there in reality. How do you handle them? Well what we are going to learn is not worry about putting multiple PI controllers. We are going to look at multivariable controllers. So these are model based online model based controllers. So I am going to use a dynamic model for this process online all the time. In a computer this computer will have a model which is being simulated and this model will be used to decide how to control the plant. So this is the technology which was developed in US and in France way back in 1970s or starting from early 70s by two different companies. One was a group from Shell Refinery in US and other was a group from France. And these controllers are now very much used, multivariable controllers are very much used in all kinds of domains. It started with chemical industry and by now it has spread to all engineering disciplines. This model based predictive controllers which use online dynamic model for controlling the plant. It is a very, very mature technology. It is used now in robotic applications, in space applications, in biomedical applications, in control of drives. So it started from chemical plant. Why it started only in chemical plants? What was so separate? These are highly computation intensive algorithms. You need heavy online computing. So it started in a plant which was slow, chemical plants are very slow. You can make one change, go for a tea, come back, make another change. You have a furnace to control. The dynamics of a furnace is spread over one day. So you have time to compute online and then computers say at 30 years back were pretty slow. The advanced computing center which now you carry on your laptop would actually be entire room, some big machine filling this entire room. And then using that for control was very, very expensive, difficult and it happened only in rich companies like Shell. They could afford to do this. But now it is all over. The latest one I heard is this has been used by Google to manage requests from server request. So this technology is generic. It can be used anywhere. What is the basic idea? Basic idea is this is a modified form of, those of you have done control course. This is nothing but classical optimal control modified to suit a real industrial problem. It can handle multi variable interactions because this particular controller is going to use a dynamic model for the plant online. I am going to use the online model. You can specify your constraints. You can say well I want to operate this system under this so and so constraints. You can handle process nonlinearities. What is the basic idea? Basic idea is what actually we keep doing every day is given a model for the plant dynamics. We forecast. We can do forecasting, online forecasting. I have a computer. I can do online forecasting. What if I change feed water flow rate from this value to this value? What will happen over next one are in the boiler? I can forecast. I have a model. I have a computer. I can use the Dundee Kutla method. Integrate and I can simulate what if scenarios. What if I do this? What if I do this? What if I do this? And then I can decide to take an action which is optimal in some sense. So when I decide this action I will of course take into consideration the constraints and so on. Let us go back to the car driving example. When you are driving the car whether you know it or you do not know it you actually have a dynamic model for your car in your mind. What is the dynamic model? You have developed this by doing some experiments with the car. When you take the car or you take your motorcycle first time you try to accelerate a little bit and then see how it zooms. Then you have a model. If I press this much then you have another model that you develop is you press accelerator then you press your brake and say where does it stop? How good is my brake? And this model which you develop which is not quite quantitative it is probably more complex. We do not know how calculations occur in our brains. But we are able to forecast using this model and make decisions based on what is going to happen next. If somebody is crossing the road and I am driving the car I am going to forecast whether he will cross before I reach that point or after I reach that point and then you are able to decide your action based on that. You can start pressing your brake or you will start changing the direction depending upon your forecast. Something that we every day every now and then keep doing. When you are driving when you are preparing for a course whatever every action. When you are behaving with somebody you have a model for this person. So whatever and then you forecast if I say this is going to happen and then you manipulate your actions inputs manipulate inputs to decide what is going to happen. So this is what is done. So you have a dynamic model for the plan which is running online in a computer which is used to do what if scenarios and then you make decisions based on these what if scenarios through optimization. So very very complex very very computation intensive process but now with so fast computers it is possible to do it in just few seconds few microseconds at times. I will just give you an example here. This is a reactor example don't worry look at the systems guy or systems person. This is a reactor in a reactor I am a simple reaction A goes to B okay some isomerization and I have two things to control concentration of A in the reactor and temperature of the reactor exothermic reaction heat gets generated. I am measuring let us say temperature and concentration I am measuring the concentration of A I am measuring temperature online. I have two things which I can manipulate one is I can change the feed flow to the reactor of reactant A. I can change the cooling water I have a cooling water system which cools the reactor contents. So I can manipulate I just want to show you visually without going into mathematics right now what happens if I put two controllers if I put two drivers to drive this reactor as against I put one controller which is multi variable what is the difference just look at it visually I have put two controllers. I have taken concentration as a measurement and I am changing cooling water flow rate actually the slide typo it should be concentration as a measurement and I am changing inlet reactant flow rate and I am taking temperature as a measurement and f c that is cooling water is being changed so I have temperature to be maintained I am changing cooling water okay there is a jacket and in this jacket surrounding the reactor and I am pumping cooling water so that the contents are cooled. How does this reactor look like just imagine a pressure cooker in which you know some reactants are coming out some products are being withdrawn continuously you have a surrounding jacket which is used for cooling the reaction okay. I have put two drivers or two controllers one only trying to control concentration inside the reactor other fellow trying to control only the temperature they do not know about each other okay there is no coordination one only looks as his or its own objective that is temperature control or concentration control I have given here a step change in the concentration I want to ramp up the concentration you can see that I have changed the concentration from 0.26 to 0.36 or something but I want to maintain the temperature to 0.395 okay I have tuned the controllers these are believe me I am not created this example just to fool you I have tuned the controllers using best methods available okay each one of them separately works very very fine when they start working together you can see what is happening okay there is lot of fluctuations lot of you know this is what we call as interactions because one action has effect on if I change the cooling water temperature it has effect on both okay it has effect on temperature it has effect on concentration so one fellow just doing one thing is not enough you have to have coordination well these are the manipulate variables and then I have given a disturbance there in the concentration so this is a classic problem in which set point change followed by a disturbance simulation okay and you can see that two controllers when they are trying to control you get this kind of a profile and then what if I use a multi variable controller just look at this a multi variable controller will implement a step change just like a step change the other variable temperature is not affected much this one small blip which comes okay and then the temperature is steady why this is happening because this multi variable controller is simultaneously changing both the inputs by taking two measurements simultaneously right so just like when you are driving you will look at speed and direction simultaneously and manipulate three things simultaneously this is a controller which is a multi variable controller which will so I just want to motivate through this diagrams okay that this is what this is the difference I mean you can see the go back and see here you know oscillations and not so great control whereas here when when I introduce a disturbance it is just you know when I introduce a disturbance it is just one another blip here no effect on the concentration it is able to control do a fantastic job I cannot do this to do this using a multiple PID controllers is difficult even for a two input to output system imagine for a chemical plant you know for a large power plant or nuclear plant it is very very difficult well so this multi variable controllers are they something academic or are they actually used these multi variable controllers are actually used there are companies which I have just listed here companies which no no I have listed here applications in which these things have been used refining petrochemicals pulp and paper mining food processing you know polymer processing furnaces aerospace and defense you know this was 2003 survey of this multi variable control technology which we are going to study in this course and what is the largest controller developed using this technology you know it is a refinery in Canada where they simultaneously monitor 603 measurements by manipulating 283 inputs simultaneously okay using a model mathematical model which is used online the mathematical model is like a book you know if you have to go through the mathematical model so these are different vendors who implement these controllers as per technology and Honeywell and believe me all these vendors are here in India implementing these controllers and they need people who are trained to know what this complex business is just another visual motivation you know this is a slide from an industrial implementation before implementing multi variable controller and after implementing multi variable controller I think I do not have to say much about do not worry about what this is just look at the qualitative features of the graph okay you want to control this variable here and you want to control this variable here you can just see how the output is behaving before multi variable controller was implemented and after multi variable controller was implemented okay this huge difference okay initially before a multi variable controller was implemented there were two PID controllers they were fighting it with each other and you can see a lot of oscillations poor control moment you have a multi variable controller you know the control outputs are just had again the set points it's very nice control and how do you design this controllers well the first thing that you need to do to design this controllers is to develop dynamic models okay I should be able to predict the dynamic behavior of a plant of a system that I want to control online so I need a model which can forecast okay and transient behavior not the steady state behavior the transient behavior it should be such that you know it should be able to capture the dynamics at the same time it should be simple enough so that online computations can be done very fast your all kinds of constraints right if you are controlling a robot you want to do this calculations in fraction of a second right you cannot afford to wait for minutes to do calculations so you need what I would call control relevant models so we will study first how to develop this control models then many times you want to you know control certain variables which are not directly measurable okay a good example would be well recent application of this soft sensing is you know in a surgical procedure surgical operation you want to actually maintain up the patient under the state of hypnosis during the surgical procedure you can have a mathematical model which estimates percentage of hypnosis but there is no measurement of hypnosis you measure blood pressure okay you probably measure blood sugar you measure all kinds of other parameters from that using a mathematical model you predict what is the level of hypnosis or you can predict what is the you know what is called as analgesia the reaction to the pain you can have and people are talking now of online sensors for level of hypnosis during a surgical procedure I can think of you know well I want to you know my my in this room it's a temperature control problem and humidity control problem the air injection are my manipulate variables and they are distributed and let's say I want to you know major comfort level and I can define let's say some comfort index which is some complex function of humidity and temperature there are disturbances people will keep coming and going out so bomber will come in suddenly and then you have to react and each one of you is like a 60 watt bulb and you know you keep you know disturbing the plant that is temperature so and it's a more complex problem in a party where people are moving because there might be groups in some zones and then you know now your stationary it's easier problem control so you can actually have a mathematical model which estimates comfort index by measuring variety of parameters like temperatures distributed at different places and so on then we can have a state feedback controller the state is this variable which is probably not directly measurable but estimable through a model okay I have a reactor I cannot measure concentration at each point inside the reactor but I have a model which reconstructs what happens inside the reactor okay so that's a state estimator using that estimated state I implement the feedback controller so you need models you need models and you need different kinds of models I talked about four layers of advanced control you need different models at different points we are going to concentrate on layer two okay dynamic multi variable time series models that's what we are going to look at this is what is the core of our course the modeling part aggregate production rate models steady state models these are not really really part of this this course there are all kinds of models you have qualitative models you have quantitative models you have mixed models like fuzzy logic and then we are not going to get into that too much we will look at first principle models which are coming from physics very briefly and what is their connection how do you how do you reduce those models to make them control the relevant how do you simplify those models so that you can do calculations fast other kind of models I am going to so these first principle or pedagogical models these models are great because you know if you can develop them if I can develop a model from first principles writing a partial differential equation for temperature distribution in this room nothing like it you know you can do very accurate predictions of what is happening inside the room but it's difficult to develop you need an expert okay and then to control many times you don't need those kind of models simplest example yeah qualitative models are the models which we have a simple example is that you know if I if I in a boiler let's go back to the boiler if I change the you know if I make a small change in the feed water flow rate then the level will increase by a small amount okay if I make a big change in the feed water flow rate the level will change by a large amount so I have a qualitative you know mapping between the cause and the effect this kind of models actually we use every day okay when we so these are these are not using some numerical values okay these are qualitative labels you know or you can have more gradation you can have medium this medium change will have medium effect large change will have large effect so all these kind of you know it could be large decrease or large increase okay so one can develop these kind of models and then use them for control it's not that it's not possible but developing a model is a very very difficult task so time-consuming affair the first principle model for this full tank system would be you know differential equations which are coming from physics the flow from tank 1 to tank 2 how it occurs and you can write simple pressure balance equations and develop this model so I'll give you this details but you are familiar with these kind of models this kind of models of course can be used for control if they are available but many times they are difficult to develop what we are going to do is to do something called data driven modeling data driven modeling is something in which a model which is qualitatively similar to the model that you develop for your car you do some small experiment you record in your mind how the car was behaving and you develop a model that links the cause and the effect okay this kind of models are good enough for controlling the car you don't have to be a mechanical engineer or automobile engineer to you know driver car right anyone can drive a car and he does develop a model he or she does develop a model for driving that car so we are going to develop this control relevant models only from data only from doing some working experiments with the plant you know I am going to inject some perturbation into the system observe how the output behaves then try to develop a correlation but not static correlation I may want to develop a transfer function model or I may want to develop a differential equation that correlates inputs with the outputs okay so I am fitting a differential equation into the data of output measurements and the inputs just full time setup again we have this in our lab the same thing which I have been showing you just now I wanted to do poking experiments so what I have done is these two walls there are two control walls here if you can see there is a control wall here this is a control wall and this control wall okay and the flow from this is split one part goes to this tank other part goes to this tank same thing is here this control wall some flow goes here remaining part of the flow actually goes to this tank so this is the same interacting system which so whatever we actually do in simulations will be able to actually go and see in the lab now I could come up and develop a model of this form for this particular system little bit complex task not so difficult for this simple system but it takes some time the other way is you know I just do poking I just do put up I just change the wall positions okay and I record how the level changes as a function of time okay here I have recorded how the level changes as a function of time and this data is then used to propose nonlinear or linear differential equation or a difference equation model and then you estimate the model parameters from the data okay how to do it we will be doing in this as a part of this course I will just show you the model that I got from MATLAB toolbox this is a model that is telling me that this is a discrete time model it tells me that the state x at time k plus 1 times it is done at a regular interval so it is a difference equation at time k plus 1 is related to the state at time k through this matrix file and to the inputs wall 1 wall 2 position through this matrix gamma and why are the measured outputs I am not going to measure all four levels I am going to measure only level 1 and level 2 lower tanks okay and this is a mathematical model this is a dynamic model difference equation model k is time here discrete time okay which I could develop only from this data okay I do not have to know the physics I am just perturbing the plant poking it getting data and developing the model model is pretty good you can see it is able to predict the behavior of level change as function of time the black part is the actual data and this magenta line is actually the model predictions model predicts is dynamic model develop from data predicts behavior quite well then I am you going to use it for control okay there is one more thing that I need to do once I have a model I need to do what is called as soft sensing or state estimation yeah well there are two ways one one approaches you go from physics and say that you know the states of the system and then try to do a structured model the other way is what is called as black box in which you just the states may not have any meaning physical meaning input and output has physical meaning the states are some mathematical constructs that help you to capture the dynamics so there are two viewpoints will cover both the viewpoints okay now let us say I have a model coming from physics and then I want to estimate some variables which are not directly measured I use what is called as state estimation what is the basic idea here in many systems there are some fast primary measurements like temperature pressure level pH this can be measured very fast using online sensors these are related to some quality effect okay and then I can estimate this quality variable using a mathematical model so what I want to do is since I have fast computers I want to use a mathematical model take some measurements fuse the data with the model predictions and construct estimate of a variable which cannot be directly measured that is why I am calling it as soft sensing okay and then the soft sensed variable is then used in my controller okay so I have fast rate data coming from simple measurements like temperature pressure and I have some irregularly sampled data coming from lab essays I fuse this data with my dynamic model and then this could be set of PDEs or ODEs and then I can estimate quality variables I will just well let us keep this particular slide there are various ways of doing this we are going to do it using what is called as a dynamic model based estimation we will be looking at this for about three weeks to four weeks so the modeling coming from data I will spend about four to five weeks I will move on to state estimation that is how do you estimate states given a dynamic model by fusing data so this will be about three to four weeks and then remaining part I will move to the advanced control algorithms so again the basic idea here is that you have an online model running in your computer and you have a process which is giving some measurements you actually use the mismatch between the model predictions and what is measured to correct the model online so we will look at this I will just give you an example of a reaction reactor this is a for those of you who are not chemical engineers I will just explain qualitatively this is a called tubular reactor there is a long tube and you start injecting the reactant here again a very simple reaction A goes from B B goes to C do not worry about what is A and B and C some reaction exothermic reaction heat generated during this reaction so there is a cooling jacket if you notice here this red part is a cooling jacket okay I want to actually know what is the concentration profile inside this reactor concentration measurements are extremely costly I mean just to give you a online concentration measurement one sensor might cost about 20 lakhs whereas one temperature sensor might cost about 20,000 so putting 5 or 10 temperature sensors is I can afford to do that I cannot afford to put concentration sensors even one forget about putting multiple okay but I would like to have concentration profiles inside because that is what matters to me when I am operating this system I can manipulate the cooling water flow rate I can manipulate the inlet flow rate which is going here I can manipulate the cooling water flow rate I am going to use this mathematical model which is actually coupled partial differential equations online I am going to use this model online to construct you know concentration profiles inside so this is a software sensor just demonstration of how concentration profiles change with time inside the reactor a practical example from my lab this is a software sensor again we have two tanks which are coupled there is heating element here and this hot water is then mixed with the cold water here okay and then I am interested in you know maintaining level of water inside this tank I am also interested in maintaining temperature inside this tank I want to estimate some quantity which is not directly measurable online what is this quantity I am doing this experiment in my lab and there is a heat transfer from this walls okay from this walls to the atmosphere now I want to know what is the efficiency of heat transfer I want to estimate some kind of effectiveness parameter you know because this is modeled through U A delta T those of you have done heat transfer course and then this U heat transfer coefficient keeps changing because of the changes in the environmental condition it changes whether depending upon whether you are doing experiment in the night or in the day whether you are doing experiment with the fan running or with the fan off you know all kinds of things can change how you heat transfer occurs to the atmosphere that has significant effect on the dynamics I want to estimate effectiveness of heat transfer we have a mathematical model and we are going to use this mathematical model let us not get into details we have a dynamic model which talks about rate of change of temperature in tank 1 rate of change of level in tank 2 rate of change of temperature in tank 2 I want to use this model I want to use this model and then I want to estimate effectiveness of the heat transfer coefficient U I have all three measurements two temperatures one level being measured you can see here we have developed a fractional parameter called heat loss parameter which changes with time and you can see that the heat loss parameter is estimated online using this temperature measurement well what we have done is we have taken one temperature measurement one level measurement we have tried to estimate other the temperature using our model online I am just comparing how the model based estimates of the temperature match with the measure temperature here okay so temperature 1 in tank 1 is being estimated through my observer and it is just being compared with the real measurements you can see that it is a good observer or good soft sensor I am able to reconstruct temperature in tank 1 using measurements of level and temperature in the tank 2 okay and I am also able to construct something which I cannot measure effectiveness of heat transfer online parameter measurement so I am measuring the parameter of interest you know constructing it online is this state feedback controller I can use this state estimators online and then do a state feedback controller and there are ways to design this how to design these controllers will be the last part of my course so we will end up by talking about we have developed a model from data okay then we talk about how to estimate unmeasured variables from this model and then we do controller based on you know this dynamic models so it is complete story starting from modeling to control okay so you end up in the industry somebody gives you says that look this is my plant this is my induction motor now develop advanced controller for this you will say okay I know how to go about it I will start with poking a developer model validate my model use it for controller system observer design controller design and develop an advanced controller which is a multi variable controller that is what we want to do well this is entire field of advanced control is an ocean I am going to just touch tip of an iceberg just remember it is not possible to cover everything but idea is to sensitize you about things that are happening outline of the course is something like this as I said there are three modules one is system identification how do I develop online control relevant models purely from data or from physics I am fine with both but I am going to emphasize more on how to develop it from data from physics you have been doing it in your engineering courses I do not have to worry too much data driven modeling very very important state estimation you know given a model how do I estimate internal variables which are not measurable state estimation will look at some popular techniques like leonberger observer or kalman filter we will move on to outline model based control I will talk initially about classical quadratic linear optimal control theory which is which forms the foundation of linear model predictive control and then finally I will end with linear model predictive control my evaluation scheme well I am quite decided about mid semester examination will be 20% and end semester about 40% I am still debating how to split between the quizzes and the projects in this particular course doing actually simulation experiments is very very critical you will not understand many concepts you know it is like listening to lectures on swimming unless you jump into water you cannot understand how to swim okay so unless you do this exercise of actually doing simulations of what is happening because some of these things are so complex that there is an exam question on that you have to actually implement and see how it works and understand so the project component could increase to from 20% to 30% quiz component could go back from 20% to 10% so that I will take a call after the population stabilizes and then how many projects we can generate because and how to go about doing it these last two parts are little fuzzy and we will take a call little later so this is the breakup and this is how we are going to go about so this is an intensive course on advanced control starting from data to control okay everything is covered so welcome about and let us hope you will enjoy this journey together