Hi Folks, I am teaching myself DSP and have got a problem with checking if a system is linear. The system is linear if and only if the rules of homogeneity and superposition apply. They are both the necessary and sufficient conditions for linearity. I am stuck on the following y[n]=x[n] to check whether this is linear I can apply the homegneity rule that is multiply the system by a constant. y[n]=αx[n]. if by making that constant 0 the output also goes to 0. The system obeys homegeneity, this is however only necassary not sufficent for linearity. The system must also obey superposition. My understanding of it as that 2 seperate functions X1[n] + X2[n] should equal if: y1[n]=x1[n] y2[n]=x2[n] How does a response of the system become: y3[n]= [α1x1[n]+β2x2[n]] Surely this can not be looked at from the POV of numbers as: 3+4 (3+4) I can only assume I have to look at it in terms of a digital system but can not visulaise it. Any help will be appreciated.
x(n)^2 is non linear. Just look at the graph of that function.. You just proved it with both homogeneity and superposition. I don't understand what your question is, however..
Thaks for replying, I understand the function is not linear in the mathematical sense, however do not undertstand from the POV of DSP system. If it was linear then Y1[n]+Y2[n] = a1x1[n]+a2x2[n]. But Y3[n] = [a1 x1[n]+a2 x2[n]). I dont understand why Y3 equals what it does.
You have to keep in mind that the homogeneity and superposition properties apply to ARBITRARY constants, meaning that you don't have any say in what the particular value is. If f(x) = x^2, then if this were linear it would have to be true that f(Ax) = A*f(x) for ANY value of A. Similarly, it would have to be true that f(x1+x2) = f(x1) + f(x2) for ANY values of x1 and x2. NOTE: Both of these requirements are often combined into the following necessary and sufficient requirement: f(A*x1+B*x2) = A*f(x1) + B*f(x2) As for why y3 is what is it, you don't specify what x3 is (the input to the system that produces y3). Assuming then
Thanks WBahn for that excellent explanation, I understand now completely. I can not believe I did not connect: fx[n]=x[n] + x[n] and therefore: y[n]= x[n] as: y[n]=x[n] then y3[n]=x3[n] Seems so obvious now, doh!
Could someone please confirm I have got this right please. Is this a linear system. y[n] = x[n-1] x[n+1] This system will pass the homogeneity part. If a zero is multiplied to x[n] then y[n] will be zero. However for the superposition part. The linear combination of y3[n] should be: y[n]= x[n-1] x[n+1] + x[n-1] x[n+1] However the digital system will deal with the same sample at once. x1[n-1] and x2[n-1] are both fed into a multiplier of the digital system for which this is the difference equation. Therefore x3[n] is: x[n]= x[n-1] x[n+1] + x[n+1] x[n+1] The two are not the same therefore the system can not be linear. Is this correct or have I made a mistake in understanding.
You're doing it again! When applying the homogeneity rule, you don't get to pick a particular special magical value for the multiplying constant. It must apply for ANY and ALL values of the multiplying constant. The homogeneity rule basically says that if we double the strength of the input signal, that the strength of the output signal will double. For this problem, you have Now what happens if we multiply x[n] by α to generate a new input sequence? If homogeneity holds, then the output must be But Therefore homogeneity does not hold.
Thanks for the reply. You are right I am making mistakes overall. However let me explain what I mean by using the constants is: if the digital system is: y[n]=x[n] I thought homogeneity means that if you multiply the input and output by a constant, they should be equal. As you say there is no magic number, however the system has to hold true for all values of the constant. if we can use any value for the constant. Why not zero as this is easy to test. y[n]= x[n] If is 0, this will make both sides of th2 equation equal to 0 (pass homogeneity) However this function: y[n]= x[n] + C which is in linear equation is not a linear system because when alpha is 0 it does not guarantee that the output will be 0 because of the constant. That is why I was using 0 to start. You are totally correct and I thank you for the superposition part as I am continuously making mistakes on it. I must keep practising.
First off, y[n] is not equal to x[n] unless your digital system passes the input directly to the output (and such a system would be a linear one). In general, you have an input sequence, x[n], that is passed through a digital system, characterized by some function f(), to produce an output sequence, y[n]. Or y[n] = f(x[n]) True. Because it may happen to work for zero. It may happen to work for pi. It may happen to work for 112.37. But if it doesn't also work for 2.718 and 42 and every other number in the universe, then it fails to hold, period. If your system is the identity function (output equals input), then it does pass homogeneity, but not because it happens to work for 0, but because it works no matter what the constant is. If you can find one value, any value, for which it does not hold, then that is all that is needed to prove that homogeneity does not hold. But the reverse is not true, finding a single value for which it does work does not prove that it works for ALL values. The way to show that it works for all values is for the multiplying constant to cancel out. If it cancels out, then clearly it doesn't matter what value it is.