- •Contents
- •1 LAboratory work # 1
- •Mathematical model
- •Stages of a program elaboration
- •Call Desktop matlab
- •Script-files and Function-files
- •Enter of input data by awarding method. Comments
- •Organization of enter of the input data by a dialogue mode
- •Creation of Function-file
- •Graphical output
- •2 LAboratory work # 2
- •Debugging and verification of programs
- •Search of syntactic mistakes
- •Debugging with the help of Editor/Debugger
- •Verification of results of calculation
- •3 LAboratory work # 3
- •The task for fulfillment
- •Individual tasks
- •4 LAboratory work # 4
- •Mathematical model
- •The block-diagram of algorithm of calculation according to mathematical model
- •The task for fulfillment
- •5 LAboratory work # 5
- •The task for fulfillment
- •Individual tasks
- •6 LAboratory work # 6
- •Mathematical model
- •Determination of zero approximation
- •Program of calculation in matlab environment
- •Results of calculation
- •Individual tasks
- •The task for fulfillment
- •7 LAboratory work # 7
- •Mathematical model
- •Program of calculation at matlab environment
- •Results of calculation
- •Individual tasks
- •The task for fulfillment
- •8 LAboratory work # 8
- •Mathematical model
- •Results of calculation
- •Improvement of convergence of the Newton method
- •The task for fulfillment
- •9 LAboratory work # 9
- •Mathematical model
- •The program of calculation in matlab environment
- •Results of calculation
- •The task for fulfillment
- •10 LAboratory work # 10
- •The task for fulfillment
- •Individual tasks
- •LIst of literature
The program of calculation in matlab environment
The main program:
% Newt6
% CALCULATION OF THE NONLINEAR MAGNETIC CIRCUIT BY THE NEWTON %METHOD
n=20; % number of iterations of the Newton method
h=0.001; % a step for realization of numerical derivation
I=5; N=50; % Current and loops of windings
Fm=N*I; % MMF
mu0=4*pi*1e-7;
l1=0.3; l2=0.3; l3=0.1; % length of magnetic branches
D1=0.1; D2=0.1; D3=0.1; % breadth of magnetic branches
dlt=0.1; % thickness of the core
luft=0.00002; % thickness of the air-gap
S1=D1*dlt; S2=D2*dlt; S3=D3*dlt; % cross-section area of magnetic
% branches of the core
Rm3=luft / (mu0*S3); % magnetic resistance of the air-gap
Gm3=1/Rm3; % Magnetization curve of steel
B = [-2.1,-2,-1.98,-1.96,-1.94,-1.92,-1.9,-1.86,-1.84,-1.8,-1.7,-1.6,-1.4…
-1.2-1, -0.8,-0.4,-0.2,-0.1,0,0.1,0.2,0.4,0.8,1,1.2,1.4,1.6,1. 7,1.8, 1.84...
1.86, 1.9, 1.92, 1.94, 1.96, 1.98, 2,2.1];
H = [-1000000,-11820,-5331,-3191,-2249,-1625,-1218,-660,-520,-295…
-97,-51.4,-31.9,-26.2, -23.2,-20.8,-15.2,-10.8,-7.58, 0,7.58, 10.8, 15.2…
20.8, 23.2, 26.2, 31.9, 51.4, 97, 295, 520, 660, 1218, 1625, 2249, 3197…
5331, 11820, 1000000];
Flux (1,1)= 0.02; % the initial approximation of magnetic fluxes
Flux (2,1)= 0.015;
Flux (3,1)= 0.01;
% Iterative calculation of magnetic fluxes in the linear network containing
% discrete flux models by node potentials method
for k=2:n
% calculation of discrete flux models conductivity for K-1 iteration
U3=l3*spline (B, H, Flux (3, k-1)/S3);
G3=S3/l3*der7 (H, B, U3/l3, h);
U1=l1*spline (B, H, Flux (1, k-1)/S1);
G1=S1/l1*der7 (H, B, U1/l1, h);
U2=l2*spline (B, H, Flux (2, k-1)/S2);
G2=S2/l2*der7 (H, B, U2/l2, h);
% the fluxes of discrete sources for K-1 iteration
Flux1=Flux (1, k-1)-U1*G1;
Flux2=Flux (2, k-1)-U2*G2;
Flux3=Flux (3, k-1)-U3*G3;
% node conductivities for K-1 iteration
G22=G3+G1+G2;
G11=G3+Gm3;
G12=G3;
G = [G11, -G12;
-G12, G22];
% the node fluxes for K-1 iteration
Fluxnode = [-Flux3; Flux3+Flux2-Flux1-Fm*G1];
phi=G\Fluxnode; % calculation of the node potentials for K iteration
% magnetic fluxes for K iteration
Flux (3, k) = (-phi (1) *Gm3+Flux (3, k-1) *2)/3;
Flux (1, k) = (Flux1+Fm*G1+phi (2) *G1+Flux (1, k-1) *2)/3;
Flux (2, k) = (Flux2-phi (2) *G2+Flux (2, k-1) *2)/3;
End
% Construction of the graphics of convergence of iterative processes of the magnetic fluxes calculation through the core
p=1:n;
plot (p, Flux (1, p)/S1, p, Flux (2, p)/S2, p, Flux (3, p)/S3);
The subprogram -function der7 of calculation of derivative in the given point is performed in methodical directions to laboratory work # 8.