# Questions about doing a bode magnitude plot for a complex pole in Matlab

Status
Not open for further replies.

#### dbmd

##### Junior Member level 1
When doing a bode magnitude plot for a complex pole, do I use the real or img part of the pole ? Matlab seems to point to the img part (20), which is confusing since for the non-complex pole, the real part (1) is used.

tf=1/((s+1)*(s^2+s+400)

Also, there is no difference between right-half plane and left-half plane non-complex pole for magnitude plot, but the difference is seen in the phase plot ? why is that ?

1/(s-1) vs 1/(s+1)

#### ahmed osama

##### Full Member level 6
Re: bode plot confusion

bode plot consist of two plot
1-the mag. plot which is drawing the mag. of the function vs freq.
2- phase plot which is drawing the phase of the function vs freq

#### carporsche

##### Junior Member level 2
Re: bode plot confusion

Since you have mentioned matlab for the bode plot, all you have to do is specify the transfer function and the 'bode' function will automatically calculte the magnitude and phase plots for you! From the bode plot you can infer the following properties.

The dominant pole occurs at the same location for both 1/(s-1) and 1/(s+1) in the magnitude plot. Magnitude is always the absolute value. hence it always occurs in the same location. The most important consideration is what are you trying to infer from the bode plot.

The presence of RHP pole reduces the phase margin of the system considerable. The phase plots give an important indication for this.
and complex conjugate poles cause the peaking behavior in the magnitude plots.

I hope i got your question right. Plotting the bode for the 2 systems will give u the same magnitude but different phase plots!

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

You kinda answered my 2nd question although I'd like to understand how the sign of the real pole affects the phase plot. And yes, I've used matlab to generate the plots.

Any insight to my 1st question regarding the complex pole, specifically in the tf of 1/((s+1)*(s^2+s+400). The poles are calculated at (1) and (-0.5 +- 20j). The bode mag plot indicates pole location at 1 and 20 which is confusing since it uses the real part of the non-complex pole and the img of the complex pole. What am I missing ? Thanks.

Since you have mentioned matlab for the bode plot, all you have to do is specify the transfer function and the 'bode' function will automatically calculte the magnitude and phase plots for you! From the bode plot you can infer the following properties.

The dominant pole occurs at the same location for both 1/(s-1) and 1/(s+1) in the magnitude plot. Magnitude is always the absolute value. hence it always occurs in the same location. The most important consideration is what are you trying to infer from the bode plot.

The presence of RHP pole reduces the phase margin of the system considerable. The phase plots give an important indication for this.
and complex conjugate poles cause the peaking behavior in the magnitude plots.

I hope i got your question right. Plotting the bode for the 2 systems will give u the same magnitude but different phase plots!

#### carporsche

##### Junior Member level 2
Re: bode plot confusion

Well, i think you are getting confused with this particular example. even in this the 1st pole location is s+1 =0 and the second pole is not taken from the imaginary part of -0.5+/-j20. Use the pole(tf) and it'll give you the exact location of the poles. then using the abs(pole(tf)), you will get the exact pole locations on the bode plot!.

I guess its because of the example transfer function which is causing the problem.
Try the following tf (1/(s+2)(s^2+3s+17)).. just some random tf i have used. Now when you check the pole locations it will give u a better idea!

dbmd

### dbmd

points: 2

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

I think I see what you are saying now. Bode uses the magnitude of the pole/zero as opposed to just the real or img part. So in the bode mag plot, there is no difference between having poles at -0.5+/-j20 and -20+/-j0.5 ? Intuitively, what will be the difference in the phase plot then ? Thanks again.

Well, i think you are getting confused with this particular example. even in this the 1st pole location is s+1 =0 and the second pole is not taken from the imaginary part of -0.5+/-j20. Use the pole(tf) and it'll give you the exact location of the poles. then using the abs(pole(tf)), you will get the exact pole locations on the bode plot!.

I guess its because of the example transfer function which is causing the problem.
Try the following tf (1/(s+2)(s^2+3s+17)).. just some random tf i have used. Now when you check the pole locations it will give u a better idea!

#### carporsche

##### Junior Member level 2
Re: bode plot confusion

A simple way to explain the phase response would be as follows :
1. A dominant pole / zero always adds +/- 90 degrees to the phase plot depending on whether its a pole or a zero!
2. Coming to the complex-conjugate poles x+jy will add a phase tan-1(y/x) (complex algebra) to the phase plot depending on the signs of the complex conjugate poles.

You can verify this in the phase plots. Again this is a very crude way of putting things in perspective.
Hope what i made sense. IF others can verify what i just said!

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

I will play with matlab to confirm your 2nd point.
Speaking of dominant pole/zero, without doing small-signall, with some effort one can probably associate a particular node a circuit (opamp) with a dominant pole. However, intuitively, how to tell whether that pole is real, complex, right half plane, left half plane, etc ? Also, how to spot a (dominant) zero ?

A simple way to explain the phase response would be as follows :
1. A dominant pole / zero always adds +/- 90 degrees to the phase plot depending on whether its a pole or a zero!
2. Coming to the complex-conjugate poles x+jy will add a phase tan-1(y/x) (complex algebra) to the phase plot depending on the signs of the complex conjugate poles.

You can verify this in the phase plots. Again this is a very crude way of putting things in perspective.
Hope what i made sense. IF others can verify what i just said!

#### LvW

Re: bode plot confusion

Hi dBmd,
neglecting the up-to-now-discussion I like to answer your original question as follows:

When doing a bode magnitude plot for a complex pole, do I use the real or img part of the pole ? Matlab seems to point to the img part (20), which is confusing since for the non-complex pole, the real part (1) is used.
tf=1/((s+1)*(s^2+s+400)

Using the term "pole frequency" wp (which is identical to the magnitude of the vector pointing from the origin to the pole location within the s-plane) it is clear that wp is identical to a real pole and to the dominating part of a complex pole, respectively. That means: For a pole at wp=1 +/- (j*20) the imaginary part dominates which could lead to the assumption that the real part is neglected (which is not true).

Also, there is no difference between right-half plane and left-half plane non-complex pole for magnitude plot, but the difference is seen in the phase plot ? why is that ?
1/(s-1) vs 1/(s+1)

The answer is clear: The magnitude of both functions is identical, but the real part has a different sign leading to another phase, of course. (By the way: A BODE plot for a system with a positive real pole is unstable).
Correction: Not the BODE plot is unstable, but it belongs to an unstable system!

Last edited:

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

Thanks LvW for further clarification. Would you also comment on my last post (quoted below) ?

I will play with matlab to confirm your 2nd point.
Speaking of dominant pole/zero, without doing small-signall, with some effort one can probably associate a particular node a circuit (opamp) with a dominant pole. However, intuitively, how to tell whether that pole is real, complex, right half plane, left half plane, etc ? Also, how to spot a (dominant) zero ?

#### LvW

Re: bode plot confusion

Speaking of dominant pole/zero, without doing small-signall, with some effort one can probably associate a particular node a circuit (opamp) with a dominant pole. However, intuitively, how to tell whether that pole is real, complex, right half plane, left half plane, etc ? Also, how to spot a (dominant) zero ?

What do you mean with "intuitively"? Based on a known circuit diagram? Based on a known transfer function or on the step response in the time domain?

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

Based on a circuit schematic. Thx.

Speaking of dominant pole/zero, without doing small-signall, with some effort one can probably associate a particular node a circuit (opamp) with a dominant pole. However, intuitively, how to tell whether that pole is real, complex, right half plane, left half plane, etc ? Also, how to spot a (dominant) zero ?

What do you mean with "intuitively"? Based on a known circuit diagram? Based on a known transfer function or on the step response in the time domain?

#### LvW

Re: bode plot confusion

Hi dbmd,
I think, for a circuit as complex as - for example - an opamp it is not easy to estimate the approximate frequency response - only by visual inspection of the circuit diagram.
More than that, I am not able to "intuitively" see if the transfer function of such a circuit has a real pole or a complex pole pair - and I doubt that somebody else can do this. This will be a good task for a simulation program.

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

LvW, by simulation, you mean some sort of open loop to get the mag and phase plots. And from them, estimate the pole and zero location ? But then you will need to tie these zeros/poles to the corresponding nodes of the circuit right. Can you do this by visual inspection of the circuit ?

#### LvW

Re: bode plot confusion

Why open loop? This is necessary only to determine either an appropriate feedback factor Hf or the phase margin (if Hf is fixed) after closing the loop. Up to now, I was of the opinion that you are interested in closed-loop pole location.
And what is the need to "tie these poles/zeros" to corresponding circuit nodes? Because of circuit modifications?
I must confess, the background behind your questions is not clear to me.

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

The background for all of my questions is for me to understand frequency response and stability of a system. I'd like to be able to look at a circuit diagram and, similarly to visually identifying gain stages, be able to identify poles/zeros and estimate the frequency response. If this is not possible because of the complexity of the circuit, I can use simulations to obtain the bode plots of magnitude and phase and from them identify the poles/zeros on the diagram. Those are the reasons I need to be able to correlate between circuit diagram, simulation, bode plots, and stability. This knowledge would hopefully allow me to evaluate, understand, and make modification on circuit topology, compensation schemes, etc...

Now to your specific question regarding closed-loop or open-loop pole location, I thought that poles and zeros are obtained from the tf which is open-loop tf ? Thanks!

Why open loop? This is necessary only to determine either an appropriate feedback factor Hf or the phase margin (if Hf is fixed) after closing the loop. Up to now, I was of the opinion that you are interested in closed-loop pole location.
And what is the need to "tie these poles/zeros" to corresponding circuit nodes? Because of circuit modifications?
I must confess, the background behind your questions is not clear to me.

#### LvW

Re: bode plot confusion

Now to your specific question regarding closed-loop or open-loop pole location, I thought that poles and zeros are obtained from the tf which is open-loop tf ? Thanks!

Of course, you can determine both: poles/zeros for open loop AND for closed-loop transfer functions.
Normally, poles and zeros for circuits without feedback (and without resonance effects due to inductances) are real.
Very often, then they become conjugate-complex because of feedback (closed-loop operation).
As far as stability is concerned: Are you familiar with Nyquist's stability criterion? This is important in the mentioned context.

#### dbmd

##### Junior Member level 1
Re: bode plot confusion

Other than the concept of phase margin, not really. I recall vaguely that it also talks about the correlation between closed-loop and open-loop unstable poles.

As far as stability is concerned: Are you familiar with Nyquist's stability criterion? This is important in the mentioned context.