Thread: Need help to find this answer - signal processing

1. Need help to find this answer - signal processing

Hello, I dont know wether I've posted this in the right section but im really stuck on this question. Its from a signal processing exam paper:

Show that the signal is x(t) + y(t) is a sinusoid and determine its amplitude, frequency and phase.

The answer on the answer paper is:

x(t) + y(t) = cos (pi/2) t + sin (pi/2) t

= √2 cos ((pi/2) t - pi/4)

I have no idea how this is the answer. Am I missing something? can anyone show me the FULL working out?

2. Originally Posted by DevK
Hello, I dont know wether I've posted this in the right section but im really stuck on this question. Its from a signal processing exam paper:

Show that the signal is x(t) + y(t) is a sinusoid and determine its amplitude, frequency and phase.

The answer on the answer paper is:

x(t) + y(t) = cos (pi/2) t + sin (pi/2) t

= √2 cos ((pi/2) t - pi/4)

I have no idea how this is the answer. Am I missing something? can anyone show me the FULL working out?
I don't (yet) know whether you are missing something, but I can tell you that I am missing something: namely the definition of $x(t)$ and $y(t)$. In other words, if you want a FULL working out of this problem then you have first to provide us with a FULL specification of the of the problem statement.

3. hi, sorry i thought i added that, well here it is:

x(t) = cos ((pi/2)*t)

= cos ((2*pi)*(1/4*t))

y(t) = x(t-1)

= cos (pi/2)*(t-1)

= cos ((pi/2)*t)-(pi/2)

= sin ((pi/2)*t)

Thanks

4. Originally Posted by DevK
hi, sorry i thought i added that, well here it is:

x(t) = cos ((pi/2)*t)

= cos ((2*pi)*(1/4*t))

y(t) = x(t-1)

= cos (pi/2)*(t-1)

= cos ((pi/2)*t)-(pi/2)

= sin ((pi/2)*t)

Thanks
Just remember the addition formula for $\cos$, namely (adapted to your problem): $\cos(\omega t+\varphi)=\cos(\omega t)\cos(\varphi)-\sin(\omega t)\sin(\varphi)$.

$\begin{array}{lcll}
x(t)+y(t) &=& \cos(\tfrac{\pi}{2}t)+\sin(\tfrac{\pi}{2}t)\\
&=& \sqrt{2}\big[\cos(\tfrac{\pi}{2}t)\cdot\tfrac{1}{\sqrt{2}}-\sin(\tfrac{\pi}{2}t)\cdot (-\tfrac{1}{\sqrt{2}})\big]
\end{array}
$

Now, if we want this last term to be equal to

$\cos(\tfrac{\pi}{2}t)\cdot\cos(\varphi)-\sin(\tfrac{\pi}{2}t)\cdot\sin(\varphi)=\cos(\tfra c{\pi}{2}t+\varphi)$

we must have that $\cos(\varphi)=\tfrac{1}{\sqrt{2}}$ and $\sin(\varphi)=-\tfrac{1}{\sqrt{2}}$, which leads to $\varphi=-\tfrac{\pi}{4}$. Thus, it follows

$\begin{array}{lcll}
x(t)+y(t) &=& \cos(\tfrac{\pi}{2}t)+\sin(\tfrac{\pi}{2}t)\\
&=& \sqrt{2}\big[\cos(\tfrac{\pi}{2}t)\cdot\tfrac{1}{\sqrt{2}}-\sin(\tfrac{\pi}{2}t)\cdot (-\tfrac{1}{\sqrt{2}})\big]\\
&=& \sqrt{2}\cos(\tfrac{\pi}{2}t-\tfrac{\pi}{4})
\end{array}
$

as desired. More generally, if you want to convert $a\cdot\cos(\omega t)+b\cdot \sin(\omega t)$ to the form $c\cdot \cos(\omega t+\varphi)$, you first factor out $\sqrt{a^2+b^2}$ like this
$a\cdot\cos(\omega t)+b\cdot \sin(\omega t) = \sqrt{a^2+b^2}\cdot \Big[\cos(\omega t)\cdot\tfrac{a}{\sqrt{a^2+b^2}}-\sin(\omega t)\cdot\big(-\tfrac{b}{\sqrt{a^2+b^2}}\big)\Big]
$

and then determine $\varphi$ from the two conditions $\cos(\varphi)= \tfrac{a}{\sqrt{a^2+b^2}} \text{ and } \sin(\varphi)=-\tfrac{b}{\sqrt{a^2+b^2}}$. - In other words: from $\tan(\varphi)=-\tfrac{b}{a}$, which is to say $\varphi = \tan^{-1}(-\tfrac{b}{a})$.

5. Originally Posted by DevK
Hello, I dont know wether I've posted this in the right section but im really stuck on this question. Its from a signal processing exam paper:

Show that the signal is x(t) + y(t) is a sinusoid and determine its amplitude, frequency and phase.

The answer on the answer paper is:

