Principal frequencies of a Waveform

In summary: If you then add the two noises, the spectrum is still three delta functions, but now at f1, f2, and f3. In summary, From the excel file, it can be determined that the principal frequencies in the current waveform are 52Hz, 246Hz, and 351Hz. The term "principal frequency" refers to the main or dominant frequencies in the waveform. To calculate the total harmonic distortion, the formula for THD can be used with the values of the harmonics above the fundamental frequency. The THD value for this waveform is quite high at 80.69%. To sketch the original waveform from the three principal harmonics, the signal
  • #1
his_tonyness
48
1

Homework Statement


Identify the principal frequencies in the current waveform

Homework Equations

The Attempt at a Solution


From the excel file, I have identified 3 principle frequencies at 52Hz, 246Hz and 351Hz. Is this correct? What does the term principle frequency actually mean?
 

Attachments

  • Wave Spectrum FFT.xlsx
    97.1 KB · Views: 732
Physics news on Phys.org
  • #2
It's "principal" frequency, not "principle".
Wouldn't you just guess that they're the three peaks on your spectrum drawing?
 
  • #3
Thanks for your reply. How do I calculate total harmonic distrortion of that data using the attached equation. Since the vertical axis is in I^2, for I1 I have sqrt0.6617 * sqrt2 = 1.15A where 0.6617 is at 0Hz. I don't know what the nth harmonic is. the n(max) i assume is the n of the highest peak which is 3
 

Attachments

  • THD(I).png
    THD(I).png
    48.2 KB · Views: 878
  • #4
I can't seem to reopen your original excel file. But you need to determine the principal frequency. Is it the first (largest) peak? Anyway, the principal frequency is not distortion so you need to follow your formula for THD with all peaks above the first. If the spectrum was really I^2 (which sounds suspicious) then you already have I^2 for the two higher peaks. If the spectrum is I though you need to take I^2 in the formula.
 
  • #5
rude man said:
I can't seem to reopen your original excel file. But you need to determine the principal frequency. Is it the first (largest) peak? Anyway, the principal frequency is not distortion so you need to follow your formula for THD with all peaks above the first. If the spectrum was really I^2 (which sounds suspicious) then you already have I^2 for the two higher peaks. If the spectrum is I though you need to take I^2 in the formula.
upload_2015-5-13_19-38-59.png


This is the waveform, the largest peak is 15.8785 at 52Hz, then there is 8.77 at 246Hz and finally 6.25 at 351Hz. I think that these 3 frequencies are the principal frequencies.
I think I1^2 is 0.6617.
 

Attachments

  • Wave Spectrum FFT.xlsx
    81.1 KB · Views: 473
  • #6
I don't fully understand how to obtain the variables in the THD formula using my data.
 
  • #7
I would interpret the waveform data as the principal frequency being 52 Hz and the distortion frequencies as 246 and 351 Hz. So you'd use the THD formula for the latter two frequencies. Notice the summation is from n=2 to however many "spur" frequencies there are, expressed as a fraction of n=1 or I1. I'd say the sum here is over n = 2 to 3.
The graph does display I^2 so use the y-axis numbers directly in the THD formula. So I1 = 16 A^2 etc.
 
  • #8
1/16*sqrt(8.77+6.25(In))*100% is what I have so far. Am I on the right track? What is an nth harmonic?

My notes on this question state I1 is the r.m.s. value of the fundamental current, In the r.m.s
value of the nth harmonic and n(max) is the number of the highest measurable or significant harmonic.
 
  • #9
his_tonyness said:
1/16*sqrt(8.77+6.25(In))*100% is what I have so far. Am I on the right track?
No, you are misusing the formula. You need the sum of squares, not the square of the sum. What's "In" doing in your formula?
{quote]
What is an nth harmonic?{/quote]
n = 2 or 3 for you.
My notes on this question state I1 is the r.m.s. value of the fundamental current, In the r.m.s
value of the nth harmonic and n(max) is the number of the highest measurable or significant harmonic.
That makes sense. Your fundamental (n=1) is 16 A2 and your harmonics are 8.77A2 and 6.25A2.
 
  • #10
Ok so; 1/16*(sqrt ((8.77+6.25)/2))*100%. Sum of squares is standard deviation isn't it? n=2 because there are just the 2 harmonics after the fundamental right?
 
  • #11
his_tonyness said:
Ok so; 1/16*(sqrt ((8.77+6.25)/2))*100%.
This is worse than last time. Why are you dividing by 2? And you're still not doing the square root of the sum of squares.
Sum of squares is standard deviation isn't it?
Can be but is irrelevant here. You're not doing standard deviations.
n=2 because there are just the 2 harmonics after the fundamental right?
Right.
 
  • #12
