# DFT X(K) frequency spectrum is not what was expected

Status
Not open for further replies.

#### ganes

##### Newbie level 3 DFT

hi,

Can someone tells me how X(K) change f we doubled the sampling freuqency

#### Distortion-andi

##### Newbie level 4 DFT

Can you state it a bit clearer what your up to?
Is X(k) your time or freq domain, when you double the sampling freq your getting a better resolution in the freq domain fs = 44100 -> 22050 Hz, fs2 = 88200 -> than 44100 Hz..it only helps if you wanna get frequencies over the half sampling rate.....i am not a pro but maybe if you state it a bit clearer, i can help you

### ganes

Points: 2

#### Communications_Engineer Re: DFT

ganes said:
hi,

Can someone tells me how X(K) change f we doubled the sampling freuqency

Just think about what you are asking. The answer is in the question, if you really know how DFT works

### ganes

Points: 2

#### ganes

##### Newbie level 3 DFT

hi,

I have a signal x(t)=25cos(10*pi*t)cos(400*pi*t) . i sampled it at sampling frequency of 410 Hz which is just equal to the Nyquist rate. my matlab code to compute the DFT X(K) is
N=82;
n= 0:81;
Ts = 1/410;
t = n*Ts;
x=25*cos(10*pi*t).*cos(400*pi*t);
X=fft(x);
subplot(3,1,1)
stem(n, x)
axis tight
ylabel('x[n]');
xlabel('n');
subplot(3,1,2);
stem(n*410/N, abs(X));
axis tight
ylabel('DFT X(K),Magnitute');
xlabel('f in Hz');
subplot(3,1,3)
stem(n*410/N, angle(X))
ylabel('DFT X(K),Phase');
xlabel('f in Hz');
axis tight

The result is the DFT X(K) frequency spectrum show 3 frequency present in the signal. but i expect only two frequency present (195Hz and 205Hz) . where the hell this third frequency resulted. am i right to say that is it caused by aliasing.

Now if I sampled the signal at 810Hz and other parameter remain unchanged , my DFT X(K) in the frequency domain have duplicate copies( periodic) but the frequency spectrum is not what i expected to be 195Hz and 205Hz. I thought I have prevented Aliasing by sampling higher than the Nyquist Rate.

struggling to understand on this.

#### Communications_Engineer DFT

### ganes

Points: 2

#### Communications_Engineer Re: DFT

While having a look at the Matlab code, I don't think you should expect to see two frequency bins, since you are not 'adding' but 'multiplying' the two discrete-time signals

If you also look at it, this similar to multiplying a low frequency signal with a higher frequency one, something like AM and I believe the graph is also showing the same thing, both in time-domain and in frequency-domain

### ganes

Points: 2

#### ganes

##### Newbie level 3 DFT

hi,

Thanks , I manage to figure out already.

#### awanis

##### Junior Member level 1 Re: DFT

hai...
ihave a question..
how i can solve the signal from X signal to quantization signal
can give me the example of instruction in matlab how to do it..
where X = 6 sin (3πt)-5cos (6πt)+7cos(8πt +π/6)
N=7 with 4 level quantization using tranqated technique
range= ±10V sample signal of x  dft signal of x #### Communications_Engineer DFT

kindly re-phrase your question. It is difficult to understand what you are asking

#### awanis

##### Junior Member level 1 Re: DFT

ok..
this the question..
the question give X = 6 sin (3πt)-5cos (6πt)+7cos(8πt +π/6)
its want to get the quantized signal,Xq with 4 quantization level using trancated technique.. and the dynamic range is ±10V..
giving N=7..
from the manual calculating i get the value is..
{-2.5,-2.5,-2.5,-2.5,2.5,7.5,7.5..}

#### Communications_Engineer DFT

you have 4 quant levels or 4 bit ADC? Both are different things, I hope you are aware of it

Taking your question as it is, I'd say the answer is wrong. 4 quant level for a dynamic range ±10 would be 20/4 values.

What is N? Why is it equal to 7?

#### awanis

##### Junior Member level 1 Re: DFT

N is equal of the dicsrete signal from 0 until 6..(0<N<6)
i get in what u said 4 quant level for a dynamic range ±10 would be 20/4 values.
its true...
how should i get the true answer from calculating and using matlab..?

#### Communications_Engineer DFT

You would have made a function to quantize the input signal in Matlab. So, upload the part where you describe the algorithm into Matlab code. You can send it via email if you dont want to upload it here.

I'll point you out where you are doing the mistake. So that you can reverse engineer the idea

I will however, not make a function for you (I think this is part of your homework)

#### awanis

##### Junior Member level 1 Re: DFT

ok...
thanks...
how can i email?
i will send my instruction in matlab..

Status
Not open for further replies.