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.

spectral analysis ... urgent help required

Status
Not open for further replies.

sweetsalt

Newbie level 4
Joined
Dec 18, 2005
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
Hi all!
I am asked to perform a spectral analysis using Fourier techniques of the following 64 points.which are obtained by sampling a continous signal at 4000hz.

-2.2084441e-001
1.0841281e-001
-2.2566847e-002
-7.1269979e-001
-7.7570468e-001
1.5490627e+000
1.9458210e-001
-8.9878564e-001
2.5642118e-001
1.2323886e+000
-2.5090429e-001
-6.4754173e-001
-2.8157727e-001
1.8196999e+000
-3.4228194e-001
-1.0446433e+000
5.8907411e-001
4.8584173e-001
7.0878880e-001
2.1880127e-001
1.2519184e+000
2.9170207e-001
1.2549903e+000
1.2138000e+000
-3.1823385e-001
-4.6785664e-002
-2.3964629e-001
-1.7661788e+000
-1.4964292e+000
-3.6095019e-001
-1.1122538e+000
2.1902688e-002
6.1575414e-001
1.3917852e+000
-3.2921212e-001
7.7902325e-001
6.3796904e-001
-1.2476316e+000
9.7494022e-001
-7.5831465e-001
-1.0848348e+000
6.0460012e-001
-1.4021865e+000
1.3785847e+000
-6.5360020e-001
-4.9165649e-001
9.8713534e-001
-1.0617638e+000
-1.0888472e+000
6.9453009e-001
6.1975115e-001
8.5906752e-001
9.9296393e-002
1.8264694e-001
-6.5977471e-001
-1.0669556e+000
1.5649163e-001
3.4083024e-001
8.9142667e-001
6.5523161e-001
1.1048760e-001
-8.1966173e-001
-2.1416913e-001
-1.6509091e+000

Now the problem is when i do, stem(abs(fft(x)) , what i should get must be symetric around its center, because it a real signal.
real signal has frequency only from 0 to pi ( comments needed?? )
so values from 0 to pi must repeat from pi to 2pi,

But in my case fft is not symetric, the first value is causing problem, like i have 64 point fft, 31 values around 33rd values are symetric, but the value at 1 is like no where in the signal again, y is thats so???

if any one can do the given signal's spectral analysis for me, it would be great help.

i am doing

yf=fft(x,64);
y = yf(1:33); % just look at first half
m = abs(y); % m = magnitude of sinusoids
p = unwrap(angle(y)); % p = phase of sinusoids, unwrap() % copes with 360 degree jumps
w=0:pi/32:pi;


subplot(2,1,1), stem(w/pi,m); % plot magnitudes
ylabel('Abs. Magnitude'), grid on;
xlabel('\omega/\pi');
subplot(2,1,2), stem(w/pi,p*180/pi); % plot phase in degrees
ylabel('Phase [Degrees]'), grid on;
xlabel('\omega/\pi');


plz help me urgent, deadline is 2morow.
Thanks in advance
 

Hi
There is no proplem in the results u get... it is correct and semetrical.
FFT DOES NOT RETURN FREQUENCY FROM 0 TO 2*PI .. BUT FROM 0 TO (63/64) *2*PI with step 2*pi/64.
The first component is the DC and so you will not find it anywhere in the signal.
The spectrum of sampled signal is replicas of the continous one so
the component at 33 is the value at pi.
the component at 64 is the value at 63/64 2pi
the value at 2pi is known and equal to that at 33

Again u should remeber that the spectrum of the sampled signal is NOT from 0 to pi ... it is entended from -inf to inf by repeating spectrum from -pi to pi ( which is semetrical)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top