to obtain contour plots

2 ビュー (過去 30 日間)
Prashanth Nayak
Prashanth Nayak 2016 年 4 月 27 日
回答済み: Raghunath Rachabattuni 2023 年 6 月 30 日
Hi,
I am trying to obtain the IPMSM Flux weakening characteristics with matlab code. I could able to get required circle and ellipse but i could not get the black line in the pic which i have attached. Here is my code. Can u please rectify the problem.
Thank you
matlab code:
clear all;
close all;
clc;
x=0;
y=0;
r=355;
hold on
th = 0:pi/50:2*pi;
xunit = r*cos(th)+x;
yunit = r*sin(th)+y;
h=plot(xunit, yunit,'blue');
axis('equal');
hold on;
[m,n]=meshgrid(-500:500,-500:500);
p=(((m+299).^2)/5814.25+((n.^2)/2517.2));
contour(m,n,p,10);
[c,h]=contour(m,n,p,10,'red');
%clabel(c,h);
hold on;
Ld=(0.349e-3);
Lq=(0.806e-3);
[m,n]=meshgrid(250:-350, 187:353);
t=0.6276*n-(0.000457*m*n);
contour(m,n,t,10);
[c,h]=contour(m,n,t,'black');
%clabel(c,h);
hold off;
grid on;
regards, Prashanth

回答 (2 件)

KSSV
KSSV 2016 年 4 月 27 日
編集済み: KSSV 2016 年 4 月 27 日
change
[m,n]=meshgrid(250:-350, 187:353);
t=0.6276*n-(0.000457*m*n);
to
[m,n]=meshgrid(250:-1:-350, 187:353);
t=0.6276*n-(0.000457*m*n);
Though black lines appear it is not like the attached png.
  3 件のコメント
KSSV
KSSV 2016 年 4 月 27 日
Friend...I am not aware what the problem is...I only edited the code mistake....
Prashanth Nayak
Prashanth Nayak 2016 年 4 月 28 日
Ok fine..

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


Raghunath Rachabattuni
Raghunath Rachabattuni 2023 年 6 月 30 日
You can use the commandline utilities that are shipped with Motor Control Blockset. Please refer to the following links to explore the constraint curves and also how to use them.

カテゴリ

Help Center および File ExchangeElectromechanical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by