 So, warm welcome to the 16th lecture on the subject of digital signal processing its applications. We will take a minute to recapitulate what we did in the previous lecture. We had been looking at the rational Z transform in the previous lecture and we had evolved different ways to deal with the inversion of the rational Z transform. Essentially, we had looked at partial fraction expansion and the use of the derivative. I mean the derivative of the Z transform. So, we multiply the sequence by n when you take the derivative essentially there is an association between multiplication of the sequence by the time index and taking a derivative in the Z domain. Of course, you know you do need to multiply by the factor minus Z after taking the derivative and so on, but there is a relationship between multiplying by n or the time index or a polynomial in the time index. So, polynomial in the time, so let us write this down. You see polynomial in the time index polynomial in time index n. Essentially, something of the form summation k going from 0 to say m a k n raise the power k multiplied by x n involves taking essentially a linear combination of the kth derivative. This corresponds to summation k going from 0 to m. Now, please note we should interpret this carefully what I am saying here minus Z d dz to the power k x Z. This means applying the operator first take the derivative with respect to Z and then multiply by minus Z together and this should be treated as an operator. And for example, if you are doing this twice if k is equal to 2 what you mean is take the derivative with respect to Z multiply by minus Z then take the derivative again with respect to Z and multiply by minus Z. So, apply the whole operator minus Z d dz twice that is how one should interpret it. So, this multiplied by B k some B k some constant. So, essentially there is a there is a one to one association in the Z domain between a polynomial in the time index multiplying the sequence and a polynomial in this operator minus Z d dz multiplying the Z transform operating on the Z transform. So, I have I have also asked you to put down this relationship precisely by using inductive reasoning. I have left it to you as an exercise to do that and based on this principle we could see that we could handle any Z transform here any rational Z transform based on this principle and partial fraction expansion we can handle any rational Z transform. One observation that we made last time was that you know the rational Z transform is kind of frequent you know currents that is why we said that we were spending so much of time on the rational Z transform. We shall take the next few minutes to understand why this is the case why is it that the rational Z transform is so important why does it why does it you know mean a lot to us. In fact, let us assume that we have a system described by a system function which is rational. So, for example, let us take a concrete system as an example where the transfer function or the system function is rational consider an LSI system with system function let us say 1-1 4th Z inverse divided by 1-1 3rd Z inverse into 1-1 ½ Z inverse this is capital H of Z is essentially the Z transform of the impulse response of that system. Now let us expand let us draw out HZ HZ can be rewritten as 1-1 4th Z inverse divided by 1-1 3rd plus half Z inverse plus 1 6 Z raised to power minus 2 which of course becomes 1-1 4th Z inverse 1-3 plus 2 makes it 5 by 6 Z inverse plus 1 by 6 Z raised to power minus 2. Now what is HZ HZ is the ratio of the output Z transform to the input Z transform in fact that is obvious because the input Z transform multiplied by HZ would give you the output Z transform XZ multiplied by HZ would give you YZ and therefore another way to understand the system function is the ratio of the output Z transform to the input Z transform this also tells us something about LSI systems. If you look at the ratio of the output Z transform to the input Z transform and if you find that this ratio is independent of the input then the system is LSI that is another way of looking at it. So in the Z domain the fact that the output Z transform divided by the input Z transform is independent of the input makes the system LSI alright. So in effect what we are saying is that HZ which is YZ by XZ in this case is 1-1 4th Z inverse by 1-5 by 6 Z inverse plus 1 by 6 Z raised to power minus 2 and we can of course cross multiply we can cross multiply to get YZ into 1-5 by 6 Z inverse plus 1 by 6 Z raised to power minus 2 is XZ into 1-1 4th Z inverse and we can go back to time go back to the natural domain by taking the inverse Z transform both sides. So of course it is very easy to see that you would get Yn here and here you would get minus 5 by 6 the inverse Z transform of Z inverse YZ is Y of n-1 essentially Y delayed by 1 and so on. So one can take the inverse Z transform on both sides we will denote this as the inverse Z transform you have Yn-5 by 6 Y of n-1 plus 1 by 6 Y of n-2 is Xn-1 by 4 Xn-1 and of course we can rewrite this. So you have you know what we want to do ultimately is to write Yn in terms of past values of Y and X and its past value. So we can keep Yn on one side and move all the other terms to the other side. So we have Yn is 5 by 6 Yn-1-1 by 6 Yn-2 plus Xn-1 by 4 Xn-1 and this is an example of what is called a linear constant coefficient difference equation it is abbreviated by L double CdE difference equation let us understand the terms one by one difference equation is a relation between the input and the output in the sampled natural domain. The difference equation is a relation between the discrete input and the discrete output the constant coefficient difference equation is a relationship where the constants that are involved where the multipliers that are involved are all constant. So here these are the multipliers 1-1 4 5 by 6 and – 1 by 6 all of them are constant that is why it is a constant coefficient difference equation and linear because it obeys this entire input output relationship obeys the principle of superposition. That means it obeys additivity and homogeneity and therefore this is called a linear constant coefficient difference equation. If you drop the terms one by one for example you could have a constant coefficient difference equation which is not linear for example suppose in this equation you brought in y of n-2 the whole squared then it would become a constant coefficient difference equation but not linear and so on right and there could be of course a linear equation but not constant coefficient for example some of these terms could depend on n here right. So each of these terms in the expression L double CdE is important now L double CdEs are very important you see these this kind of an equation is very fundamental to realizability. In fact let us spend a minute on seeing how you can realize this very relationship here that is how would you translate this into a hardware structure or a software structure we can see this right away. So in fact suppose you happen to have you know a circuit which constantly generates yn that means you have you know let us assume that you have a timing mechanism which times the samples the sampling points and the samples you know in every unit time one sample of the input is fed and one sample of the output is generated so you have a timing mechanism you have to have a timing mechanism. Now in that timing mechanism what you do is introduce what you call memory so you introduce a delay buffer which we will denote by D in fact introduce two of them so when you feed yn to a delay buffer what you get is y of n minus 1 that means a delay buffer stores the previous value of the output I mean stores the previous value of the input given to it so in this case it is yn but in general a delay buffer stores the previous value of the input given to it and of course here you would get y of n minus 2 and similarly you could have a delay buffer operating on the input and that would give us x of n minus 1. Now what does this equation tell me this equation tells me that I have taken y of n minus 1 multiplied it by 5 by 6 I have taken y of n minus 2 and multiplied it by minus 1 by 6 I have added these two I will show addition by a summation yeah I have added these two I have also taken the input and added to it minus 1 by 4 times the input delayed by one sample and I have added these two together and thus generated the output I have taken care here to allow only for what are called two input adders so we will assume that all the elements need to be of uniform structure so all the adds are of two inputs of course you could have additions with more than two inputs because addition is a commutative and associative operation you can add more than two at a time but we will assume for the sake of modularity and implementability that you use a two input adder. So what we have done is to realize this relationship this linear constant coefficient difference equation by using three kinds of elements delay buffers these d's multipliers constant multipliers and two input adders let us write that down we can realize realize means translate into hardware or and or software a linear constant coefficient difference equation and hence a rational system function a rational system function is realizable it is realizable because you can use a finite amount of hardware and software to translate it into an implementable structure finite it important what kind of hardware and software have we used here let us again list that down elements that are used one sample delay buffer which we denoted by D constant multipliers or scaling units two input adders these are three kinds of elements that we use of course you can very easily see that each of these elements can either be thought of as a hardware element or as a software element for example if you think about the one sample delay you could think of it as a little program statement which stores the previous value and keeps it at a memory location and of course in half way you can think of it as a register or a combination of registers similarly a constant multiplier can be thought of either as a hardware element or as a software element in software it is a one line multiplication by a constant in hardware essentially a multiplier implemented with any of the known multiplier algorithm constant multiplier of course and you know that there are very efficient ways of implementing multiplier if you know them to be constant multiplier for example one could use distributed arithmetic or any other efficient way of doing multiplication both algorithms you like right anyway so much so for the fact that and two input adders again we know how to do that the tools complement or any other structure right so we know how to implement it in hardware and of course in software again so one line statements all of these are really unit statements in software or unit elements in hardware modular elements in hardware and with a combination of them we can realize a rational system so rational system function is realizable now to contrast let us take an example of an irrational you see all this while we have been saying rational so the natural question that comes to mind is can you have an irrational system function so can a system function or can a z transform be rational and the answer of course has to be yes of course xz is e raised the power z inverse with the region of convergence mod z greater than 0 now note that here you cannot include the point z equal to 0 in the region of convergence in fact this is an example of what is called an essential singularity you know in some sense a singularity of infinite degree we will see in a minute now e raised to power z inverse is very easy to expand you know those of us all of us would have been exposed to Taylor series at some right the Taylor series expansion of e raised to power z inverse is essentially summation n going from 0 to infinity z inverse raised to power of n divided by n factorial with 0 factorial defined as 1 and n factorial defined as n into n-1 factorial this is well known this is essentially the Taylor series expansion of e raised to power of x now when we write down this Taylor series expansion it is very easy to identify what sequence corresponds to this xz that is very easy to do in fact it turns out that this sequence xn would simply be 1 by n factorial un where n factorial has been defined already and un you know un is the unit step in fact very interestingly if an LSI system were to have this impulse response suppose xn where the impulse response of an LSI system we could ask whether the system is causal and stable and it is very easy to see the system is of course causal because the impulse response is 0 for n less than 0 so of course if this were to be the impulse response of an LSI system the LSI system would be causal would it be stable how would we answer the question you would need to look at the absolute sum of the impulse response and in fact the absolute sum of xn is very easy to calculate so summation n over all integers mod xn is very easy to calculate it is essentially summation n going from 0 to infinity mod 1 by n factorial which is essentially 1 by n factorial because n factorial is positive and this is very easy to evaluate this is essentially erase the power of x evaluated at x equal to 1 this is e the standard neperian base and that is of course finite and therefore this is absolutely summable and therefore the system is stable so if a system were to have this impulse response it would be both causal and stable however erase the power z inverse can never be written as a ratio of 2 finite series in z it is impossible to write erase the power z inverse as a ratio of 2 finite series in z z or z inverse does not matter and therefore xz is irrational and concomitant with that is also that if this happen to be the system function of some LSI system which it can be nothing stops it from being the system function of an LSI system if it were that system is not realizable that means there is no finite hardware or at least no known at least today there is no known finite hardware or software structure which can realize this as of date irrational systems are unrealizable in hardware or software the rational systems are not see we must not confuse irrational with unstable or non-causal or something of the kind if rationality or irrationality for an LSI system is a property over and above the other property causality stability yes of course rationality has a meaning only for LSI system one cannot talk about rationality or irrationality when the system is not LSI in fact not only LSI it must be LSI and its impulse response must have a Z transform otherwise there is no sense in talking about rationality or irrationality so now we have a classification of LSI system you have the whole class of LSI system they are characterized by the impulse response among them you have a smaller class whose impulse response has a Z transform that means that the Z transform converges somewhere in the Z plane and among them you have Z transforms or LSI systems which have a Z transform in the Z transform is rational that is the innermost core which we are calling rational system and those in the system that we are going to design implement and build.