What's the equation for summing 2 ac waveforms?

Status
Not open for further replies.
I'm creating a little "project" in excel to model the response of various filters on imported CLIO responses. Although I realize that similar tools already exist, I'm doing this strictly as a learning tool.

Right now I've got graphs for the individual driver responses in a 2-way design, but I want to also generate a summing signal. I can't remember all the useful equations I was taught in college, and I'm having a tough time finding them on the internet, so hopefully somebody here has them handy.


One more area that I could use guidance in...
Right now my design is rather crude with a constant 6/12/18/24/whatever dB/octave rolloff beyond a specific point. I want to change my equations to incorporate a more accurate rolloff slope. I'd also like to be able to incorporate an equation with a variable "Q" for the crossover. I've seen crossover equations with a variable "Q" to determine capacitor and inductor values, but does anybody have an equation to determine SPL at frequency "X" , given a desired crossover frequency "Y", and crossover "Q" value?

Thanks. 🙂 I made great progress on this spreadsheet yesterday morning to the point where it's actually been quite useful. If I can now make it just a tad more accurate, it'll be that much better!
 
Summing has to account for phase. Normally, you convert magnitude and phase of each waveform into a real and imaginary part, sum the real parts, sum the imaginary parts, and you now have the summed signal. Then this can be expressed as a magnitude and phase.

For a signal with magnitude R and phase theta, real part = R cos theta, imaginary part = R sin theta. Working backwards, for a signal expressed as A + jB, magnitude = A2 + B2 , phase = arctan (B/A).
 
Summation of two electrical signals that are coherent.

Vtotal^2 = V1^2+V2^2 - 2V1V2cos(180-angle)

summation of incoherent

Vtotal^2 = V1^2 + V2^2

Sound pressures for incoherent sounds

Ptotal^2 = P1^2+P2^2+..Pnth^2

Sound pressures for coherent

Ptotal^2 = P1^2+P2^2 + 2P1P2cos(angle)
 
Ron E said:
Do you know complex math and transfer functions?....Probably not or you wouldn't ask the question.

You can do it with phasors, but IMO that is a PITA.
I'm familiar with them, but I can't spout them off at will. I learned all of this in college, but crammed it into my brain very tightly next to a million other things, and usually it exploded shortly after the final exam, never to be seen again. 🙂

Right now I'm working in the filter slopes with known capacitor and inductor values, but what I'm trying to make is a simpler filtering system where you get to change the filter frequency and slope instead of changing component values. It's a little bit different approach that I haven't seen anywhere else. I've screwed around with it for a day with my crude approximations and it really seems to make crossover selection a little bit more fun to screw with. Now I'm trying to make it more accurate, and if I can get it to spit out some suggested component values at the end, that'll be ok too. 🙂
 
Hi Jim,

Spit out you brains about complex math and/or reread your textbooks about it. Write out all signals in the form of a + jb. This is really the most handsome way IMHO to write out the entire math in Excel. But it is also a cumbersome way :bawling:

Cheers :cheerful:
 
Hi

Jim85IROC said:
One more area that I could use guidance in...
Right now my design is rather crude with a constant 6/12/18/24/whatever dB/octave rolloff beyond a specific point. I want to change my equations to incorporate a more accurate rolloff slope. I'd also like to be able to incorporate an equation with a variable "Q" for the crossover. I've seen crossover equations with a variable "Q" to determine capacitor and inductor values, but does anybody have an equation to determine SPL at frequency "X" , given a desired crossover frequency "Y", and crossover "Q" value?

Try reading this about second order sallen and key filters

http://www.delta-audio.com/Manualer/Sallen And Key ver 1.0.pdf

It's work in progress so it is not perfect

\Jens
 
Ok, here's another question. The textbook I'm using has the equations for first-order high pass and low pass filters, but only for capacitors. It doesn't give the inductor equations.

low pass:
Magnitude=1/(1+(wRC)^2)^.5
w= omega

high pass:
Magnitude=wRC/(1+(wRC)^2)^.5
w=omega

Unfortunately, I'm not finding the equivalent equations for inductance. Anybody know what they are?
 
Jim85IROC said:
It was close enough that I knew what he meant. Even that isn't giving me what I'm looking for though, but I walked around the office and found some friends that had their college textbooks here. I'm getting closer. 🙂
I think it just dawned on me why the Vtotal^2 = V1^2 + V2^2 equation isn't giving me the numbers I expected. I'm inputting 2 numbers on a dB scale, where I should be using a linear scale for this computation. Right now a pair of 80dB signals is combining to give me 160dB. Oops. 😀
 
Jim85IROC said:
I'm creating a little "project" in excel to model the response of various filters on imported CLIO responses. Although I realize that similar tools already exist, I'm doing this strictly as a learning tool.

Right now I've got graphs for the individual driver responses in a 2-way design, but I want to also generate a summing signal. I can't remember all the useful equations I was taught in college, and I'm having a tough time finding them on the internet, so hopefully somebody here has them handy.


One more area that I could use guidance in...
Right now my design is rather crude with a constant 6/12/18/24/whatever dB/octave rolloff beyond a specific point. I want to change my equations to incorporate a more accurate rolloff slope. I'd also like to be able to incorporate an equation with a variable "Q" for the crossover. I've seen crossover equations with a variable "Q" to determine capacitor and inductor values, but does anybody have an equation to determine SPL at frequency "X" , given a desired crossover frequency "Y", and crossover "Q" value?

Thanks. 🙂 I made great progress on this spreadsheet yesterday morning to the point where it's actually been quite useful. If I can now make it just a tad more accurate, it'll be that much better!

"Assuming" that the magnitudes you wish to sum are of the same frequency the previously given equations work.

Ron E said:
Do you know complex math and transfer functions?....Probably not or you wouldn't ask the question.

You can do it with phasors, but IMO that is a PITA.

However, as Ron E. alludes to, there are other ways to make the calculations, and if the two waveforms are of differing frequencies, then phasor mathematics will not give you the correct answer. You are now in the realm of Fourier.

Later,
 
Re: Re: What's the equation for summing 2 ac waveforms?

stadams said:


"Assuming" that the magnitudes you wish to sum are of the same frequency the previously given equations work.



However, as Ron E. alludes to, there are other ways to make the calculations, and if the two waveforms are of differing frequencies, then phasor mathematics will not give you the correct answer. You are now in the realm of Fourier.

Later,
I'm adding two signals of the same frequency at all times.

Now I'm just having fits getting the equation to work in excel. I'm converting the dB scale to power, doing the summing, then converting the summed signal back into dB. There are an awful lot of parenthesis in this equation! I need to find (or derive) the simplified version that has all of the conversion drop out of both sides.
 
Hi Stadams,

When writing out the transfer function of filters etc. in Excel you are dealing with one frequency at a time, usually one row contains the equations for one particular frequency. Also in Excel it is handy to work with name references for fixed variables in stead of cell references.

Cheers 😉
 
Status
Not open for further replies.