⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vrm1.m

📁 电动机
💻 M
字号:
clc
clear
Lmax = 0.128;
Lleak = 0.005;

N = 1000;%resolution
tmax = 0.005;

%Now do the calculations
for n = 1:(N+1)
    t(n) = tmax*(n-1)/N;
    theta(n) = -67.5 + (4000/60*360)*t(n);
    
    if (theta(n) <= -7.5 & theta(n) >= -67.5)
        i(n) = 100*t(n)/(0.005+49.2*t(n));
        dlbytheta = 0.11175;
          end
    if (theta(n) <= 7.5 & theta(n) >= -7.5)
        i(n) = -66.7 + 68.65*exp(-(t(n)-0.0025)/0.0853);
        dlbytheta=0;  
    end
    if (theta(n) > 7.5 & theta(n) <= 67.5)
        i(n) = (0.185 - 100*(t(n)-0.00313))/(0.128-49.2*(t(n)-0.00313));
        dlbytheta = -0.11175;
    end
    torque(n) = 0.5*i(n)^2*dlbytheta;
end
n=1;
for de=-180:0.5:179
    if (de <= -112.5 & de >= -172.5)
        L(n) = 5 - 123/60*(de+112.5);
    end
    if (de <= 67.5 & de >=7.5)
        L(n) = 5 - 123/60*(de-67.5);
    end
    if (de >= -112.5 & de <= -67.5) || (de <= 112.5 & de >= 67.5)
        L(n) = 5;
    end 
    if (de>=172.5 & de<=179) || (de>=-7.5 & de<=7.5) || (de<=-172.5 & de>=-180)
        L(n) = 128;
    end
    if (de >= -67.5 & de <= -7.5)
        L(n) = 5 + 123/60*(de+67.5);
    end
    if (de <= 172.5 & de >= 112.5)
        L(n) = 5 + 123/60*(de-112.5);
    end
    n=n+1;
end

figure(1);
plot(-180:0.5:179,L);
xlabel('degree');
ylabel('L(theta)')
grid on;
figure(2);
plot(t*1000,i);
xlabel('time [msec]');
ylabel('Phase current [A]');
grid on;
figure(3);
plot(t*1000,torque);
xlabel('time [msec]');
ylabel('torque [N-m]');
grid on;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -