# how to add numerical bode results

Status
Not open for further replies.

#### case-sensitive

##### Member
Hello,

I extracted voltages and phase shift for some bodeplots for 1000Hz highpass and lowpass filters 2nd orders. Now I am trying to overlay them. Simply adding the values does not look right, and adding the voltage times cosine of the angle does not look right. Where am I going wrong?

see pictures attached.

Cheers,

Case

#### Attachments

• 31.5 KB Views: 59
• 17.8 KB Views: 54
• 18.5 KB Views: 59
• 18.3 KB Views: 53
• 9.8 KB Views: 56
• 10.5 KB Views: 54

#### MikeMl

##### Well-Known Member
What are you trying to do? If making a more complex filter, you can "cascade" one filter stage behind another, meaning that the second filter takes in what the first filter puts out:

Look at the attached Bode plots for an example:

V(a) is the output of a low-pass filter

V(b) is the output of a high-pass filter.

V(c) is the output from the cascaded high-pass filter behind the low-pass filter to create a bandpass filter.

Note that V(c) is identical to V(a)*V(b). Note that this is not V(a)+V(b)! V(a)*V(b) is permutable, however, so it doesn't matter which filter comes first.

Last edited:

#### case-sensitive

##### Member
its going to be an active filter and I want to overlay the speakers. At present there is a sink/ so I have to push the low pass and high pass closer together. Ideally, when they have the same corner frequencys, the sum should be linear? But none of the filters seems to achieve that. None of them has -3dB at 1000Hz.

#### MikeMl

##### Well-Known Member
Did you notice the difference between * (multiply) and + (add)?

By "overlay", do you mean that you have two filters, one high-pass (that drives a tweeter), one low-pass (that drives a woofer). Now you want to combine the individual lp and hp responses to create a mid-band response instead of creating a new band-pass filter?

Last edited:

#### case-sensitive

##### Member
the lowpass does the bass, the high pass the mid. The mid is slightly sloping towards both ends. The corner frequencys would be more around 200 Hz. But for this exercise I choose 1000. None of these filters would create a straight line arund the 1000kHz.
I can post an image of the circuit tonight.

#### case-sensitive

##### Member
ok, you mean in series, I mean in parallel.
In series, multiplying makes a band pass judging from your image.

#### Attachments

• 9.4 KB Views: 51
• 9.8 KB Views: 54
• 25 KB Views: 52
• 10.1 KB Views: 49

#### MrAl

##### Well-Known Member
Hello,

If the output of U1 is v1 and the output of U3 is v3, then the total response the way you have it set up there is:
Vout=(v1-v3)*R10/(R5+R10)+v3

and since you have both resistors the same we end up with:
Vout=(v1-v3)/2+v3

or:
Vout=v1/2+v3/2

So you are effectively summing half of each output response.

Now if you have an output near 0 for one and near 1 for the other at 0Hz, then the output will be 1/2 at 0Hz.
And, if you have an output near 1 for both near the center frequency then the output will be near 1 at the center frequency.
And, if you have the opposite responses from 0Hz at infinity then the high frequency response (given ideal components) will also be 1/2.

The phase shift from each however may change this, so we'd have to calculate that in too, which i will do later today if i can get to it.
The problem is that if they are both tuned to the same frequency then the phase shifts will cause them to add up to zero. So at 1000Hz you may get just zero output.

LATER:
Ok yes the two outputs cancel at the cutoff frequencies because the phases are opposite and the amplitudes are the same.
This means to get a bandpass you would have to connect them in cascade instead. Alternately, you could subtract them if you did not need too sharp of a response, but that probably would be a waste.

Last edited:

#### case-sensitive

##### Member
multiplying the responses would get this (see picture).
The resistors I put in so I could connect a bode plotter before so to get a plot of each branch. Did not work out. So I end up getting bode plots for each half and exporting the values.
The idea is, ther is a low pass, a band pass and a high pass. Since the speakers are parallel, I was thinking, each gets one band. For the 180 deg phase, the mid will be be connected "in reverse". So then in excel I added the absolute values of the V1*cos ph1 and V3*cos ph3. That does not look good either. Fot the xover I built there is an audible dent. Even though there is an overlap already.
I can post the Excel file or at least a .csv file?

edit: the response of each driver would of course be the product of its um capability at that frequency times the output of the xover

#### Attachments

• 38.5 KB Views: 54
Last edited:

#### MrAl

##### Well-Known Member
Hello,

So what kind of response do you want then?
Bandpass or bandstop?

#### MrAl

##### Well-Known Member
So i guess this is going to have to be 1000 questions to find out what you really are doing here.

Are you:
1. Building a speaker box
2. Testing a speaker box
3. Emulating a speaker box
4. None of the above
5. All of the above
6. Looking for a good restaurant

If you explain in detail what the heck you are doing then someone can help you. If you keep giving short replies you wont get any help. Endless graphs wont help either unless you explain exactly what you are doing, in detail, probably more than 100 words.

#### case-sensitive

