Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to perform FFT on random data signal correctly in MATLAB?

Status
Not open for further replies.

dashin

Newbie level 4
Joined
Nov 4, 2019
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
83
Hello,
I am a student doing research in high-speed electrical link.

I have came up with a new signaling scheme, and want to see spectrum plot of it but not sure how to correctly perform fft on the signal in MATLAB.
My signaling scheme, uses phase modulation to have same spectral efficiency as PAM-4 signal (which is 2bits/UI) but has one-UI that is 1.25 times larger than the PAM-4 signaling.
We know that for PAM-4 signaling, the first null in the spectrum plot appears at its symbol-rate. Therefore, for the signaling scheme that I am proposing, I am expecting to see the first null at 1/1.25 = 0.8*symbol-rate of PAM-4. However, this is not the result that I am seeing through FFT.

I think I have followed all the fft rules (sampling-rate >> symbol-rate, including integer # of cycles) but not sure what is wrong..
Could anyone please help me on this?

Below is my code for fft.


Code - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
% sampling-rate is chosen Rs times the symbol-rate of the signal.
fs = f_sym*Rs; Ts = 1/fs;
% warning if symbol period is smaller than the sampling interval
 
if (fs < f_sym)
error('symbol period is smaller than the sampling interval');
end
 
% fft
N = size(signal, 2);
signal_fft = (fftshift(fft(signal, N)))/(N/2);
signal_fft_abs = abs(signal_fft);
signal_fft_db = db(signal_fft_abs);
df = fs/N;
f = -fs/2:df:fs/2-df;
 
% plot the result
figure;
plot(f(end/2+1:end), db(signal_fft_abs(end/2+1:end)), linestyle);



The result shows correct plot for PAM-4. I have used PAM-4 signal with symbol-rate of 1Gsymbol/s. Then, I see in the spectrum plot that there is null at multiples of 1GHz.
PAM_fft.png

However, for the signaling scheme that I came up with, I see null at 4GHz even if its maximum symbol-rate is 0.8Gsymbol/s. Why, I am not seeing a clear null at 800MHz?
PAM_PM_FFT.png
 
Last edited by a moderator:

Hi,

I think I have followed all the fft rules (sampling-rate >> symbol-rate, including integer # of cycles) but not sure what is wrong..
Better give all the really used values than vague informations.

Can you post a picture of your FFT signal input (time domain)

Klaus
 

Hello KlausST,

Thank you for your reply.
For the following spectrum result that I posted before, I am using the following values.

For PAM-4,
symbol-rate is 1Gsym/s (f_sym = 1e9) so one symbol period is 1ns.
Sampling-rate is 1000GHz (Rs = 1000).

This is the time-domain of PAM-4 signal that I am using as one period in n-point dft.
It contains 100 symbols, and in each symbol there are 1000 samples of points, so total 100000 points in the dft.
View attachment 156359

For the signaling scheme that I am proposing, it uses PAM-4 signaling and PM-4 in an alternate way as below.
In this case, symbol-rate in PAM-4 UI is 1Gsym/s. In PM-4 UI, PM spacing is 0.25UI.
Therefore, minimum pulse-width of 1.25UI can be achieved.
PAM_PM_concept.png

symbol-rate is set to 1Gsym/s (f_sym = 1e9) so minimum pulsewidth is 1.25ns in this case.
Sampling-rate is 1000GHz (Rs = 1000).

This is the time-domain of the signal that I am using as one period in n-point dft.
It contains 100 symbols of PAM-4 and PM-4 each (so in total 200 symbols).
In each PAM-4 symbol, there are 1000 samples of points.
In each PM-4, each PM slice in time (0.25UI) contains 250 samples of points.
View attachment 156358


Thank you.
 

Hi,

Before you talked about FFT. There the window size should be 2^n samples (n = integer).

Now you talk about DFT. Why?
DFT window size should be an integer value.

Independent of DFT or FFT...you should imagine that the input windows (with same content) are placed one after the other (= signal is repeating). Now check that there is no mismatch at the edges of the window.

If you can't ensure this ... you need to perform a "windowing function" (Hamming, von Hann ...) before you perform the fourier function.

For an FFT: if possible use Rs = 512 or Rs = 1024 (instead of 1000). Check if this gives a benefit.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top