Borrar filtros
Borrar filtros

Find Bode Phase of Uncertainty models

3 visualizaciones (últimos 30 días)
John
John el 28 de En. de 2022
Comentada: John el 31 de En. de 2022
How can I find the phase programatically, of an Uncertainty plot like this one? This transfer function is build using the Robust Controls toolbox.
Eg I'd like to read at what frequency range, the phase drops to (say) -45 degrees.
If this was a normal bode of a single SISO model, it'd be easy: do a bodeplot() and read out phase and magnitude data, and/or use margin().
But this is an uncertain model range. I don't know how to read out the phase data, much less its bounds.
Does anyone know how to get phase data of Uncertain models?
% Transfer function (with uncertainty) example
a = ureal('a', 1, 'percent', 50);
s = tf('s');
res = 1 / (s + a);
bode(res);
  1 comentario
Star Strider
Star Strider el 28 de En. de 2022
Please see my Comment to yout previous Question. It applies here, too.

Iniciar sesión para comentar.

Respuesta aceptada

Paul
Paul el 28 de En. de 2022
I don't know if there is much control over what bode() does with a uss input, but you can get at the data in the plot after the fact. Kind of kludgy though. Disappointing that bode() with return arguments doesn't return the mag and phase of all of the curves.
% Transfer function (with uncertainty) example
a = ureal('a', 1, 'percent', 50);
s = tf('s');
res = 1 / (s + a);
bode(res);
hax = get(gcf,'Children');
hg = get(hax(2),'Children')
hg =
2×1 graphics array: Group (res) Line
get(hg(1))
Annotation: [1×1 matlab.graphics.eventdata.Annotation] BeingDeleted: off BusyAction: 'queue' ButtonDownFcn: '' Children: [21×1 Line] ContextMenu: [0×0 GraphicsPlaceholder] CreateFcn: '' DeleteFcn: '' DisplayName: 'res' HandleVisibility: 'on' HitTest: on Interruptible: on Parent: [1×1 Axes] PickableParts: 'visible' ScribeContextMenu: [] Selected: off SelectionHighlight: on Tag: '' Type: 'hggroup' UserData: [] Visible: on
So hg(1).Children is an hggroup that contains 21 Lines, for which the XData and YData are accessible. For example, replot one of the phase curves.
semilogx(hg(1).Children(1).XData,hg(1).Children(1).YData);
xlim([.02 100])
If the line data is accessible, it can be processed after pulling it all out of the plots.
  1 comentario
John
John el 31 de En. de 2022
Thank you -- I will try this out as a starting point.
(If it looks like it leads to where I'm trying to go, I'll mark it as an accepted answer)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by