Discussion in 'Math' started by suzuki, Jun 12, 2012.

1. ### suzuki Thread Starter Member

Aug 10, 2011
119
0
Hi,

The blue, green, and red plots are a, b, and a+b respectively.

What I'm having a hard time understanding is how a+b is formed. Looking at the magnitude of a, it is in the range of 500 dB or $10^{25}$. Whereas, looking at b, it is a negative dB gain, so a number of small magnitude. Although I do expect to see the gain of a+b to be lower than that of a, I can't explain why the drop is so significant.

Am I missing something fundamentally important here? or is this fishy to anyone else?

If it makes any difference, I directly got this plots in matlab using

Code ( (Unknown Language)):
1. bode(a,b,a+b)
tia

• ###### rOApB.png
File size:
11.8 KB
Views:
15
Last edited: Jun 14, 2012
2. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
What are 'a' and 'b'? Are these system descriptions? If so, what does 'a+b' mean?

3. ### suzuki Thread Starter Member

Aug 10, 2011
119
0
'a' and 'b' are frequency domain transfer functions of high order and have coefficients that are complex numbers.

I think what a+b means to me, is that say you have a magnitude value of 488 dB at -200 degrees (as an example), you can find the real and imaginary parts of that. You would repeat this for 'b' and add the real parts of 'a' with the real parts of 'b'. Same goes the for the imaginary.

In my example, 'b' is quite small, so essentially negligible, so i expect the response of a+b to look a lot like 'a', which clearly is not shown in the matlab plot. So i'm actually not sure if my logic is incorrect, or if Matlab has a different interpretation of a+b. Although I would be suspicious that matlab is incorrect and i am not.

4. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
I think here is your problem. It doesn't matter what you "think" a+b mean or even what you want it to mean. It only matters what MatLab specifies it to mean.

It sounds like 'a' and 'b' probably consist of Z+1 complex coefficients for the numerator and P+1 complext coefficients for the denominator (or perhaps Z and P if everything is normalized or perhaps some variation on the theme). If so, when you say a+b is doesn't know squat about these as systems or transfer functions. It sees an array of complex numbers that is to be added to another array of complex numbers and what you end up with is a new array of complex numbers that the bode() function will interpret as the description of a linear system.

5. ### suzuki Thread Starter Member

Aug 10, 2011
119
0
Hmm.. ok i think i see what you are getting at here. Would you agree that my method is logically correct? I'm thinking i might extract information from the bode plot to manually do the calculation, but it won't be worth it if the logic is incorrect.

6. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
Whether your logic is correct depends on what you are trying to do. Are 'a' and 'b' two systems in series in which you pass an input signal, say 'x', into 'a' and the output of that is the input to 'b' and you are interested in the final output signal, say 'y' of 'b' and now you want to do a bode plot of 'y' versus 'x'?

7. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
783
Depends what's meant by a "two systems in series" configuration of the two functions. I would think the upper form shown in the attachment would be the parallel summation case and the lower form would be the series multiplication case.

File size:
121.8 KB
Views:
16
8. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
Yes.... So "two systems in series" is the second of these. I don't see how the first could be considered a series connection of the two systems.

The fact that he is wanting to add the values from the Bode plots, in dB, implies that he is trying to multiply the gains of the two responses.

But the bottom line is that he needs to be much more descriptive of what he is trying to do before we have a hope of giving sound advice.

9. ### suzuki Thread Starter Member

Aug 10, 2011
119
0
Sorry for the delayed response. I feel like my system is a parallel system, but as I draw it out I'm not too sure any more. The reason I say this is that the input to my system is a square wave which I have simplified as a sum of three harmonics and then each of these harmonics is processed through three different transfer functions. Then (as my bode plot tries to show with the fundamental and third harmonic), i want to combine these three new transfer functions. I say that it may not be parallel as the input node doesn't look "common" to me. I have attached a schematic here that hopefully is clear.

File size:
4.4 KB
Views:
18
10. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
This is a combination of series and parallel. Overall, you have three parallel branches that each take your squarewave signal and first pass it through a bandpass filter to pick of the desired harmonic and then pass that through a second filter. Your diagram shows the three filters having the same system response, H(s); Are they the same or are they different?

I can't tell from the schematic if all three filters are active at the same time or if that is some kind of switch arrangement on the left had side that only connects the squarewave to one path at a time.

The things that get summed at the right side are not the system functions, but the signals that are output from the systems. However, these are linear systems (the whole theory behind the use of H(s) only works for linear systems) and therefore it turns out to be the sum of the system response functions. This is because you have:

Y1(s) = [BP1(s)H1(s)]X(s)
Y2(s) = [BP2(s)H2(s)]X(s)
Y3(s) = [BP3(s)H3(s)]X(s)

Y(s) = Y1(s)+Y2(s)+Y3(s)
Y(s) = {[BP1(s)H1(s)]+[BP2(s)H2(s)]+[BP3(s)H3(s)]}X(s)

Where 1, 2, 3 are the respective banches and BP is the bandpass filter for each branch.

11. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
783
This is a puzzling manner in which to undertake an analysis. Why not simply derive the transfer function for the system and then produce the bode plot? You know the input comprises a square wave which has a well defined Fourier series representation. The input frequencies and their amplitudes are known to you and the bode plot tells you how the system responds at those frequencies.

12. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
The real question for me at this point is what is the goal here? Is it to find the final output given a squarewave input, or is it to find the bode plot of the overall system. If the goal is just the final output for a squarewave input, then your plot will consiste of three delta functions at the three frequencies in question (six, if you are doing this as a two-side spectrum) each of which has an amplite that is the product of the coefficient of that harmonic of the square wave and the response of the corresponding filter at that frequency.

13. ### suzuki Thread Starter Member

Aug 10, 2011
119
0
Sorry, but i am a little confused here, since I think this is what I think I am doing. The reason i took just the first, third, and fifth harmonic is because square wave Fourier series is an infinite sum of terms.

In my diagram, I forgot to mention that H(s) is a filter (which I have the transfer function for). since we are inputting frequency terms (fundamental frequency, 3*fundamental, and 5*fundamental), to the filter, H(s) for each "leg" is evaluated at H(jw), H(3jw) and H(5jw), and each of these "legs" should produce an output signal. The sum of these three should give me a output that is approximately equivalent to putting in a square wave signal at the input.

What I was thinking of doing was to find the final output for the square wave input. But, then I would divide that by another variable I have to give something like Vo/Vin to obtain a transfer function.

Now that I think about it, I might need to review how I am using the bode plot. I think I may be actually just plotting the bode of the resulting output signal, which I'm not sure has any real meaning or significance. I will try to report back in a few days. Thanks again to the both of you.

14. ### WBahn Moderator

Mar 31, 2012
18,261
4,941
The transfer function for what? The transfer function characterizes the response of a system. You therefore have to be clear what the system is that is being characterized.