how do i find the minimum of multiple curves that start from different X and the draw it
5 views (last 30 days)
Show older comments
I have multiple curves each describes somthing, now i need to pick the minimum between them, the problem is they start from different point in x, I understand what needs to be done but can't seem to figure out how exactly
here is a picture and the code

clc
clear
S=input('Input Apparent Power \n' );
Pm=input('Input Mechanical Power \n');
V=input('Input Rated Voltage \n');
X=input('Input Synchronous Reactance \n');
E=input('Input Maximum Excitation \n');
M=input('Input Stability Margin in percentage \n');
%margin=(100-M)/100
% Apparent Power
theta=0 : 0.01 : 180;
xc=S*cosd(theta);
yc=S*sind(theta);
plot(xc,yc)
% Rotor Limitation
c2=V^2/X;
theta=0 : 0.01 : 90;
xc2=((E*V)/X)*cosd(theta)-c2;
yc2=((E*V)/X)*sind(theta);
% Mechanical Power
xp=min(-3):2;
yp=xp.^0*Pm;
% Margin
for i=1:(((E*V)/X)*10+2)
ym(i)=((i-1)/10)-((i-1)/10)*(M/100);
xm(i)=sqrt(((i-1)/10)^2-ym(i)^2)-c2;
end
maxy1=max(yc);
maxy2=max(yc2);
maxy3=max(yp);
maxy4=max(ym);
arr=cat(4,maxy1,maxy2,maxy3,maxy4);
miny=min(arr,[],4)
maxy=max(arr,[],4)
plot(xp,yp,xc,yc,xc2,yc2,xm,ym)
ylim([0 , maxy+0.1])
0 Comments
Answers (1)
See Also
Categories
Find more on Wind Power in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!