# Stability margins for a cascaded system with getLoopTransfer functions

3 ビュー (過去 30 日間)
Daam Schoon 2023 年 8 月 30 日 Hello all, I have tuned the control system above and it's stable. I'm trying to find the (classical) stability margins at the signals highlighted in red, and I'm still a bit inexperienced with this. How would I go about this?
I have calculated those at e as follows:
Le = getLoopTransfer(CL,'e',-1); % open-loop function at e
[margins] = allmargin(Le);
which is I think the correct way. I am more unsure however of q and , since there are inner-loops with positive feedback and there is the added complexity of breaking the loops of the outer loop(s). I found that breaking the loop at both and and only at gives the same transfer function when evaluating q. Apologies for inconsistency, in the code below and %% Verification of margins at plant input
L_P_input = getLoopTransfer(CL,'u_c',-1,{'y2'});
zpk(L_P_input)
eig(L_P_input)
figure; nyquist(L_P_input)
[margins_input] = allmargin(L_P_input); % Margins at the plant input
%%
%% Verification of margins at q
L_P_out_q = getLoopTransfer(CL,'y1',-1,{'y2'});
zpk(L_P_out_q)
eig(L_P_out_q)
[margins_q] = allmargin(L_P_out_q); % Margins at the output of q
figure; nyquist(L_P_out_q)
Futhermore, I also saw that the OL transfer functions for and q are exactly the same (when I break the outer loop at ). Anyone could clarify this?
Lastly, is it enough to find the stability margins at the highlighted locations? I reckoned it wouldnt be necessary to also do it at since the error is already on this signal.
I am wondering if my approach is correct and if not what should be changed.
Thanks in advance for any help!

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

### 採用された回答

Paul 2023 年 8 月 30 日

Hi Daam,
To get the stability margins at 'e', I believe this is correct:
Le = getLoopTransfer(CL,'e',-1); % open-loop function at e
[margins] = allmargin(Le);
To get the stability margins at 'u_c', I believe this is correct.
L_P_input = getLoopTransfer(CL,'u_c',-1);
[margins_input] = allmargin(L_P_input); % Margins at the plant input
Note that I removed the loop break at 'y2' which is 'a_n'. You could compute the margins at u_c with the loop broken at 'a_n', but the real system has the loop closed at a_n.
Similary, at 'q'
L_P_out_q = getLoopTransfer(CL,'y1',-1);
[margins_q] = allmargin(L_P_out_q); % Margins at the output of q
If in doubt, it's always easy to verify the gain margins (and not so difficult to verify the phase margins). For example, rebuild your system with the nominal value of Kq multiplied by a gain margin from margins_q.GainMargin. The closed loop system should have poles (or one pole at the origin) on the imaginary axis at the corresponding margins_q.GMFrequency.
"I found that breaking the loop at both a_n and Kp*a_n and only at a_n gives the same transfer function when evaluating q."
Breaking the loop at a_n eliminates the feedback loops through Kp and Ki. So additionally breaking the loop at the output of Kp doesn't change anything. In either case, the loop transfer at q
L_q = getLoopTransfer(CL,'y1',-1,{'a_n'});
should be L_q(s) = -Kq*G21(s).
"Futhermore, I also saw that the OL transfer functions for u_c and q are exactly the same (when I break the outer loop at a_n)."
When you open the loop at a_n, the two outer loops are eliminated when computing the open loop transfer at either u_c or q. The lone remaining loop contains both q and u_c, so the open loop tranfer fucntion at either should be L(s) = -Kq*G21(s).
If you save G, Kp, Ki, Kq in a .mat file and upload that file using the paperclip icon on the Insert menu, then we can verify all of the above, which at this point is based only on my view of the diagram.
"Lastly, is it enough to find the stability margins at the highlighted locations? I reckoned it wouldnt be necessary to also do it at a_n since the error is already on this signal."
As discussed above, opening the loop at a_n is actually breaking two feedback loops and the resulting open loop transfer fucntion is not the same as it would be at e. One apprach is to find the stability margins at the control inputs and feedback outputs, i.e., u_c, q, and a_n. However, you can, of course, compute stabilty margins at any point in the system should you feel there is a need to do so.
##### 5 件のコメント3 件の古いコメントを表示3 件の古いコメントを非表示
Daam Schoon 2023 年 8 月 31 日

This has been an eye-opener for me. Why to choose this sign of the getLoopTransfer makes sense to me now, as well as the method of verifying the gain and phase margins.
Thanks a lot for your extensive help, Paul!
Paul 2023 年 8 月 31 日

You're very welcome.

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

### カテゴリ

Help Center および File ExchangeClassical Control Design についてさらに検索

R2023a

### Community Treasure Hunt

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

Start Hunting!