MATLAB: How to draw efficiency map contour of a motor

contourefficiency mapelectric_motor_controlmotor efficiency mappower_electronics_control

Given vectors of Speed, Torque and Efficiency. How do I draw the contour for efficiency map of the motor in matlab?

Best Answer

x0 = min(speed) ; x1 = max(speed) ; nx = 100 ;
y0 = min(torque) ; y1 = max(torque) ; ny = 100 ;
x = linspace(x0,x1,nx) ;
y = linspace(y0,y1,ny) ;
[X,Y] = meshgrid(x,y) ;
Z = griddata(speed,torque,efficiency,X,Y)
contour(X,Y,Z)
Where speed, torque and efficiency are vectors.
Related Question