So let us have some more observations on the dynamical response of discrete time systems. So let me have some comments before we close stop it. So what we have in front of us is some set of observations which are of special importance when you consider the pulse transfer function.
So the first thing is that a for an N discrete systems in series. Till now we considered a single system. So in the previous lecture, we took the pulse transfer function of system, which was first order and it was equipped with a 0 order hold.
We determines the first transfer function multiplied it with the z transform of the input did the inverse z transform. Now if you have N systems in series, what would you do? Well, let us see what you would do for a continuous domain system, you have, imagine system of two sub systems in series.
So you have an input u, it goes to the first system which has the transfer function g 1 of s, it gives an output y 1, output y 1 access the feed to the second system which has the transfer function g 2 of s, you get the ultimate output y 2. So what are the different relationships which we can write? I can write g 1 of s is equal to y 1 bar of s divided by u bar of s and I have g 2 s is equal to y 2 bar of s divided by u bar of s and therefore, from sorry y 1 bar of s.
So let me write this properly, this would be y 2 bar of s divided by y 1 bar of s. From where I can write g 1 s, g 2 s, is equal to y 1 bar of s divided by u bar of s multiplied by y 2 bar of s divided by y 1 bar of s, which is equal to what? y 2 bar of s divided by y u bar of s.
So therefore, I can write g overall simply g of the process s, as g 1 of s, g 2 of s, and in fact, we did make use of this fact in the previous lecture by writing g as a product of g p and g h, the process transfer function and pole transfer function, is the same concept here. So therefore, this is a general observation that g overall of s for an N system would be g 1 of s g 2 of s, up to g 1 of s. Well, now I can do this I can make an analogous case on the right hand side for a discrete time system, you have u which is discrete now is fed to the system, which has a transfer function g 1 of z which acts as an output the discrete output y 1 fed to that is to second transfer function first transfer function in fact, g 2 z gives you the discrete output y 2.
So I can try exact same steps here, because if you remember the block diagram, which we wrote in the previous case, our expression was that y 1 of z in fact y of z is equal to g of z multiplied by u of z. So I can do this for all the individual transfer functions from where it is not very difficult to see that g overall z would be equal to what? g 1 z g 2 z up to g capital N Z.
For N systems in series, your transfer function is simply the multiplication of individual transfer functions, this is applicable for continuous as well as discrete time domain fine. Then what else for a N continuous processes in series with Laplace domain transfer function as g 1 s, g 2 s, and so on, Laplace domain transfer function. The pulse transfer function has given us this formula well did we make use of this fact beforehand.
Well, we did what this practice is that g of z is the z transform of the individual transfer functions in Laplace domain. So let us see if g 1 s, g 2 s, up to g n s are the Laplace domain transfer functions then what would be g overall or simply g? Just now we develop this particular expression this would be g 1 of s, g 2 of s up to g n of s.
Now you would like to determine the corresponding pulse transfer function, how would you do that? We said that you whenever you have g of s you determine g of t. If you remember the scheme which we wrote in the previous lecture, you are in s domain, you go to t domain, from where you go to z domain.
So I get g of t, I discretize this, I get g of n T and from g of n T I get g of z, the flow which is been later on far right. With some expertise and experience, I also said that you can write this directly. So what will I do?
I now have g of s as this multiplication, so I will get the overall transfer function inward that to get the get g in terms of T, discretize it and then again do this transform, which basically means that g z. Let me write this in this manner, g z is what the Laplace transform, the z transform of g s, you see this going from s domain to z domain, which in other words means g of z as the z transform of g 1 of s g 2 of s, g N of s. So this is what which has been stated.
What else? In general g z transform of G 1 s 1 small correction then it has to be a multiplication not a comma. So G 1 of s, G 2 of s uo to G N of s is not equal to G 1 of z, G 2 of z, G N of z and so on.
Let us try to understand what this means. So I have this overall transfer function g of s, which is equal to g 1 of s and g 2 of s, up to g N of s. How do I obtain the corresponding z transform?
Let me write this again, S domain to t domain to z domain alternatively directly my flow is very clear. So how do I go from g of s? Is a multiplication of individual transfer function to g of z.
What I do is this and how do I get g of s, I have g 1 of s available with me, I have g 2 of s available with me and so on, I have g N of s available with me. What do I do? I multiply them multiply, multiply, multiply and then I do this, for the multiplication I do a z transform, I get g of z.
Let me repeat I had these individual transfer functions available with me, I multiplied them first and then whatever product I got, which is g of s I took the transform of it z transform. I can do 1 more thing, I have g 1 of s, g 2 of s, g N of s. Now I can do this thing first, I from g 1 of s I get g 1 of z, from g 2 of s I get g 2 of z and from so on from g N of s I get g N of z.
And then I do this thing I take this I multiply. So this is taking z transform, taking z transform, taking z transform and then I multiply them, what do I get? g 1 of z, g 2 of z, up to g N of z, which is the correct method.
Multiplication first followed by z transformation or z transformation first followed by multiplication are these in other words, are these 2 operations equivalent can you do 1 operation followed by other or second operation followed by the first, would you get the same answer in general you will not get the same answer, the only method to get this answer the pulse transfer from overall pulse transfer function correctly is to first multiply your transfer function in the Laplace domain itself and then do z transformation in the end. And why does this happen? There is an elaborate proof which is not in the scope of this current discussion, we will not go into those details in this particular course.
What needs to be remember this, get the overall transfer function in Laplace domain first by multiplication and do z transformation later, not the other way around. Now we all always looked into a single input single output process, did this a transformer analysis, but for the transform domain analysis we did the transform domain analysis for multiple input multiple output systems as well, so is it possible that we do this analysis for multiple input multiple output discrete systems? Turns out that yes, it is possible.
Now when you do a multiple input multiple output MIMO analysis of discrete time systems, you get a system of difference equations. Let us quickly see how do we get it for single input single output system and then can we extend this. So for a single input SISO system we can write the corresponding equations as a d x by d t is equal to a x plus b u, this is the dynamical equation, let us call this as equation 1 and y is equal to c x plus d, this is the equation for the output variable.
So to determine the corresponding discrete time equations for this SISO system, let us first discretize equation number 1 we can write x n plus 1 minus x n upon T is equal to a x n plus b u n. Let us do some simplifications this is x n plus 1 upon T is equal to 1 upon T plus a x n plus b u n, which can be further simplified to x n plus 1 is equal to t times 1 plus a t upon T plus b T times u n, in other words x n plus 1 is equal to, okay so we forgot x n here so it should have been x n. So 1 plus a T times x n plus b t times u n.
So I can make a general observation that a T b are all constants. So if I set 1 plus a T as a 1 and b T as b 1, then I can write my difference equation for the dynamical variable as x n plus 1 is equal to a 1 x n plus b 1 u n, let me call this equation 3. And what is the meaning of equation 3?
If you know x n the value of the dynamical variable at any instant of time with an index n and the corresponding value of the input function at the same instant of time, then the value of the dynamical variable at the next instant of time would be given us x n plus 1 is equal to a 1, a constant times x n plus v 1 another constant times u n. And then the way we converted equation number 1 to the discrete form from equation number 2, I can simply write y n is equal to c x n plus d u n, let me refer this equation as equation number 4. So the value of the output variable at any given instant of time can be obtained by multiplying the value of the dynamical variable at that instant of time by c and followed by addition of the multiplication of d with the value of the forcing function at that given instant of time.
So let us see how this scheme works. You have u and u would be known at, u at 0, u at T, u at 2 T, and so on, and all of these would be known, let us call these as u 0, u 1, u 2 and so on. The initial condition, because equation number 1 is an initial value problem.
So all of these are known. Since equation number 1 is an initial value problem, x at 0 would have be known, so this is x 0, and this is also known. So if I know u 0 and I know x 0, then from equation number 3, x 1 would be what?
a 1 times x 0 plus b 1 times u 0. And since x 0 and y 0 are known, you now know x 1 at time t, this is known. Now what is the meaning of equation 4?
y at 0 would be equal to c times x 0 plus d times u 0, which means y at 0 would be known because x 0 and u 0 are known. Now since x 0 and u 0 are known, you can determine you could determine x 1. So therefore, from x 1, which is known now and u 1 which is always known, you can determine y 1 as c x 1 plus d u 1 and this way you can continue this whole procedure.
So the basic method is that you start with the dynamical variable, the dynamical equation, discretize it and we what we learned is that from equation number 3, your value of the dynamical variable at next instant of time can be known from the value of the dynamical variable and the forcing function at the current instant of time. So x n plus 1 would be a 1 x n plus b 1 u n, a 1 and b 1 are constants. Further y n, the value of the output variable at a given instant of time can be calculated from the value of the dynamical variable and the value of the input function at that given instant of time, so now this helps me propagate my system.
There is only one thing which is left that you have y is equal to c x plus d u, from where you wrote y n is equal to c x n plus d u n. Which means to determine the value of the output variable at a given instant of time, you need the value of the forcing function as well as the dynamical variable at that instant of time. Again we since we are having a SISO system single input single output system, can we devise a method such that I know only I need to feed only the input variable and I get the output variable directly.
Well, that is possible, I have let me refer this to as equation 1, refer this to as equation 2, and x n plus 1 is equal to a 1, x n plus b 1 u n, this is what we obtain by discretization of the dynamical equation. So let us see how I can get the relationship directly between y n u in the discrete form. So from equation number 1, I can write d y by d t is equal to c times d x by d t plus d times d u by d t.
So let me discretize this equation now therefore, the denominator d t would get cancelled out. So I can write y n plus 1 minus y n is equal to c x n plus 1 minus x n plus d u n plus 1 minus u n, I hope that you are able to see that throughout the left hand side and the right hand side, you will have a division by capital T and we have cancelled it. So I can write y n plus 1 as y n plus c x n plus 1 minus c x n plus d u n plus 1 minus d u n.
And what is x n plus 1 from equation number 1? Equation number 3 it is even x n plus b 1 u n. So let me make use of this.
So y n plus 1 is equal to y n plus c times a 1 x n plus b 1 u n minus c x n plus d u n plus 1 minus d u n, from where I can write y n plus 1 is equal to y n plus I will collect the terms having x n, so c a 1 minus 1 times x n plus c b 1 minus d times u n plus d times u n plus 1. Well, after doing this rearrangement, I have gotten rid of x n plus 1, but I still have x n which means, I need to know the value of the dynamical variable at the current instant of time and this is what I do not want. So from equation number 2, I can write x n is equal to 1 upon c y n minus d upon c u n.
So I can substitute equation number 5 in equation number 4 and what I get is this, y n plus 1 is equal to y n plus c times a minus 1 times now x n is 1 upon c y n minus d upon c u n, this is for x n plus c b 1 minus d times u n minus plus d times u n plus 1. And we can do further rearrangements to basically see that y n plus 1 can be written as some quantity alpha, where alpha will be in terms of a, b, c, d times y n plus some quantity beta times u n plus some quantity gamma times u n plus 1. Now see what has happened, when I have obtained equation number 6.
If I know the value of the output function at the current instant of time and the value of the forcing function at current instant of time and the next instant of time, which will always be known, you can know the value of the output variable directly without having to calculate the value of the dynamical variable. So x 0 sorry, u 0. So let us see the scheme now, u 0 is known, u 1 is known, u 2 is known and so on, all of these are known, because you have the function forcing function.
Because you have an initial value problem x 0 also would be known. And since x 0 is known, y 0 is equal to c x 0 plus d u 0 this would be known. And since use 0 is known, u 1 is known and y 0 is known, y 1 is equal to alpha times y 0 plus beta times u 0 plus gamma times u 1 is known and therefore, in this manner, we can propagate our system.
So this was the way to convert single input single output system to a difference equation form. So now let us extrapolate this to obtain the relationship for MIMO system. So let us consider a second order 2 input, 2 output system, and then we can generalize it to n-eth order m input p output system.
So how will you deal with second order input-output, 2 input, 2 output system? My equations would become d x 1 by d t is equal to a 1 1 x 1 plus a 1 2 x 2 plus b 1 1 u 1 plus b 1 2 u 2 d x 2 by d t is equal to a 2 1 x 1 plus a 2 2 x 2 plus b 2 1 u 1 plus b 2 2 u 2, these are my dynamical equations the output equation are y 1 is equal to c 1 1 x 1 plus c 1 2 x 2 plus d 1 1 u 1 plus d 1 2 u 2 and y 2 is equal to c 2 1 x 1 plus c 2 2 x 2 plus d 2 1 u 1 plus d 2 2 u 2. Now we need to discretize this system.
From a single input single output system, we saw that your dynamical equations can be described discretized in the form x n plus 1 is equal to a 1 times x n plus b 1 times u n. Now you have 2 dynamical variables x 1 and x 2, but if we write this in this form subscript x 1 x 2 in our current notation, this will become the time. So you want to avoid this confusion.
So instead of subscript we will use superscript for the variable, so superscript x 1 x 2, so superscript x 1 at the current instant of time would be n, x 2 at current instant of time would become x 2 n, in the next instant of time after T, after T this will become x n plus 1 the same variable 1 and x n plus 1 the same variable 2, so this is how the system is hopping to the next state. So therefore, what would be my discretized equations I hope you are able to see this that you will have x n plus 1 is equal to a 1 1 x n plus a 1 2 x n plus b 1 1 u n plus b 1 2 u n except that now you need to account for the indices corresponding to the variable. So for first equation for first variable first variable, this will become second variable, this will become first variable, this will become second variable.
Similarly, x n plus 1 for the second variable would be a 2 1 x n from the first variable plus a 2 2 x n from the second variable plus b 2 1 u n from the first variable plus b 2 2 u n from the second variable. So this is the discretized form of the dynamical variable. The corresponding form for the output equations will be simple y n for the first variable would be c 1 1 x n for the first variable plus c 1 to x n for the second variable plus d 1 1 u n for the first variable plus d 1 2 u n for the second variable.
And finally, y n for the second variable would be c 2 1 x n for the first variable plus c 2 2 x n for the second variable plus d 2 1 u n for the first variable plus d 2 2 u n for the second variable. So, these are the discrete equations or difference equations for your discrete system. And you can follow the exact same protocol for evolution of the system that if you know x 0, you know u 0, you can determine y 0 from x 0 and y 0 for the first and you will determine this for all the variables and substitute in equation 1 and 2 and after you get the values from equation 1 and 2, you can subsequently substitute the values in equation 3 and 4 to get the evolution of the output variable.
Alternatively, you can take a longer path and come up with explicit expression for y n in terms of x in terms of u n, the way we did for the single input single output system. You can model multiple input multiple output system using the difference equations which we wrote here. And then for multiple input multiple output discrete system, you can determine a discrete transfer function matrix.
Let us see the genesis of this discrete transfer function matrix. For that let us make a for a 2 input 2 output system, let us make a block diagram. So you have input 1 u 1 you have an input 2 u 2, go to the system and you have the ultimate output y 1 and you have an ultimate output y 2 from the system.
Now y 1 sorry u 1 is acting on the system to give you output as y 1. So I will have a block here and this gives you y 1, the effect of input u 1 on the output y 1. How would you do that?
It would be via a transfer function g of z. Similarly, u 2 would act on a transfer function to give you an output y 2 g of z. But now u 1 may act on y 2 on may affect y 2 as well, so therefore, what I need to do is this I will have the way y 1 u 1 at via some transfer function g such that the combination of the effect from the block down and the block up will give you the overall effect.
So, I have an addup here, so plus plus. So I have u 1 to understand this, I have u 1 which is acting on a block g of z which gives you the effect on output y 1. Similarly, it gives the effect of effect on y 2 via another block.
Well I can draw an analogous situation here g z and let me make another adder here, plus, plus. So this is the overall flow of different effects. I can do one thing; I can make a large block like this and what I can see is that there are a lot of operations which are going inside this dashed block but all I can see from outside is that I have 2 inputs and have 2 outputs.
So, what I can do is, I can assign a block which has 2 inputs and which has 2 outputs, u 1 u 2, y 1 y 2 and inside that is a set of operations. Now what does the top post block give me? g z, it gives you the effect of input 1 on output 1.
What does the next block gives me? It gives me the effect of input 1 on output let us follow the arrow it goes to 2 output 2. Similarly, the third block from top gives me the effect of u 2 on y 1 and finally, the 4th block gives me the effect of u 2 on y 2.
So therefore, I will have a transfer function matrix g 2 cross 2, whose elements would be the individual transfer functions g 1 1 z, g 1 2 z, g 2 1 z and g 2 2 z. So in this manner, it is possible to determine the transfer function matrix of a multiple input, multiple output discrete time systems. So, what we understood today is that it is possible that you have a multiple input multiple output system and how to deal with such a system?
Well, you deal with such a system in an analogous manner as you did with the continuous systems. In continuous systems, you had the transfer function matrix, in this case also you have a pulse transfer function matrix where the elements individual elements of the transfer function matrix would give you the individual effects of the inputs on the individual outputs on the system. So, we will stop here today and we will take an interesting case of analysis of stability of systems in the next lecture.
Till then goodbye.