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.
because we want to make it look cyclic. remeber cyclic convolution? the idea is that using this we maintain the orthogonality of our carriers using the DFT later on
Thank you communication_engineer but i know that, my quistion is why not centering the data why he made the padding on the center not the data at the center?
hi Aya2002,
Let me tell explain you a simple eg ( using dft symmetry property)
where to maintain DFT symetricity they maintain zero padding at the center rather at the end. this is usaually done for making the spectrum to be symmetric .
for real even seq you expect imaginary spectrum X[k] to be zero.
for real odd seq you expect real X[k] to be zero.
eg.
let your seq be x[n] = { 1,1,1,1,1,1}
by padding zero at the end of the seq,you are changing the transform you are computing. (i.e, you are breaking the DFT symmetry(even or odd seq for periodic seq ). of course With N=6, FFT is perfectly fine on 6 points
But, if you really wanted to pad, you woud have to pad in an "even"
fashion. In this case, you would pad to
[1 1 1 0.5 0 0.5 1 1]
i will explain you with another example:
For example,
the array [1 2 3 8 3 2] is a real-even array, where "1" is the zero-
frequency (DC) element, "8" is the Nyquist element, and "2 3" and "3
2" are the symmetric positive and negative frequency amplitudes,
respectively. To pad it symmetrically to length 8 (although, as I
said above, you really don't need to), you would do [1 2 3 4 0 4 3 2],
where the Nyquist frequency "8" has been split equally between
positive and negative frequencies.
Your data are (almost) symmetric around N/2, not 0.
This would cause a linear phase shift of the spectrum
coefficinets. So to get this to work, account for the N/2 lag in the spectrum.
In short, Whenever U need symmetrical spectrum for real (even or odd) sequences
U must zero pad at the center onwards ( not at the end)
If U understand this concept i will tell regarding periodic odd seq satisfying DFT symmetry.
Hi aya2002,
Usually one will think zero padding will be done at the end.
ofcourse DFT operates on periodic sequence only( even though aperiodic sequence is there i.e., by making them (aperiodic) circularly symmetric)
by taking this circular symmetric property as advantage, we reduce the DFT computation into half (saving 50% computation and storage)
so when L=i/p seq length =6; it is advisable we dont need to pad zeros. if U want to pad zeros still for better display
we pad zeros symmetrically (rather than at the end; as it changes the transform itself). if your original data is x[n]={1,2,10,5} here L=4; also this is even sequence
If U want to make the seq N=8; then padded symmetrical seq. is
x[n]= {1,2,10,2.5,0,2.5,10,2} here zero is padded at the centre, by taking advantage the dft symmetricity it is enough if we take 1 to (N/2+1) i.e., 1 to 5 (Unique sequences). (In matlab starting array element is 1 )
while remaining seq are redundant data points, whose spectum will b conjugate symmetric.
reason:
If you have a N point real valued input waveform, your samples are the
real valued inputs to the DFT or FFT, and the imaginary parts are set
to zero. e.g.: with N even, outputs 0 and N/2 will be
real and unique, and outputs 1 to N/2-1 will be conjugate symmetric
with outputs N-1 to N/2+1).
if U want to find DFT with N=16;
then the seq would be x[n]={1,2,10,2.5,0,0,0,0,0,0,0,0,0,2.5,10,2}
Here we will take data points 1 to N/2 +1 and then perform DFT. i.e., only first 9 points are considered.
one can wonder at wha point the above spectrum is symmetric.
It is symmetric with respect ot N/2(nyquist point). so to make spectrum to be symmetric around zero one has to introduce the phase lag of N/2 additionally.
then plot will look like from -N/2 to N/2.
till now i told about even seq (x[N-n]=x[n]) ; i didnt mention about odd seq.
x[N-n]= - x[n] for n= 1 to N-1
symmetric odd seq L=5; x[n]={0,2,4,-4,-2}. This element is DC component is set to zero. also there is no nyquist freq. (without zero padding)
if want to padd zero symmetrically, for even N =8;
x[n]={ 0,2,4,0,0,0,-4,-2} while intentionally making nyquist frq and dc component to be zero. here Unique data points are ceil (N+1)/2 i.e., 5 data ponts ( 1 to 5 elements in MATLAB) take first five data points and find fft of that seq. since we know the rest 3 data points exhibit conjugate symmetric. therby it reduces the computation of DFT and memory storage as well.
a word of caution :
zero padding is advisable only whenever the i/p seq length is closer to DFT N-point length.
In ofdm, i think zero padding will related to cyclic prefix(of course i dont know much about cyclic prefix in detail) so that orthogonality is maintained.
hi rramya
i understad it very much. My quistion is if i have random data with imaginary parts, why i did the zero pad before the IFFT as shwon in the following matlab code
%DVB-T 2K Transmission
%The available bandwidth is 8 MHz
%2K is intended for mobile services
clear all;
close all;
%DVB-T Parameters
Tu=224e-6; %useful OFDM symbol period
T=Tu/2048; %baseband elementary period
G=0; %choice of 1/4, 1/8, 1/16, and 1/32
delta=G*Tu; %guard band duration
Ts=delta+Tu; %total OFDM symbol period
Kmax=1705; %number of subcarriers
Kmin=0;
FS=4096; %IFFT/FFT length
q=10; %carrier period to elementary period ratio
fc=q*1/T; %carrier frequency
Rs=4*fc; %simulation period
t=0:1/Rs:Tu;
%Data generator (A)
M=Kmax+1;
rand('state',0);
a=-1+2*round(rand(M,1)).'+i*(-1+2*round(rand(M,1))).';
A=length(a);
info=zeros(FS,1);
info(1: (A/2)) = [ a(1: (A/2)).']; %Zero padding
info((FS-((A/2)-1)) :FS) = [ a(((A/2)+1) :A).'];
thanks in advance (i will donate 20 pts for best discussion).
as i know the padding will be done for the ends while he did it by siplit the data and puts the zeros in the center and also the zero padding must be done for the FFT. can you explain please ?
Hi Aya2002,
your data exhibit conjugate or hermitian symmetry where,
x[n]=x*[N-n] which implies real part is even symmetric ansd imaginary part is odd symmetric.
also In your notes they zero padding can be done after N/2 samples.
to maintain symmetry.
so zeros are put in the centre of the seq in your matlab code (last line)
you can do it but you wont get symmetry of spectrum. if u padd at the end your data gets changed and your transform will get changed. so symmetricity will not be maintained. Also u can't take advantage of DFT symmetry property.
You have to do full N-point computation (tedious task, copunsumption of bw by 50% will not be done as for OFDM is tis the biggest adv )instead of ceil(N+1)/2 computation.
i am telling to the best of my knowlege. I am just a beginner yet. Pl consult some expert advice.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.