フィルターのクリア

Find Bode Phase of Uncertainty models

3 ビュー (過去 30 日間)
John
John 2022 年 1 月 28 日
コメント済み: John 2022 年 1 月 31 日
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 件のコメント
Star Strider
Star Strider 2022 年 1 月 28 日
Please see my Comment to yout previous Question. It applies here, too.

サインインしてコメントする。

採用された回答

Paul
Paul 2022 年 1 月 28 日
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 件のコメント
John
John 2022 年 1 月 31 日
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)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Control System Toolbox についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by