(1) The realization principle of MPTA and the realization in simulink (based on vector control FOC)
First of all, this MPTA-based implementation is based on Id=0. Since the simulation of Id=0 is too simple, there are many online materials, so I won’t elaborate here.
MPTA implements the mathematical formula:
Motor stator current:
Find the extremum according to Lagrange's theorem, and then construct the auxiliary function:
Solving it, we can get:
So we build a model according to this formula
Speed ring:
Current loop:
Inside MTPA:
The code of its CLACK1 is:
function [iqx,idx] = fcn(Te,Np,pisa,Ld,Lq)
%#codegen
%iqx=(4*Te)/(3*pisa*Np);
temp3=(8*Te*pisa)/(3*Np);
temp4=(pisa*pisa)-4*(Ld-Lq)*(Ld-Lq);
temp5=(4*Te)/(3*Np);
temp6=(temp5*temp5)-(pisa*pisa);
temp7= (temp3*temp3)-(4*temp4*temp6);
iqx=(temp3+sqrt(temp7))/(2*temp4);
temp1f=(pisa)/(2*(Ld-Lq));
temp1=0-temp1f;
temp2n=(pisa^2)/(4*(Ld-Lq)*(Ld-Lq))+iqx*iqx;
temp2f=sqrt(temp2n);
temp2=0-temp2f;
idx=temp1+temp2;
end
Motor parameters:
Three-prase V-Imeasurement parameters:
*
The rest are basically the default parameters, which can be pulled directly from the library, and my clack and park transformations are all codes. You can also copy and build them from my previous blog without codes.
Speed Waveform:
Like it! ! ! Favorites
Continue to watch the follow-up! !