 So warm welcome to the 34th lecture on the subject of digital signal processing and its applications. We continue in this lecture to look at the lattice structure and the construction of a lattice structure for rational system functions. Last time we had seen how to construct it for FIR system functions or polynomials. But now we need to see how to construct it for rational system. Now we have taken a step in that direction last time but we have not quite completed it. The step was to make a small transformation on the equations. Let me put that transformation back again. What we have said is let us begin right from the equations relating the sequences. So the sequences in successive stages are related to the following equations E n plus 1, Z is E nz plus K n plus 1 Z inverse E n tilde z and E n plus 1 tilde z is Z inverse E n tilde z plus K n plus 1 E nz and we said we would make a little transformation on this. We would rewrite this as E nz is E n plus 1 z minus K n plus 1 Z inverse E n tilde z and we noted that since the equations were the same, the relationships would remain the same between quantities but which sequence we use as an input and which we use as an output could be our choice. So the relationship, the mutual relationship would be the same but we could choose which to use as input and which to use as output. That was the central point here. Now first what we were trying to do is to write down one stage of this set of equations. So we said we would reverse the direction. We would put the you know initially we had put the sequences in increasing order of index from left to right. Now we will put the sequences in increasing order of index from right to left. So we would have an E n here, we would have an E n tilde here and we would have an E n plus 1 here and an E n plus 1 tilde there and we would carry out a relationship between them. So if you look at this relationship what it says is that E nz is a combination of E n plus 1z and K n plus 1 times z inverse E n tilde z. In any case we require z inverse E n tilde z for both of these expressions and therefore we can put a z inverse right there. So we need to add up E n plus 1z and minus K n plus 1 times z inverse E n tilde z. So what we generate here is essentially E nz. E n plus 1z minus K n plus 1 times z inverse E n tilde z. So we have generated E nz here and this is of course transmitted forward. Now note this was a little change that we needed to make. We had just begun making that change at the end of the previous lecture but we did not complete it. So our arrow was going this way but now we need to push the arrow this way. Now this is what we have generated here is E nz. So you can keep transmitting it. It is E nz. Now from the second equation you need K n plus 1 times this sequence. K n plus 1 times this sequence E nz plus z inverse E n tilde z. So what we generate here is as desired E n plus 1 tilde z you see and this can be transmitted to E n plus 1 tilde z. So we have constructed one stage of this lattice now and what we note is that the relationships are the same essentially. It is the same relationships but we are now going to redefine the input and output in this set of relationships. So let us write down several stages of this lattice now. So you have let us look at the nth stage and let us go all the way up to the 0th stage. We have E 0 and E 0 tilde and what we do is you see here all our arrows now look at the upper branch here. All the arrows are forward here and all the arrows are reverse. So as we go from E n plus 1 to E n and then to E n minus 1 and then all the way down to E 0 we would need to join E 0 to E 0 tilde. So we have E 0 you see the E 0 arrow goes forwards and the E 0 tilde arrow goes backwards. So we need to join it here. So E 0 needs to be transmitted to E 0 tilde. This is the entire structure and if there are n stages then this would be E n and this would be E n tilde and the input would be applied here. So here we need to take an output from any of these points. You see the input is here and the output could be taken at really any of these points but we need to be able to generate a most general form of a rational system function. So what we would do is to take a linear combination here. So if you have E n here E n minus 1 here tilde and so on then we take a linear combination of these. That is the most general form that we can conceive of. So we could multiply this by C 0, this by C n minus 1 in general C n and we could add it term by term and this is the output that we generate. So we have X z here at E n and Y z as a sum of or as a linear combination of the E 0 tilde E n minus 1 tilde and E n tilde all these E 0 tilde all the way up to E n tilde. Yes there is a question. Yes. So then yeah so there is a question why there are so many nodes between E n tilde and E n minus there are not so many. So the question is why are there so many nodes? There are not so many nodes. There are just enough nodes to create the lattice structure. So you have one you see here if you look at let us look at the structure again. So the question was why do we have so many? We do not have so many nodes really. We have just enough nodes to create. This is the lattice part, this is the transmissile part and so you know here you have a transmissile, you have the lattice part and you have the only catch is that here you need one transmissile here and one transmissile here. Therefore there are exactly three parts as required. There is no extra part at all. So therefore what we have here is a linear combination of the E tilde outputs and therefore we could write down Y z by E z as follows or Y z by X z as follows. It is essentially summation n going from 0 to capital N C n E n tilde z divided by E n z. This is the relationship and we can rewrite this relationship. Of course needless to say if we look at the way this has been constructed E 0 tilde is equal to E 0 z here as well as it was in our initial structure. This is the relationship. Now we multiply and divide by E 0 z. This can be rewritten as summation n going from 0 to capital N C n E n tilde z divided by E 0 z multiplied by E 0 z divided by E n z. And therefore we can write the same relationship in terms of the A n tilde ways and the A n's. This is the relationship. And now this gives us a clue how we can realize an arbitrary rational system function because E n tilde z divided by E 0 z is E n tilde z and E n z divided by E 0 z is A n z. E n z is already in the form that we wish it to be. So you see when you have a general rational system function, rational causal system function H of z given by summation, well let us put it as say k, k equal to 0 to capital N B k z raised to power minus k divided by 1 plus summation n going from 1 to capital N A L z raised to power minus L. Essentially is equated to the denominator A m z. So this is A m z. So what it really means is that you need to choose as many stages in the lattice as the degree of the denominator. Now there is a bit of a catch. Suppose the numerator degree is more than the denominator degree, then what do you do? In that case you need to first make a long division and remove a quotient. You see here when I write it like this, I have assumed that the degree of the denominator is not more than the degree of the denominator. If it is then first make a division, remove a term and leave the remainder on the numerator. Now the term that is removed is essentially an FIR term. So now you realize the rational system function as a parallel combination of two parts, one with the lattice and one with an FIR system function. You have full freedom to realize the FIR system function either with a lattice or with a standard direct form 1, 2 or cascade or parallel form. That is up to you. The FIR part anyway is you know easy to realize. There is no problem of stability. There is not any serious problem of numerical instability and so on. It is the IRR part where we need to be vigilant about the behavior of the poles and so on. So that part needs to be realized with the lattice. So we will assume then that the numerator carries the remainder after division now and so you have already extracted. So when we put it in this form, I am assuming that you have already extracted that term which might be required by long division and the remainder has been put on the numerator here. If necessary you may want to put one more branch in parallel with the lattice which corresponds to that term which you have removed by division. I am not showing it explicitly here but we will just write it down. To put the rational system, to put the HZ in this form, first carry out a long division. In case numerator degree in Z inverse is greater than the denominator degree. Keep only the remainder of this division as the numerator. The quotient polynomial is realized separately in parallel. Now, you see it is very easy to calculate the lattice parameters. Calculation of the lattice parameters K 1 to K n is easy. Do it by the lattice recursion and we studied the lattice recursion in the previous lecture. We said essentially K n plus 1 is the coefficient of the highest degree term. So Z to the power minus n plus 1 in A n plus 1, isn't it? We had studied this last time. Is A n plus 1 Z minus K n plus 1 A n plus 1 Tim d Z divided by 1 minus K n plus 1 the whole squared. We had studied this recursion the last time. Is that correct? Essentially we brought one stage backwards. I explained to you it was like peeling off one by one the layers of a vegetable, the outer peel and the inner peel and so on. Now of course once you reached A n, then the coefficient of the highest power of Z inverse in A n gives you K n and using K n you can go peel off one more stage and you keep peeling off stages until you reach A 0 which is 1. So you can complete the lattice recursions to obtain the K 1 to K n. Now having completed the lattice recursions we need to determine the C 0. So let us go back to the structure we had drawn here. We need to you see to complete the realisation we need to determine these C 0, C 0, C 1, C n minus C n to realise the numerator now. So numerator is equal to summation n going from 0 to capital N remember we have already done the land division and all that. So C n A n till A n till day Z and this is equal to summation say K going from 0 to capital N, B K Z raised to power minus K. Now once again employ the relationship between A m and A m till day. So we have noted that the leading term that means the coefficient of Z raised to the power of 0 in all the A n's A 1, A 2, A 3 and so on. The coefficient of Z raised to the power of 0 is 1 and further the coefficients of A n till day are the coefficients of A n in reverse order and therefore the coefficient of the highest power of Z inverse in all the A m till day is 1 as well. Let us make this observation. The coefficient of Z raised to the power of 0 in all the A n till day is 1. You see if you compare when the term Z raised to the power minus n arise only in A n till day, none of the other A m's could give the highest power of Z inverse and what will the coefficient be of Z to the power minus n coming from here 1. So therefore that would be multiplied by C capital N and therefore the coefficient of comparing the coefficients of Z raised to the power of minus n on both sides, B capital N is equal to C capital N. C capital N is equal to B capital N. Now once you have C capital N, you can subtract that term from the left hand side and the right hand side and therefore we can get summation n going from 0 to capital N minus 1 C m A m till day Z is equal to summation k going from 0 to N, B k Z raised to the power minus k minus C n A m till day Z and this is now known. So this whole thing is known. Now since this whole thing is known, the same principle can be used to find C capital N minus 1. The coefficient of C capital N minus 1 on the left hand side would only arise from A n minus 1 till day and the coefficient of Z to the power minus n minus 1 in A n minus 1 till day is 1 and that is going to get multiplied by C n minus 1 and whatever be the coefficient of Z raised to the power minus n minus 1 here is also going to be C n minus 1 therefore. So essentially what we are saying is C n minus 1 is now the coefficient of Z raised to the power minus n minus 1 on the right hand side. Summation k going from 0 to N B k Z raised to the power minus k minus C n A m till day Z which is known. Now once you find C n minus 1 you can apply exactly the same procedure to find C n minus 2. This process can be continued recursively downwards until you reach C 0. So let us make a remark. We can now continue this process recursively to obtain C n minus 2 C n minus 3 all the way down to C 0. Subtract the corresponding term with the right hand side and look at the highest power of the inverse. Now having done that we have completed the lattice structure. So we know in principle how to build the lattice structure. But now let us take an example. So let us take a very simple example of a degree 2 rational system function.