0
$\begingroup$

The signal $$x(t)=\cos(10\pi t+\phi)+\cos(20\pi t)$$ is sampled with a sampling frequency $F_s$ as $25 \mathrm{Hz}$ where the phase $\phi$ is unknown.

Sampling the continuous time signal $$y[n]=x(nT)$$ where $T=1/F_s$.

After calculating the DFT of $y[n]$ with the length of DFT $N=100$, which of $k$ will give us the maximum of the magnitude of $Y[k]$?

$\endgroup$
  • $\begingroup$ Any ideas that you might have to start with? $\endgroup$ – GKH Feb 3 at 9:32
  • $\begingroup$ May I know why you have introduced one more unknown $\phi$ in seeking an answer? $\endgroup$ – jomegaA Feb 3 at 9:42
  • $\begingroup$ I thought of converting to Euler and then converting to DFT but the answer I get is incorrect. @GKH $\endgroup$ – ori Feb 3 at 9:48
  • $\begingroup$ This is the qeustion I got... @jomegaA $\endgroup$ – ori Feb 3 at 9:49
2
$\begingroup$

Note that the frequencies of the FFT grid are given by

$$f_k=\frac{kf_s}{N},\qquad k=0,1,.\ldots,N-1\tag{1}$$

where $N$ is the FFT length.

Now observe that the two frequencies of the given signal fall exactly on the grid. So you only have to determine these two frequencies, and then use $(1)$ to figure out the corresponding indices.


EDIT:

It's always good to check your results using some simulation software. The following Octave/Matlab script confirms what you came up with.

phi = 0;    % exact value irrelevant
n = 0:99;
T = 1/25;
y = cos( 10*pi*n*T+phi ) + cos( 20*pi*n*T );
Y = fft(y);
subplot(2,1,1), plot(n,abs(Y),'x'), grid on

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ I already did it and I get k=20,40,60,80. its incorrect. The answer should be k=10,20,80,90 $\endgroup$ – ori Feb 3 at 10:56
  • $\begingroup$ @ori: What you got is correct. Why don't you just use some software and check the result? The given answer is wrong. $\endgroup$ – Matt L. Feb 3 at 11:03
  • 1
    $\begingroup$ @ori: I've added a simulation to my answer to convince you that we're right and the given solution is wrong. $\endgroup$ – Matt L. Feb 3 at 11:17
  • $\begingroup$ I understand, thank you very much $\endgroup$ – ori Feb 3 at 11:20
  • 1
    $\begingroup$ @jomegaA: If you want the zeroth bin in the center you can use fftshift. $\endgroup$ – Matt L. Feb 3 at 11:35
0
$\begingroup$

My humble attempt and I could be totally wrong in trivial things. Phase $\phi=0$

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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