1
$\begingroup$

If I have a system with the output: $$y(t)=x(t)+0.7x(t-0.4)$$ For $x_2(t)=\cos(56t)$, how can we write $y_2(t)$ in the form $y_2(t)=A\cos(\omega t+B)$ and calculate the unknown values A, B and $\omega$?

My 1st attempt:

I have written $y_2(t)$ as $y_2(t)$ = $x_2(t) + 0.7 x_2(t-0.4) = \cos(56t) + 0.7\cos(56t-22.4)$ and knowing that $e^{j\theta} = \cos(\theta) + j\sin(\theta)$ and that $e^{-j\theta} = \cos(\theta) - j\sin(\theta)$, I wrote $$\cos(56t) + 0.7\cos(56t-22.4) = \frac{e^{j56t}+e^{-j56t}}{2}+\frac{0.7 e^{j56t-22.4}+0.7 e^{-j56t+22.4}}{2}$$

I then considered $z=1+0.7 e^{-22.4j}$ and rewrote the previous expression as $z e^{j56t}+\overline z\ e^{-j56t}=|z|\ e^{j\angle z}\ e^{j56t} +|z|\ e^{-j\angle z}\ e^{-j56t}=|z|\ e^{j(56t+\angle z)}+e^{-j(56t+\angle z)}=|z|\ 2\cos(56t+\angle z)$

My 2nd attempt:

$$y_2(t) = x_2(t) + 0.7 x_2(t-0.4) = \cos(56t) + 0.7\cos(56t-0.4)$$ Use the cosine relation of $\cos(\alpha - \beta) = \cos(\alpha)\cos(\beta) + \sin(\alpha)\sin(\beta)$: \begin{align} y_2(t) &= \cos(56t) + 0.7\cos(56t)\cos(0.4)+0.7\sin(56t)\sin(0.4)\\ &=\cos(56t)+0.6447\cos(56t)+0.2726\sin(56t)\\ &=1.6447\cos(56t)+0.2726\sin(56t) \end{align}

But for example $\phi=\text{arctan}(-\frac{b}{a})=-0.16$ and the result I should come to is $\phi = 0.661$ and $c = 0.453$.

$\endgroup$
3
  • 1
    $\begingroup$ I’m guessing you’ve figured it out since you accepted my answer. Maybe it’s worth putting your answer here for future reference! $\endgroup$
    – Jdip
    Commented Dec 7, 2022 at 19:49
  • 1
    $\begingroup$ Yep, my bad, that's because the correct expression is actually $\cos(56t)+0.7\cos(56(t−0.4))$ like you had said before. I edited my answer accordingly, but @MattL's answer is a lot more elegant than brute-force trigonometry. $\endgroup$
    – Jdip
    Commented Dec 8, 2022 at 15:12
  • 1
    $\begingroup$ Thank you so much for the help. I finally figured it out. $\endgroup$
    – Anna Smith
    Commented Dec 8, 2022 at 19:03

2 Answers 2

1
$\begingroup$

EDIT A more elegant and general answer from Matt L.
The same result through brute-force trigonometry follows.


  • Use the identity $\cos(\alpha - \beta) = \cos(\alpha)\cos(\beta) + \sin(\alpha)\sin(\beta)$
  • Re-arrange your result, you should then be able to
  • use the identity $a\cos(x) + b\sin(x) = c\cos(x+\phi)$

$c = \text{sign}(a)\sqrt{a^2+b^2}$
$\phi = \arctan\left(-\frac{b}{a}\right) \quad\text{if} \ a\neq0$

Results

\begin{align} A &= \sqrt{(1+0.7\cos(56*0.4))^2 + (0.7\sin(56*0.4))^2}\\ B &= \text{arctan}\left(-\frac{0.7\sin(56*0.4)}{1+0.7\cos(56*0.4)}\right)\\ \omega &= 56 \end{align}

enter image description here

w = 56;
a = 1+0.7*cos(w *0.4); 
b = 0.7*sin(w *0.4);

A = sqrt(a^2+b^2); % Matt L: abs(1+0.7*exp(-1i*0.4*w))
B = atan(-b/a); % Matt L: angle(1+0.7*exp(-1i*0.4*w))

t = (0:100);
y = cos(w*t) + 0.7*cos(w*(t-0.4));
y2 = A*cos(w*t + B);

figure(1)
subplot 211
hold on
plot(y)
plot(y2)
legend('y', 'y2')
grid on
subplot 212
plot(y-y2);
title('error')
grid on
$\endgroup$
5
  • $\begingroup$ $$ \phi = \arctan(-\frac{b}{a}) $$ is true only if $a>0$. You really should say $$ \phi = \arg \{a-jb\} $$ Maybe check out this: en.wikipedia.org/wiki/… $\endgroup$ Commented Dec 7, 2022 at 18:41
  • $\begingroup$ Point taken! Edited $\endgroup$
    – Jdip
    Commented Dec 7, 2022 at 18:51
  • $\begingroup$ Woah! I just noticed the $\mathrm{sign}(a)$ thing. We gotta be more careful. I was assuming $c \ge 0$. You might need to undo my suggestion. $\endgroup$ Commented Dec 7, 2022 at 21:27
  • $\begingroup$ So it would just be if $a \neq 0$ right? Feel free to edit if there's still something not completely math-sound ;) $\endgroup$
    – Jdip
    Commented Dec 7, 2022 at 22:14
  • 1
    $\begingroup$ yes. I think so. i have thought of doing phase unwrapping as you are showing, myself. So that a sinc filter with delay will still be a sinc filter that there are sign changes in the magnitude rather than a 180 degree jump discontinuity in the phase. $\endgroup$ Commented Dec 8, 2022 at 4:02
2
$\begingroup$

A more general and - in my opinion - more straightforward way to arrive at the result is to use the following property of linear time-invariant (LTI) systems:

The response of an LTI system with frequency response $H(j\omega)$ to an input signal $x(t)=\cos(\omega_0t)$ is given by $y(t)=|H(j\omega_0)|\cos\big[\omega_0t+\arg\left\{H(j\omega_0)\right\}\big]$

The given system is clearly LTI, and its frequency response is easily computed as

$$H(j\omega)=1+0.7e^{-j0.4\omega}\tag{1}$$

With $\omega_0=56$, the desired magnitude and phase values are

$$|H(j\omega_0)|=\left|1+0.7e^{-j0.4\cdot 56}\right|=0.45320\tag{2}$$

and

$$\arg\left\{H(j\omega_0)\right\}=\arg\left\{1+0.7e^{-j0.4\cdot 56}\right\}=0.66119 \textrm{ rad}\tag{3}$$

The advantage of this method is that it is equally easy to derive the expression for the output in the more general case when the input-output relation is given by

$$y(t)=\sum_{k=0}^Na_kx(t-t_k)\tag{4}$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.