Material
Material
Table 1.1.
The positions of logical functions
N 1 2 3 4 Note
N 2 4 8 16
M 4 16 256 65536
Table 1.2.
Truth table for 2 variabels
n=1 M=4
N= 2 X Y1 Y2 Y3 Y4
0 0 1 0 1
1 0 0 1 1
Table 1.3.
Truth table for 4 variabels
1
Table 1.4.
Truth table for 8 variabels
Y = X1 X2 , (1.3)
As can be seen from Table 1.5, the operations on X1 and X2 formally resemble the
binary numbering system (except 1 + 1 = 1). Therefore, they call this operation a
logical addition operation:
Y = X1 + X2.
2) Conjunction operation. This operation implements the "AND" logic. The
logical results of the AND operation for the two variables, the concept of electrical
contact, and the conventional sign are shown in Table 1.6. Analytical representation
of the AND operation is as follows:
Y = X1 X2. (1.4)
As can be seen from Table 1.6, the logical operations on X1 and X2 are similar to
the binary number production operations. That is why they call this operation logical
production:
Y = X1 * X2 = X1 X2.
3) Inversion operation. This operation implements the "NO" ("HET", "NOT")
logic. The inversion operation is analytically expressed as follows:
Y= (1.5)
2
A table description of this operation, the concept of electrical contact, and the
conventional symbol are given in Table 1.7.
More complex logical transformations can be made using "AND", "AND",
"NO" logical operations. The following identities for logical algebra conjunctions
and designing operations are presented (Tables 1.8 and 1.9).
Table 1.5.
Truth table for 2 variabels of the OR gate
Table 1.6.
Truth table for 2 variabels of the AND gate
Table 1.7.
Truth table of the NOT gate
Table 1.8.
Truth table of the conjuction
Y=X1X2
Table 1.9.
3
Truth table of the disjunction
Y=X1+X2
V1 X2 V1 V2 X1 V2
12 V 12 V 12 V 12 V
X1X2=X2X1 (1.6)
X1 X2 X2 X1
2) Associative laws
(X1+X2)+X3=X1+(X2+X3); (1.7)
(X1X2)X3=X1(X2X3) (1.8)
4
X1
X1
X2
X2
V1 X3 V2
12 V V1
12 V X3 V2
12 V
12 V
3) Distributive laws
(X1+X2) X3=(X1X3)+(X2X3) (1.9)
(X1X2)+X3=(X1+X3)(X2+X3) (1.10)
X1 X2
X1 X2
X3 X3 X3 V1
12 V
12 V
V2
X 1 X 2=X 1+ X 2 ; (1.11)
X 1+ X 2= X 1 X 2 (1.12)
Commmutative, associative and distributive laws for logical addition matches with
that of ordinary algebra. That is why there is no need to prove them. The distributive
laws for logical multiplication and inversion doesnot match with that of ordinary
algebra. To prove these kind of equations table method is used.at the same time they
can be proved by analytical and logical methods. For example, for distributive:
(X1X2)+X3=(X1+X3)(X2+X3)
Let’s prove that:
(X1+X3)(X2+X3)=X1X2+X1X3+X3X2+X3X3=
=X1X2+X1X3+X3X2+X3=X1X2+
+(X1+X2+1) X3=X1X2+1X3=(X1X2)+X3.
5
Based on the distrubution law, we can obtain the fillowing exspressions:
1. (X1X2)+(X1 X 2)=X1(X2+ X 2)=X11=X1;
2. (X1+X2)(X1+ X 2)=X1X1+X1 X 2+X2X1+
+X2 X 2=X1+X1( X 2+X2)+0=X1+X11=
=X1+X1=X1;
3. X1+(X1X2)=X1(1+X2)=X11=X1;
4. X1 (X1+X2)=X1X1+X1X2=X1+X1X2=
=X1 (1+X2)=X11=X1;
5. X1+( X 1X2)=X11+ X 1X2=X1(1+ X2)+ X 1X2 =
=X1+X1X2+ X 1X2=X1+X2(X1+ X 1)=X1+X2;
6. X1( X 1+X2)=X1 X 1+X1X2=0+X1X2=X1X2.
1) Let us denote by D that any course process takes place. In order for this process
to occur, it is necessary to have a teacher (M) and a student's participation (T). The
interpretation is logically expressed as follows:
D=MT
This expression can also be written as below:
D= D T (1.13)
At the same time, for the classroom to fail ( ) it is enough for the student ( ) OR
the teacher ( ) to be absent. This comment can be logically written as follows:
= + (1.14)
Based on expressions (1.13) and (1.14) below equation can be written
= + . (1.15)
2) Let’s assume that, we have both electric heaters (E) and water radiator (R) for
heating any room (İ). For heating the room, it is enough to connect an electric heater
(E) or a radiator (R). So :
İ=E+R or = . (1.16)
In order not to heat it is necessary not to connect the electric heater AND the
radiator at the same time,
I =E R . (1.17)
Based on both (1.16) and (1.17) expressions
=E R . (1.18) (1.15) and (1.18)
express the expressions (1.11) and (1.12).
6
ANALYTIC FORM OF BOOLEAN FUNCTIONS
As can be seen from the tables (1.1) - (1.4) as the number of boolean variables
increases their description in table form becomes more and more difficult.For
example, for 3 variables it will be 256 and for 4 variables it will be 65536. That is
why to express the logic functions with analytic equations is more convinent. The
most convinent method is the standard way of describing the logic function. The
basis of standard description is elementary conjunction and disjunction .
When said elementar conjunction (minterm), the all possible variants of
products of logic variablesare considered (table 1.10).
When said elementary disjunction (maxterms) all possible variants of logical
sums of logic variables (table 1.10).
As can be seen from the table 1.10 elementary conjunction returns 1 only in
minterms from all possible variants. And elementary disjunction returns 0 only in
maxterms from all possible variantsElementar dizyunksiya isə giriş arqumentlərinin
bütün mümkün variantlarında ancaq bir halda sıfır qiymətini (maksterm) alır. If
boolean expression is expressed only with inversion, disjunction and conjunction
then this kind of boolean function is called normal function.
The boolean expression can be given in both disjunctive and conjunctive forms.
Disjunctive normal form means the sum of minterms (elementary conjunctions). For
example:
Y=X1*X2+ *X2.
Conjunctive normal form means the product of maxterms (elementary
conjunctions). For example, (X1+X2)*( +X2). The number of elementary
conjunctions and disjunctions are called its rank.
7
Table 1.10.
8
For example, the expression Y=X* *X3 is a three variable elementary
conjunction, and the expression Y= +X2+X3+X4 is 4 variable elementary
disjunction.
If boolean expression contains elementary conjunctions that have the same
ranks and if they are connected by disjunctions then, such function is called “Full
disjunctive normal form - FDNF”. If boolean expression contains elementary
disjunctions that have the same ranks and if they are connected by conjunctions
then , such function is called “Full conjunctive normal form - FCNF”
It is proven in boolean algebra that, any boolean function except Y=0 and any
boolean function except Y=1 can be expressed with FDNF and FCNF respectively.
Assume that the values of 3 variable logic function are given in table 1.11.
Lets note the minterms corresponding to values “1” in boolean expression and
maxterms corresponding to “0” in boolean expression. The sum of minterms (FDNF)
will be the analytic expression of boolean function. At the same time, the product of
maxterms (FCNF) will the analytic expression of boolean function. It should be
noted that, both forms of boolean function is exactly same with each other.
9
Table 1.11.
Values of 3 variable logic function
10
Table 1.12.
X1 X2 Y
0 0 0
1 0 0
0 1 1
1 1 1
In above table 1.12 truth table for the 2 logic variables (X1, 2) is given. Using these
values lets write analytic expression of this logic function. The FDNF form will be
like below:
Y= X2 + X1X2.
Lets simplfy this expression
Y= X2+X1X2=X2( +X1)=X21=X2.
The analytic form of this logic function in FCNF form will be like below:
Y=(X1+X2)( +X2).
Lets simplfy this expression:
Y=(X1 +X2)( +X2) =X1 +X1X2 + X2 + X2X2=
=0+X1X2 + X2 +X2 =X2(X1+ +1)= X21=X2.
As can be seen from the obtained expressions both forms of logic functions are
exactly same with each other.
Y= X 1 X 2+ X 1 X 2= X 1 ( X 2+ X 2 )=X 1 1=X 1 ;
X1 X2 X2
Y Y
X1
X1 X2 X2
V1
12 V
Y
X1
Y= X 1 X 2+ X 1 X 2 = X 1 ( X 2+ X 2 )=X 1 1=X 1
X2 Y X2 Y
X1
X1
X1 X2 X2
V1
X1
12 V
X1 X2 Y
0 0 0
1 0 0
0 1 1
1 1 1
Y= X 1 X 2+ X 1 X 2 = X 2 ( X 1+ X 1 )=X 2 1=X 2
X1 X2 Y
0 0 1
1 0 0
0 1 0
1 1 1
12
Y= X 1 X 2+ X 1 X 2
X1 X2 Y
V1 X1 X2
12 V
X1 X2 Y
0 0 0
1 0 1
0 1 1
1 1 0
Y= X 1 X 2+ X 1 X 2
MINIMIZING (SIMPLIFICATION)
OF LOGIC FUNCTIONS
If the logical function of any process is presented in a table, then the analytical
expression of that function is obtained by writing MDNF or MKNF forms. To
simplify the obtained analytical expression, it is necessary to use the basic rules of
logic function to minimize it.
İn order to minimize the logic expression Karnaugh-Veitch (KV maps) method is
also used.the use of this method is convinent if the number of variables are no more
than 4. Fig. 1.1 shows a Karnaugh map with 4, 6, and 16 cells, respectively, for two,
three, and four arguments
13
Fig. 1.1. Karnaugh map for two, three, and four arguments
Should be written into the cells of Karnaugh map where the minterms of logic
function returns 1. To minimize the logic expression by this method you should
follow the below rules:
1) If the "1" is located in rows and columns corresponding to the adjacent cell,
then the conjunctions corresponding to these "1"-s will be reduced to one grouped
term, and in this conjunction variables of the same character are stored.
2) if the cells in which 1-s have been stored make square form then the
corresponding conjunctions are reduced by 2 rank. In this conjunction the variables
of the same type are stored.
3) if conjunction contains only 1 cell then logic expression remains same.
Example: simplfy the 3 variable logic expression corresponding table 1.12.
Lets write down analytic expression of logic function corresponding to Table 1.12
Table 1.12.
Analytic expression of logic function
X1 X2 X3 Y
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 1
0 0 1 1
1 0 1 1
0 1 1 0
1 1 1 1
Y=X1X2 + X3+X1 X3+X1X2X3 (1.19)
14
Let’s first simplfy this expression by using the basic laws of booean algebra:
Y=X1X2 + X3+X1 X3+X1X2X3=X1X2 + +X1X2X3+ X3+X1
X3=X1X2( +X3)+
+ X3( +X1)=X1X2*1+ X31=
=X1X2+ X3 (1.20)
X1
a 1
X3 1 b 1 b 1
X2
The terms that return 1-s in the Karnaugh map are X1X2 and X1X2X3. İf we
reduce these conjunctions by 1 rank and keep the same variables we will get the term
X1X2. The cells in which 1-s have been stored are conjunctions X1 X3 , X3.
İf we decrease these conjunctions by 1 rank and keep the same variables we will get
conjunction X3. As a result, the function simplified by using Karnaugh map is
shown below.
Y= X1X2+ X3 (1.21)
This expression is same with the expression (1.20). So, the logic funtion written with
the expression (1.19) can be expressed as boolean expression (1.20) or (1.21) after
simplification process.
Sample soluation:
1. Y= X2+X1X2=X2( +X1)=X2
2. Y=X1+X1X2+X3=X1(1+X2)+X3=X1+X3
15
X1
Y X1 Y
X1 X2
12 V X3 12 V X3
V1 V1
3. Y= +X1 = ( +X1)=
X1
X2 R
X1 X2 Y
X1
Y
X1 X2 R
12 V
V1
4.12Y=X1(
V +X2)+X2( +X3)+X3=X1 +X1X2+
V1
+X2 +X2X3+X3=0+X1X2+0+X2X3+X3=
=X1X2+X3(X2+1)=X1X2+X3
X1
X1
X2
X2 Y
X2 X1 X2 Y
X3
12 V X3 X3
V1
Y
X2 X2 X1
6. (X1+X2)(X1+X3)=X1+X2X3
(X1+X2)(X1+X3)=X1X1+X1X3+X2X1+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.
X 1 dəyişənini X1+1 ifadəsi ilə əvəz etsək, alarıq:
Y= X 1( X 2+ X 3)+ X 1=(X1+1)(X 2+ X 3)+ X 1=X1X3+
+X1 X 2+X1 X 3+ X 2+ X 3+ X 1= X 3+ X 2+ X 1= X 3 X 2 X 1
18
X1 X2
Y
X1 X2 R
X3
12 V X1 R
V1 X2 X3
X1 Y
X2 Y
X3 R
11. Y = X 1 X 2+ X 1 X 2= X 2( X 1+ X 1)= X 2
X1 X2 Y X1
0 0 1
1 0 1 X2 1 1
0 1 1
1 1 1 1 1
Y Y
X1 X2 X1 X2
X1 X2 X1 X2
12. Y= X 1 X 2+ X 1 X 2+ X 1 X 2= X 1 X 2+ X 1 ( X 2+ X 2 )=¿
= X 1 X 2+ X 1=X 1 X 2+ X 1 (1+ X 2 )=X 1 X 2+ X 1+ ¿
+ X 1 X 2= X 1+ X 2 ( X 1+ X 1 )= X 1+ X 2
X1 X2 Y X1
0 0 0
1 0 1 X2 1 1
0 1 1
1 1 1 1
X1X2
X1X2
=X1; } X1X2
X1X2
=X2; }
X1 X2
Y Y
X1 X2 X1
X1 X2 X2
13. Y=X1X2
19
X1 X2 Y X1
0 0 0
1 0 0 X2 1
0 1 0
1 1 1
Y
X1 X2
14. Y= X 1 X 2 X 3+ X 1 X 2 X 3= X 1 X 3 ( X 2+ X 2 )= X 1 X 3
X1 X2 X3 Y
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 0
0 0 1 1
1 0 1 0
0 1 1 1
1 1 1 0
X2
X1
1 1
X3
X 1 X 2X 3
X 1 X 2X 3 }
=X 1 X 3
Y
X1 X2 X3
Y
X1 X2 X3 X1 X3
INFORMATION ABOUT
PROGRAMMABLE LOGIC CONTROLLERS (PLC)
PLC are special electronic devices that can be programmed and are used for
automating technological processes. Unlike computers PLC-s give signals to the
system according to input signals. First logic controllers were designed in a module
20
such that relays and contacts are connected to each other according to certain. The
very first PLC was produced in 1968 by Modicon-084 and had 4 kB memory.
Programmable logic controllers that have some certain limited capacity are also
called as programmable intellectual relays.
The name of some PLC-s and PIR produced by different companies have been
given below:
PLC called ‘Simatic S5’ and ‘Simatic S7’ by Simens;
PLC called ‘Modicon’ by Schneider Electric;
PLC called ‘LOGO’ by Simens
PIR called ‘Zelio logic’ by Schneider Electric
PIR called ‘EASY’ by Moeller;
The programming languages used for PLC and PIR are shown below:
Graphical languages:
LD (Ladder Diagram) – relay, schematic language for electric contacts;
FBD (Function Block Diaqram) – functional block diagram;
SFC (Sequential Function Chart) – sequantial function chart.
Text languages:
- STL (Statement list) – operator sheet.
The rectifiers as a static converter are used to convert the alternating current to
a direct current. The power part of this converter device mainly consists of the
following parts :1-transformer; 2-rectifier elements; 3-output filter.
2 3
1 =Uout
~Uin
The rectifier circuit consists of transformer (Tr), rectifier diode (D) and active
resistance (R d ). In the figure below illustrates voltage and current diagrams. Since
the R d is active resistance, it coincides with the voltage and current in phase.
The instantaneous value of the voltage in the secondary side of the transformer
is expressed as follows:
U ab =√ 2U 2 sin ωt ,
where U2 – the RMS value of transformers seconfary side voltage
- angular fequency of grid voltage (=2f).
The constant component of rectified voltage can be determined using the
equation below: Uab
D id
Tr a Uab
id id
~U1 Ud Rd
2 t
a) Ud, Uds b)
Uab
id
t
2
22
c)
π
√ 2U 2 sin θdθ= √ U 2=0 , 45U 2
1 2 2
U ds = ∫
2π 0 2π ,
here t is rotation angle of AC vector.
When U2=220 V the Uds=0,45Uds=0,45220=99 V.
For the active inducuctive load of single-phase halfwave rectifier circuit lets
look at MATLAB - Simulink "SimPower Systems" modeling .
R ; d (1.29)
Ld
VS1 VS2
tr k
A
i1
B
id Rd
VS3 VS4
23
The circuit of single-phase bridge rectifier
√ 2 I (−cos)| ; I π
I =1,11⋅I ;
π π
I d⋅π=∫ =
0
2 ef 0 I d⋅π=2 √2 I 2 ef ; 2 ef 2 √ 2 d d
1 ,11⋅ I ;
I =
π
I d=
d
k k
1 ef
. T 2 √2 T
}
U əksm =√ 2U 2
√2
U düz m= U 2 sin .
2
active – inductive load:
Uəksm = U2, √ 2
Uflat m U2 = sin√ 2.
3) The maximum current value of thyristors
active load:
IVSM = U2 / Rd √ 2
24
active - inductive load:
IVSM= Id.
4) And average and r.m.s. value of the current through thyristor
active load:
Ud
Ivsor = 2 R
d
Ivsef = Kf Ivsor.
active - inductive load:
U d Id
Ivsor = Ivef = 2 R
d √2
25
Rectified voltage:
2 /3
3
Ud = U2 sin ❑ ∫ √ 6d = U2 = 234U2 = 1.35 UAB 3 √6 (1.44)
❑ ❑
3
t
T1 t2 t3
Ud
t
US1
26
iVS1 iVS1
t
Sək121. Three-phase bridge circuit graphs
At the angle value /3 of active load the interruptions uccurs in the value of
the voltage and current. The average value of the voltage for this situation is
expressed as follows:
Ud = Ud0 [1+ cos (/ 3 +)] (1.49)
Aaverage value of rectified voltage at active-inductive load control angle
/3:
Ud = Ud0cos (1.50)
In Fig.1.22 given the regulation characteristics of three-phase bridge circuit fo
the active (1st curve) and active-inductive (2nd curve) load.
Ud
Ud0
27
1
Fig. 1.22. Characteristics of the 3-phase bridge circuit for active (1st curv) and
active-inductive (2nd curve) loads
28