필터 지우기
필터 지우기

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 CenterFile Exchange에서 Get 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