Ok sorry. RMS of 8.77= 8.77/sqrt2 = 6.2 , RMS of 6.25=6.25/sqrt2= 4.419 . Because it is I2 I am going to assume that numerators may need to be rooted too?

Going back to the equation; ((1/16*sqrt6.22) + (1/16*sqrt4.4192))*100
 
  • #13
his_tonyness said:
Ok sorry. RMS of 8.77= 8.77/sqrt2 = 6.2 , RMS of 6.25=6.25/sqrt2= 4.419 . Because it is I2 I am going to assume that numerators may need to be rooted too?

Going back to the equation; ((1/16*sqrt6.22) + (1/16*sqrt4.4192))*100
1/√16 is right but you are still getting the rest wrong.
There is only one square root to be taken. You have two. Also, sqrt(6.22) obviously = 6.2 etc.
 
  • #14
I1(16) is also rms(16/√2=11.313) so should that not be 1/11.313*(6.2+4.419)*100%=93.86 which is a lot of distortion. The equation is trickier than it looks.
 
  • #15
his_tonyness said:
I1(16) is also rms(16/√2=11.313) so should that not be 1/11.313*(6.2+4.419)*100%=93.86 which is a lot of distortion. The equation is trickier than it looks.
No. I1 = 16 A2 according to your spectral graph. It says "I2" on the y-axis but I believe it means "I2".
Since I12 = 16 A2, I1 = 4 A. Now sum the n=2 and n=3 I2 numbers, then take the square root, then divide by 4.
I agree though that distortion is very large!
 
  • #16
1/√16*√(6.2+4.419)*100%= 80.69%.
 
  • #17
his_tonyness said:
1/√16*√(6.2+4.419)*100%= 80.69%.
But your n=2 peak is at 8.77 A2 and the n=3 is at 6.25 A2 so why are you again taking rms of those two numbers? You didn't take the rms of 16, and rightly so!
 
  • #18
Recalculating I come up 96.89%. I thought the question identified In as the rms of those harmonics that's all.
 
  • #19
Do you know a good step by step method for sketching the original waveform from the 3 principal harmonics?
 
  • #20
his_tonyness said:
Do you know a good step by step method for sketching the original waveform from the 3 principal harmonics?
It depends on your signal.
If there is just a fundamental (n=1) and noise at two harmonics (n=2 and n=3) ("spot noise") then the spectrum is a delta function at each of those two frequencies f2 and f3. Take your example and assume there is no noise at any frequency except at the spot frequencies 246 and 351 Hz. Then your power spectrum (which is what a spectrum of I2 is) should show a delta function at each of those 3 frequencies and nothing inbetween. The tips of the delta functions would be at 16, 8.77 and 6.25 A2. A delta function for you is just a spike at f1, f2 or f3.

Formally, the power at each spot frequency fn, n=1, 2 or 3, is ∫-∞In2δ(f-fn)df. Then you rss the two noises with the fundamental as you did with your formula to get rss noise.

If noise is continuous you have to evaluate a different integral. All this is probably a bit advanced for you. I should mention that a trace like your spectrum is what you'll get from a spectrum analyzer even if there are only spot noise frequencies. It will show some noise at all frequencies due to the limitations of the instrument.
 
  • #21
his_tonyness said:
Recalculating I come up 96.89%. I thought the question identified In as the rms of those harmonics that's all.
Correct!
 
  • #22
I simulated on LT spice roughly to reconstruct the original waveform by adding the 3 harmonics on the same time axis (50ms)

http://forum.allaboutcircuits.com/attachments/213-gif.85824/
 
  • #23
Good. See the spikes on the spectrum I talked about?
BTW how exactly did you come by the spectrum you showed in post 5?
 
  • #24
I performed FFT on the sample data in excel file I was given, which the spreadsheet automatically calculated the frequency and I2 magnitude columns and the spectrum diagram in post 5. I can't figure out how to use Fourier synthesis to replicate the original waveform.
 
  • #25
