 is this course optimal control course is divided into two parts. First part is the static optimization problem which we have discussed extensively last few lectures and next part is the dynamic optimization problems. So, we will briefly tell what we have covered in static optimization problems first we have defined or just we have with an example we explain what we mean by the optimization problems design. Then we have established suppose we have a function objective function which is a multivariable function. Then how to get the necessary and sufficient condition for that objective function which is unconstrained optimization problem let us say. Then in order to find out the sufficient condition we need some background of what is called positive definite matrix negative definite matrix positive semi definite matrix negative definite semi definite matrix. We have tested this matrix whether it is a positive definite or negative definite matrix by using silver star matrix criteria. Then we have solved this problem optimization problem which is unconstrained optimization problem by solving some numerical methods Newton Raphson Newton method Newton Raphson method. Then constrain then your what is called conjugate gradient method gradient method and other methods we have discussed extensively. After that we have seen that what is the difference between the unconstrained optimization problem and constrain optimization problem. Then we using the concept of Lagrangian multiplier we converted the constrain optimization problem into unconstrained optimization problem. One can solve this problem by what is called KKT condition we established the KKT necessary and sufficient condition simultaneously. After that we have solved the problem of what is called that is linear programming problem by using the numerical method that is called simplex method we have used it. Then after solving this simplex method the optimization problem whether it is the constrain or unconstrained optimization problem we can solve by linear programming method. Then we have concept we have given the concept of what is called dual and primary problems. One can solve the dual problem from primary problem solution and vice versa that we have seen it. Next we have given the concept of what is called convex set. Then what is called quadratic optimization problem. Then what is called quadratically constrain quadratic optimization problems that problems we have discussed it. The solution of this problem one can solve by numerically or by using once we obtain the necessary condition of this one. Then you can solve by using what is called our LP method linear programming methods. Then finally we have discussed briefly the outline of what is multi objective optimization problems. And in multi objective optimization problem we cannot get it optimal solution of this problem that we got it pair to optimal solution. So, this is the first part of the work course that is static optimization problems. Next part of the work course is a dynamic optimization problems and our constrain everything objective function is there our constrain is may be a dynamic in nature the equation. So, our next topic is our dynamic optimization. So, first we discussed the first we discussed the basic concept of what is function and what is functional. So, let us call concept between function and functional this as we know the function is nothing but a mapping of one domain to another domain. Any element in some set when you will map this any element of this set to another set another possible set it is called the mapping from one domain to another domain. And it is nothing but a for an example you can say function it is a mapping from it is it is a mapping in assign each element of some set to a unique element of possible different set. Suppose this is a set some set which elements are the x any point in this element x that is mapped to a another set possible another set let us call y small y this is the corresponding this let us call this point is mapped to this point. So, it is nothing but a mapping in other words with an example if you can know that if you have a function f of x y is equal to f of x which is a function of 2 s square plus 7 agree. Then this any value let us call in this is mapped to other set value of y here. So, this x is a independent variable and y is a dependent variable. So, the value of y depends on the x this. So, this is function is nothing but a mapping from one each element of a set to another set with a unique element we can the next is functional. So, it is an important element of a set and concept of calculus of variations agree. So, this is functional is nothing but a function of a function in other words you can say it is a function of a of other function. Let us take one example functional is nothing but a function of a function agree example suppose this integration t 0 to t f and v of t d t. Let us call v of t is the velocity of a vehicle and we want we have started the vehicle at time t is equal to 0 and completed the its motion at time t is equal to t f. Now, we want to this integration means this is the velocity of a vehicle velocity of a vehicle and this integration means how much path is traverse by the vehicle from the time t is equal to 0 to t is equal to t f t is 0 is the initial time and t f is the final time. So, this indicates the path traverse by the vehicle during the period during the time period this means. So, this is the v is a function of time j is a function of v. So, it is a function of a functional agree. So, let us see and if you see in general we can write let us call we have a function j is a function of time and t which is nothing but a just how it is t f of t then it is a v x of t of t d t agree. This is the functional j is a functional is a function of a function then this is our functional agree. So, what do you mean by the next question how to find at the increment of the functional by definition increment function that is called del j is equal to del x plus delta x t of t minus the functional value when x is part of by delta x plus delta x of t minus the functional value when x is part of by delta x plus delta x and difference of these two functional value is called the increment of the functional and increment of the function the difference of two function value at what is called x is equal to when x is part of x plus delta x t and then originally is x of t of t this functional increment functional. Let us see if you just do the Taylor series expansion of this one because delta x is very close to the x of t you can think of it this equation one the equation one you can think of it like this way. Suppose this is t this is our j of so this is our a and this is b and this is the x star of t I will explain what is the x star of t and this is x a which is equal to x of t is equal to x star of t plus delta x of t and this point is let us call b and this point is a. So, this is time t and we have to this point a is moved from a to b along the trajectory of x star and x star is the what is called optimal trajectory. That means to reach from the point a to b what is the optimum path of this one traverse that is if you move along the x star and around the x star I have considered which is not a optimal path, but sub optimal path around a path around a or a never would of x I have consider another path that is x star of t delta f x c, but this is not the optimal path it is a sub optimal path. So, our problem is let us call j is this one. So, if you see this one then I can write it that to that one what is called j if you do the Taylor series expansion of that one is a function of x and t Taylor series expansion expansion. So, delta j I can write it is del j along the trajectory of this one del j x of t of t plus I am writing from this equation plus del j and differentiation of x of t del x t and this x t is equal to x star of t into delta x t and I am considering this is a single variable case this agree and plus then half del square j del x square of t x star of t at and delta x of t whole square plus higher terms minus of that term minus j x star of t delta t of t. Now, this and this cancels. So, we have consider a object what is this one function is a function of x t let us call function. So, incremental functional value j is nothing but a that along x star near about x star there is another trajectory is x plus delta x t. So, what is the incremental function value of this one. In other words you can say if the function value of the functional the function value is x which a function of x t of t if you part of x t by delta x then function value is this one what is the difference of between two functional values is called incremental transformation where the perturbation around x t is very small. Then Taylor series expansion if you do it is like this way and we assume that after the what is called third order terms the after second order terms we are neglecting that contribution in the expression because the delta x is very small. So, if you do this one I can write delta x delta g is nearly equal to this one is delta j of this delta x t x t is equal to x star of t into delta x t plus delta square dot of this delta x square of t and half is there. Then x of t x star of t delta x of t whole square and we have neglected neglecting higher terms higher order derivatives order delta x star derivatives. If you see in the example though I have shown you it is an example it is in general we are a point is there we have to move the b point along the trajectory x star is the optimal trajectory for which the functional value of this one is minimum. Then I am telling that around this path and very never root of this x star that is optimal path there is another path is there then what is the functional value of this one this one. Then difference of this functional optimal path and sub functional difference of this one optimal trajectory and sub functional trajectory what is the difference of the functional value that is coming like this way while we have neglected the higher order derivative terms. So, our condition is if you recollect our the basic necessary condition for single variable case is nothing but a first derivative of this one must be 0. So, this I mean just for simplicity I am just using delta j is the this part and delta j square is for this part. So, this is called the first variation of functional and this is called second variation of functional and this two variation is important to take a conclusion whether the functional is a minimum or maximum. So, necessary condition a functional will be extremum that delta j must be 0. So, our necessary condition or a first way write it where is delta j delta j is nothing but a delta j capital J delta x of t x of t is equal to x star of t delta x of t and delta square j this is a second variation of the functional is a delta square j delta x square of t is x of t is equal to x star of t delta x of t whole square. So, keeping in this mind we know the necessary condition the necessary condition for this one is your delta j must be equal to 0. So, our necessary condition is delta j is the this is the our necessary conditions necessary condition for the functional to be extremum for the functional to be extremum. In either minimum or maximum then delta square j should be if it is greater than 0 this implies the functional is value is obtain is minimum sorry minimum value functional and delta square j is less than 0 means negative then this is condition for minimum value of the functional. This is greater than implies the maximum value of the functional. So, let us take an example and see that how first we will see this is the just as to be the necessary condition for single variable case more details will go if it is a multivariable case j x will is a variable of n variables are there x 1 x 2 x 3 dot dot x n and the functional is a function of x t we have shown it may be in general is a function of what is called x t and x dot t t or second derivatives also there is a may be functional functional may be function of x x dot x double dot t and so on. So, let us see a simple example that how to obtain the functional that I just mention it is just now suppose we have a point a and point b and this point is a time t is this one that here is your x of t in this direction. Initially the point a has a coordinates x of t 0 of t 0 and this is the function of and this is t 0 and here is your t f and this coordinates is equal to this coordinate is x t f comma t f is the coordinate of this point and this coordinate is your x t 0 t 0 and in short this is equal to x of 0 and t 0 x of 0 and t 0 and that is in short you can write x of x t f x f you can write it if you like it x f and t f. So, our problem is that what is the what is the length of this arc optimum length of this arc a to b a to b I have to move what is the optimal length of this arc while we move from a to b that is that means. So, in order to that let us call this is the optimal path of this one how to find out. So, let us take one point is here this is delta x d x you can say it is a d x and in time d t it is in time d t it is that a position of the x is change d x and this length is d l this arc length is d l. So, we can write it this our problem is length of the arc connecting two points a and b which coordinates are x of t 0 and b t f x of t f in the x t plane. Find the length of the arc connecting the point this and this x f plane. So, let us formulate in mathematical form let us call this you see we can write it this one is small element in d t second this distance covered is d x. So, I can write it this is almost 90 degree this for so far we consider the small incremental time what is the change in x. So, I can write it d l square is equal to d x square plus d t square this one. So, from this equation one can write it that d l square is equal to I am taking the common of d t square d t is a small incremental time that square. So, if you take it what is 1 plus d x and d t whole square and it is nothing but a 1 plus d x d t is nothing but a velocity or you can write it x dot of t this square then this d t square. So, what is d l d l is that small incremental the arc along the arc d l this is I am writing d l is nothing but a square root of 1 plus x dot square of t and it is d t. So, what is the length when you when you move from time t 0 to t f what is the arc length of this one you have to integrate both side that d l you have to integrate from t 0 to t f. So, this is equal to integration t 0 to t f root of 1 plus x dot square t d t and that length this in length let us call is d f l this is t 0 to t f root of 1 plus x dot square is t 0 to t f root of 1 plus x dot square is this. So, I can write it that this is nothing but a function of you can write it function of if you write it this l is a function of we can write t 0 to t f v function is a function of x dot of t of t d t. Now, we are if you see at time t is equal to 0 what is the distance covered from a point to d that means what is the arc length of this one and this is nothing but a you expect the arc length of the l which is defined by l is equal to this is nothing but a function of a functional. So, this is the basic any problem it is giving to this one you have to formulate into this form agree. So, that once you get it this one this optimal length of this one you say from a to b you can find out by using what is called that our necessary and sufficient condition agree necessary condition and in first you find out the incremental of the functional from there you find out the first variation of the functional assigned to 0 and second variation of the functional will give you the what is the what is the whether the this length of this will maximum or minimum of that one. So, now let us take a specific problem to establish that in general that what is called the necessary and sufficient condition for this problems. So, our problem is now our problem is to find the optimal trajectory x star of t for which the functional j is a function of t comma t this will be t 0 to t f v which is a function of x x dot of t of t d t. Let us call we have a given the functional which is function of the integral t is function of x t x dot t and t agree. So, you have to find out the optimal trajectory x star which in turn you will get x dot star you have to find out the optimal trajectory x star such that this functional is maximized or minimized or x t m agree. So, this is our problem statement. So, solution of this problem we made an assumption that we of this has first and second derivative second partial derivatives with respect to all its argument as a first and third derivative with respect to all these arguments agree and t 0 and t f is fixed t f t f f is and they are the end points end points and t f t 0 and t f are fixed and the end points are fixed. It is a more specific case we have considering this is means that this means we have a that functional agree we have a functional and the functional value we have to integrate from t 0 to t f and it is nothing but a I told you I mentioned I told you you have to look for a optimal trajectory x t such that this functional value is optimized. So, let us call that optimal value optimal value of the function optimal trajectory of the function x t is like this way when we moved from a to b this two end points a to b and x star is the optimal trajectory for the function for which the function value is x t m and near about this or neighborhood of this one there is another suboptimal trajectory x t plus delta x t agree. So, the x t and delta x t this one and this is I united by this is x a of t and x of t very close to very close to x star of t. So, in this direction t and in this direction is your x of t. So, what is this coordinates at time t is equal to 0 that coordinates is x t 0 which we have written x of f and this coordinate is x t f of t which is united x f of t f that this is the coordinate this is the coordinate of that one agree. So, what we can write it first step in order to solve this problem, but still now I am considering x is a single variable, but our of functional is a function of x and x dot t and t in general it can be a function of x x dot x double dot and so on. Not only this that x may be a multivariable function that means x may be a vector x 1 x 2 dot x n similarly x dot is x 1 dot x 2 dot dot x n dot. So, in such situation that how to handle this one for the time being I am considering x is a scalar quantity scalar variable. So, step one x star of t optimal trajectory x a of t is the trajectory which is very close to the optimal trajectory and it is suboptimal trajectory for which the functional value is not optimal is close to the x star of t and satisfies the following boundary conditions. What is the following boundary conditions that means this condition x I can write it x star of t 0 is equal to x 0 agree. So, this boundary condition I can write it as x star of t 0 and write it x f t 0 is nothing but a x star of t 0 is equal to x of 0 you see this value along this value for this curve and for this curve is same. So, I have to x of t 0 is same as x star of t 0 this another is x of t f is equal to x star of t f is equal to x f and these are the boundary condition not only this you can see x delta x of t at time t is equal to t 0. That means any time t is equal to this is the delta x of this delta x of t agree let us call t is equal to t 1 what is the change in from optimal trajectory and suboptimal trajectory this is the change in value. So, at this point both the function value suboptimal and optimal function value are same. So, there change in function value also will be 0 similarly at t is equal to t 0 delta x of t t is equal to t f is equal to 0 and this boundary conditions are satisfied that you have to satisfy that this condition that means we are considering a and b both are fixed point agree. So, before we go to the second step before we go to the second step we have a one lemma we have to use it for solution of this problem. So, this just this lemma is same as this is like this way and proof of the lemma I will skip it if time permits I will just do it at the end of this lecture. Suppose this is the important lemma when we will establish the necessary and sufficient condition for a functional. Suppose that a function g t is continuous on the interval t 0 to t f a function g t is continuous over the interval then then one can write it then t 0 to t f g t delta x t d t is equal to 0 then integrate the g t multiplied by delta x t delta is the change in x value in x over the interval 0 to t is 0 if and only if necessary and sufficient condition g of t must be 0 over the interval anywhere over the interval g 0 at every point every point of the interval t 0 to t f. So, this is the word important lemma of this one now we will use this lemma when we will establish the necessary and sufficient condition for the functional values. So, the proof if time permits at the end of this class I will do it otherwise next class step 2. So, what is the necessary and sufficient condition that we have to write it to find the trajectory to find a trajectory x of t connecting t 0 x 0 and t f x f between this t 0 x 0 this point and this point connecting the trajectory this one this point along the along which j the functional value will be extremum x dot of t of t is extremum that is our problem find the trajectory x star of t find the trajectory x star of t which is optimal you have to find out x of t connecting between the two which is extremum that means we have to find out x star. So, our necessary condition you see necessary condition to the functional to be optimized is del j is equal to 0 this is the necessary condition, but sufficient condition condition del square j is greater than 0 if del square j greater than 0 is minimum and del square j is less than 0 is maximum value of the functional of the functional and we have derived it you see this one earlier in our static optimization that what is the necessary condition and now for functional case of the single variable case we have also say del square j greater than 0 for minimum value of the functional. So, let us see what we can get it from equation number of 1, but now our functional is a function of x and x dot. So, from equation 1 that is our starting with this one you see. So, this is you call equation number 1 I am referring this equation our problem statement is this equation from equation 1 incremental functional value j is equal to j x star of t. x star of t plus delta x t x dot star of t plus delta x dot of t this minus j x star of t x dot star of t t and if you do the Taylor series expansion of this one what is x star of delta t just now we have seen this again if it is optimal trajectory of this one never of this one or very close to this optimal trajectory there exist another path which is sub optimal agree that that is. So, if you do the Taylor series expansion this one I will skip the detail steps of this one then you will get it del v dot del x of t. This transpose put the value x star of x t x star of t around x star I am doing the Taylor series expansion x t is x star t x dot is equal to x dot star of t into delta x of t plus del v dot del x dot of t whole transpose because this is a row vector column vector transpose a row vector then you multiplied by this is a column vector is a scalar quantity. So, that again you find out x star of t x star of t x t x dot of t. So, x star of t is equal to x dot star of t into delta x dot of t this one then second order part will be half then find out del square second derivative of this one with respect to x star of t x dot of t is equal to x star of t into delta x star of t x of t whole square plus twice del square v dot del x of t del x dot of t. We have done this thing several times in our static optimization problems this one find these values x star of t is equal to x star of t and x dot t is equal to x star of t and it is del x of t into del x dot of t this plus another term del square v del square v dot of t del dot square of t evaluate the value second derivative value of this one. This is what we have d it is v is a scalar quantity we are differentiating this with respect to x will get a vector again differentiation with respect to x will get a matrix. So, this matrix and that matrix is a symmetric matrix. So, that x of t is equal to x star of t and x dot of t x dot of t is equal to x dot star of t into delta x dot of t. Whole square whole bracket this is the whole bracket of this of that one and then higher terms this is the terms is left over increment of function. So, and because what we will do it this one you write this expression for j and then do it what is the j expression if you see the this expression is what integration of t 0 to t f this expression integration of t 0 to t f v x of t x dot of t of t d t. Similarly, this one so if you do this one I am now doing the what is called Taylor series expansion of that integral part of this one. So, your whole thing if you look at this expression the whole thing you have a t 0 to t f and this curly bracket of this one and after that this curly bracket is ends and d t. So, if you see the j expression t 0 to t f v x dot d t and similarly, this expression is what t 0 to t f v x plus delta x of t plus x dot t plus delta x dot of t t this one into d t that one. So, this after writing this one that this Taylor series expansion we are doing t 0 to t f t 0 to t f both cases it is common. So, I will get it this expression so our basic things here you see what is the necessary condition we will write it step. Let us call this equation what we are writing the equation number two the equation number two that step three first variation of the functional first variation of the functional del j is equal to 0 and in your case del j is what if you see this one t 0 to t f this is the del j t 0 to t f delta v dot del x of t whole transpose. So, from now onwards I will write this I will write it x t is equal to x star x dot is x dot is equal to x dot star by simply star that means this star indicates x t you replace by x star x star of t x dot t you replace by x dot star of t into delta x of t plus del v dot del x dot of t plus delta x of t whole transpose star means x t is replaced by x star t x dot x dot t replaced by x dot star t at x dot of t this one and this must be equal to 0 that, but this d t is there agree. So, this must be this is the first variation of the functional must be 0 so this one can simplify this part by integration by integration by parts like this way if you see this one our basic integration del u del u del v which we can write it u del v plus v del u integrate both sides integrate both sides t 0 to t f del v del v del v del v del u del v is equal to u is constant now t 0 to t f del v plus v is constant integrate t 0 to t f del u agree. So, what is this part this part is nothing, but a del u d u v then limit is t 0 to t f agree this part we can write it u v and integration that is limit is t 0 to t f this part and right hand side as it is right hand side as it is. This thing u del u t 0 to t f del v plus this one that means this terms are here right hand side. So, if you use this one here this expression here we can simplify further that one agree and this simplification you see I can write it that one what is called from here to here that is you can write it this is integration of this is you see you are differentiating this with respect to x and then put the value of x t is equal to x star. So, this is the constant term agree that is constant term you got it evaluated this one and del x dot I can write it this del x dot I can write it d of d t into d of d t into x of x of x of x of I can write it d of d t into del x of t del of x t into that our d t is there. So, differentiate of this with respect to del x of t means del x dot in general what we write it differentiation of x dot is equal to d of d t x t. So, this is del x of d t is equal to del x dot is equal to d of d x t del x this one. So, if you consider this part now last part of this expression then you can write it this is t 0 to t f del v del x dot of t whole transpose star agree then you can write it d of d t del x of t this d t. Now, you consider this is as you consider this is as a v you consider this is as a v and this is you consider the d of d t del x of t this d t. Now, you consider this is as you consider this is as a v you consider this is as a v and this is you consider as a u u. So, it is nothing but u this this cancel u d v. So, u d v you see u d v u d v I can write it that u if you consider u d v this I can write it that del v dot del x dot of t whole transpose star into v means del x t agree and this values is from t 0 to t f. So, this is u v u v t 0 to t f I have written and that is minus if you take it this is minus v means del x del x is the scalar quantity del x and integration of del u integration of d u d u integration is what if you just this one integration t 0 to t f and you have to do the d u d u is your del v dot del x dot agree. It does not matter if you multiply by this this differential and you have a d x that is your u v agree. So, that will be your del x del x of t square u is this one and your v is what del d v d v is nothing but a d v is del t del x this one you can write anyway we will discuss this part next class more clearly my aim is this one this term I can using this expression I can make it simpler form and then I can establish the del j 0 what is the condition for del j 0 to be become 0. So, using that lemma what we have discussed we can find out the necessary condition for this one. So, here I will stop it now and the lemma which we will discuss we will also explain or proof the next class.