лабораторная работа / мэмс / 8lw
.docxMinistry of science and education, youth and sport of Ukraine
Zaporozhie National Technical University
Department EEA
Report
Laboratory work#8
Done L.A.Askerova
Checked T.M.Kornus
Zaporozhie
2012
TOPIC: Modeling of steady state electric processes in nonlinear electric circuits of direct current by numerical method in MATLAB environment. Part 3.
PURPOSE OF THE WORK: Problem statement, development of the program of calculation of electrical state in the nonlinear circuit of a direct current by the Newton method using discrete current models and spline-interpolation of current-voltage diagrams
Mathematical model
Let's make mathematical model of electric processes in a circuit (Fig. 8.1) in MATLAB medium if current-voltage diagrams of nonlinear components are given as graphical curves.

Figure 8.1 – Modeled electric circuit
Let parameters of elements of the circuit are given:
E0=5 V; E3=4 V; R0=2 Ohm; R3=5 Ohm.
Nonlinear components Rn1 and Rn2 are given as graphical curves by current-voltage diagrams (VACH) according to fig. 8.2:

а).

б).
а) VACH for Rn1;
б) VACH for Rn2.
Figure 8.2 – Current-voltage diagrams of nonlinear resistance;
The equivalent circuit, in which nonlinear resistances are replaced by discrete current models, is represented in fig. 8.3.

Figure 8.3 – The equivalent circuit
The algorithm of solution of this problem as a whole is a same as algorithm of solution of the problem considered in laboratory work # 7. A singularity is the graphic mode of the representation of current-voltage diagrams of nonlinear components.
In mathematical model it would be defined current-voltage diagrams by reference points of interpolation so that abscissas of reference points of current-voltage diagrams for Rn1 and Rn2 are coincided, and thus, it would be possible to set abscissas of VACH by single vector.

where J and G are parameters of discrete current model.
Then currents of branches are calculated accord to formulas



The Block-diagram

Program that executes the task
% Newt3
%Calculation of the direct current branched nonlinear circuit by the Newton method
% with application of discrete current models of nonlinear resistance
% VACH of nonlinear resistances given as arrays
% VACH is interpolated by spline-method
% derivatives are calculated by numerical seven-point method
% Initial data:
%MU - vector of voltage coordinates of reference points for
% the VACH of Rn1 and Rn2;
%MI1 - vector of current coordinates of reference points for
% the VACH of Rn1;
%MI2 - vector of current coordinates of reference points for
% the VACH of Rn2;
MU = [-12,-10,-8,-6,-4,-3,-2,-1,-0.5,-0.2,-0.1, 0, 0.1, 0.2, 0.5, 1, 2, 3, 4, 6, 8, 10, 12];
MI1 = [-256,-200,-128,-72,-32,-18,-8,-2,-0.5,-0.08,-0.02, 0, 0.02, 0.08, 0.5, 2, 8, 18, 32, 72, 128, 200, 256];
MI2 = [-172.8,-100,-51.2,-21.6,-6.4,-2.7,-0.8,-0.1,-0.013,-0.0008,-0.0001, 0, 0.0001,0.0008,0.013,0.1,0.8,2.7,6.4,21.6,51.2,100,172.8];
R0=2; R3=5; E0=5; E3=4; hU=0.1; hI=0.1;
% Parameters of equivalent current sources
G0=1/R0; G3=1/R3;
J0=E0*G0;
J3=E3*G3;
% Initial approximation
I_11=2.5;
I_21=1;
% Number of approximation steps
N=40;
% Iterative process
I (1,1) =I_11;
I (2,1) =I_21;
Ip (1,1) =I_11;
Ip (2,1) =I_21;
Iq (1,1) =I_11;
Iq (2,1) =I_21;
for k=2:N
U1k=spline (MI1, MU, I (1, k-1)); % calculation of the voltage drop %U1k across Rn1 according to VACH by the spline-method
G1k=der7 (MU, MI1, U1k, hU); % calculation of the derivative of %VACH-function I_1 (U)
U2k=spline (MI2, MU, I (2, k-1)); % calculation of the voltage drop %U2k across Rn2 according to VACH by the spline-method
G2k=der7 (MU, MI2, U2k, hU); % calculation of the derivative of %VACH-function I_2 (U)
J1k=I (1, k-1)-U1k*G1k; % current through the nonlinear resistor Rn1
J2k=I (2, k-1)-U2k*G2k; % current through the nonlinear resistor Rn2
% calculation of conductances
G11=G0+G1k+G2k;
G22=G2k+G3;
G12=G2k;
% node currents
I11=J0-J1k+J2k;
I22=J3-J2k;
% matrix of conductances
M = [G11,-G12;
-G12, G22];
% matrix of node currents
Iuz = [I11; I22];
% potential of node 1
phi=M\Iuz;
% branch currents
I (3, k) =J0-phi (1) *G0;
I (1, k) =J1k+phi (1) *G1k;
I (2, k) =J2k + (phi (2)-phi (1)) *G2k;
Ip (3, k) =(J0-phi (1) *G0+Ip(3,k-1))*0.5;
Ip (1, k) =(J1k+phi (1) *G1k+Ip(1, k-1)) *0.5;
Ip (2, k) =(J2k + (phi (2)-phi (1)) *G2k+Ip (2, k-1)) *0.5;
Iq (3, k) =(J0-phi (1) *G0+3*I (3, k-1)) *0.25;
Iq (1, k) =(J1k+phi (1) *G1k+3*I (1, k-1)) *0.25;
Iq (2, k) =(J2k + (phi (2)-phi (1)) *G2k+3*Iq (2, k-1)) *0.25;
end
% display of iterative process
p=1:N;
subplot(3,1,1), plot(p, I (1, p), p, I (2, p), p, I (3, p));
grid on; title ('Approaching of the varistor current')
xlabel('iterations');
ylabel('Current');
legend('I1','I2','I3',-1)
subplot(3,1,2), plot(p, Ip (1, p), p, Ip (2, p), p, Ip (3, p));
grid on;title ('Voltage')
xlabel('voltage');
ylabel('current');
legend('I1','I2','I3',-1)
subplot(3,1,3),
plot(p, Iq (1, p), p, Iq (2, p), p, Iq (3, p));grid on;
title ('current')
xlabel('voltage');
ylabel('current');legend('I1','I2','I3',-1)
I(1,40)
I(2,40)
I(3,40)
Listing of the program
I1=1.5665
I2 =-0.4694
I3=2.0359
Results of calculation
Graphical dependences of calculated currents through the branches of the given circuit (fig. 8.1.) accord to the every iteration step is represented in the figure 8.4.
The schedule of dependences of branches currents from number of iterations shows confident convergence of a method.

Figure 8.4 – Graphical dependences of calculated currents through the branches
The currents are:
I1=1.5665A;
I2=-0.4694A;
I3=2.0359A.
Conclusion: The currents via varistors and branches were found. The graph of VAD is presented.
