# What are the gain and phase margins from this Bode plot?

I thought I had a decent grip on how Bode plots work yet for this model that I am working on, I need to implement a lead or a lag compensator. A lead compensator, which I was thinking about implementing, would first require me to determine the phase margin of the system from this Bode plot, but I am not sure how to do that since the magnitude plot does not cross the 0dB point.

Does this mean that the phase margin is automatically 90 degrees since the phase plot starts at -90 degrees?

Please see the attached image for the Bode plot in question:

EDIT 1: The open loop transfer function of the system taken from MATLAB is as follows:

EDIT 2: The Simulink model that I have generated the bode plot for is a simple DC motor with no friction with an inner current and velocity loop which are both PI-controlled and tuned. The Bode plot and transfer functions are for a position controller that I am trying to implement and tune using Lead Compensation. So far, I have simply given a step input as the position command with no gain to obtain both the Bode plot and transfer function.

EDIT 3: I have increased the gain in the open loop to 1500(!) to obtain a 0dB crossing for magnitude. However, when doing this, I found that the phase graph does not change even after trying different gains. I feel like continuing with my phase Lead compensator design using this gain will have some sort of impact on stability. Or could I be wrong? I have attached the new Bode plot showing both the original and the one with the open-loop gain of 1500 below:

• Do you know the system transfer function? If so, please include it in your question.
– Carl
Oct 20, 2022 at 19:53
• Your bode plot isn't sufficient to indicate the phase margin. Oct 20, 2022 at 20:04
• Thanks for the comment Carl and Andy, I've just added the transfer function of the model which should help. Oct 20, 2022 at 20:07
• Nothing wrong with a constant phase response while you shift the magnitude curve up. If you crossover in the 1-2-kHz region, please re-scale the x-axis from 10 Hz to 100 kHz to offer a better view. The only point to consider is the 0-dB crossover on the compensated loop gain, that is where you read the phase margin. However, what is the control-to-output transfer function of the process (the plant) you want to control? Without it, you cannot infer a compensation strategy. Also, are you dealing with sampled data in this example as I see a TF in $z$ rather than in $s$? Oct 21, 2022 at 5:39
• Hi @VerbalKint . Yup, I am using a sampled system (discrete system) which is why there is a z rather than an s. The transfer function I've provided is for the control-to-output transfer function with the control being a step change in position (position demand) and the output being the motor position. Oct 21, 2022 at 12:40