Bode Diagram Plot specification (magnitude)

12 visualizaciones (últimos 30 días)
Francesco Porretta
Francesco Porretta el 4 de Feb. de 2021
Comentada: Star Strider el 4 de Feb. de 2021
Good Morning guys,
I was wondering if it is possible to plot the bode diagram of a transfer function neglecting some area in the magnitude.
I'm going to better explain myself: I want to show in the plot that the tranfer function in magnitude is higher than 40 decibel in the range frequency < 1 rad/s (so I want to, let's say, colour all the zone in the graph that is lower than 40 dB up to 1 rad/s).
In other words, I want to obtain something like in the following figure (the grey parts).
How can I do?
Thanks for your help!

Respuesta aceptada

Star Strider
Star Strider el 4 de Feb. de 2021
That would likely be next to impossible using the bode function itself. The best option is to get the outputs from bode as described in Obtain Magnitude and Phase Data and the use the regular plotting routines to do the plot.
It may be necessary to use the squeeze function on some of the bode outputs to create the necessary vectors for the plot.
Since you will be filling in the gray areas, use patch or fill to create them. In my experience, patch does not work well if you first define semilogx as the plot scaling, so create the plot using plot itself, then set 'XScale' to 'log' after creating the plot.
  2 comentarios
Francesco Porretta
Francesco Porretta el 4 de Feb. de 2021
thanks!
Star Strider
Star Strider el 4 de Feb. de 2021
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by