# excel sin waves

Discussion in 'Homework Help' started by ninjaman, Dec 2, 2013.

1. ### ninjaman Thread Starter Member

May 18, 2013
306
1
hello
anyone here know much about using excel to show sin waves

i have to show a fundamental, 3rd and 5th harmonic

i have done the fundamental, but im stuck on the 3rd

i ended up with a mutated sine wave. i think it may have been the time scale that i used.
i have a fundamental of 50Hz, so the third is 3*50= 150Hz, 1/150 is 0.006 seconds.
i started with 0.0001, 0.0002, 0.0003 up to 0.006.
the vmax was different, 100v peak for the first fundamental. 32.5v for the third max voltage.

any help would be really appreciated
thanks
simon

2. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
I'm not sure what you are trying to end up with.

Do you want the three sine waves plotted as separate waveforms on the same axis? Do you want to plot the sum of the three sine waves?

What do you mean by "a mutated sine wave"?

3. ### tbinder3 Member

Jun 30, 2013
30
1
I actually tried doing this same thing a few weeks ago, I had a few pages of tables, and equations, and wanted to plot gain vs frequency along with many others. What I did was try different kinds of the graphs they offer, I believe it was the "scatter plot" I was using. Some are very similar but offer a better picture. I wound up using a different prog tho, lol

4. ### atferrari AAC Fanatic!

Jan 6, 2004
2,663
783
And that means what?

5. ### wayneh Expert

Sep 9, 2010
12,365
3,220
I spent a former life doing anything and everything you can imagine in Excel. Making a sin wave is very easy, so I don't understand your question.

Figure out the resolution - number of points to plot - that you want. I'd probably use at least 100 but no more than 1000. Let's say 1000. Create a column of ascending digits zero to 1000. This is your index column. In the next column to the right, put a formula that converts the index to the appropriate time. So for instance if you are at 60Hz and you want to plot one cycle, that's 17ms. Each row in your time column will increment by 17/1000 sec.

Now put your time formulas for sine and harmonics into the next few columns. Plot all these versus either the index or the time. You could use a line plot since all your x values are uniformly spaced, but I recommend a scatter plot.

6. ### ninjaman Thread Starter Member

May 18, 2013
306
1
this is really irritating me now.
I have tried to enter values starting a 1 and increasing to 1000
then I try to highlight by clicking the bottom right of the rectangle over 1. I have tried ctrl and left dragging down, I have tried using shift instead of ctrl but I cant get them to copy down.
I want to go to 1000 as mentioned by the poster above, so the numbers would start at 1 and finish at 1000
anyone know how to do this. I have searched and found autofill but im doing something wrong as it wont work.
thanks
simon

Last edited: Dec 4, 2013
7. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
Enter a couple numbers in a column, say 1 and 2. Highlight the cells when the numbers and then click the low right corner, hold the mouse button and drag. You don't need to use ctrl.

8. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
I haven't figured out how to force it to do what I want (literal copy or increment) from a single cell. I just know that it will almost always do the opposite of what I want to prove that it is good at telling what I really meant.

But if you put values in TWO cells and then highlight BOTH cells and copy them down it seems to do the right thing almost all the time.

9. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
You do if it decides you just want to copy the values.

10. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
Please see my edited version. If you click the corner, you don't need ctrl.

11. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
I just did some playing around and I still have no idea how to predict, with confidence, whether it will copy or increment a single cell as you copy in down. For instance, I created a column of numbers that went from 1 to 9, so you would think that it would surely choose to increment the values if I copy-extend the 9 downward. Nope, just copies it literally.

However, I did discover that the CTL key toggles whichever it chose.

In the last few (don't know how many, maybe just two) versions of Excel, you can tell which decision it made by looking for a little + above and to the right of the big + sign it uses to indicate the copy-extend operation. Also, in at least the last version, it shows a mouse-over-like dialog showing what value it is going to put into the bottom cell of the extended range. Either of those will let you choose, with confidence, whether to use the CTL key or not.

12. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
If you enter numbers into more than two rows and highlight them and copy-extend them down, the results become erratic unless the numbers in the highlighted cells have a uniform differential between them.

But if you use the CTL key in this case, then it will make copies of the range of cells, which can be quite useful at times.

13. ### ninjaman Thread Starter Member

May 18, 2013
306
1
ok I have the number 1 going to 1000

I have three sine waves altogether,

1. 50Hz fundamental
2. 150Hz third harmonic
3. 250Hz fifth harmonic
the voltages are,

1. 70vrms fundamental
2. 23volts 3rd harmonic
3. 14volts 5th harmonic
I have to produce individual graphs and a resultant complex waveform graph

then,
Part 3:
If the 5th harmonic has a lag of 70º
a) Produce graphs of individual waves and resultant complex waveform.
b) Produce a multisim simulation to support your graph.
Part 4: Find the voltage after 20ms from graphical and mathematical methods. Derive the harmonic distortion between the 2 results.

Last edited: Dec 4, 2013
14. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
Soooo... what's you're question?

15. ### ninjaman Thread Starter Member

May 18, 2013
306
1
to increment

insert values in A column

1
2
3
4, highlight this values,

(make a little black box and blue highlight inside, no ctrl or shift or anything just highlight)

then go to the bottom right hand corner of the highlighted box. the cursor should turn into a cross. left click and drag down. press nothing but left click. this will increment in whatever steps you have chosen with the values.

so now I have a lot of numbers, I have entered my formula,
=(vmax*SIN(2*PI()*frequency*A368))

now I have to graph it using scatter.

i cant attach an odt. file, dang it!

16. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
Have you tried using the Excel Help?

17. ### ninjaman Thread Starter Member

May 18, 2013
306
1
question 3 and 4 are tricky im not sure how to do those. any advice would be appreciated.

I have a graph now that shows the three sine waves. I cant show it on here as it wont attach. I think its an odt. file or something

18. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
So take a screen shot.

19. ### ninjaman Thread Starter Member

May 18, 2013
306
1
hello
my attempt add getting the resultant complex frequency is by using the formula from here;

I used (4/pi)*100v at 50Hz, (this is the fundamental)

then add, (4/pi)*32.522v at 150Hz, (this is the third harmonic)

then add, (4/pi)*19.796 at 250Hz, (this is the fifth harmonic)

after adding those values I get 193.94volts............?

so,......im guessing this is correct.........I make a single sine wave with this volt though, thinking about it. what would the frequency be? hmmmmm.
would that be 50Hz. I didn't read all of the page and it was meant for a square wave.
thanks,
CHRISTMAS SOON!!!
simon

20. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
That's the whole idea. That's exactly what I said.

This works for me every time.

ninjaman likes this.