- •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
MINISTRY OF EDUCATION AND SCIENCE OF UKRAIN
Zaporizhzhya National Technical University
METHODICAL DIRECTIONS
to laboratory works execution on the curse of
"MODELING of ELECTROMECHANICAL SYSTEMS"
for students of the specialty 7.092206.02
for all study forms
2006
METHODICAL DIRECTIONS to laboratory works execution on the curse of "MODELING of ELECTROMECHANICAL SYSTEMS" for students of the specialty 7.092206.02 for all study forms / Author T. KORNUS – Zaporizhzhya: ZNTU, 2006. – 68p.
Author: T. KORNUS
Reviewer: L. GORNJAK
Editor-in chief: A. RASSAL'SKY
Approved
by the chair of "Electrical apparatus"
The protocol #14 from 06.06.2006 y.
Contents
page
1 LABORATORY WORK #1 ………………….……………………. 4
2 LABORATORY WORK #2………………………….………….….14
3 LABORATORY WORK #3……………………………………….. 22
4 LABORATORY WORK #4……………………………………….. 30
5 LABORATORY WORK #5……………………………………….. 35
6 LABORATORY WORK #6……………………………………….. 41
7 LABORATORY WORK #7……………………………………….. 46
8 LABORATORY WORK #8……………………………………….. 52
9 LABORATORY WORK #9……………………………………….. 59
10 LABORATORY WORK #10……………………………………… 65
List of literature…………………………………………………………68
1 LAboratory work # 1
TOPIC: Modeling of steady-state electric processes in MATLAB environment. Part 1.
PURPOSE OF THE WORK: Studying of basic statements and operators of MATLAB, kinds of M-files, organization of input and output of information, processing of modeling results.
Mathematical model
Let's consider the example of working out of mathematical model of electric processes and their analysis in the elementary circuit (Fig.1.1) with the help of system MATLAB.
Figure 1.1 - Modeled electric circuit
Let parameters of elements of the circuit are given:
e1 (t) =100sin (t +/6) V; e2 (t) =200sin ((t +/3) V; =2f; f=50 Hz;
R1=1 Ohm; R2=2 Ohm; R3=3 Ohm;
C3=1*10-4 F; L2=1*10-3 H.
It is required to define the steady-state currents of branches.
Before to make the program, we shall write down system of Kirchhoff’s equations in the complex form.
Then the complex images of sine wave EMF are
The reactances are as
The complex images of impedances of branches
System of Kirchhoff’s equations for definition of branch currents
Let's copy this system of the equations as
Let's present factors before unknowns as a matrix
Vector of the right parts
Then the above-stated system of the equations written down by a matrix form will look as
where
- a column-vector of defined currents.
The solution of this matrix equation is a vector I of defined branch currents.
Stages of a program elaboration
To work out the program realizing the above-stated mathematical model in MATLAB environment, it is necessary to carry out the following steps:
-
Organize entering of the input data.
-
Make matrixes of system of the linear equations.
-
Solve this system of the linear equations.
-
Define an error of calculations.
-
Organize an output of results of calculation by using numerical or\and a graphic form.
Call Desktop matlab
MATLAB session starts by call one from the menu “Start”. Enter and run of the program should be executed directly from a Command window type and enter statements, operators and commands in turn. However, it is more expedient to use for this purpose a window of the editor of programs (Editor/Debugger). For this purpose, we shall click FileNew from the main menu or press to the corresponding icon button (New) on the panel of tools. The window of the text editor will appear. You can type the program text here.