elec_generateIdealPMSMfluxData
Generate tabulated flux linkage data for ideal PMSM
Syntax
Description
[
generates 4-D flux linkage data, including the torque and the
partial derivatives, for an ideal permanent magnet synchronous motor
(PMSM).F
,T
,dFdA
,dFdB
,dFdC
,dFdX
]
= elec_generateIdealPMSMfluxData(PM
,Ld
,Lq
,L0
,A
,B
,C
,X
)
Use this function to create test data for the FEM-Parameterized PMSM block, either for validation purposes or to set up a model before the actual flux linkage data is available.
Examples
Generate 4-D Flux Linkage Data
Specify the motor parameters.
PM = 0.1; % Permanent magnet flux N = 6; % Number of pole pairs Ld = 0.0002; % D-axis inductance Lq = 0.0002; % Q-axis inductance L0 = 0.00018; % Zero-sequence inductance Rs = 0.013; % Stator resistance
Define the phase current vectors.
iA = linspace(-250,250,5); iB = iA; iC = iA;
Specify the rotor angle vector based on the number of pole pairs.
X = pi/180*linspace(0,360/N,180/N+1);
Tabulate flux linkage partial derivatives and torque in terms of A-,B-,C-currents and rotor angle.
[F,T,dFdA,dFdB,dFdC,dFdX] = elec_generateIdealPMSMfluxData(PM,Ld,Lq,L0,iA,iB,iC,X);
The function returns a 4-D flux linkage matrix
F
, a 4-D torque matrix
T
, and four 4-D matrices for
the flux linkage partial derivatives. The four
partial derivative matrices correspond to the three
phase currents and the rotor angle, respectively.
The matrix dimensions correspond to the three phase
currents and the rotor angle.
Generate 4-D Flux Linkage Matrix F
Specify the motor parameters.
PM = 0.1; % Permanent magnet flux N = 6; % Number of pole pairs Ld = 0.0002; % D-axis inductance Lq = 0.0002; % Q-axis inductance L0 = 0.00018; % Zero-sequence inductance Rs = 0.013; % Stator resistance
Define the phase current vectors.
iA = linspace(-250,250,5); iB = iA; iC = iA;
Specify the rotor angle vector based on the number of pole pairs.
X = pi/180*linspace(0,360/N,180/N+1);
Tabulate flux linkage partial derivatives and torque in terms of A-,B-,C-currents and rotor angle.
F = elec_generateIdealPMSMfluxData(PM,Ld,Lq,L0,iA,iB,iC,X);
The function returns a 4-D flux linkage matrix
F
, a 4-D torque matrix
T
, and four 4-D matrices for
the flux linkage partial derivatives. The four
partial derivative matrices correspond to the three
phase currents and the rotor angle, respectively.
The matrix dimensions correspond to the three phase
currents and the rotor angle.
Generate 3-D Flux Linkage Data
Specify the motor parameters.
PM = 0.1; % Permanent magnet flux N = 6; % Number of pole pairs Ld = 0.0002; % D-axis inductance Lq = 0.0002; % Q-axis inductance L0 = 0.00018; % Zero-sequence inductance Rs = 0.013; % Stator resistance
Define the d
-axis and
q
-axis current
vectors.
iD = linspace(-250,250,5); iQ = iD;
Specify the rotor angle vector based on the number of pole pairs.
X = pi/180*linspace(0,360/N,180/N+1);
Tabulate flux linkage partial derivatives and torque
in terms of in terms of
d
-axis and
q
-axis currents and
rotor angle.
[F,T,dFdA,dFdB,dFdC,dFdX] = elec_generateIdealPMSMfluxData(PM,Ld,Lq,L0,iD,iQ,X);
The function returns a 3-D flux linkage matrix
F
, a 3-D torque matrix
T
, and four 3-D matrices for
the flux linkage partial derivatives. The four
partial derivative matrices correspond to the three
phase currents and the rotor angle, respectively.
The matrix dimensions correspond to the
d
-axis and
q
-axis currents and the
rotor angle.
Generate 3-D Flux Linkage Matrix F
Specify the motor parameters.
PM = 0.1; % Permanent magnet flux N = 6; % Number of pole pairs Ld = 0.0002; % D-axis inductance Lq = 0.0002; % Q-axis inductance L0 = 0.00018; % Zero-sequence inductance Rs = 0.013; % Stator resistance
Define the d
-axis and
q
-axis current
vectors.
iD = linspace(-250,250,5); iQ = iD;
Specify the rotor angle vector based on the number of pole pairs.
X = pi/180*linspace(0,360/N,180/N+1);
Tabulate flux linkage partial derivatives and torque
in terms of in terms of
d
-axis and
q
-axis currents and
rotor angle.
F = elec_generateIdealPMSMfluxData(PM,Ld,Lq,L0,iD,iQ,X);
The function returns a 3-D flux linkage matrix
F
. The matrix dimensions
correspond to the d
-axis
and q
-axis currents and
the rotor angle.
Input Arguments
PM
— Peak permanent magnet flux linkage, in weber-turns
scalar
Peak permanent magnet flux linkage, in weber-turns, specified as a scalar.
Data Types: double
Ld
— D-axis inductance, in henries
scalar
D
-axis inductance, in
henries, specified as a scalar.
Data Types: double
Lq
— Q-axis inductance, in henries
scalar
Q
-axis inductance, in
henries, specified as a scalar.
Data Types: double
L0
— Zero-sequence inductance, in henries
scalar
Zero-sequence inductance, in henries, specified as a scalar.
Data Types: double
A
— A-phase current, in amperes
vector
A-phase current, in amperes, specified as a vector. The vector must be monotonically increasing and two-sided (contain both positive and negative values). Best practice is to include zero current as one of the points. Use this input argument to generate 4-D flux linkage data.
Data Types: double
B
— B-phase current, in amperes
vector
B-phase current, in amperes, specified as a vector. The vector must be monotonically increasing and two-sided (contain both positive and negative values). Best practice is to include zero current as one of the points. Use this input argument to generate 4-D flux linkage data.
Data Types: double
C
— C-phase current, in amperes
vector
C-phase current, in amperes, specified as a vector. The vector must be monotonically increasing and two-sided (contain both positive and negative values). Best practice is to include zero current as one of the points. Use this input argument to generate 4-D flux linkage data.
Data Types: double
D
— D-axis current, in amperes
vector
D-axis current, in amperes, specified as a vector. The vector must be monotonically increasing and two-sided (contain both positive and negative values). Best practice is to include zero current as one of the points. Use this input argument to generate 3-D flux linkage data.
Data Types: double
Q
— Q-axis current, in amperes
vector
Q-axis current, in amperes, specified as a vector. The vector must be monotonically increasing and two-sided (contain both positive and negative values). Best practice is to include zero current as one of the points. Use this input argument to generate 3-D flux linkage data.
Data Types: double
X
— Rotor angle, in radians
vector
The rotor angle, in radians, specified as a vector. The values must be in the range from zero to 2π/N, where N is the number of pole pairs.
Data Types: double
Output Arguments
F
— Flux linkage
matrix
The flux linkage, in weber-turns, returned as a
matrix. The matrix can be four-dimensional or
three-dimensional, depending on the syntax used to
call the function. In a four-dimensional matrix, the
first three dimensions correspond to the phase
currents, and the fourth dimension corresponds to
the rotor angle. In a three-dimensional matrix, the
first two dimensions correspond to the
d
-axis and
q
-axis currents, and
the third dimension corresponds to the rotor angle.
T
— Torque
matrix
Torque, in N*m, returned as a matrix. The matrix can
be four-dimensional or three-dimensional, depending
on the syntax used to call the function. In a
four-dimensional matrix, the first three dimensions
correspond to the phase currents, and the fourth
dimension corresponds to the rotor angle. In a
three-dimensional matrix, the first two dimensions
correspond to the d
-axis
and q
-axis currents, and
the third dimension corresponds to the rotor angle.
dFdA
— Flux linkage partial derivative with respect to the A-phase current
matrix
Flux linkage partial derivative with respect to the
A-phase current, returned as a matrix. The matrix
can be four-dimensional or three-dimensional,
depending on the syntax used to call the function.
In a four-dimensional matrix, the first three
dimensions correspond to the phase currents, and the
fourth dimension corresponds to the rotor angle. In
a three-dimensional matrix, the first two dimensions
correspond to the d
-axis
and q
-axis currents, and
the third dimension corresponds to the rotor angle.
dFdB
— Flux linkage partial derivative with respect to the B-phase current
matrix
Flux linkage partial derivative with respect to the
B-phase current, returned as a matrix. The matrix
can be four-dimensional or three-dimensional,
depending on the syntax used to call the function.
In a four-dimensional matrix, the first three
dimensions correspond to the phase currents, and the
fourth dimension corresponds to the rotor angle. In
a three-dimensional matrix, the first two dimensions
correspond to the d
-axis
and q
-axis currents, and
the third dimension corresponds to the rotor angle.
dFdC
— Flux linkage partial derivative with respect to the C-phase current
matrix
Flux linkage partial derivative with respect to the
C-phase current, returned as a matrix. The matrix
can be four-dimensional or three-dimensional,
depending on the syntax used to call the function.
In a four-dimensional matrix, the first three
dimensions correspond to the phase currents, and the
fourth dimension corresponds to the rotor angle. In
a three-dimensional matrix, the first two dimensions
correspond to the d
-axis
and q
-axis currents, and
the third dimension corresponds to the rotor angle.
dFdX
— Flux linkage partial derivative with respect to the rotor angle
matrix
Flux linkage partial derivative with respect to the
rotor angle, returned as a matrix. The matrix can be
four-dimensional or three-dimensional, depending on
the syntax used to call the function. In a
four-dimensional matrix, the first three dimensions
correspond to the phase currents, and the fourth
dimension corresponds to the rotor angle. In a
three-dimensional matrix, the first two dimensions
correspond to the d
-axis
and q
-axis currents, and
the third dimension corresponds to the rotor angle.
Algorithms
The flux linking each winding has contributions from the permanent magnet plus the three windings. Therefore, the total flux is given by [1]:
Here, Θe is the electrical angle, which is related to rotor angle Θr by Θe = N·Θr. The function assumes that the permanent magnet flux linking the A-phase winding is at the maximum for Θe = 0.
The function output F
corresponds to
ψa tabulated as a function
of A-phase current, B-phase current, C-phase current, and rotor
angle.
Ls, Lm, and Ms are
related to input arguments Ld
, Lq
, and
L0
by:
References
[1] Anderson, P.M. Analysis of Faulted Power Systems. 1st Edition. Wiley-IEEE Press, July 1995, p.187.
Version History
Introduced in R2017aR2019a: elec_generateIdealPMSMfluxData
will be removed
The elec_generateIdealPMSMfluxData
function will
be removed in a future release. Use the ee_generateIdealPMSMfluxData
function instead.
The only difference between these functions is the function name. To
prevent your code from generating an error when the function is
removed, update to the new function name.
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)