 So, one welcome to the 23rd lecture on the subject of digital signal processing and its applications. We use this lecture to discuss the solution to the mid-semester examination that was conducted in this course. Of course, the detailed solution is available on the course webpage, but it is useful to discuss the questions and their answers in structure solution and the possible variants more than from the point of view of evaluation, from the point of view of understanding some niceties, some finer points in the material that was studied. So, you know more than just looking at the evaluation aspect which of course has been done routinely, it is important to understand some finer ideas that were being communicated through the questions that were asked in the mid-semester examination. So, what I shall do in this lecture is to present the question first and then discuss the instructor solution to it and then of course ask for any clarifications if there are any questions or clarifications that have to be made. So, you see that we are going to look at, now we look at the first question, I shall project the relevant question or I shall briefly explain the question and then give its response. So the first question I will just you know mention the main points of course, we will load the question paper and the instructor solution on the webpage, but we will put the main points here. So, we do not intend to discuss every step of the solution, but we wish to discuss some important or salient points of the solution which are important from the point of view of concept. So, here we go for the first question here, the first question was whether the system now in all the questions in all the parts in the question number 1, we use xn to denote the input of the system and yn to denote the output and therefore the question was does this describe a causal system and of course the answer is yes, that is because although this is n plus 1 that was the deceptive part, this is n plus 1 that does not affect the causality. The causality only relates the fact that y of n depends on the current sample of x and no other, it does not matter what function you perform on the index before you apply that to the sample that does not affect causality. So the system was indeed causal. Question 1, part 2, part b asked whether y of n is equal to n times x of n is a bounded input bounded output stable system and the answer is no, that is because you could give a counter example by taking y of n is equal to u of n, this is bounded but the output is clearly unbounded. So you have a bounded input with an unbounded output and that serves as a counter example. If there are any questions please post them right then and there. So question 1, part c asked whether in a Bebo unstable system does an unbounded input necessarily produce an unbounded output and the answer is no. You see in unstable system you are guaranteed that there is at least one bounded input which produces an unbounded output but you are not guaranteed either that every bounded input produces an unbounded output or that an unbounded input necessarily produces an unbounded output. In fact we can give a very simple counter example by exploiting the Z transform. So you see if you take the system you know well you know if you take this system if you take this input 1 minus 2 Z I mean I am showing the Z transform of the input and if you consider this system the system with system function 1 minus 3 Z inverse by 1 minus 2 Z inverse mod Z greater than 2. Clearly this input is unbounded the system is unstable when you find the output it is essentially an impulse and of course you do have a valid region of convergence. So you have at least mod Z greater than 3 as a region of convergence and therefore if you take the inverse Z transform of this X Z as the input and the inverse and this as a system which is clearly unstable then this input applied this system is clearly Bebo unstable this input is unbounded that is clear because you know if you look at this is essentially an exponential with a factor of 3 alright the output is however going to be an impulse. Now this is of course just one counter example you are welcome to give any other counter example but in general you are not guaranteed it shows that you are not that is a very tricky thing you are not guaranteed that a Bebo unstable system gives an unbounded output when the input is unbounded yes. So you see what is the region of convergence at least mod Z greater than 3. The question is why why are we taking mod Z greater than 3 so the answer is that you see the region of convergence is at least the intersection if not more right. So here we are sure that there is some part in the region of convergence mod Z greater than 3 is the minimum part of course the region of convergence may expand in this case it does in this case in face the region of convergence goes all over the Z plane but we are sure that there is a region of convergence to begin with so maybe what we should say is mod Z greater than 3 at least is the region of convergence so we have something to begin with alright. Now question 1 part 4 so the question is in the previous system where you have Y of n is n times X of n could you have given a bounded input which produced a bounded output yes indeed. So for example if you give Xn equal to delta n you know the unit impulse it produces a bounded output in fact it produces all 0 so in unstable system it is not necessary that every bounded input produces an unbounded output but there is at least one bounded input which produces an unbounded output this illustrates the idea. So question 1 D was if you give a Bebo stable system D input X of n is minus 1 for n odd and 1 for even n is the output bounded and of course the answer is yes that is because the Bebo stable system the input is bounded by 1 and therefore the output must be bounded so that is simple. On the other hand in question 1 part e you are asked whether a linear system responds to the standard you see you told that delta n produces some output Hn which has a finite number of finite samples system is linear now the statement was that if you give a bounded input would it produce a bounded output in general and the answer of course is not necessarily that is because you are not told the system is shift invariant. So although the impulse located at 0 produces a finite number of finite samples the impulse located somewhere else might not in fact not just the impulse some other combination might not and in particular of course you know for a linear system you can use impulses located at various places to see what the system does. So it is quite possible that the input located somewhere else may not and then you have trouble so it is not necessary so the answer is no it is not correct so not so for question 1 now are there any doubts or difficulties about question 1 beyond this yes please yes so the question is question asked is in the part e of question 1 was the point that if the impulse were located elsewhere there could be an unbounded output and the answer is yes you know the system being linear but not shift invariant could have a different response to an impulse located somewhere else and that could be unbounded. Now we come to question 2 you are given the response to delta m minus k for k over the set of integers you are told that for k less than 0 the output is all 0 for k equal to 0 and 1 the output is given so you know we will quickly put them down k less than 0 all 0 k equal to 0 1 it is gm minus k and gm and sorry hm minus k and hm is specified to be 1 to 1 with this 1 placed at 0 and for k greater than 1 it is gm minus k and gm is specified to be 1 to 2 1 with this 1 located at 0. So the first question is to write down the output ym in terms of the input xm in general now you see when a system is linear of course any input can be written in terms of the impulses this is true for any input and if the system is linear then one thing is clear ym is summation overall k xk is like a constant here so xk responds to delta n minus k this is true because the system is linear so on account of additivity you can take the response over each of these and on account of homogeneity you can take the response in to the xk and therefore we can now write down ym in terms of all the responses to different impulses that is true for any linear system the only catch is that for a linear system which is not shift in value this cannot be written in terms of a single hn now this question was meant to test one's understanding of the proof that LSI systems have an impulse response that characterizes them completely so the system is linear but not shift in variant what is it that is required to characterize so one dilutes the proof so to speak to come to a weaker requirement so it is meant you see I used to stress in the class that it is not enough simply to understand the proof but also appreciate all its variance and that means we must learn to read between the lines in what is it one what one is doing in the classroom so you see that was what was being tested in this question and that is of course going to be true in the future as well unless you learn to look beyond simply what is said obviously in the class it will not enable you to understand the subject in depth now one can work this out and one can show that in general this is the response that you get yn is in general 0 for n less than 0 x of 0 for n equal to 0 twice x of 0 plus x of 1 for n equal to 1 so you can expand this you know you can expand this output and get so I am just putting down the response x1 plus twice x2 plus x3 for I am sorry x0 plus twice x1 plus x2 for n equal to 2 and we can continue this it is equal to x1 plus twice x2 plus x3 for n equal to 3 twice x2 plus twice x3 so you see it is clearly shift variant the behavior changes for n equal to 4 and again for n equal to 5 we need to write a separate expression and beyond that you can write a common expression x5 plus twice x4 plus twice x3 plus x2 for n equal to 5 up to 5 it writes separate expressions and beyond that of course one can write xk plus twice xk minus 1 plus twice xk minus 2 plus xk minus 3 for n greater than 5 now of course this expression also holds for 5 and you may therefore take it from 5 onwards now this follows by adding the individual responses to different impulses right so I leave it to you to work out the details but the idea is that in such a linear shift variant system you need to write down the output at every point in terms of the input samples and from here you can also see that for some samples that could be a combination of a fewer number of input samples and for some more and this is what was also discussed in question 1 in one of the questions where the system was not shift in variant so you know it could be possible that for one impulse look at one place you may have a finite length response and for another place the response may be of infinite length that can happen if the system is not shift in variant so this is in general the expression of course one can the next part of the question was to write down the output for a specific input and the specific input was this and of course one can simply substitute and one can get the following expression so this is for a specific input right by this one just substitutes the values of x 0 x 1 x 2 and puts them in the respective samples to get the output. Now question 2 part c was to answer whether the system was causal and of course the answer is yes indeed that is because if you look at the expression for y n in terms of x n every sample involved either the current sample or past future samples were never involved and therefore one could see that the system was causal. The next part was to answer whether the system is stable and of course the answer is again yes luckily in this particular system every output sample was a combination only of a finite number of input samples albeit different at different places and if the input was bounded then you would have a finite combination of bounded samples and therefore the output needed to be bounded everywhere so the system was stable. Now if there are any questions on this then we can answer them before we proceed to question 3 alright so there are no questions we will proceed to question 3. Now in question 3 in question 3 the object there were 2 objectives and the question was as follows you are given a real impulse response rational LSI system will not necessarily rational actually I am sorry stable LSI system so you have a real impulse response and you have a stable LSI system so you are bound to have a frequency response so the frequency response is guaranteed to exist not only that the frequency response is going to be magnitude symmetric and phase anti-symmetric that is because the frequency response is conjugate symmetric so the magnitude is symmetric and the phase anti-symmetric and you are given the magnitude in the range 0.45 pi so you see the magnitude between point you are only given the magnitude between 0.45 and 0.55 you are told the magnitude is constant at B and you are told that the phase is essentially a linear phase well if not one would not call it linear actually one should call it pseudo linear because it does have a straight line expression but it does not pass through the origin so it is a phase like this it is a straight line kind of function and the phase response was specified to be minus tau P omega 0 minus omega minus omega 0 times tau G where tau P and tau G are positive constants and omega 0 is called the center omega 0 is also positive constant called the center frequency now you see you are told to consider a combination of two sinusoids in fact the input given is of this nature now product of sinusoids is always expressible as a sum of two sinusoids so it is cos omega 0 plus omega 1 times n plus cos omega 0 minus omega 1 times n so product of two sinusoids which was given to be the input is actually a sum of two sinusoids as well with frequencies omega 0 plus omega 1 and omega 0 minus omega 1 now you see you are also told that omega 0 plus omega 1 is strictly less than 0.55 pi and you are told that this is greater than 0.45 pi what it really says is that these two sinusoids are well within the band of interest so you are in a position to use the frequency response to find out the output and of course the system is linear and shift invariant the input is a sum of two sine waves so you can find the output by using the frequency response that is that is the idea here now one can easily calculate the output in this case by using the frequency response and we have here the output is going to see so essentially the input is a sum of two sine waves the output is a sum of individual responses to each of these sine waves so cos omega 0 plus omega 1 times n and cos omega 0 minus omega 1 times n you are guaranteed that they lie within the band in which the frequency response is specified. Now I must again stress that here you do not need to worry about the frequency response on the negative side of omega because it is going to be conjugate symmetric that is given that the impulse response is real so therefore the output turns out to be a b by 2 so you see the cos omega 0 minus omega n response with cos omega 0 minus omega 1 n minus you see this is the change of magnitude and this is the change of phase for the omega 0 minus omega 1 frequency essentially you are multiplying the magnitude by b and you are adding the phase of as given minus tau p omega n minus in place of omega we put omega n minus omega 1 and of course minus omega n times tau g so there we are and for the and it is equal to a b by 2 times cosine omega n plus omega 1 minus tau p omega n minus omega n plus omega 1 minus omega n times tau g for the omega n plus omega 1 frequency. So here you have again multiplied the magnitude by 2 and you have added a phase of minus tau p omega n minus in place of omega you put omega n plus omega 1 so omega n plus omega 1 minus omega n times tau g. Now you see when you add these two terms what you get is the following the output is a b by 2 cos omega not into n minus tau p plus omega 1 into n minus tau g plus cos in fact you can take all this in the bracket cos omega not n minus tau p minus omega 1 into n minus tau g. So again it is a sum of two sinusoids as expected the catch is that you have a very interesting change of the time there is a different change of time on omega 1 and on omega not that is very interesting. So you can combine now you can put this back in you are asked actually it was asked to express as a product of sinusoids and that would of course give you a b cos omega not into n minus tau p times cos omega 1 n minus tau g not only to interpret it is very interesting we have a product of two sinusoids initially of frequencies omega not and omega 1 and you know one is assuming here or even though it is not explicitly said in the question. Let us take the situation where omega not is considerably larger than omega 1 so to take an example omega not could be 0.5 pi here this must be in the range it has to see because omega not minus omega 1 and omega not plus omega 1 are both in the range 0.45 to 0.55 pi so the omega not has no choice but to be inside that range let us take it to be 0.5 pi and let us take omega 1 to be let us say 0.01 pi right so you it is much smaller than omega not. Now this is like a situation where you have what is called amplitude modulation for communication for those of us who are familiar with that in other in any case you have a very low frequency sine wave multiplying a high frequency sine wave in that case. In communication this is called amplitude modulation so you change the amplitude very slowly in accordance with the message and here the message can be taken to be a frequency omega 1 and the carrier which carries the message is a frequency omega not and what we have done is to take a pseudo linear phase what I mean by pseudo linear phases you have taken the phase to be approximated by a straight line around the carrier. Now what you mean by approximating a phase by a straight line you see if you have a very small band signal a very narrow band signal around the carrier and if the phase is continuous and the magnitude non-zero you see if you are taking the signal to be very narrow band compared to the center frequency of the carrier. So in that narrow band if the frequency response is analytic at that point then you may make a Taylor series approximation and if the magnitude if you are not operating on what is called a transition band region that is important you should not be operating on a transition band. If you are operating somewhere in the past part you can assume that the magnitude response does not change too much around the carrier if it is narrow band and the phase response even though it may change if it is analytic in that region you may approximated by a Taylor series with only the first term that is what you are essentially saying. So take a Taylor series approximation of the phase with only the first term that is what we have done here. Now what it shows is that in that circumstance there are two delays you see the first term of the Taylor series how do you construct the first term of the Taylor series the value of the function. So you go back to the expression that we wrote for the phase right in the beginning. So in the expression for the phase has a constant term here and a term which varies omega you are writing a Taylor series expansion around omega equal to omega 0. So this is the first term of the Taylor series. So this is essentially the derivative of the phase and this is the 0th term or a constant term in the Taylor series which is essentially the value of the function at the point. So when you take you can always divide that value by omega 0 and call that power b. So the phase at omega 0 divided by omega 0 is called the phase delay and the derivative of the phase at omega equal to omega 0 is called the group delay and the significance of the group delay is that it acts on the message and the significance of the phase delay is that it acts on the carrier that is what we have been able to demonstrate by this question here. Now here we demonstrated it exactly when you took a message which was exactly a sinusoid a very narrow band message which is a sinusoid but you could of course extend this idea if the message had a combination of sinusoid but narrow band. So the aim of this question was to illustrate through a very closed process through a very guided process the meaning of group delay and phase delay when you have a phase response. We have been saying at some stage the phase response is necessary evil and what this illustrates is the precise effect that the phase response has when you have a narrow band message operating on a high frequency carrier. Are there any questions on this? So if there are none we can then take the next question, question 3b. Now question 3b gave you the sequence x of n this is the sequence was given and you are required to evaluate the integral from minus pi to pi mod x omega squared d omega. Of course this is easy to do one can use the possible theorem for doing it because you know that mod x n squared summed over all n is 1 by 2 pi integral minus pi to pi mod x omega squared d omega. So the idea was without evaluating the discrete time Fourier transform you are required to find this quantity which is easy to do because you could take 2 pi to the other side and you are done. Similarly you are asked to evaluate the quantity integral of x omega with respect to omega from minus pi to pi and that is easily seen to be essentially 2 pi times x of 0 that is easy to evaluate you see by using the inverse discrete time Fourier transform. So it is essentially this is the inverse discrete time Fourier transform evaluated at n equal to 0 and multiplied by 2 pi. So that is easy to do once you have the samples of the sequence you have nothing more to do it is in fact given to you. So any doubts on this question? Question 3 part b so I leave of course the calculations to you. Now the last question 4 was a very interesting question in part a you are given x z equal to e raised to power z inverse with mod z greater than 0 and you are told that x n was convolved with itself to give y. So of course you are asked of course to find out y as a product of x and another sequence g. So you are told that y which is the convolution of x with itself should be written as the product also of x with another sequence g. Now that is easy to do because when you convolve the sequence x with itself with z transform is multiplied. So you get y z is equal to x z the whole square and therefore y z is simply e raised to power 2 z inverse with the same region of convergence mod z greater than 0. And just as you can expand e raised to power z inverse you can also expand e raised to power 2 z inverse that is very easy to do and that gives you why n is essentially summation n going from 0 to infinity to time to raise the power of n by n factorial where 0 factorial is 1 1 factorial is 1 and n factorial is n by into n minus 1 factorial for n greater than 1. Now this is from the Taylor series expansion the Taylor series expansion on e raised to power of x we have discussed this in the class we have discussed this as an example of irrational z transforms and we essentially need to use the Taylor series expansion and interestingly this expression here is clearly x n times 2 raised to power of n. Now you know x n itself is of course I mean I must make a correction here it is the summation n going you see this is 2 raised to power of n by n factorial u n that is how you must write it there is a correction here because you know you are not writing the z transform you are writing the expression sample by sample. So y of n is 2 raised to power of n by n factorial u n where of course the factorial is defined in this way and what I wrote initially was essentially the z transform y z and there I should have written as z to the power minus n. But nevertheless if I remove the 2 to the power of n here what I have left namely u n by n factorial. So 1 by n factorial u n was x n the original x n and so you can see that y of n is x n into 2 raised to power of n you can equally write this y of n is 2 raised to power of n times u n into x n. Now therefore the sequence g n can be specified for n greater than or equal to 0 for n less than 0 the sequence g n can be arbitrary. So indeed y n is indeed equal to g n times x n where g n is clearly specified to be 2 raised to power of n for n greater than or equal to 0 an arbitrary for n less than 0. You can of course extend it to be 2 raised to power of n also for n less than 0 it does not matter. But of course 1 would give full credit if one has written 2 raised to power of n any acceptable sequences fine and the simplest thing that comes to mind is either 2 raised to power of n itself or 2 raised to power of n times u n either of them is what comes to mind immediately both of them are acceptable. Now any doubts about part A of question 4? If not then we go to the very last of the questions of the mid semester exam and that was question 4 part B and there you were told that there is a system given to you it is a rational causal LSI system and the system function was given to you. H z is 1 by 1 minus A z inverse into 1 minus B z inverse and A and B are real constants. You do not know whether A and B are equal or not equal but you know they are real. You do not know whether they are less than 1 greater than 1 nothing else. But of course you know the system is rational of course it is obvious but it is also causal and LSI and of course LSI and rational have to be obvious otherwise there is no system function but you know the system is causal. So you know that the region of convergence is very clear mod z greater than the greater of mod A and mod B. Now you are given the response in two different experiments. So two different experiments were conducted. Each of the experiments the input was of the form r to the power of n for all n. Now please note this was r to the power of n for all n not r to the power of n u n there is a very big difference. r to the power of n u n gives a different response and r to the power of n for all n gives in fact r to the power of n and of course you know it is obvious that if you have got a finite output here we will see in a minute if you have got a finite output the r must have been in the region of convergence otherwise it could not have let us see. So what is the output when the input is r to the power of n for all n in fact we saw this the very moment we began our discussion on the z transform. The output would be summation k going from minus to plus infinity h k r to the power n minus k where h n is the impulse response and we can split this r to the power n minus k is r to the power n equal to r to the power minus k. So that can be written as r to the power of n times summation k going from minus to plus infinity h k r to the power minus k no one behold this is nothing but h z evaluated at z equal to r. So essentially this illustrates the idea of what are called eigen sequences r to the power of n is an eigen sequence of the LSI system it goes into the system and is multiplied by a constant no other change takes place. So you see whatever the constant by which it is multiplied is the value of the z or the system function evaluated at z equal to r needless to say r must be in the region of convergence otherwise this is not acceptable you know this would not converge otherwise so r must be in the region of convergence and you are given two different cases here you are given the case r equal to 1 and r equal to 4 and you are told that the sample y 0 was equal to 3 for r equal to 1 and for r equal to 4 the sample y 0 was 96 by 77. So obviously we have two equations on the two unknowns a and b because you can substitute r equal to 1 and r equal to 4 in the next so you have 1 by 1 minus a times 1 inverse into 1 minus b times 1 inverse is equal to 3 you see remember y of 0 is r to the power 0 times h evaluated at 1 this is for r equal to 1. So y of 0 is simply h of 1 here for r equal to 1 this is the first equation that you get and the second equation that you get when r is equal to 4 is that 1 by 1 minus a into 4 inverse into 1 minus b into 4 inverse is 96 by 77 because value of 0 here would come out to be 4 to the power 0 times h of 4. So you see you have two equations in two unknown and you can now solve them. Let me write down the two equations that we have once again the first equation is 1 minus a into 1 minus b is 1 by 3 and the second equation is 1 minus a by 4 into 1 minus b by 4 is 77 by 96. Now these are essentially you could treat them as quadratic in either a or b. So one can solve these by a quadratic so you need to eliminate one of them and you get two solutions. You might wonder why you get a quadratic. Well you get two solutions because a and b are symmetric they can be the rows of a and b can be reversed. So the two solutions of a are in fact the solutions of a and b or the two solutions of b when you obtain them are in fact the solutions of b and a that is why you get a quadratic. Of course needless to say here it would not have mattered whether a is equal to b or a is unequal to b that can be obtained once you solve the quadratic. So you are required to find the constants a and b which you could and it turns out that the constants evaluate to one third and half. So you can take either of them to be one third and the other to be half does not matter they are symmetric. Now of course I do understand a lot of people took the input to be R to the power of n u n and of course that was incorrect that gives a totally different response. Now this question was meant to illustrate or to test or to strengthen the idea of the z transform what exactly is the z transform what significance does it have that was being examined in this question. Any questions on this? So the question is what exactly did we mean when we talked about symmetry well the role of a and b is indistinguishable here. So it could be what you are calling b could be a and in that case what you are calling a would become b. So a and b are indistinguishable in this in that sense there is a symmetry with a and b yes any other questions. So the question is could you write R raised to the power of n as R raised to the power of n u n plus R raised to the power of n u of minus n minus 1 yes you can but it would not offer any significant advantage. You could do that but it only makes matters more difficult does not simplify matters in any way. Yes please yes so the very good so the question is if you did indeed write R to the power of n as R raised to the power of n u n plus R raised to the power of n u minus n minus 1 how would you deal with that that is exactly the problem R raised to the power of n has no z transform or has no z transform in the sense of conventional functions you need to introduce impulses in the z domain to take the z transform R raised to the power of n. So even when you take R raised to the power of n and u n and R raised to the power of n u minus n minus 1 separately the only possibilities that you solve them separately and add but that is not convenient at all to do. So you know you could find the responses individually in the time domain and add them but that is not in no ways that convenient to do. So it is interesting in this case you use the z transform but you cannot the input and the output do not have a z transform that is the great secret in this question and it was meant to really test the fundamentals of the z transform to the core. To conclude you have any other questions yes so you there is no if you take them together there is no region of convergence so you cannot deal either you deal with them separately and add them in the time domain not in the z domain the time domain or you work it out straight away in time it was meant. Now the aim of many questions in this examination was to test understanding at the core it is often the case that when one comes to a graduate program in electrical engineering in particular or in any other discipline one comes with the full assumption that one has dealt with many concepts earlier and not too much is required to review them before an examination of basic nature. Basics in a subject are often so vast that they need review more than once one often proceeds with weak foundations to construct the strong second story but it is also useful once in the while to strengthen one's foundation so that the story is above become more stable and I do hope that some of the questions examination illustrated that one did need to ask some fundamental questions about fundamental concepts in DSP. Thank you.