How to plot the phase margin?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Hello I have one tricky question where I am struck.I know how to plot the bode diagtam using the margin command but i am not sure how can i implement more than 30% margin part. my system and requirement is below. Please help me to understand how can i do this.
채택된 답변
Bora Eryilmaz
2022년 12월 22일
편집: Bora Eryilmaz
2022년 12월 22일
The transfer function 20/(s+1) is your controller. As it is, it does not give you a 50-degree phase margin. You need to modify this controller to achieve the desired phase margin. There are couple ways of doing this:
- Either reduce the gain of the controller to achieve a larger phase margin, but at a lower frequency.
- Or add additional phase using controller terms such as lead-lags.
% Initial compensator
C = zpk([], -1, 20);
% The plant
G = zpk(-20, [-2 -5], 1);
% Phase and gain margin of the open-loop transfer function with initial
% compensator
L = C*G;
margin(L)

% Modify the compensator C to obtain the desired phase margin (this part is
% up to you, since this seems like a homework question).
C = zpk([], -2, 10) % This is my trivial change, will not give 50 degrees phase margin.
C =
10
-----
(s+2)
Continuous-time zero/pole/gain model.
L = C*G;
margin(L)

% Bode plot of the compentator
bode(C)

% Closed-loop system
T = L / (1 + L);
bode(T)

step(T)

댓글 수: 6
Hello thank you sir for your explanation i have one question that can i use the following code to get moe than 50% phase margin. I have set the phase margin to 51%.
clc;
close all;
s=tf('s'); % To enter the transfer function directly
V= 51/(s+1); % This will give 51 degrees phase margin
G= (s+20)/((s+2)*(s+5));
margin(V)
M = C*G;
margin(M)
bode(C)
S = M / (1 + M);
bode(S)
step(S)
Did I do this correctly?
Please run your code and see yourself if
margin(M)
gives you the desired phase margin.
C= 51/(s+1); % This will give 51 degrees phase margin
How do you know that the controller C above will give you a 51 degree phase margin? Its gain is 51, but that doesn't necessarily give you a 51 degree phase margin.
SIr i run the code and I understand that I had to reduce the gain value I have use the following code and in bode plot it says Pm = 61.3 deg.
clc;
close all;
clear all;
s=tf('s'); % To enter the transfer function directly
V= 1.5/(s+1); % This will give 61.3 degrees phase margin
G= (s+20)/((s+2)*(s+5));
M=V*G
margin(M)
Did i do it correctly this time sir?
Looks like it. If the phase margin is better than 50 degrees, then your controller satisties the requirements of your problem. Also take a look at the step response of the closed loop system to make sure it is well behaved:
s = tf('s'); % To enter the transfer function directly
V = 1.5/(s+1); % This will give 61.3 degrees phase margin
G = (s+20)/((s+2)*(s+5));
M = V*G;
margin(M)

step(M/(1+M))

You will see that the steady-state step response value of your closed-loop system is not 1. This was not part of your question, but normally this would not be an acceptable step response... As a small hint, if your controller had an integrator, the steady-state response would have converged to 1, which is more desirable.
Hardik
2022년 12월 22일
Okay Sir. I understand. thank you for all your help.
Hello Sir, in my next part of problem I have to use the Feedback command in Matlab to find the closed loop transfer function of the compensated system. Provide the overall closed loop transfer function.
I have done the coding part but I am bit confused here that Do i have to use feedback command on original given system or the output TF i get from this part i have to use?
And if i have to use new obtanined TF then do i also have to use the plant value (s+20) and multiply them and then use the feedback command ?
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
