# How to calculate spectrum coefficient amplitude.

Discussion in 'Homework Help' started by lam58, Jan 19, 2014.

1. ### lam58 Thread Starter Member

Jan 3, 2014
69
0
A question asks to calculate the spectrum amplitudes at harmonic frequencies which are closest to the frequencies of the sinusoid sample. The sinusoid has an amplitude of 220v with 50Hz freq and is sampled at 200Hz over 0.21s.

2. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,496
511
Fourier series stuff.

This seems relevant: http://www.dspguide.com/ch13/4.htm

So you have a signal: x(t)=220*cos(2*pi*50*t)
I make a couple of assumptions:
1) The signal is even, that makes it cosine.
2) I am going to center the signal at t=0 seconds. This means that the signal is not from 0 seconds to 0.21 seconds. The way I set it up is that the signal is from -0.105 seconds to +0.105 seconds, total of 0.21 seconds, but centered on t=0.

Now just plug the numbers into the formula:
an=2*Amplitude*sin(pi*n*(k/T))/(n*pi)

Amplitude is known.

n is the harmonic, if you want to find amplitude of second harmonic, replace n with 2.

k is 0.21 seconds.

T is period of the sinusoid, you can calculate it using frequency of the sinusoid.

No offense mate, but if you are in school, then you should stop paying for your school because you are not getting anything for your money.

lam58 likes this.
3. ### WBahn Moderator

Mar 31, 2012
18,064
4,904
Is this signal that you are sampling coming from a mathematical function or is it, at least presumably, a real signal that has noise and harmonics in it?

Assuming the latter, you first have to determine what frequency is the closest harmonic to your fundamental.

Then you have to figure out how to single out that frequency from the data. What you are basically looking for is how to do a single frequency Fourier transform, which is closely related to the Fourier series.

lam58 likes this.
4. ### lam58 Thread Starter Member

Jan 3, 2014
69
0
Really why do you say that?

5. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,496
511
Because I have taken DSP class and I did not need to go look for help on the internets.

The amount of time you spend here looking for help tells me that you are having problems with how your instructor presents the material or you have an issue with the textbook for your class, or both.

6. ### lam58 Thread Starter Member

Jan 3, 2014
69
0
Just the way I learn, my tutors are very good at teaching, this is just the way I've always done it. The course I'm on is in a different country from where I come from so a lot of the content in the text books are going on the assumption that you've already learned previous material. Where as in my case I haven't. However I've been doing ok so far, I might be asking loads of questions on here and sound a bit ignorant at times but I soon pick it all up.

Better to ask on the internet when I can't get a hold of my tutor than to struggle and fail my exams when they come.