his_tonyness said:
I performed FFT on the sample data in excel file I was given, which the spreadsheet automatically calculated the frequency and I2 magnitude columns and the spectrum diagram in post 5. I can't figure out how to use Fourier synthesis to replicate the original waveform.
Depends on whether you are assuming a continuous waveform or a truncated one.
What you have simulated is continuous (generators are there from t - infinity to t + infinity. For that you already have the answer: I(t) = 3.98sin(w1t) + 2.96sin(w2t) + 3.98sin(w3t). (In your simulation you generated the squares of the currents which is incorrect.)

The DFT is actually a Fourier series. The truncated waveform of duration T is assumed to have periodicity T. So first thing you know is you can't determine any frequency components below 1/T. The fact that the spaces between your "spikes" is nonzero is a consequence of the fact that there are only a finite number of samples taken during time T.
Show us your excel file & we should be able to see just what you did.
 
  • #26
Here it is. Also features An and Bn Fourier co efficients.
 

Attachments

  • FFT.xlsx
    100.6 KB · Views: 582
  • #27
his_tonyness said:
Here it is. Also features An and Bn Fourier co efficients.
What is the time interval (column A)?
Were there 1024 or 2048 time samples taken? If only N=1024 as it appears, there is redundant information in the frequency components (column D), because you can only get N/2 + 1 complex frequency numbers for N time samples.
Don't be confused by the term "complex frequency numbers". It just means there are N/2 + 1 sine coefficients and N/2 + 1 cosine coefficients for the Fourier series representing a periodic function with T as its fundamental.
 
Last edited:
  • #28
Thats the darndest thing, the sample interval does not state the time units. "The supply current was sampled 1024 times over a very short time interval" that's all it gives me with regards to time, I assume we can use any sensible small time period. If you hover the mouse cursor over cell I3, it does state that the sampling frequency is 360/20ms=18000. I re-ran the simulation at 20ms:

upload_2015-5-19_18-59-17.png

upload_2015-5-19_18-59-29.png
 
  • #29
his_tonyness said:
Thats the darndest thing, the sample interval does not state the time units. "The supply current was sampled 1024 times over a very short time interval" that's all it gives me with regards to time, I assume we can use any sensible small time period. If you hover the mouse cursor over cell I3, it does state that the sampling frequency is 360/20ms=18000. I re-ran the simulation at 20ms:
I think you gave me what I wanted: if the sampling frequency was 18 KHz and there were 1024 samples taken, then the sample duration T = 1024/18000 = 56.89 ms. Your graph is column H, the magnitude of I2.
They didn't make you do much. They gave you the output of the DFT program without going into the formulas involved, which I think is too bad, but what the heck, you got to go with what they give you - if you're ever curious how the data in column D was obtained, look at http://www.dspguide.com/ch8.htm
Based on T = 56.89 ms. the DFT gave you all the A and B coefficients staring with the dc component and the "fundamental" frequency 1/.05688 = 17.58 HGz and harmonics up to and including the 512th (N/2). Interestingly, there was a dc component in your wave. As I said, half the D column values have to be redundant since you can't get more than N/2 + 1 harmonics starting with dc and 17.58 Hz.
 
  • #30
Ok, If i produce a simulation over 57ms or 1/T with the 3 principals at their orignal not square values that would be a more accurate synthesis?
 
  • Like
Likes NTL2009
  • #31
his_tonyness said:
Ok, If i produce a simulation over 57ms or 1/T with the 3 principals at their orignal not square values that would be a more accurate synthesis?
No, see my next post. Looks like my mistake.
 
  • Like
Likes NTL2009
  • #32
OK I ran the excel data anylis Fourier program and finally (my last column) got your magnitudes as depicted on your graph. So it looks like your sample were I2, not I, which I wonder how you (or they) did that. In other words, you were right to show your generators as I2 instead of I in your simulation.
My excel Fourier transform run is attached. Obviously your spreadsheet used the same excel algorithm, the one from the data analysis package. I hope the upload worked. If you get a strange spreadsheet let me know.
 

Attachments

  • FFT1.xls.xlsx
    116.7 KB · Views: 530
  • #33
I'm currently working through this and I noticed that the coefficients (bn and an) in one of the attached spreadsheets is incorrect. The Fourier components should be divided by N (using IMDIV) before either multiplying by 2xn for an (using real part) and -2yn for bn (using imaginary part).

Regards
 
  • #34
Electest said:
I'm currently working through this and I noticed that the coefficients (bn and an) in one of the attached spreadsheets is incorrect. The Fourier components should be divided by N (using IMDIV) before either multiplying by 2xn for an (using real part) and -2yn for bn (using imaginary part).

Regards
Correct. I looked at "H2" and assumed the rest was all "IMDIV'ed", my mistake. Unfortunately I don't know how to perform IMDIV on multiple cells and I am not doing it one by one for 1024 cells! Multiplying the real and imaginary parts separately is a pain too to extract sine and cosine coefficients.
 
  • #35
All you need to do is carry the formula out for one cell, then highlight the result cell (where you have your =) and drag it down for each cell (you will see a little plus sign) this will then carry out the formulas for every cell/result. Very straight forward to do.
Any problem and I will explain some more.
 

Similar threads

Back
Top