##### Member
emulating a speaker box. Built it already with 12dB Butterworth, low pass corner frequency 240 Hz, for mids its the corner frequency 204 Hz. They should overlap then, but there is an audible dip. So now I will most likely go for Linkwitz. But even then, if the corner frequency for the low pass is same ad for the high pass for the next speaker, in the simulation there is a dip. But I thought the sum of the signals at the corner frequency shold be a straight line.
The mid range speaker has a bit of a roof in its response. So on top of that corner frequency for the bass has to be moved up and the one for the mid has to come down. But thats a different topic. For now I just want to simulate the crossovers. In multisim at the bodeplotters there is export to Excel, thats what I did. There would be voltages between 0 and 1 V and angle between 0 and -180. It should be possible to get the values for the low pass and high pass next to each other and then sum them up.

#### Attachments

• 246.3 KB Views: 46

#### MrAl

##### Well-Known Member
Hi again,

Oh ok, well i am not sure that everyone here can deal with Excel files.

Also, do you want to widen the intermediate area in the response?

Also, why do you want to add the two responses?

#### case-sensitive

##### Member
open office can open excel files

why I want to add the responses? A speaker box would add the responses as well. Somehow, thats my question. Because each driver gets a part of the signal, but in sum its the entire range more or less. But as the pictures I posted earlier show, at that frequency I selected there is no -6dB and the sum of the responses is not linear, it has a dip or a bump, depending on the filter type. In an ideal world it should be a line. So I am trying to work out, what corner frequency I should select and what filter. I think, Butterworth is not a good idea and Bessel is even worse. But none of summed filters has a linear response at the corner frequency.

#### Attachments

• 53.6 KB Views: 41
• 115.5 KB Views: 43

#### MrAl

##### Well-Known Member
Hi,

Usually if you want to widen the area in the center you just move the low pass and high pass cutoff frequencies away from each other so there is a gap between the two frequencies. Since you are adding though it may be a little different.
Maybe you could try that and also invert one output and that way when they 'add' they will really be being subtracted.

It almost sounds like you want to add two filter responses one LP and one HP, but you want each one to have no phase shift before they are added. Do you have to do this with two electrical networks (the filters) or can you just use a set of equations?

#### case-sensitive

##### Member
pretty much them mid is the black, the brown graph is the tweeter and the yellow one is the bass. So I have to overlap them a bit to get the mid linear. Got that project of a speaker project, will try to scn some time. Sadly distracted with some other less interesting stuff.

#### Attachments

• 4.3 KB Views: 49

#### MrAl

##### Well-Known Member
Hi,

Ohh, well this is finally starting to make some sense

I dont know if you did not explain it right or i did not understand you correctly or a little of each, but this 'project' is much more understandable now. It appears that you wish to know how to drive the three different sound producers in order to get a good midrange response.

One thing we all learned from this is that the PHASE also matters as well as the amplitude. In fact, that's usually the case, and we even saw an example of the most extreme example where the two amplitudes that should have added actually subtracted because they were out of phase. These observations lead to the idea that in order to do this right you'd have to know a lot more about the individual sound producters including their phase, but probably also about the box they are installed in too. In other words, this requires some pretty advanced audio analysis techniques that only an audio professional would know. We are probably talking some 3d spatial analysis combined with structural analysis which brings in methods like 3d finite element methods, possibly with some 3d PDE's. There's a chance you might find a good book on this though which may take you through the steps, but may require some heavy math too which i am not sure you are into or not.

#### case-sensitive

##### Member
for now I just want to get the filter simulated. When I chose the same corner frequency for the low pass and the high pass next to it, the sum should be a line, but there is always a dip. I actually choose 240Hz for the low pass and 204 for the high pass, in the simulation there is a -24 dB dent.
I got a sinewave generator and was just tuning through the frequencies, there is an audible dip. This was my initial question, in theory these 2 frequency responses, could I sum them up in Excel. I was thinking same way as AC, if I was to involve the phase shift and add it somehow. I don't even want to go so far to involve the speakers and all that. If I was to keep a 2nd order filter, I have to reverse the mid speaker for the 180 deg shift, I am aware of that.

#### Attachments

• 5.6 KB Views: 50

#### MrAl

##### Well-Known Member
Hi,

Ok, so you just want to get the two electrical filters working so that you can get the midrange response more flat, and ignore many of the real life parameters that would come up in a real system? Academically speaking that may still be interesting.

Almost every filter has a phase response that also goes with the amplitude response. The 'normal' way to create a filter like you are talking about is to connect the two in tandem and in that way the phase no longer matters because the phase of the first section looks like 0 degrees to the second section. In the case of addition however, that means you have to find two filters with transfer functions H1 and H2 that add up to whatever you want which we can call H3:
H3(s)=H1(s)+H2(s)

but the constraints on H1 and H2 are such that H1 has to be low pass and H2 has to be high pass, by themselves.

This is a more unusual problem than the more typical where we have:
H3(s)=H1(s)*H2(s)

The question that comes up next then is what are your requirements for H1 and H2, other than low pass and high pass, as to what can be used to create the electrical networks that make them. I guess op amps are ok then right, and how about inductors?
Is a digital technique possible here? That would require sampling the input and generating two separate outputs and then adding them using a standard analog technique.

Also, what exactly are you trying to prove ?

#### case-sensitive

##### Member
not trying to prove anything. To get a visible bump in the frequency response I had to overlap the corner frequencies by 4 octaves, that does not feel right. But also the bit that I get a dent instead of a straight line. So I tried to check it somehow. Dont want to unsolder the resistors too many time in my built crossover. Its active, after that are amps. So the inductivity of the speakers will only influence the amps, but not the crossover?

Status
Not open for further replies.