- •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
7 LAboratory work # 7
TOPIC: Modeling of steady state processes in nonlinear electric circuits of direct current by numerical method at MATLAB environment. Part 2.
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.__
Mathematical model
Let’s consider the example of the mathematical model development of the electric processes in the circuit represented in the figure 7.1 and analyze of them at MATLAB environment.
Figure 7.1 – Given electrical circuit
Let parameters values of elements are given as:
EMF – E1= 10 V; E2= 5 V;
Linear resistances – R1=2 Ohm; R2=3 Ohm;
Nonlinear resistance Rn is given analytically accord to VACH:
Uf(I)=a·I⅓, (7.1)
where Uf(I) – voltage across of nonlinear resistor, a=10.
It is required the determination of the currents through the all branches of given circuit.
For solution it is required to calculate a derivative at concrete values of voltage. For this purpose the equation (7.1) is solved concerning current І and the derivative is defined:
I’f(U)=0.3U2 (7.2)
Expression (7.2) allows calculation of conductance of discrete current model of the nonlinear resistive element. Therefore expression (7.2) is determined in the program by user function. Initial value (zero approximation) of the current through the nonlinear resistance should be set. Let it be I0 = 0,1 A. Zero approximation should meet two requirements: the derivative dI/dU at this value of a current should not be equal to zero; value І0 should not exceed the greatest possible value of a current through the nonlinear element. Precomputation of І0 can be executed as follows: roughly to replace VACH of a straight line and to execute calculation of currents in the obtained linear circuit. However, in most cases it is not required carrying out of precomputation of І0. It is easier to define І0 by the ‘adjustment fire’ method. If at any value І0 calculation confidently converges, the value І0 is chosen correctly.
The calculated currents through all branches of all steps of iteration are saved as a bi-directional array І. The first index sets number of a current of the branch, the second – number of iteration.
Further there is a cycle of calculations in which number of iteration k changes from unit up to set number N. Parameters of discrete current model G, J is calculated cyclically, and the nonlinear circuit (fig. 7.1) is replaced by an equivalent circuit (fig. 7.2).
Calculation of currents of the linear circuit shown in fig. 7.2 is carried out by the method of two nodes:
where J and G are parameters of discrete current model.
Then currents of branches are calculated accord to formulas
Figure 7.2 – The equivalent electrical circuit
The program realizing the given algorithm is resulted in item 7.2.