x(t) + y(t) = cos (pi/2) t + sin (pi/2) t

= √2 cos ((pi/2) t - pi/4)

I have no idea how this is the answer. Am I missing something? can anyone show me the FULL working out?
No, that is NOT the answer! Are you clear on what the question is? It would make no sense at all to ask you to "Show that the signal is x(t) + y(t) is a sinusoid" without telling you what x(t) and y(t) are! You forgot to tell us, or didn't notice yourself, that part of the problem tells you that x(t)= cos((pi/2)t) and y(t)= sin((pi/2)t). From that, immediately, x(t)+ y(t)= cos((pi/2)t)+ sin((pi/2)t). NOW the problem is to reduce that to a single sine or cosine- i.e. a "sinusoid". Here it is given as a cosine because that way you can use the trig identity cos(a+ b)= cos(a)cos(b)- sin(a)sin(b). Take b= (pi/2)t and try to find a such that cos(a)= 1 and sin(a)= 1.

Well, of course, that isn't possible because we must have $cos^2(a)= sin^2(a)= 1$ and $1^2+ 1^2= 2$. But we could always write this as $\sqrt{2}(\frac{1}{\sqrt{2}}cos((pi/2)t)+ \frac{1}{sqrt{2}}sin((\pi/2)t)$ and ask for a such that $sin(a)= \frac{1}{\sqrt{2}}$ and $\frac{1}{\sqrt{2}}$. That's possible!

6. Originally Posted by Failure
Just remember the addition formula for $\cos$, namely (adapted to your problem): $\cos(\omega t+\varphi)=\cos(\omega t)\cos(\varphi)-\sin(\omega t)\sin(\varphi)$.

$\begin{array}{lcll}
x(t)+y(t) &=& \cos(\tfrac{\pi}{2}t)+\sin(\tfrac{\pi}{2}t)\\
&=& \sqrt{2}\big[\cos(\tfrac{\pi}{2}t)\cdot\tfrac{1}{\sqrt{2}}-\sin(\tfrac{\pi}{2}t)\cdot (-\tfrac{1}{\sqrt{2}})\big]
\end{array}
$

Now, if we want this last term to be equal to

$\cos(\tfrac{\pi}{2}t)\cdot\cos(\varphi)-\sin(\tfrac{\pi}{2}t)\cdot\sin(\varphi)=\cos(\tfra c{\pi}{2}t+\varphi)$

we must have that $\cos(\varphi)=\tfrac{1}{\sqrt{2}}$ and $\sin(\varphi)=-\tfrac{1}{\sqrt{2}}$, which leads to $\varphi=-\tfrac{\pi}{4}$. Thus, it follows

$\begin{array}{lcll}
x(t)+y(t) &=& \cos(\tfrac{\pi}{2}t)+\sin(\tfrac{\pi}{2}t)\\
&=& \sqrt{2}\big[\cos(\tfrac{\pi}{2}t)\cdot\tfrac{1}{\sqrt{2}}-\sin(\tfrac{\pi}{2}t)\cdot (-\tfrac{1}{\sqrt{2}})\big]\\
&=& \sqrt{2}\cos(\tfrac{\pi}{2}t-\tfrac{\pi}{4})
\end{array}
$

as desired. More generally, if you want to convert $a\cdot\cos(\omega t)+b\cdot \sin(\omega t)$ to the form $c\cdot \cos(\omega t+\varphi)$, you first factor out $\sqrt{a^2+b^2}$ like this
$a\cdot\cos(\omega t)+b\cdot \sin(\omega t) = \sqrt{a^2+b^2}\cdot \Big[\cos(\omega t)\cdot\tfrac{a}{\sqrt{a^2+b^2}}-\sin(\omega t)\cdot\big(-\tfrac{b}{\sqrt{a^2+b^2}}\big)\Big]
$

and then determine $\varphi$ from the two conditions $\cos(\varphi)= \tfrac{a}{\sqrt{a^2+b^2}} \text{ and } \sin(\varphi)=-\tfrac{b}{\sqrt{a^2+b^2}}$. - In other words: from $\tan(\varphi)=-\tfrac{b}{a}$, which is to say $\varphi = \tan^{-1}(-\tfrac{b}{a})$.

It is a special case of the more general situation I have described: $\sqrt{a^2+b^2}=\sqrt{1^2+1^2}=\sqrt{2}$ in your specific problem.
Note that this is required to make sure that the factors $\frac{a}{\sqrt{a^2+b^2}}$ and $-\frac{b}{\sqrt{a^2+b^2}}$ behave like the $\cos$ and $\sin$ of the same angle $\varphi$, since it must be true that $\cos^2\varphi+\sin^2\varphi=1$:
$\left(\frac{a}{\sqrt{a^2+b^2}}\right)^2+\left(-\frac{b}{\sqrt{a^2+b^2}}\right)^2=\cdots=\frac{a^2 +b^2}{a^2+b^2}=1$