Basic Electrical Engineering_A. Mittle and v. N. Mittle

Embed Size (px)

Citation preview

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    1/212

    Scilab Textbook Companion for

    Basic Electrical Engineering

    by A. Mittle and V. N. Mittle1

    Created byIdris Manaqibwala

    Electrical TechnologyCivil Engineering

    VNIT NagpurCollege Teacher

    Prof. V. B. BorghateCross-Checked byBhavani Jalkrish

    August 28, 2014

    1Funded by a grant from the National Mission on Education through ICT,http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilabcodes written in it can be downloaded from the Textbook Companion Projectsection at the website http://scilab.in

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    2/212

    Book Description

    Title: Basic Electrical Engineering

    Author: A. Mittle and V. N. Mittle

    Publisher: Tata McGraw Hill

    Edition: 2

    Year: 2005

    ISBN: 9780070593572

    1

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    3/212

    Scilab numbering policy used in this document and the relation to theabove book.

    Exa Example (Solved example)

    Eqn Equation (Particular equation of the above book)

    AP Appendix to Example(Scilab Code that is an Appednix to a particularExample of the above book)

    For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 meansa scilab code whose theory is explained in Section 2.3 of the book.

    2

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    4/212

    Contents

    List of Scilab Codes 5

    1 DC Circuits 13

    2 Electrostatics 22

    3 Electromagnetism 26

    4 Magnetic Circuit 29

    5 Electromagnetic Induction 41

    6 Fundamentals of Alternating Current 52

    7 AC Series Circuit 68

    8 AC Parallel Circuit 80

    9 Three Phase Systems 97

    10 Measuring Instruments 107

    13 Temperature Rise and Ventilation in Electrical Machines 111

    14 Single Phase Transformers 113

    15 Three Phase Transformers 127

    16 Electromechanical Energy Conversion 130

    3

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    5/212

    17 Fundamentals of DC Machines 132

    18 DC Generators 140

    19 DC Motors 150

    20 Testing of DC Machine 160

    21 Three Phase Alternators 167

    22 Synchronous Motors 176

    23 Three Phase Induction Motor 185

    24 Single Phase Induction Motor 204

    4

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    6/212

    List of Scilab Codes

    Exa 1.1 Example on Ohms Law . . . . . . . . . . . . . . . . . 13Exa 1.2 Example on Ohms Law . . . . . . . . . . . . . . . . . 13Exa 1.3 Example on Ohms Law . . . . . . . . . . . . . . . . . 14Exa 1.4 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 14Exa 1.5 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 15Exa 1.6 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 15Exa 1.7 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 16Exa 1.8 Example on Superposition Theorem . . . . . . . . . . 16Exa 1.9 Example on Superposition Theorem . . . . . . . . . . 17Exa 1.10 Example on Thevenin Theorem . . . . . . . . . . . . . 17Exa 1.11 Example on Norton Theorem . . . . . . . . . . . . . . 18Exa 1.12 Example on Nodal Analysis . . . . . . . . . . . . . . . 18Exa 1.13 Example on Maximum Power Transfer Theorem . . . 19

    Exa 1.14 Example on Delta to Star and Star to Delta Transfor-mation . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    Exa 1.16 Example on Delta to Star and Star to Delta Transfor-mation . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Exa 2.1 Example on Coulombs Law . . . . . . . . . . . . . . . 22Exa 2.2 Example on Electric Intensity . . . . . . . . . . . . . 22Exa 2.3 Example on Electric Potential. . . . . . . . . . . . . . 23Exa 2.4 Example on charging and discharging of capacitor . . 24Exa 2.5 Example on charging and discharging of capacitor . . 24Exa 2.6 Example on charging and discharging of capacitor . . 25Exa 3.2 Example on Field Strength and Flux Density . . . . . 26

    Exa 3.3 Example on Field Strength and Flux Density . . . . . 26Exa 3.4 Example of Force on on Current Carrying Conductor . 27Exa 3.5 Example of Force on on Current Carrying Conductor . 27Exa 4.1 Example on Series Magnetic Circuit . . . . . . . . . . 29

    5

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    7/212

    Exa 4.2 Example on Series Magnetic Circuit . . . . . . . . . . 30

    Exa 4.3 Example on Series Magnetic Circuit . . . . . . . . . . 30Exa 4.4 Example on Series Magnetic Circuit . . . . . . . . . . 31Exa 4.5 Example on Series Magnetic Circuit . . . . . . . . . . 32Exa 4.6 Example on Series Magnetic Circuit . . . . . . . . . . 33Exa 4.7 Example on Series Magnetic Circuit . . . . . . . . . . 33Exa 4.8 Example on Series Magnetic Circuit . . . . . . . . . . 34Exa 4.9 Example on Series Magnetic Circuit . . . . . . . . . . 35Exa 4.10 Example on Series Magnetic Circuit . . . . . . . . . . 36Exa 4.11 Example on Series Magnetic Circuit . . . . . . . . . . 37Exa 4.12 Example on Series Parallel Magnetic Circuit. . . . . . 38Exa 4.13 Example on Series Parallel Magnetic Circuit. . . . . . 39

    Exa 5.1 Example on Induced EMF. . . . . . . . . . . . . . . . 41Exa 5.2 Example on Induced EMF. . . . . . . . . . . . . . . . 41Exa 5.3 Example on Induced EMF. . . . . . . . . . . . . . . . 42Exa 5.4 Example on Induced EMF. . . . . . . . . . . . . . . . 42Exa 5.5 Example on Induced EMF. . . . . . . . . . . . . . . . 43Exa 5.6 Example on Induced EMF. . . . . . . . . . . . . . . . 44Exa 5.7 Example on Induced EMF. . . . . . . . . . . . . . . . 44Exa 5.8 Example on Induced EMF. . . . . . . . . . . . . . . . 45Exa 5.9 Example on Induced EMF. . . . . . . . . . . . . . . . 45Exa 5.10 Example on Induced EMF. . . . . . . . . . . . . . . . 46

    Exa 5.11 Example on Induced EMF. . . . . . . . . . . . . . . . 46Exa 5.12 Example on Growth and Decay of Current in InductiveCircuits . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    Exa 5.13 Example on Growth and Decay of Current in InductiveCircuits . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    Exa 5.14 Example on Growth and Decay of Current in InductiveCircuits . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    Exa 5.15 Example on Growth and Decay of Current in InductiveCircuits . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    Exa 5.16 Example on Energy Stored in Magnetic Field . . . . . 49Exa 5.17 Example on Energy Stored in Magnetic Field . . . . . 49

    Exa 5.18 Example on Energy Stored in Magnetic Field . . . . . 50Exa 6.1 Example on AC Wave Shapes . . . . . . . . . . . . . . 52Exa 6.2 Example on AC Wave Shapes . . . . . . . . . . . . . . 54Exa 6.3 Example on AC Wave Shapes . . . . . . . . . . . . . . 54Exa 6.4 Example on AC Wave Shapes . . . . . . . . . . . . . . 55

    6

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    8/212

    Exa 6.5 Example on AC Wave Shapes . . . . . . . . . . . . . . 56

    Exa 6.6 Example on AC Wave Shapes . . . . . . . . . . . . . . 56Exa 6.7 Example on AC Wave Shapes . . . . . . . . . . . . . . 60Exa 6.8 Example on AC Wave Shapes . . . . . . . . . . . . . . 61Exa 6.9 Example on AC Wave Shapes . . . . . . . . . . . . . . 64Exa 6.10 Example on AC Wave Shapes . . . . . . . . . . . . . . 64Exa 6.11 Example on Phase Difference . . . . . . . . . . . . . . 66Exa 6.13 Example on Simple AC Circuits . . . . . . . . . . . . 66Exa 6.14 Example on Simple AC Circuits . . . . . . . . . . . . 67Exa 7.1 Example on AC Series Circuit . . . . . . . . . . . . . 68Exa 7.2 Example on AC Series Circuit . . . . . . . . . . . . . 68Exa 7.3 Example on AC Series Circuit . . . . . . . . . . . . . 69

    Exa 7.4 Example on AC Series Circuit . . . . . . . . . . . . . 70Exa 7.5 Example on AC Series Circuit . . . . . . . . . . . . . 71Exa 7.6 Example on AC Series Circuit . . . . . . . . . . . . . 71Exa 7.7 Example on AC Series Circuit . . . . . . . . . . . . . 73Exa 7.8 Example on AC Series Circuit . . . . . . . . . . . . . 73Exa 7.9 Example on AC Series Circuit . . . . . . . . . . . . . 74Exa 7.10 Example on AC Series Circuit . . . . . . . . . . . . . 75Exa 7.11 Example on AC Series Circuit . . . . . . . . . . . . . 76Exa 7.12 Example on AC Series Circuit . . . . . . . . . . . . . 76Exa 7.13 Example on AC Series Circuit . . . . . . . . . . . . . 77

    Exa 7.14 Example on AC Series Circuit . . . . . . . . . . . . . 78Exa 7.15 Example on AC Series Circuit . . . . . . . . . . . . . 79Exa 8.1 Example on Phasor Method. . . . . . . . . . . . . . . 80Exa 8.2 Example on Phasor Method. . . . . . . . . . . . . . . 81Exa 8.3 Example on Phasor Method. . . . . . . . . . . . . . . 83Exa 8.4 Example on Phasor Method. . . . . . . . . . . . . . . 84Exa 8.5 Example on Admittance Method . . . . . . . . . . . . 86Exa 8.6 Example on Symbolic Method . . . . . . . . . . . . . 87Exa 8.7 Example on Symbolic Method . . . . . . . . . . . . . 88Exa 8.8 Example on Symbolic Method . . . . . . . . . . . . . 89Exa 8.9 Example on Symbolic Method . . . . . . . . . . . . . 90

    Exa 8.10 Example on Series Parallel Circuit . . . . . . . . . . . 91Exa 8.11 Example on AC Network Theorems . . . . . . . . . . 92Exa 8.12 Example on Resonance in Parallel Circuits. . . . . . . 93Exa 8.13 Example on Resonance in Parallel Circuits. . . . . . . 95Exa 9.1 Example on Three Phase Circuits . . . . . . . . . . . 97

    7

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    9/212

    Exa 9.2 Example on Three Phase Circuits . . . . . . . . . . . 98

    Exa 9.3 Example on Three Phase Circuits . . . . . . . . . . . 99Exa 9.4 Example on Three Phase Circuits . . . . . . . . . . . 100Exa 9.5 Example on Three Phase Circuits . . . . . . . . . . . 101Exa 9.6 Example on Three Phase Circuits . . . . . . . . . . . 101Exa 9.7 Example on Three Phase Circuits . . . . . . . . . . . 102Exa 9.8 Example on Power Measurement . . . . . . . . . . . . 103Exa 9.9 Example on Power Measurement . . . . . . . . . . . . 103Exa 9.10 Example on Power Measurement . . . . . . . . . . . . 104Exa 9.11 Example on Power Measurement . . . . . . . . . . . . 105Exa 9.12 Example on Power Measurement . . . . . . . . . . . . 105Exa 10.1 Example on Moving Coil Instruments . . . . . . . . . 107

    Exa 10.2 Example on Moving Coil Instruments . . . . . . . . . 107Exa 10.3 Example on Moving Coil Instruments . . . . . . . . . 108Exa 10.4 Example on Moving Coil Instruments . . . . . . . . . 109Exa 10.5 Example on Moving Coil Instruments . . . . . . . . . 109Exa 10.6 Example on Moving Coil Instruments . . . . . . . . . 110Exa 13.1 Example on Heating and Cooling of Electrical Machines 111Exa 13.2 Example on Heating and Cooling of Electrical Machines 112Exa 14.1 Example on EMF Equation . . . . . . . . . . . . . . . 113Exa 14.2 Example on EMF Equation . . . . . . . . . . . . . . . 113Exa 14.3 Example on Equivalent Circuit . . . . . . . . . . . . . 114

    Exa 14.4 Example on Equivalent Circuit . . . . . . . . . . . . . 115Exa 14.5 Example on Regulation and Efficiency . . . . . . . . . 116Exa 14.6 Example on Regulation and Efficiency . . . . . . . . . 116Exa 14.7 Example on Regulation and Efiiciency . . . . . . . . . 117Exa 14.8 Example on Regulation and Efficiency . . . . . . . . . 118Exa 14.9 Example on Regulation and Efficiency . . . . . . . . . 119Exa 14.10 Example on Regulation and Efficiency . . . . . . . . . 120Exa 14.11 Example on Regulation and Efficiency . . . . . . . . . 120Exa 14.12 Example on Regulation and Efficiency . . . . . . . . . 121Exa 14.13 Example on Regulation and Efficiency . . . . . . . . . 121Exa 14.14 Example on Testing of Transformer. . . . . . . . . . . 122

    Exa 14.15 Example on Testing of Transformer. . . . . . . . . . . 123Exa 14.16 Example on Testing of Transformer. . . . . . . . . . . 124Exa 14.17 Example on Parallel Operation . . . . . . . . . . . . . 124Exa 14.18 Example on Parallel Operation . . . . . . . . . . . . . 125Exa 15.1 Example on three phase transformer . . . . . . . . . . 127

    8

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    10/212

    Exa 15.2 Example on three phase transformer . . . . . . . . . . 128

    Exa 15.3 Example on three phase transformer . . . . . . . . . . 128Exa 15.4 Example on three phase transformer . . . . . . . . . . 129Exa 16.2 Example on Electromechanical Energy Conversion De-

    vices. . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Exa 16.3 Example on Electromechanical Energy Conversion De-

    vices. . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Exa 17.1 Example on DC Winding . . . . . . . . . . . . . . . . 132Exa 17.2 Example on DC Winding . . . . . . . . . . . . . . . . 132Exa 17.3 Example on EMF Equation . . . . . . . . . . . . . . . 133Exa 17.4 Example on EMF Equation . . . . . . . . . . . . . . . 133Exa 17.5 Example on EMF Equation . . . . . . . . . . . . . . . 134

    Exa 17.6 Example on EMF Equation . . . . . . . . . . . . . . . 134Exa 17.7 Example on Types of DC Machines. . . . . . . . . . . 135Exa 17.8 Example on Types of DC Machines. . . . . . . . . . . 135Exa 17.9 Example on Types of DC Machines. . . . . . . . . . . 136Exa 17.10 Example on Types of DC Machines. . . . . . . . . . . 136Exa 17.11 Example on Types of DC Machines. . . . . . . . . . . 137Exa 17.12 Example on Types of DC Machines. . . . . . . . . . . 137Exa 17.13 Example on Types of DC Machines. . . . . . . . . . . 138Exa 17.14 Example on Types of DC Machines. . . . . . . . . . . 139Exa 18.1 Example on Magnetization Characteristics. . . . . . . 140

    Exa 18.2 Example on Magnetization Characteristics. . . . . . . 142Exa 18.3 Example on Magnetization Characteristics. . . . . . . 143Exa 18.4 Example on Magnetization Characteristics. . . . . . . 145Exa 18.5 Example on Parallel Operation . . . . . . . . . . . . . 147Exa 18.6 Example on Parallel Operation . . . . . . . . . . . . . 148Exa 18.7 Example on Parallel Operation . . . . . . . . . . . . . 149Exa 19.1 Example on Torque and Speed . . . . . . . . . . . . . 150Exa 19.2 Example on Torque and Speed . . . . . . . . . . . . . 151Exa 19.3 Example on Torque and Speed . . . . . . . . . . . . . 151Exa 19.4 Example on Torque and Speed . . . . . . . . . . . . . 152Exa 19.5 Example on Torque and Speed . . . . . . . . . . . . . 153

    Exa 19.6 Example on Torque and Speed . . . . . . . . . . . . . 154Exa 19.7 Example on Torque and Speed . . . . . . . . . . . . . 155Exa 19.8 Example on Speed Control of DC Motors . . . . . . . 155Exa 19.9 Example on Speed Control of DC Motors . . . . . . . 156Exa 19.10 Example on Speed Control of DC Motors . . . . . . . 157

    9

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    11/212

    Exa 19.11 Example on Speed Control of DC Motors . . . . . . . 157

    Exa 19.12 Example on Speed Control of DC Motors . . . . . . . 158Exa 19.13 Example on Speed Control of DC Motors . . . . . . . 159Exa 20.1 Example on losses in DC Machine . . . . . . . . . . . 160Exa 20.2 Example on losses in DC Machine . . . . . . . . . . . 160Exa 20.3 Example on losses in DC Machine . . . . . . . . . . . 161Exa 20.4 Example on losses in DC Machine . . . . . . . . . . . 162Exa 20.5 Example on losses in DC Machine . . . . . . . . . . . 163Exa 20.6 Example on losses in DC Machine . . . . . . . . . . . 164Exa 20.7 Example on losses in DC Machine . . . . . . . . . . . 165Exa 20.8 Example on losses in DC Machine . . . . . . . . . . . 166Exa 21.1 Example on emf Equation . . . . . . . . . . . . . . . . 167

    Exa 21.2 Example on emf Equation . . . . . . . . . . . . . . . . 168Exa 21.3 Example on emf Equation . . . . . . . . . . . . . . . . 168Exa 21.4 Example on emf Equation . . . . . . . . . . . . . . . . 169Exa 21.5 Example on emf Equation . . . . . . . . . . . . . . . . 170Exa 21.6 Example on Regulation . . . . . . . . . . . . . . . . . 171Exa 21.7 Example on emf Equation . . . . . . . . . . . . . . . . 172Exa 21.8 Example on Regulation . . . . . . . . . . . . . . . . . 173Exa 21.9 Example on Regulation . . . . . . . . . . . . . . . . . 174Exa 21.10 Example on Regulation . . . . . . . . . . . . . . . . . 174Exa 22.1 Example on Phasor Diagram and Power angle Charac-

    teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 176Exa 22.2 Example on Phasor Diagram and Power angle Charac-teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 177

    Exa 22.3 Example on Phasor Diagram and Power angle Charac-teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 178

    Exa 22.4 Example on Phasor Diagram and Power angle Charac-teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 179

    Exa 22.5 Example on Phasor Diagram and Power angle Charac-teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 180

    Exa 22.6 Example on Phasor Diagram and Power angle Charac-teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 181

    Exa 22.7 Example on Phasor Diagram and Power angle Charac-teristics . . . . . . . . . . . . . . . . . . . . . . . . . . 182

    Exa 22.8 Example on Variation of Excitation . . . . . . . . . . 183Exa 23.1 Example on Slip and Rotor Frequency . . . . . . . . . 185Exa 23.2 Example on Slip and Rotor Frequency . . . . . . . . . 185

    10

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    12/212

    Exa 23.3 Example on Slip and Rotor Frequency . . . . . . . . . 187

    Exa 23.4 Example on Equivalent Circuit . . . . . . . . . . . . . 188Exa 23.5 Example on Equivalent Circuit . . . . . . . . . . . . . 188Exa 23.6 Example on Equivalent Circuit . . . . . . . . . . . . . 189Exa 23.7 Example on Equivalent Circuit . . . . . . . . . . . . . 191Exa 23.8 Example on Losses in Induction Motor . . . . . . . . . 193Exa 23.9 Example on Losses in Induction Motor . . . . . . . . . 193Exa 23.10 Example on Losses in Induction Motor . . . . . . . . . 194Exa 23.11 Example on Losses in Induction Motor . . . . . . . . . 194Exa 23.12 Example on Losses in Induction Motor . . . . . . . . . 195Exa 23.13 Example on Torque . . . . . . . . . . . . . . . . . . . 196Exa 23.14 Example on Torque . . . . . . . . . . . . . . . . . . . 197

    Exa 23.15 Example on Torque . . . . . . . . . . . . . . . . . . . 198Exa 23.16 Example on Torque . . . . . . . . . . . . . . . . . . . 199Exa 23.17 No load and Block Rotor Test. . . . . . . . . . . . . . 200Exa 23.18 Example on Circle Diagram . . . . . . . . . . . . . . . 201Exa 23.19 Example on starting . . . . . . . . . . . . . . . . . . . 202Exa 23.20 Example on starting . . . . . . . . . . . . . . . . . . . 202Exa 24.1 Example on Equivalent Circuit . . . . . . . . . . . . . 204Exa 24.2 Example on Equivalent Circuit . . . . . . . . . . . . . 205Exa 24.3 Example on Equivalent Circuit . . . . . . . . . . . . . 206Exa 24.4 Example on No Load and Block Rotor Test . . . . . . 208

    Exa 24.5 Example on No Load and Block Rotor Test . . . . . . 209

    11

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    13/212

    List of Figures

    4.1 Example on Series Magnetic Circuit. . . . . . . . . . . . . . 344.2 Example on Series Magnetic Circuit. . . . . . . . . . . . . . 37

    6.1 Example on AC Wave Shapes . . . . . . . . . . . . . . . . . 536.2 Example on AC Wave Shapes . . . . . . . . . . . . . . . . . 576.3 Example on AC Wave Shapes . . . . . . . . . . . . . . . . . 606.4 Example on AC Wave Shapes . . . . . . . . . . . . . . . . . 65

    18.1 Example on Magnetization Characteristics . . . . . . . . . . 14118.2 Example on Magnetization Characteristics . . . . . . . . . . 14218.3 Example on Magnetization Characteristics . . . . . . . . . . 14418.4 Example on Magnetization Characteristics . . . . . . . . . . 146

    12

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    14/212

    Chapter 1

    DC Circuits

    Scilab code Exa 1.1 Example on Ohms Law

    1

    2 / / By KCL , I 1 + I 2 = 2 . 253 I 1 = 1 0 / ( 2 + 8 )

    4 I 2 = 2 . 2 5 - I 1

    5 r = ( 1 0 - 5 * I 2 ) / I 2

    6 mprintf ( r =%d ohm , c u r r e n t i n br anc h ABC=%d A and

    c u r r e n t i n br anc h ADC=%f A , r , I1 , I2 )

    Scilab code Exa 1.2 Example on Ohms Law

    1

    2 // i 1 , i 2 , i 3 be t he c u r r e n t s i n t he b ra nc he s CD, EFand GH r e s p e c t i v e l y

    3 // i 1+i2+i 3 =1.5

    4 i 2 = ( 2 0 - 1 . 5 * 1 0 ) / 1 55 i 3 = ( 2 0 - 1 . 5 * 1 0 ) / 1 5

    6 i 1 = 1 . 5 - i 2 - i 3

    7 r = ( 2 0 - 1 . 5 * 1 0 ) / i 1

    8 mprintf ( r=%f ohm , r )

    13

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    15/212

    Scilab code Exa 1.3 Example on Ohms Law

    1

    2 // p o i n t s A, E , F ,G a r e a t t he same p o t e n t i a l3 R a b = 2 0

    4 R e b = 5 0

    5 R 1 = R a b * R e b / ( R a b + R e b ) // e q u i v a l e n t r e s i s t a n c e o f Raband Reb

    6 R b c = 2 57 R 2 = R 1 + R b c // e q u i v a l e n t r e s i s t a n c e o f R1 and Rbc8 R f c = 5 0

    9 R 3 = R f c * R 2 / ( R f c + R 2 ) // e q u i v al e n t r e s i s t a n c e o f R2a nd R fc

    10 R c d = 3 0

    11 R 4 = R 3 + R c d // e q u i v a l e n t r e s i s t a n c e o f R3 and Rcd12 R = R 4 * 5 0 / ( 5 0 + R 4 ) // e q u i v a l e n t r e s i s t a n c e b et we en A

    a n d D13 i = 2 0 0 / R //Ohm s Law14 mprintf ( C u r r en t dra wn by c i r c u i t =%f A , i )

    Scilab code Exa 1.4 Example on Kirchhoffs Law

    1

    2 // r e f e r F i g . 1 . 10 i n t he t ex tb oo k3 // ap pl y i ng KCL, I1+ I2 = 20; I2+I3=304 // ap pl y i ng KVL5

    // f o r mesh ABGHA, 0.1I2 + 20R1=1086 // f o r mesh BCFGB, 0. 3I2 +20R130R2=07 // f o r mesh CDEFC, 0. 2I2 +30R2=1148 a = [ - 0. 1 20 0 ;0 .3 2 0 - 30 ;0 .2 0 3 0]

    9 b = [ 1 0 8 ; 0 ; 1 1 4 ]

    14

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    16/212

    10 x = inv ( a ) * b

    11 I 2 = x ( 1 , 1 )12 R 1 = x ( 2 , 1 )

    13 R 2 = x ( 3 , 1 )

    14 I 1 = 2 0 - I 2

    15 I 3 = 3 0 + I 2

    16 mprintf ( R1=%f ohm , R2=%f ohm , I1=%f A, I2=%f A, I3=%f A , R1 , R2 , I1 , I2 , I3 )

    Scilab code Exa 1.5 Example on Kirchhoffs Law

    1

    2 // r e f e r F i g . 1 . 1 1 i n t he t ex tb oo k3 // ap pl y i ng KVL ov e r l o op s ABEFA and BCDEB, I2 = 3. 5

    I 1 ; 2 I1+ 7 I2=104 a = [ 3. 5 - 1; - 2 7 ]

    5 b = [ 0 ; 1 0 ]

    6 i = inv ( a ) * b

    7 I 1 = i ( 1 , 1 )

    8 I 2 = i ( 2 , 1 )

    9 I = I 2 - I 110 mprintf ( C u r re nt t hr o ug h 8 ohm r e s i s t a n c e =%f A f ro m

    E t o B , I )

    Scilab code Exa 1.6 Example on Kirchhoffs Law

    1

    2 // r e f e r F i g . 1 . 1 2 i n t he t ex tb oo k

    3 // A ppl y i n g KVL4 // f o r mesh AHGBA, 23 i 1 + 2 0 i 2 + 3 i 4= 05 // f o r mesh GFCBG, 20i 143 i 2 + 2 0 i 3 + 3 i 4= 06 // f o r mesh FEDCF, 20i 243 i 3 + 3 i 4= 07 // f o r mesh ABCDJIA, 3i 1 +3 i 2 + 3 i 39 i4+50=0

    15

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    17/212

    8 a = [-23 20 0 3;20 -43 20 3;0 20 -43 3;3 3 3 -9]

    9 b = [ 0 ; 0 ; 0 ; - 5 0 ]10 i = inv ( a ) * b

    11 i 1 = i ( 1 , 1 )

    12 i 2 = i ( 2 , 1 )

    13 i 3 = i ( 3 , 1 )

    14 i 4 = i ( 4 , 1 )

    15 V 1 = 3 * ( i 4 - i 1 )

    16 V 2 = 3 * ( i 4 - i 2 )

    17 V 3 = 3 * ( i 4 - i 3 )

    18 mprintf ( V o l t a g e a c r o s s b r an c h AB=%f V , V o l t a g ea c r o s s b r a nc h BC=%f V, V o l t a g e a c r o s s b r a nc h CD=

    %f V , V1 , V2 , V3 )

    Scilab code Exa 1.7 Example on Kirchhoffs Law

    1

    2 // r e f e r F i g . 1 . 1 3 i n t he t ex tb oo k3 / / by a p p l y i n g KVL4 // f o r mesh ABCDA, 7. 45 i 1 3. 25i 2 =10

    5 // f o r mesh EFBAE , 8. 55 i 2 5.3i 3 3. 25i 1 =106 // f o r mesh HGBFEAH, 11 .3 i 3 5.3i 2 =807 a = [ 7 .4 5 - 3. 25 0 ; - 3. 25 8 .5 5 - 5. 3; 0 - 5. 3 1 1. 3]

    8 b = [ 1 0 ; 1 0 ; 8 0 ]

    9 i = inv ( a ) * b

    10 i 1 = i ( 1 , 1 )

    11 i 2 = i ( 2 , 1 )

    12 i 3 = i ( 3 , 1 )

    13 mprintf ( C ur re n t i n 6 ohm r e s i s t o r =%f A, c u r re n t i n3 ohm r e s i s t o r =%f A , i3 , i2 - i 1)

    Scilab code Exa 1.8 Example on Superposition Theorem

    16

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    18/212

    1

    2 / / u s i n g S u p e r p o s i t i o n Theorem3 / / c o n s i d e r E1 a l o n e4 E 1 = 1 . 5

    5 R 1 = ( 1 + 1 ) * 2 / ( 1 + 1 + 2 ) + 2 // t o t a l r e s i s t a n c e6 I 1 = E 1 / R 1 / / c u r r e n t s u p p l i e d7 i 1 = I 1 / 2 // c u r r e n t i n b ra nc h AB f ro m B t o A8 / / c o n s i d e r E2 a l o n e9 E 2 = 1 . 1

    10 R 2 = ( 1 + 1 ) * 2 / ( 1 + 1 + 2 ) + 1 + 1 // t o t a l r e s i s t a n c e11 I 2 = E 2 / R 2 / / c u r r e n t s u p p l i e d12 i 2 = I 2 / 2 // c u r r e n t i n b ra nc h AB f ro m B t o A

    13 mprintf ( C u r re nt t hr o ug h 2 ohm r e s i s t o r =%f A , i 1+ i2)

    Scilab code Exa 1.9 Example on Superposition Theorem

    1

    2 // r e f e r F i g . 1 . 2 0 i n t he t ex tb oo k3 // ap pl y i ng KVL

    4 / / f o r m es h BAEFB , 4I1 +2 I2 =1.55 // f o r mesh BACDB, 2I1 +4 I2 =1.16 a = [4 2 ;2 4]

    7 b = [ 1 . 5 ; 1 . 1 ]

    8 i = inv ( a ) * b

    9 I 1 = i ( 1 , 1 )

    10 I 2 = i ( 2 , 1 )

    11 mprintf ( C u r re nt t hr o ug h 2 ohm r e s i s t o r =%f A f ro m Bt o A , I1 + I2 )

    Scilab code Exa 1.10 Example on Thevenin Theorem

    1

    17

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    19/212

    2 // r e f e r F ig . 1 . 2 2 ( a ) i n t he t ex tb o ok

    3 / / r e s i s t a n c e b et we en A and B i s rem oved4 / / I 1 be c u r r e n t i n b ra nc h CD5 // ap pl y i ng KCL6 //100 I 1 i s t he c u r r en t i n b r a nc h AF7 / / I 150 i s t he c u r r e nt i n br a nc h DE8 //70 I 1 i s t h e c u r r e n t i n br a n c h FE9 // ap pl y i ng KVL f o r mesh CDEFC , we ge t ,

    10 I 1 = 5 6

    11 V = . 1 * I 1 + . 1 5 * ( I 1 - 5 0 ) / / t h e v en i n s v o l t a g e12 r = ( . 1 + . 1 5 ) * ( . 1 + . 1 5 ) / ( . 2 5 + . 2 5 ) // t he v e ni n s

    e q u i v a l e n t r e s i s t a n c e

    13 I = V / ( r + . 0 5 )14 mprintf ( C u rr en t f l o w i n g i n t he b ra nc h AB o f 0 . 0 5

    ohm r e s i s t a n c e i s %f A , I )

    Scilab code Exa 1.11 Example on Norton Theorem

    1

    2 //by N or ton s T he or em

    3 I = 2 * 1 0 // t o t a l c u r r e n t p ro du ce d by c u r r e nt s o u r ce4 r = 2 * 2 / ( 2 + 2 ) // r e s u l t a n t r e s i s t a n c e o f c u r r e n t s o u r c e5 I n = 2 0 * r / ( r + 1 ) / / n o r t on c u r r e n t6 R n = 1 + r // n or to n r e s i s t a n c e7 I = I n * R n / ( R n + 8 )

    8 mprintf ( C u rr e n t t h r o ug h t he l oa d r e s i s t a n c e o f 8ohm=%f A f r om A t o B , I )

    Scilab code Exa 1.12 Example on Nodal Analysis

    1

    2 // c i r c u i t ha s 4 nodes , v iz , A, B , C and D3 / / node D i s t ak en a s r e f e r e n c e node

    18

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    20/212

    4 / / v o l t a g e s a t A , B a nd C be Va , Vb and Vc

    r e s p e c t i v e l y5 // ap pl y i ng KCL6 / / a t node A, 7VaVbVc=257 / / a t n od e B, 4Va+19Vb10Vc=08 / / a t n od e C, 4Va10Vb+19Vc=409 a = [7 -1 -1; -4 19 - 10; - 4 -10 1 9]

    10 b = [ 2 5 ; 0 ; - 4 0 ]

    11 v = inv ( a ) * b

    12 V a = v ( 1 , 1 )

    13 V b = v ( 2 , 1 )

    14 V c = v ( 3 , 1 )

    15 I = ( V a - V c ) / 516 mprintf ( C u r r en t i n 5 ohm AC b r an c h=%f A f ro m A t o C

    , I )17 // e r r o r i n t e xt bo o k a ns we r

    Scilab code Exa 1.13 Example on Maximum Power Transfer Theorem

    1

    2 V = 3 * 2 0 / ( 2 + 3 ) / / t h e v en i n s v o l t a g e3 r = 1 + 2 * 3 / ( 2 + 3 ) // t he ve ni n s e q u i v a l e n t r e s i s t a n c e4 R = r

    5 P m a x = V ^ 2 / ( 4 * r )

    6 mprintf ( Max p ower t r a n s f e r r e d t o t he l oa d i s %f Wwhen l o ad r e s i s t a n c e i s %f ohm , P m a x , R )

    Scilab code Exa 1.14 Example on Delta to Star and Star to Delta Trans-

    formation

    1

    2 // i n n er d e l t a DEF i s t ra ns f o r m ed t o e q u i v a l e n t s t a rc o nn e ct i on h av in g r e s i s t a n c e s Ra , Rb , Rc

    19

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    21/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    22/212

    12 I = I 3 + I 4

    13 mprintf ( By S u p e r p o s i t i o n Theorem , c u r r e n t t h r ou g ht h e 2 ohm r e s i s t a n c e i s %f A from A t o B\n , I )14 //by T he v eni n s T he or em15 // ap pl y i ng KCL16 // f o r mesh CDHIC , 15i 1 +12 i 2= 217 // f o r mesh DEGHD, 12i 1 +17 i 2= 418 a = [ 15 1 2; 12 1 7]

    19 b = [ 2 ; 4 ]

    20 i = inv ( a ) * b

    21 i 1 = i ( 1 , 1 )

    22 i 2 = i ( 2 , 1 )

    23 V a b = 4 - 3 * i 2 - i 224 R 1 = ( 1 + 2 ) * 1 2 / ( 1 + 2 + 1 2 ) //R1 i s e q ui v a l e n t r e s i s t a n c e

    o f Rcd , R ci , Rdh25 R = ( 1 + R 1 ) * ( 3 + 1 ) / ( 1 + R 1 + 3 + 1 ) / / t h e v en i n s e q u i v a l e n t

    r e s i s t a n c e26 I = V a b / ( R + 2 )

    27 mprintf ( By T h ev e ni n Theorem , c u r r e n t t h r o u g h 2 ohmr e s i s t a n c e i s %f A from A t o B\n , I )

    28 / / b y M ax we ll Mesh A n a l y s i s29 // ap pl y i ng KVL30

    // f o r mesh CDEHC, 15 I112 I2=231 // f o r mesh DABED, 12 I1+ 15 I2+ 2 I3=032 // f o r mesh AFGBA, 2I2 +6 I3=433 a = [1 5 -12 0; -12 15 2;0 2 6]

    34 b = [ 2 ; 0 ; 4 ]

    35 i = inv ( a ) * b

    36 I 1 = i ( 1 , 1 )

    37 I 2 = i ( 2 , 1 )

    38 I 3 = i ( 3 , 1 )

    39 mprintf ( By M ax we ll Mesh A n a l y s i s , c u r r e n t t h r ou g h 2ohm r e s i s t a n c e i s %f A from A t o B , I2 + I3 )

    21

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    23/212

    Chapter 2

    Electrostatics

    Scilab code Exa 2.1 Example on Coulombs Law

    1

    2 e p s i l o n = 8 . 8 5 4 D - 1 2

    3 r = sqrt ( . 1 ^ 2 + . 1 ^ 2 ) / / d i s t a n c e b /w A and C4 F c a = ( 2 D - 6 ) * ( 4 D - 6 ) / ( 4 * % p i * e p s i l o n * r ^ 2 ) / / f r o m A t o C5 F c b = ( 4 D - 6 ) * ( 2 D - 6 ) / ( 4 * % p i * e p s i l o n * . 1 ^ 2 ) / / f r o m C t o B6 F c d = ( 4 D - 6 ) * ( 4 D - 6 ) / ( 4 * % p i * e p s i l o n * . 1 ^ 2 ) / / f r o m C t o D

    7 / / Fr ha s h o r i z o n t a l and v e r t i c a l compone nt s a s Frxand Fry r e s p e c t i v e l y

    8 F r x = F c d - F c a * cos ( 4 5 * % p i / 1 8 0 )

    9 F r y = F c b - F c a * sin ( 4 5 * % p i / 1 8 0 )

    10 Fr = sqrt ( F r x ^ 2 + F r y ^ 2 )

    11 mprintf ( R e s u l ta n t f o r c e a c t i n g on c h ar g e a t C=%f N, F r )

    12 // e r r o r i n t e xt bo o k a ns we r

    Scilab code Exa 2.2 Example on Electric Intensity

    1

    22

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    24/212

    2 e p s i l o n = 8 . 8 5 4 D - 1 2

    3 E 1 = ( 4 D - 8 ) / ( 4 * % p i * e p s i l o n * . 0 5 ^ 2 ) / / f i e l d i n t e n s i t y d uet o c ha rg e a t A, d i r e c t i o n i s from D t o A4 r = sqrt ( 2 * . 0 5 ^ 2 ) / / d i s t a n c e b /w B a nd D5 E 2 = ( 4 D - 8 ) / ( 4 * % p i * e p s i l o n * r ^ 2 ) / / f i e l d i n t e n s i t y d ue

    t o c ha rg e a t B , d i r e c t i o n i s from B t o D a lo ngd i a g o n a l BD

    6 E 3 = ( 8 D - 8 ) / ( 4 * % p i * e p s i l o n * . 0 5 ^ 2 ) / / f i e l d i n t e n s i t y d uet o c ha rg e a t C , d i r e c t i o n i s from D t o C

    7 / / Er ha s h o r i z o n t a l and v e r t i c a l compone nt s a s Erxand Ery r e s p e c t i v e l y

    8 E r x = E 3 - E 2 * cos ( 4 5 * % p i / 1 8 0 )

    9 E r y = - E 1 + E 2 * sin ( 4 5 * % p i / 1 8 0 )10 Er = sqrt ( E r x ^ 2 + E r y ^ 2 )

    11 t h e t a = a t a n d ( E r y / E r x )

    12 mprintf ( R e s u l ta n t i n t e n s i t y on c h ar g e a t C=%f 1 0 4N/C a t a n g l e %f d e g r e e s , E r / 10 ^4 , - t h e t a )

    Scilab code Exa 2.3 Example on Electric Potential

    12 e p s i l o n = 8 . 8 5 4 D - 1 2

    3 A B = . 0 5

    4 B C = . 0 7

    5 AC = sqrt ( . 0 5 ^ 2 + . 0 7 ^ 2 )

    6 V 1 = 2 D - 1 0 / ( 4 * % p i * e p s i l o n * . 0 5 ) // p o t e n t i a l a t A due t oc ha rg e a t B

    7 V 2 = - 8 D - 1 0 / ( 4 * % p i * e p s i l o n * A C ) // p o t e n t i a l a t A due t oc ha rg e a t C

    8 V 3 = 4 D - 1 0 / ( 4 * % p i * e p s i l o n * . 0 7 ) // p o t e n t i a l a t A due t o

    c ha rg e a t D9 V = V 1 + V 2 + V 310 mprintf ( P o t e n t i a l a t A due t o c h ar g es a t B , C and D

    =%f V, V )

    23

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    25/212

    Scilab code Exa 2.4 Example on charging and discharging of capacitor

    1

    2 C = 3 0 D - 6

    3 R = 5 0 0

    4 T = C * R

    5 mprintf ( Time c o n s t a n t T=%f s e c \n , T )6 / / at t =0 s ec , v o l t a ge a c r o s s c a p a c i t o r i s z er o7 V = 1 0 0 // a p l i e d v o l t a g e8 I = V / R //Ohm s Law9 mprintf ( I n i t i a l cu rr en t=%f A\n , I )

    10 t = . 0 5

    11 Q = C * V

    12 q = Q * ( 1 - exp ( - t / T ) )

    13 mprintf ( Charge on t h e c a p ac i t or a f t e r 0 . 0 5 s e c i s%f C\n , q )

    14 i 1 = I * exp ( - t / T )

    15 mprintf ( C h a r g i n g c u r r e n t a f t e r 0 . 0 5 s e c i s %f A\n ,i1 )

    16 t = . 0 1 517 i 2 = I * exp ( - t / T )

    18 mprintf ( C h a r g i n g c u r r e n t a f t e r 0 . 0 1 5 s e c i s %f A\n, i 2 )

    19 V = i 1 * R

    20 mprintf ( V ol ta ge a c r o s s 500 ohm r e s i s t o r a f t e r 0 . 0 5s e c i s %f V , V )

    21 // a ns we rs v ar y fro m t he t ex tb o ok due t o ro und o f f e r r o r

    Scilab code Exa 2.5 Example on charging and discharging of capacitor

    1

    24

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    26/212

    2 C = 1 0 0 D - 6

    3 V = 2 0 04 Q = C * V

    5 C t = 1 0 0 D - 6 + 5 0 D - 6 // t o t a l c a p a c i t a nc e6 V t = Q / C t

    7 mprintf ( P . D. a c r o s s t h e c o mb i n at i on =%f V\n , V t )8 E E 1 = 1 0 0 D - 6 * V ^ 2 / 2

    9 mprintf ( E l e c t r o s t a t i c e ne rg y b e f o r e c a p a c i t o r s a rec on ne ct ed i n p a r a l l e l =%f J \n , E E1 )

    10 E E 2 = C t * V t ^ 2 / 2

    11 mprintf ( E l e c t r o s t a t i c e ne rg y a f t e r c a p a c i t o r s a rec on n ec te d i n p a r a l l e l =%f J , EE2 )

    Scilab code Exa 2.6 Example on charging and discharging of capacitor

    1

    2 C 1 = 1 0 0 D - 6 // c a p a c i t a nc e o f f i r s t c a p a c i t o r whi ch i st o be c ha rg ed

    3 V = 2 0 0 // v o l t a g e a c r o s s C14 Q = C 1 * V

    5 / / L et Q1 , Q2 , Q3 , Q4 b e t he c h a r ge s on r e s p e c t i v ec a p a c i t o r s a f t e r c on n e ct i o n

    6 Q 2 = 4 0 0 0 D - 6

    7 Q 3 = 5 0 0 0 D - 6

    8 Q 4 = 6 0 0 0 D - 6

    9 Q 1 = Q - ( Q 2 + Q 3 + Q 4 )

    10 C 2 = C 1 * ( Q 2 / Q 1 )

    11 C 3 = C 1 * ( Q 3 / Q 1 )

    12 C 4 = C 1 * ( Q 4 / Q 1 )

    13 mprintf ( T hree c a p a c i t o r s h ave c a p a c i t a n c e s %d

    mi cr oF , %d mi c r oF and %d mi c r oF\n , C 2 *1 0^ 6 , C 3* 1 0 ^ 6 , C 4 * 1 0 ^ 6 )14 V t = Q 1 / C 1

    15 mprintf ( V o l t a ge a c r o s s t h e c o mb i na t io n =%f V , V t )

    25

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    27/212

    Chapter 3

    Electromagnetism

    Scilab code Exa 3.2 Example on Field Strength and Flux Density

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 N = 1 5 0 // no . o f t ur ns o f c o i l4 I =4 // c u r r e nt c a r r i e d by c o i l5 l = . 3 // l e ng t h o f s o l e n o i d i n mt rs6 B c = m u _ n o t * N * I / l

    7 mprintf ( F lux d e n s i t y a t c e n t r e =%f 10 3 Wb/m2 ,B c * 1 0 ^ 3 )

    Scilab code Exa 3.3 Example on Field Strength and Flux Density

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 // c a l c u l a t i n g f l ux d e n s i t y a t c e n t r e o f c o i l B=

    mu not I /(2R)4 I = 5 0

    5 R = 4 D - 2

    6 B = m u _ n o t * I / ( 2 * R )

    26

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    28/212

    7 mprintf ( Fl ux d e n si t y a t c e n tr e o f c o i l =%f 10 6 Wb/

    m2( Te sl a ) \n , B * 1 0^ 6)8 / / c a l c u l a t i n g f l u x d e n s i t y p e r p e nd i c u l a r t o p la ne o f c o i l a t a d i s t a n ce o f 10 cm from i t

    9 z = 1 0 D - 2

    10 B = m u _ n o t * I * R ^ 2 / ( 2 * ( R ^ 2 + z ^ 2 ) ^ 1 . 5 )

    11 mprintf ( Fl ux d e n s i t y p e r p e nd i c u l a r t o p la ne o f c o i la t a d i s t a n ce o f 10 cm f rom i t =%f 106 Wb/m 2 (

    T e s l a ) , B * 1 0^ 6 )

    Scilab code Exa 3.4 Example of Force on on Current Carrying Conductor

    1

    2

    3 m u _ n o t = 4 D - 7 * % p i

    4 I 1 = 3 0 // c u r r e nt i n w i re A5 I 2 = 3 0 // c u r r e nt i n w i re B6 R = 1 0 D - 2 // d i s t a n c e b /w 2 w i r e s7 F = m u _ n o t * I 1 * I 2 / ( 2 * % p i * R )

    8 mprintf ( F or ce p er m et r e l e ng t h i s %d10 4 N / m i n

    b ot h c a s e s ( i ) a nd ( i i ) . However i n c a s e ( i ) , i t i sa t t r a c t i v e and i n c as e ( i i ) , i t i s r e p u l s i v e , F

    *10^4)

    Scilab code Exa 3.5 Example of Force on on Current Carrying Conductor

    1

    2 B = . 0 6 // f l u x d e n s i t y3 I = 4 0 D - 3 // c u r re n t i n c o i l4 l = 4 D - 2 // l en gt h o f c o i l s i d e5 F = B * I * l

    6 N = 5 0 // no . o f t u r ns

    27

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    29/212

    7 mprintf ( F or ce a c t i n g on e ac h c o i l s i d e=%f 10 3 N ,

    F * N * 1 0 ^ 3 )

    28

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    30/212

    Chapter 4

    Magnetic Circuit

    Scilab code Exa 4.1 Example on Series Magnetic Circuit

    1

    2

    3 m u _ n o t = 4 D - 7 * % p i

    4 a = ( 3 D - 2 ) ^ 2 / / c r o s ss e c t i o n a l a re a5 L a = ( 2 0 - 1 . 5 - 1 . 5 ) * 1 D - 2 // l e n g t h o f f l u x pat h i n p ar t A6 m u _ r = 1 0 0 0 // r e l a t i v e p e r m e ab i l i t y f o r p ar t A

    7 S a = L a / ( m u _ n o t * m u _ r * a )8 mprintf ( R e l u c t a n c e o f p a r t A=%f 104AT/Wb\n , Sa

    /10^4)

    9 L b = ( 1 7 + 8 . 5 + 8 . 5 ) * 1 D - 2 // l e n g t h o f f l u x pat h i n p ar t B10 m u _ r = 1 2 0 0 // r e l a t i v e p e r m e ab i l i t y f o r p ar t B11 S b = L b / ( m u _ n o t * m u _ r * a )

    12 mprintf ( R e l u c t a n c e o f p a r t B=%f 104AT/Wb\n , Sb/10^4)

    13 L g = ( 2 + 2 ) * 1 D - 3 // l e n g t h o f f l u x pa th i n a i r gap14 S g = L g / ( m u _ n o t * a )

    15 mprintf ( R e l uc t an c e o f 2 a i r g ap s=%f 1 0 4 AT/Wb\n ,S g / 1 0 ^ 4 )16 S = S a + S b + S g

    17 mprintf ( T ot al r e l u c t a n c e o f m ag ne ti c c i r c u i t =%f 10 4 AT/Wb\n , S / 1 0^ 4)

    29

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    31/212

    18 N = 1 0 0 0 // no . o f t ur ns on e a c h c o i l

    19 I =1 // c u r r e n t i n c o i l20 m m f = 2 * N * I21 mprintf ( mmf=%d AT\n , m mf )22 f l u x = m m f / S

    23 mprintf ( F lux i n m ag ne ti c c i r c u i t =%f 104 Wb\n ,f l u x * 1 0 ^ 4 )

    24 f l u x _ d e n s i t y = f l u x / a

    25 mprintf ( F l ux d e n s i t y =%f T e s l a , f l u x _d e n si t y )

    Scilab code Exa 4.2 Example on Series Magnetic Circuit

    1

    2

    3 B g = . 7 // f l u x d e ns i t y i n a i r gap4 L g = 3 D - 3 // l e ng t h o f a i r gap5 A T g = . 7 9 6 * B g * L g * 1 D + 6

    6 B s = B g // f l u x d e n si t y i n i r o n path7 H = 6 6 0 // a mpere t u rn s c o r r es p o n d i ng t o Bs fro m BH

    c u rv e ( F ig . 4 . 2 ) o f t e xt b o o k

    8 L i = 4 0 D - 2 // l e n g t h o f f l u x pa th i n i r on p o rt i on9 A T s = H * L i

    10 AT = round ( A T g ) + round ( A T s )

    11 mprintf ( T o ta l ampere t u rn s t o be p r ov i de d on t heel ec tr om ag ne t=%d AT , A T )

    12 / / a ns we r v ar y fr om t he t ex t bo o k due t o ro un d o f f e r r o r

    Scilab code Exa 4.3 Example on Series Magnetic Circuit

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 N = 7 0 0 // no . o f t ur ns on s t e e l r i ng

    30

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    32/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    33/212

    10 I = A T / N

    11 mprintf ( C u rr en t i n t he c o i l =%f A\n ,I )12 L g = 2 D - 3 // l e ng t h o f a i r gap13 L i = L - L g // l e ng t h o f mean f l u x pat h i n r i n g14 m u = B / H

    15 B g = A T / ( L i / m u + . 7 9 6 * L g * 1 D + 6 )

    16 f l u x = B g * A

    17 mprintf ( M a g n e t ic f l u x p r o d uc e d=%f 10 4 Wb\n ,flux* 1 D + 4 )

    18 / / c a l c u l a t i n g v al u e o f c u r r e n t which w i l l p ro du cet he same f l u x a s i n ( i )

    19 A T i = H * L i

    20 A T g = . 7 9 6 * B * L g * 1 D + 621 A T = A T i + A T g

    22 I = A T / N

    23 mprintf ( C u rr e n t i n t he c o i l whi ch w i l l g i ve t hesa me f l u x a s i n ( i )=%f A ,I )

    Scilab code Exa 4.5 Example on Series Magnetic Circuit

    12 m u _ n o t = 4 D - 7 * % p i

    3 N = 4 0 0 // number o f t u r ns on t he c o i l wound on i r o nr i n g

    4 I = 1 . 2 // c u r r e n t t hr ou gh t he c o i l5 A T = N * I

    6 l =1 // mean f l u x pat h i n r i n g i n mt rs7 H = A T / l

    8 B = 1 . 1 5 / / f l u x D e ns i t y9 m u _ r = B / ( H * m u _ n o t )

    10 mprintf ( R el p e r m e a b i l i t y o f i r o n r i n g mu r=%d ,round ( m u _ r ) )11 // e r r o r i n t e xt bo o k a ns we r

    32

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    34/212

    Scilab code Exa 4.6 Example on Series Magnetic Circuit

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 L i = 5 0 d - 2 // l e n g t h o f f l u x pa th i n i r on4 m u _ r = 1 3 0 0 // r e l a t i v e p e r m ea b i l i t y5 a = 1 2 D - 4 // c r o s s s e c t i o n a l a re a6 S i = L i / ( m u _ n o t * m u _ r * a )

    7 mprintf ( R el uc ta nc e o f i r o n p ar t o f m ag n et i c c i r c u i t=%f10 3 AT/Wb\n , S i / 1 0 ^ 3 )

    8 L g = . 4 D - 2 // l e n g t h o f f l u x pa th i n a i r gap9 S g = L g / ( m u _ n o t * a )

    10 mprintf ( R el uc ta nc e o f a i r gap o f m a gn et i c c i r c u i t =%f10 3 AT/Wb\n , S g / 1 0 ^ 3 )

    11 S = S i + S g

    12 mprintf ( T ot al r e l u c t a n c e o f m ag ne ti c c i r c u i t =%f 10 3 AT/Wb\n , S / 1 0 ^ 3 )

    13 N = 4 0 0 + 4 0 0 // t o t a l no . o f t u rn s14 I =1 // c u r r e nt t hr ou gh e ac h c o i l

    15 m m f = N * I16 f l u x = m m f / S

    17 mprintf ( T o t a l f l u x =%f m i ll i Wb \n , f l ux * 1 0 ^ 3 )18 B = f l u x / a

    19 mprintf ( F l u x d e n s i t y i n a i r g ap=%f Wb/m 2 , B )20 // a ns we rs v ar y fro m t he t ex tb o ok due t o ro und o f f

    e r r o r

    Scilab code Exa 4.7 Example on Series Magnetic Circuit

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 N = 3 0 0 // no . o f t ur ns i n c o i l

    33

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    35/212

    Figure 4.1: Example on Series Magnetic Circuit

    4 I = . 7 // c u r r e n t t hr ou gh c o i l5 A T = N * I6 L = 6 0 D - 2 // l e ng t h o f r i n g7 L g = 2 D - 3 // l e ng t h o f a i r gap8 L i = L - L g // l e n g t h o f f l u x pat h i n r i ng9 m u _ r = 3 0 0 // r e l p e r m e a b i l i t y o f i r on

    10 B = A T / ( L i / ( m u _ n o t * m u _ r ) + . 7 9 6 * L g * 1 D + 6 )

    11 mprintf ( Flux de n s it y=%f Wb/m2 , B )

    Scilab code Exa 4.8 Example on Series Magnetic Circuit

    34

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    36/212

    1

    2 m u _ n o t = 4 D - 7 * % p i3 p h i = . 0 0 0 6 / / f l u x4 A = 5 . 5 D - 4 / / c r o s ss e c t i o n a l a re a o f r i n g5 B = p h i / A

    6 h =[0 200 400 5 00 600 800 1 00 0]

    7 b = [0 .4 .8 1 1. 09 1 .1 7 1 .1 9]

    8 plot2d ( h , b )

    9 xtitle ( BH c ur ve f o r e xa mp le 4 . 8 , H ( a m p er e t u r n sp e r m e tr e ) , B(Wb/m 2 ) )

    10 H = 6 0 0 / / c o r r e s p o n d i n g t o B f ro m BH c u r v e11 L = 2 7 0 D - 2 // l e ng t h o f r i n g

    12 L g = 4 . 5 D - 3 // l e ng t h o f a i r gap13 L i = L - L g // l e n g t h o f f l u x pat h i n i r on p o rt i o n o f r i ng14 A T i = H * L i

    15 A T g = . 7 9 6 * B * L g * 1 D + 6

    16 AT = round ( A T i ) + round ( A T g )

    17 mprintf ( T o t a l a m pe re t u r n s =%d , A T )18 // e r r o r i n t e xt bo o k a ns we r

    Scilab code Exa 4.9 Example on Series Magnetic Circuit

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 f l u x = 1 . 1 D - 3

    4 A = 4 * 4 * 1 D - 4 / / c r o s ss e c t i o n a l a re a5 B = f l u x / A

    6 m u _ r = 2 0 0 0 // r e l p e r m e a b i l i t y7 H = B / ( m u _ n o t * m u _ r )

    8 / / c a l c u l a t i n g ampere t u rn s r e q u i r e d f o r p o ti o n C

    9 l = . 2 5 / / l e n g t h o f mean f l u x p at h10 A T c = H * l11 / / c a l c u l a t i n g ampere t u rn s r e q u i r e d f o r p o ti o n D12 l = . 3 // l e n g t h o f mean f l u x p at h13 A T d = H * l

    35

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    37/212

    14 / / c a l c u l a t i n g ampere t u rn s r e q u i r e d f o r a i r gap

    15 A T g = . 7 9 6 * B * . 0 0 2 * 1 0 ^ 616 AT = round ( A T c ) + round ( A T d ) + round ( 2 * A T g )

    17 mprintf ( T o t a l a mp er e t u r n s r e q u i r e d =%d , A T )18 / / a ns we r v ar y fr om t he t ex t bo o k due t o ro un d o f f

    e r r o r

    Scilab code Exa 4.10 Example on Series Magnetic Circuit

    12 m u _ n o t = 4 D - 7 * % p i

    3 f l u x = . 0 1 8

    4 // c o n s i d e r p a rt A5 a = 2 0 5 D - 4 // c r o s s s e c t i o n a l a re a6 B a = f l u x / a

    7 H = 7 6 0 // c o r r es p o n d i ng t o Ba a s o b ta i n ed fro m F ig .4 . 2 i n t he t ex tb oo k

    8 l = ( 3 8 - . 2 5 ) * 1 D - 2 // l e ng t h o f mean f l u x pat h i n i r o np o rt i o n o f p ar t A

    9 A T i = H * l

    10 A T g = . 7 9 6 * B a * 2 . 5 D - 3 * 1 0 ^ 611 A T a = A T i + A T g

    12 // c o n s i d e r p a rt B13 a = 2 5 5 D - 4

    14 B b = f l u x / a

    15 H = 6 7 0 // c o r r e s p o n d i n g t o Bb a s o b t a i n ed f ro m F ig .4 . 2 i n t he t ex tb oo k

    16 l = . 2 5 // l e ng t h o f mean f l u x pat h i n i r o n p o r ti o n o f p a r t B

    17 A T b = H * l

    18 AT = round ( A T a ) + round ( A T b )19 mprintf ( T o ta l ampere t u rn s r e q u i r e d f o r c om pl et em a g n e t i c c i r c u i t =%d , A T )

    36

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    38/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    39/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    40/212

    12 a = 5 D - 4 / / c r o s ss e c t i o n a l a re a

    13 B _ o l = p h i _ o l / a14 H = 1 2 0 0 // c o rr e sp o nd i ng t o B o l from F i g 4 . 2 i n t het e x t b o o k

    15 l = . 3 5 // l e n g t h o f mean f l u x p at h16 A T _ o l = H * l

    17 A T = A T _ c c + A T _ o l

    18 N = 4 0 0

    19 mprintf ( C u rr en t r e q u i r e d i n t he c o i l =%f A , AT / N)

    Scilab code Exa 4.13 Example on Series Parallel Magnetic Circuit

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 p h i _ c c = 1 . 2 D - 3 // f l u x i n c e n t r a l c or e4 p h i _ o l = p h i _ c c / 2 // f l u x i n e ac h o u te r l imb5 // c o n s i d e r c e n t r a l c o re6 a = 9 D - 4 / / c r o s ss e c t i o n a l a re a7 B _ c c = p h i _ c c / a // f l u x d e n s i t y8 H = 1 6 0 0 // c o rr e sp o nd i ng t o B c c from F ig 4 . 2 i n t he

    t e x t b o o k9 l = ( 1 5 - . 2 ) * 1 D - 2 // l e ng t h o f mean f l u x path o f c a s t

    s t e e l10 A T _ c c = H * l

    11 A T g = . 7 9 6 * B _ c c * 2 D - 3 * 1 0 ^ 6

    12 // c o n s i d e r o u t er l im b13 a = 5 D - 2 / / c r o s ss e c t i o n a l a re a14 B _ o l = p h i _ o l / a

    15 H = 1 2 0 0 // c o rr e sp o nd i ng t o B o l from F i g 4 . 2 i n t het e x t b o o k

    16 l = . 3 5 // l e n g t h o f mean f l u x p at h17 A T _ o l = H * l18 A T = A T _ c c + A T g + A T _ o l

    19 N = 4 0 0

    20 mprintf ( E x c i t in g c u r r e nt i n t he c o i l =%f A , A T / N )

    39

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    41/212

    40

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    42/212

    Chapter 5

    Electromagnetic Induction

    Scilab code Exa 5.1 Example on Induced EMF

    1

    2 N = 1 0 0 0 // no . o f t ur ns i n t h e c o i l3 d p h i = - 2 * 9 0 0 D - 6 // c ha ng e i n f l u x i n Wb4 d t = . 2 // t im e i n s e c i n whi ch c h ang e t a ke s p l a ce5 e m f = - N * d p h i / d t

    6 mprintf ( A v er ag e emf i n d u ce d i n t h e c o i l =%d V , round

    ( e m f ) )

    Scilab code Exa 5.2 Example on Induced EMF

    1

    2 l = 8 0 D - 2 // l e n g t h o f c o n du c t or3 B = 1 . 2 / / f l u x d e n s i t y o f u n if o rm m a gn e ti c f i e l d4 v = 3 0 // v e l o c i t y o f c o nd u ct o r i n m/ s5 // when t h e d i r e c t i o n o f mot io n i s p e r pe n d i cu l a r t o

    f i e l d6 e = B * l * v

    7 mprintf ( emf i n du c ed i n t h e c o n du c to r when t h e

    41

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    43/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    44/212

    10 mprintf ( R e l a t i v e p e r m e a b i l i t y o f m et al=%f \n , m u _ r )

    11 A = % p i * 2 . 5 D - 2 ^ 2 / 4 // c r o s s s e c t i o n a l a re a o f r i n g12 p h i = B * A13 L = N * p h i / I

    14 mprintf ( S e l f i n du c t an c e o f c o i l =%f H\n ,L )15 / / s o l v i n g p a r t ( i i i )16 d p h i = . 0 8 * p h i - p h i // c ha ng e i n f l u x17 d t = . 0 0 1 5 // t i me t ak en f o r c ha ng e18 e = - N * d p h i / d t

    19 mprintf ( emf i nd uc e d i n t h e c o i l when v al ue o f f l u xf a l l s t o 8 p e rc e n t i t s v a l i u e i n 0 . 00 1 5 s e c=%f V,e )

    Scilab code Exa 5.5 Example on Induced EMF

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 H = 3 5 0 0 // a mpere t u r ns p er m et re o f f l u x p at h l e n g t h4 l = % p i * 4 0 D - 2 // l e ng t h o f mean f l u x path i n r i n g5 A T = H * l

    6 N = 4 4 0 // no . o f t ur ns on c o i l7 I = A T / N // e x c i t i n g c u r r e nt8 mprintf ( E x c i t i n g c u r r e n t =%d A\n , round ( I ) )9 B = . 9 // f l u x d e n s i t y

    10 A = 1 5 D - 4 / / c r o s ss e c t i o n a l a re a o f r i n g11 p h i = B * A

    12 L = N * p h i / I

    13 mprintf ( S e l f i n d uc t an c e o f c o i l =%f H\n ,L )14 / / s o l v i n g p a r t ( i i i )15 l = ( l - 1 / 1 0 ^ 2 ) // l e n g t h o f mean f l u x pat h i n s t e e l r i ng

    16 A T i = H * l // ampere t u rn s r e q u i r e d f o r i r o n p o r ti o n17 A T g = . 7 9 6 * B * 1 D - 2 * 1 D + 6 // ampere t ur n s f o r a i r gap18 A T = A T i + A T g

    19 I = A T / N

    20 mprintf ( When an a i r gap 1 cm l on g i s c ut i n t he

    43

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    45/212

    r in g , e x c i t i n g c u r r e nt I=%f A and s e l f i n d uc t an c e

    o f c o i l =%f H\n , I , N * p h i / I )

    Scilab code Exa 5.6 Example on Induced EMF

    1

    2 N = 8 0 0 // no . o f t u rn s3 d I = 1 0 - 5 // c ha ng e i n c u r r en t4 d B = 1 . 2 - . 8 // c o r r es p o n d i ng c ha ng e i n f l u x d e n s i t y

    5 A = 1 5 D - 4 // c r o s s s e c t i o n a l a re a6 L = A * N * d B / d I7 mprintf ( S e l f i n d u c t a n ce o f c o i l , L=%f H\n ,L )8 d i = 5 - 1 0 // c ha ng e i n c u r r en t9 d t = . 0 4 // t i me t ak en f o r c ha ng e

    10 e = - L * d i / d t

    11 mprintf ( I n d u ce d emf when t h e c u r r e n t f a l l su n i fo r m ly from 10 A t o 5 A i n 0 . 0 4 s e c=%d V ,round ( e ) )

    Scilab code Exa 5.7 Example on Induced EMF

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 N = 1 2 0 0 // no . o f t ur ns i n t h e c o i l on s o l e n o i d4 l = 8 0 D - 2 // l e ng t h o f s o l e n o i d5 A = % p i / 4 * ( 5 D - 2 ) ^ 2 / / c r o s ss e c t i o n a l a re a6 L = N * ( m u _ n o t * N * A / l )

    7 mprintf ( S e l f i n d u c t a n c e =%f mH\n , L * 1 0 0 0 )

    8 // c a l c u l a t i n g i nd uc ed emf 9 d i = - 5 - 5

    10 d t = . 0 3

    11 e = - L * d i / d t

    12 mprintf ( Induc e d e mf=%f V ,e )

    44

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    46/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    47/212

    8 e = - M * 2 0 0

    9 mprintf ( emf i nd uc ed i n s e a r ch c o i l =%f V ,e )

    Scilab code Exa 5.10 Example on Induced EMF

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 N = 8 0 0 // no . o f t ur ns f o r e a c h s o l e n o i d4 l = 9 0 D - 2 // l e ng t h o f e a ch s o l e n o i d

    5 A x = % p i * ( 3 D - 2 ) ^ 2 / 4 / / c r o s ss e c t i o n a l a re a o f s o l e n o i dX6 A y = % p i * ( 6 D - 2 ) ^ 2 / 4 / / c r o s ss e c t i o n a l a re a o f s o l e n o i d

    Y7 M = N * N * m u _ n o t * A x / l

    8 mprintf ( M ut ua l i n d u c t a n c e o f a r r a n g em e n t=%f mH\n,1000*M)

    9 // c a l c u l a t i n g c o up l i ng co e f f i c i e n t10 L x = N * m u _ n o t * N * A x / l

    11 L y = N * m u _ n o t * N * A y / l

    12 k = M / sqrt ( L x * L y )

    13 mprintf ( C o u p l i ng co e f f i c i e n t =%f ,k )

    Scilab code Exa 5.11 Example on Induced EMF

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 N b = 5 0 0 // no . o f t ur ns i n c o i l B4 l = 1 2 0 D - 2 // mean l e n g t h o f f l u x pa th i n i r on c i r c u i t

    5 N a = 5 0 // no . o f t ur ns i n c o i l A6 m u _ r = 2 0 0 0 // r e l a t i v e p e r m e ab i l i t y o f i r on7 A = 8 0 * 1 0 ^ - 4 / / c r o s ss e c t i o n a l a re a8 M = N b * m u _ n o t * m u _ r * N a * A / ( l )

    9 mprintf ( M u tu al i n d u c t a n c e M=%f H\n ,M )

    46

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    48/212

    10 d i = 1 2

    11 d t = . 0 1 512 e = - M * d i / d t

    13 mprintf ( Emf i n d u ce d i n c o i l B=%f V ,e )

    Scilab code Exa 5.12 Example on Growth and Decay of Current in In-ductive Circuits

    1

    2 V = 1 1 0 // a p p l i e d v o l t a g e3 L = . 5 // i n du c t a nc e o f c o i l4 r = V / L

    5 mprintf ( R at e o f c h an g e o f c u r r e n t =%d A/ s \n ,r )6 R =8 // r e s i s t a n c e o f c o i l7 I = V / R

    8 mprintf ( F i n a l s t e a d y c u r r e n t =%f A\n ,I )9 T = L / R

    10 mprintf ( Time c o n s t a n t =%f s e c\n ,T )11 / / s o l v i n g p a r t ( i v )12 t = - log ( . 5 ) * T

    13 mprintf ( Time t ak e n f o r t h e c u r r e n t t o r i s e t o h a l f i t s f i n a l v a lu e=%f s e c ,t )

    Scilab code Exa 5.13 Example on Growth and Decay of Current in In-ductive Circuits

    1

    2 / / c a l c u l a t i n g t i m e i t w i l l t a k e c ur r e nt t o r ea ch . 8

    o f i t s f i n a l s t e a dy v a lu e3 L =5 / / i n d u c t a nc e o f w in di n g4 R = 5 0 // r e s i s t a n c e o f w in di ng5 T = L / R

    6 V = 1 1 0 // a p p l i e d v o l t a g e

    47

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    49/212

    7 I = V / R // f i n a l s te ad y c u r r e nt

    8 i = . 8 * I9 t = - T * log ( 1 - i / I )

    10 mprintf ( C u rr e n t g row s t o . 8 t im es i t s f i n a l s te ad yv a l ue , %f s e c a f t e r t he s wi tc h i s c l o se d\n ,t )

    11 / / c a l c u l a t i n g t i m e i t w i l l t a k e f o r t h e c ur r e nt t or e a c h . 9 o f i t s f i n a l s t e a d y v a l u e

    12 i = . 9 * I

    13 t = - T * log ( 1 - i / I )

    14 mprintf ( Time t ak en f o r t he c u r r e n t t o grow t o . 9t i m e i t s f i n a l s t e a d y v a l ue i s %f s e c\n ,t )

    15 // c a l c u l a t i n g a v er a ge emf i nd uc ed

    16 e = - L * ( - 2 . 2 / . 0 5 )17 mprintf ( e mf i nd uc e d=%d V\n , round ( e ) )

    Scilab code Exa 5.14 Example on Growth and Decay of Current in In-ductive Circuits

    1

    2 // c a l c u l a t i n g i nd uc ta nc e and r e s i s t a n c e o f t h e r e l ay

    3 T = . 0 0 4 // t im e c o ns t a n t whi ch i s t i me t ak en f o r t hec ur re nt t o r i s e t o . 63 2 o f i t s f i n a l s t e a d y v a l u e

    4 I = . 3 5 / . 6 3 2 // f i n a l s te ad y v al ue5 V = 2 0 0 // a p p l i e d v o l t a g e6 R = V / I

    7 L = T * R

    8 mprintf ( R e s i s t a nc e o f r e l a y c i r c u i t =%f ohm\n In du ct an ce o f r e l a y c i r c u i t =%f H\n , R , L )

    9 // c a l c u l a t i n g i n i t i a l r a t e o f r i s e o f c u r r e n t10 r = V / L

    11 mprintf ( I n i t i a l r a t e o f r i s e o f c u r r e n t=%f A/ s ,r )

    48

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    50/212

    Scilab code Exa 5.15 Example on Growth and Decay of Current in In-

    ductive Circuits

    1

    2 R = . 5 + 4 0 + 1 5 // t o t a l r e s i s t a n c e3 L =1 // t o t a l i n d uc t an c e4 T = L / R

    5 V = 1 2 // emf o f b a t t er y6 I = V / R // f i n a l s te ad y c ur r e nt i n t h e c i r c u i t7 i = . 0 4 // c ur r e nt a t t i m e t a f t e r c l o s i n g t h e c i r c u i t8 t = - T * log ( 1 - i / I )

    9 mprintf ( The r e l a y w i l l b eg in t o o pe r a t e %f s e c

    a f t e r t h e r e l a y c i r c u i t i s c l o s e d\n ,t )

    Scilab code Exa 5.16 Example on Energy Stored in Magnetic Field

    1

    2 m u _ n o t = 4 * % p i * 1 D - 7

    3 // c a l c u l a t i n g i n d uc t an c e4 N = 4 0 0 0 / / number o f t u r n s

    5 I =2 // c u r r e nt f l o w i n g i n t he s o l e n o i d6 d = 8 D - 2 // d i am e te r o f s o l e n o i d7 A s = % p i / 4 * d ^ 2

    8 l = 8 0 D - 2 // l e ng t h o f s o l e n o i d i n mtr s9 p h i = m u _ n o t * N * I * A s / l

    10 L = N * p h i / I

    11 mprintf ( I n d u c t a n c e = % f H\n ,L )12 // c a l c u l a t i n g e ne rg y s t o r e d i n t he m ag ne ti c f i e l d13 E = L * I ^ 2 / 2

    14 mprintf ( E n er gy s t o r e d i n t h e m a g ne t i c f i e l d =%f J ,E)

    Scilab code Exa 5.17 Example on Energy Stored in Magnetic Field

    49

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    51/212

    1

    2 m u _ n o t = 4 D - 7 * % p i3 // c a l c u l a t i n g e x c i t i n g c u r r e n t4 B = 1 . 2 // f l u x d e n s i t y5 m u _ r = 5 0 0 // r e l p e r m e a b i l i t y f o r i r on6 H = B / ( m u _ n o t * m u _ r )

    7 D = 1 0 D - 2 / / mean d i a m e t e r8 l = % p i * D // l e n g t h o f f l u x pat h i n t he r i ng9 A T = H * l

    10 N = 3 0 0 // number o f t u rn s on t he r i n g11 I = A T / N

    12 mprintf ( E x c i t i n g c u r r e n t =%d A\n , round ( I ) )

    13 // c a l c u l a t i n g i n d uc t an c e14 A s = 8 D - 4 / / c r o s ss e c t i o n a l a re a15 p h i = B * A s

    16 L = N * p h i / I

    17 mprintf ( I n d u c t a n c e = % f H\n ,L )18 // c a l c u l a t i n g e ne rg y s t o r e d19 E = L * I ^ 2 / 2

    20 mprintf ( E n e rg y s t o r e d =%f J \n ,E )21 // c o n s i d e r t he c a se i n which an a i r gap o f 2 mm i n

    t he r i n g i s made22 l i = l - 2 D - 3

    // l e n g th o f f l u x pat h i n i r on p o rt i o n23 l g = 2 D - 3 // l e ng t h o f a i r gap24 A T i = H * l i // ampere t ur n s f o r i r o n p o r ti o n25 A T g = . 7 9 6 * B * l g * 1 0 ^ 6 // ampere t ur n s f o r a i r gap26 A T = A T i + A T g

    27 I = A T / N

    28 mprintf ( When t h e r e i s an a i r gap o f 2mm in t he r i n g\ n E x c i t i n g c u r r e n t=%f A\n ,I )

    29 L = N * p h i / I

    30 mprintf ( Ind uc t an c e =%f mH\n , L * 1 0 0 0 )31 E = L * I ^ 2 / 2

    32 mprintf ( E n e rg y s t o r e d =%f J \n ,E )

    50

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    52/212

    Scilab code Exa 5.18 Example on Energy Stored in Magnetic Field

    1

    2 m u _ n o t = 4 D - 7 * % p i

    3 // c a l c u l a t i n g p u l l on t he a rm at u re4 m u _ r = 3 0 0 // r e l p e r m e a b i l i t y o f i r on5 A T = 2 0 0 0 // t o t a l a mp ere t u r n s6 l i = 5 0 D - 2 // l e n g th o f i r o n pa th7 l g = 1 . 5 D - 3 // l e ng t h o f a i r gap8 B = A T / ( l i / ( m u _ n o t * m u _ r ) + . 7 9 6 * l g * 1 0 ^ 6 )

    9 A = 3 D - 4 // a r ea o f e ac h p o l e s ho e10 x = B ^ 2 * A / ( 2 * m u _ n o t ) // p u l l on t he a rm at ur e a t e ac h

    p o l e11 p = 2 * x

    12 mprintf ( T o ta l p u l l due t o b ot h t he p o l e s=%f N\n ,p )13 // c o n s i d e r i n g t he gap c l o s e s t o . 2 mm14 l g = . 2 * 1 D - 3

    15 B = A T / ( l i / ( m u _ n o t * m u _ r ) + . 7 9 6 * l g * 1 0 ^ 6 )

    16 x = B ^ 2 * A / ( 2 * m u _ n o t )

    17 p = 2 * x

    18 mprintf ( When t h e gap c l o s e s t o . 2 mm, t o t a l f o r c en ee de d due t o bot h t he p ol es , t o p u l l t he

    arm atu re away=%f N,p )

    19 / / a ns we r v ar y fr om t he t ex t bo o k due t o ro un d o f f e r r o r

    51

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    53/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    54/212

    Figure 6.1: Example on AC Wave Shapes

    53

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    55/212

    Scilab code Exa 6.2 Example on AC Wave Shapes

    1

    2

    3 // i=Imaxs i n (2%p if t )4 I m a x = 1 0 0 //max v a lu e o f c u r r e nt5 f = 2 5 // f r e q u e n cy i n Hz6 // c a l c u l a t i n g t im e a f t e r whi ch c u r re n t becomes 20 A7 i = 2 0

    8 t = asin ( i / I m a x ) / ( 2 * % p i * f )

    9 mprintf ( Time a f t e r w hi ch c u r r e n t b ec om es 2 0 A=%f s e c\n ,t )

    10 // c a l c u l a t i n g t im e a f t e r whi ch c u r re n t becomes 50 A11 i = 5 0

    12 t = asin ( i / I m a x ) / ( 2 * % p i * f )

    13 mprintf ( Time a f t e r w hi ch c u r r e n t b ec om es 5 0 A=%f s e c\n ,t )

    14 / / c a l c u l a t i n g t im e a f t e r whi ch c u r r e n t beco mes 10 0 A15 i = 1 0 0

    16 t = asin ( i / I m a x ) / ( 2 * % p i * f )17 mprintf ( Time a f t e r w hi ch c u r r e n t b ec om es 1 00 A=%f

    s e c\n ,t )

    Scilab code Exa 6.3 Example on AC Wave Shapes

    1

    2 // c a l c u l a t i n g i n s t an t an e o u s v o l t a ge a t . 0 0 5 s e c

    a f t e r t h e wave p a ss e s t h r o ug h z e r o i n p o s i t i v ed i r e c t i o n

    3 f = 5 0 / / f r e q u e n c y4 E m a x = 3 5 0 //max v a lu e o f v o l t a g e5 t = . 0 0 5

    54

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    56/212

    6 e 1 = E m a x * sin ( 2 * % p i * f * t )

    7 mprintf ( V ol ta ge a t . 0 0 5 s e c a f t e r t he wave p a ss e st hr ou gh z e ro i n p o s i t i v e d i r e c t i o n =%d V\n , e 1 )8 // c a l c u l a t i n g i n s t an t an e o u s v o l t a ge a t . 0 0 8 s e c

    a f t e r t he wave p a s se s t hr ou gh z e ro i n n e g at i v ed i r e c t i o n

    9 t = . 0 0 8

    10 e 2 = - E m a x * sin ( 2 * % p i * f * t )

    11 mprintf ( V ol ta ge a t . 0 0 8 s e c a f t e r t he wave p a ss e st hr ou gh z e r o i n n e g a t i v e d i r e c t i o n =%f V , e 2 )

    Scilab code Exa 6.4 Example on AC Wave Shapes

    1

    2 //e = 100s i n (1 0 0 %pi t )3 // c a l c u l a t i n g r a t e o f c ha ng e o f v o l t a g e a t t =. 0025

    s e c4 t = . 0 0 2 5

    5 r 1 = 1 0 0 0 0 * % p i * cos ( 1 0 0 * % p i * t )

    6 mprintf ( Rate o f c h an ge o f v o l t a g e a t . 0 02 5 s e c=%f V

    / se c\n , r 1 )7 // c a l c u l a t i n g r a t e o f c ha ng e o f v o l t a g e a t t =. 005

    s e c8 t = . 0 0 5

    9 r 2 = 1 0 0 0 0 * % p i * cos ( 1 0 0 * % p i * t )

    10 mprintf ( Rate o f c ha ng e o f v o l t a g e a t . 0 0 5 s e c=%d V/s e c\n , r 2 )

    11 // c a l c u l a t i n g r a te o f c ha n g e o f v o l t a ge a t t =.01 s e c12 t = . 0 1

    13 r 3 = 1 0 0 0 0 * % p i * cos ( 1 0 0 * % p i * t )

    14 mprintf ( Rate o f c ha ng e o f v o l t a g e a t . 0 1 s e c=%f V/s e c\n , r 3 )15 // e r r o r i n t e xt bo o k a ns we r i n f i r s t and l a s t c a s e

    55

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    57/212

    Scilab code Exa 6.5 Example on AC Wave Shapes

    1

    2

    3 / / c a l c u l a t i n g g r e a t e s t r a te o f c ha n ge o f c u rr e n t4 // i =50s i n ( 1 0 0%p i t )5 mprintf ( G r e a t e st r a t e o f c ha ng e o f c u r r e n t=%f A/ s e c

    \n,50*100*%pi )6 / / c a l c u l a t i n g a v e ra g e v a lu e o f c u r re n t7 f = 5 0 // f r e q u e n cy o f t h e wave8 T = 1 / f

    9 I m e a n = 1 / . 0 1 * i n t e g r a t e ( 50s i n ( 1 0 0 %pi t ) , t ,0,T/2)10 mprintf ( A ve ra ge v a l ue o f t he g i ve n c u r r e n t=%f A\n ,

    I m e a n )

    11 I r m s = sqrt ( i n t e g r a t e ( ( 5 0s i n ( t h e t a ) ) 2 , t h e t a ,0,2*% p i ) / ( 2 * % p i ) )

    12 mprintf ( RMS v a l u e o f c u r r e n t =%f A\n , I r m s )13 / / c a l c u l a t i n g t im e i n t e r v a l b et we en a maximum v a l u e

    and n ex t z e r o v a lu e

    14 t = ( % p i / 2 ) / ( 1 0 0 * % p i )15 mprintf ( Time i n t e r v a l b et we en a maximum v a l u e a nd

    t h e n ex t z er o v al ue i s %f s e c t o %f s e c , t , 2 * t )16 / / v al ue o f g r e a t e s t r a t e o f c h a ng e o f c u r r e n t i s

    g i v en wrong i n t he t e xt bo o k due t o a pp r ox im a ti on

    Scilab code Exa 6.6 Example on AC Wave Shapes

    1

    2 i = linspace ( 0 , 0 , 2 )

    3 t = linspace ( 0 , 1 , 2 )

    56

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    58/212

    Figure 6.2: Example on AC Wave Shapes

    57

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    59/212

    4 plot2d ( t , i )

    5 for j = 0 : 36 i = linspace ( 4 0 + 2 0 * j , 4 0 + 2 0 * j , 2 )

    7 t = linspace ( j + 1 , j + 2 , 2 )

    8 plot2d ( t , i )

    9 if j = = 0 then

    10 t = linspace ( j + 1 , j + 1 , 2 )

    11 i = linspace ( 0 , 4 0 , 2 )

    12 plot2d ( t , i )

    13 else

    14 t = linspace ( j + 1 , j + 1 , 2 )

    15 i = linspace (40+20*(j-1) ,40+20*j,2)

    16 plot2d ( t , i )17 end

    18 end

    19 for j = 1 : 3

    20 i = linspace ( 1 0 0 - 2 0 * j , 1 0 0 - 2 0 * j , 2 )

    21 t = linspace ( j + 4 , j + 5 , 2 )

    22 plot2d ( t , i )

    23 i = linspace (100-20*(j-1) ,100-20*j,2)

    24 t = linspace ( j + 4 , j + 4 , 2 )

    25 plot2d ( t , i )

    26 end

    27 i = linspace ( 4 0 , 0 , 2 )

    28 t = linspace ( 8 , 8 , 2 )

    29 plot2d ( t , i )

    30 i = linspace ( 0 , 0 , 2 )

    31 t = linspace ( 8 , 9 , 2 )

    32 plot2d ( t , i )

    33 for j = 0 : 3

    34 i = linspace ( - ( 4 0 + 2 0 * j ) , - ( 4 0 + 2 0 * j ) , 2 )

    35 t = linspace ( j + 9 , j + 1 0 , 2 )

    36 plot2d ( t , i )

    37 if j = = 0 then38 t = linspace ( j + 9 , j + 9 , 2 )

    39 i = linspace ( 0 , - 4 0 , 2 )

    40 plot2d ( t , i )

    41 else

    58

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    60/212

    42 t = linspace ( j + 9 , j + 9 , 2 )

    43 i = linspace ( - 4 0 - 2 0* ( j - 1 ) , - 4 0 - 20 * j , 2 )44 plot2d ( t , i )

    45 end

    46 end

    47 for j = 1 : 3

    48 i = linspace ( - ( 1 0 0 - 2 0 * j ) , - ( 1 0 0 - 2 0 * j ) , 2 )

    49 t = linspace ( j + 1 2 , j + 1 3 , 2 )

    50 plot2d ( t , i )

    51 i = linspace ( - 1 0 0 + 20 * ( j - 1 ) , - 1 0 0 + 20 * j , 2 )

    52 t = linspace ( j + 1 2 , j + 1 2 , 2 )

    53 plot2d ( t , i )

    54 end55 i = linspace ( 0 , - 4 0 , 2 )

    56 t = linspace ( 1 6 , 1 6 , 2 )

    57 plot2d ( t , i )

    58 xtitle ( P e r i o d i c c u r r e nt wave f o r ex am pl e 6 . 6 , t i m ei n s e c on d s , c u r r e n t )

    59

    60 / / c a l c u l a t i n g a v e ra g e v a lu e f o r t h i s wave s ha pe61 I a v g = ( 0 + 4 0 + 6 0 + 8 0 + 1 0 0 + 8 0 + 6 0 + 4 0 ) / 8

    62 mprintf ( A v e ra ge v a lu e o f c u r re n t o f g i ve n wave

    shape=%f A\n, I a v g )

    63 // c a l c u l a t i n g RMS v a lu e f o r t he g i v en wave s ha pe64 I r m s = sqrt ( ( 0 ^ 2 + 4 0 ^ 2 + 6 0 ^ 2 + 8 0 ^ 2 + 1 0 0 ^ 2 + 8 0 ^ 2 + 6 0 ^ 2 + 4 0 ^ 2 )

    /8)

    65 mprintf ( RMS v a l u e o f c u r r e n t o f g i v e n wave s h a pe=%f A\n , I r m s )

    66 // c a l c u l a t i n g form f a c t o r67 x = I r m s / I a v g

    68 mprintf ( Form f a c t o r o f g i v e n wave f or m=%f \n ,x )69 // c a l c u l a t i n g peak f a c t o r70 I m a x = 1 0 0 / /maximum v a l u e o f c u r r e n t wa ve

    71 y = I m a x / I r m s72 mprintf ( Peak f a c t o r o f g i v e n wave=%f \n ,y )73 // c a l c u l a t i n g a v er a ge and RMS v a lu e o f c u r r e nt

    c o n s i d e r i n g t he wave t o be s i n u s o i d a l h av in g peakv al ue o f 100 A

    59

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    61/212

    Figure 6.3: Example on AC Wave Shapes

    74 I a v g = i n t e g r a t e ( 100 / %pis i n ( t h e t a ) , t h e t a , 0 , % p i )75 mprintf ( A v er ag e v a l u e o f s i n e wave=%f A\n , I a v g )76 I r m s = sqrt ( i n t e g r a t e ( (10 0s i n ( th et a ) ) 2/ %pi , t h e t a

    , 0 , % p i ) )

    77 mprintf ( RMS v a l u e o f s i n e w av e=%f A , I r m s )

    Scilab code Exa 6.7 Example on AC Wave Shapes

    1

    2 t h e t a = linspace (0,2*%pi ,100)

    3 i = 1 0 + 1 0 * sin ( t h e t a ) // e x p r e s s i o n f o r t he r e s u l t a n t

    60

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    62/212

    wave

    4 plot2d ( t h e t a , i )5 xtitle ( Wave s h ap e f o r e xa mp le 6 . 7 , t h e t a , c u r r e n t )

    6

    7 / / c a l c u l a t i n g a v e ra g e v a lu e o f t he r e s u l t a n t wave8 I a v g = i n t e g r a t e ( 10+10s i n ( t h e t a ) , t h e t a , 0 , 2 * % p i )

    / ( 2 * % p i )

    9 mprintf ( A v e ra ge v a lu e o f t he r e s u l t a n t c u r r e nt wave=%d A\n , I a v g )

    10 // c a l c u l a t i n g RMS v a lu e o f c u r r e nt o f t he r e s u l t a n twave

    11 I r m s = sqrt ( i n t e g r a t e ( ( 1 0+ 1 0s i n ( t h e t a ) ) 2 , t h e t a , 0 , 2 * % p i ) / ( 2 * % p i ) )

    12 mprintf ( RMS v a l u e o f t h e r e s u l t a n t c u r r e n t wave=%f A , I r m s )

    Scilab code Exa 6.8 Example on AC Wave Shapes

    1

    2 t h e t a = linspace (0,2*%pi ,100)3 i = 5 0 * sin ( t h e t a )

    4 xset ( window ,0)5 plot2d ( t h e t a , i )

    6 xtitle ( C u r r en t wave s h ap e f o r e xa mp le 6.8>( a ) , t h e t a , c u r r e n t )

    7

    8 xset ( window ,1)9 t h e t a = linspace (0, %pi ,100)

    10 i = 5 0 * sin ( t h e t a )

    11 plot2d ( t h e t a , i )12 t h e t a = linspace (%pi ,2*%pi ,100)

    13 i = - 5 0 * sin ( t h e t a )

    14 plot2d ( t h e t a , i )

    15 xtitle ( C u r r en t wave s h ap e f o r e xa mp le 6.8>( b ) ,

    61

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    63/212

    t h e t a , c u r r e n t )

    1617 xset ( window ,2)18 t h e t a = linspace ( 0 , 0 , 2 )

    19 i = linspace ( 0 , 5 0 , 2 )

    20 plot2d ( t h e t a , i )

    21 t h e t a = linspace ( 0 , % p i , 2 )

    22 i = linspace ( 5 0 , 5 0 , 2 )

    23 plot2d ( t h e t a , i )

    24 t h e t a = linspace ( % p i , % p i , 2 )

    25 i = linspace ( 5 0 , - 5 0 , 2 )

    26 plot2d ( t h e t a , i )

    27 t h e t a = linspace ( % p i , 2 * % p i , 2 )28 i = linspace ( - 5 0 , - 5 0 , 2 )

    29 plot2d ( t h e t a , i )

    30 i = linspace ( - 5 0 , 0 , 2 )

    31 t h e t a = linspace ( 2 * % p i , 2 * % p i , 2 )

    32 plot2d ( t h e t a , i )

    33 xtitle ( C u r r en t wave s h ap e f o r e xa mp le 6.8>( c ) , t h e t a , c u r r e n t )

    34

    35 xset ( window ,3)36 t h e t a = linspace ( 0 , % p i / 2 , 2 )

    37 i = linspace ( 0 , 5 0 , 2 )

    38 plot2d ( t h e t a , i )

    39 t h e t a = linspace ( % p i / 2 , % p i , 2 )

    40 i = linspace ( 5 0 , 0 , 2 )

    41 plot2d ( t h e t a , i )

    42 t h e t a = linspace ( % p i , 3 * % p i / 2 , 2 )

    43 i = linspace ( 0 , - 5 0 , 2 )

    44 plot2d ( t h e t a , i )

    45 t h e t a = linspace ( 3 * % p i / 2 , 2 * % p i , 2 )

    46 i = linspace ( - 5 0 , 0 , 2 )

    47 plot2d ( t h e t a , i )48 xtitle ( C u r r en t wave s h ap e f o r e xa mp le 6.8>( d ) ,

    t h e t a , c u r r e n t )49

    50 / / c o n s i d e r wave s ha pe ( a )

    62

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    64/212

    51 mprintf ( Fo r w ave s ha pe ( a ) \nAs t he n e g a t i v e and

    p o s i t i v e p a rt s o f t he wave a re e q u a l , r e a d i ng o f moving c o i l ammeter i s z e r o\n )52 I r m s = sqrt ( i n t e g r a t e ( (5 0s i n ( t h e t a ) ) 2 , t h e t a ,0,2*

    % p i ) / ( 2 * % p i ) )

    53 mprintf ( R e a d in g o f m ov in g i r o n a mm et er=%f A\n , I r m s)

    54

    55 / / c o n s i d e r wave s ha pe ( b )56 I a v g = i n t e g r a t e ( 5 0s i n ( t h e t a ) , t h e t a , 0 , % p i ) / % p i57 mprintf ( Fo r wave s ha pe ( b ) \ n R ea d in g o n t h e m ov in g

    c o i l a mm et er=%f A\n , I a v g )

    58 I r m s = sqrt ( i n t e g r a t e ( (5 0s i n ( t h e t a ) ) 2 , t h e t a ,0,2*% p i ) / ( 2 * % p i ) )

    59 mprintf ( R e a d i n g o n m ov in g i r o n a mm et er=%f A\n , I r m s)

    60

    61 / / c o n s i d e r c a s e ( c )62 mprintf ( F o r wa ve s h a p e ( c ) \ n Av er ag e v a l u e o v er o ne

    c om pl et e p e ri o d i s c l e a r l y z e r o . Thus r e ad i ng onmoving c o i l ammeter i s z e r o . As t he v a lu e o f c u r r e nt r em ai ns c o ns t a n t a t 50 A d u ri ng v a r i o u s

    i n t e r v a l s , RMS v a lu e w i l l be 50 A o n ly . Hence ,r e a d i n g on m ov in g i r o n ammeter =50 A\n )63

    64 / / c o n s i d e r c a s e ( d )65 I a v g = ( 0 + 1 0 + 2 0 + 3 0 + 4 0 + 5 0 + + 4 0 + 3 0 + 2 0 + 1 0 + 0 + ( - 1 0 ) + ( - 2 0 )

    + ( - 3 0 ) + ( - 4 0 ) + ( - 5 0 ) + ( - 4 0 ) + ( - 3 0 ) + ( - 2 0 ) + ( - 1 0 ) + 0 ) / 2 0

    66 mprintf ( Fo r wave s ha pe ( d ) \ n Re ad in g on m ov in g c o i lammeter=%d\n , I a v g )

    67 I r m s = sqrt

    ( ( 0 ^ 2 + 1 0 ^ 2 + 2 0 ^ 2 + 3 0 ^ 2 + 4 0 ^ 2 + 5 0 ^ 2 + 4 0 ^ 2 + 3 0 ^ 2 + 2 0 ^ 2 + 1 0 ^ 2 + 0 ^ 2 + ( - 1 0 )

    ^ 2 + ( - 2 0 ) ^ 2 + ( - 3 0 ) ^ 2 + ( - 4 0 ) ^ 2 + ( - 5 0 ) ^ 2 + ( - 4 0 ) ^ 2 + ( - 3 0 )

    ^ 2 + ( - 2 0 ) ^ 2 + ( - 1 0 ) ^ 2 + 0 ^ 2 ) / 2 0 )68 mprintf ( R e a d i n g o n m ov in g i r o n a mm et er=%f A\n , I r m s

    )

    63

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    65/212

    Scilab code Exa 6.9 Example on AC Wave Shapes

    1

    2 / / l e t u s a s su me V=1 V , T=1 s e c3 // e=V t /T4 V =1

    5 T =1

    6 E r m s = sqrt ( i n t e g r a t e ( (V t / T ) 2 , t ,0 , T ) / T)7 mprintf ( RMS v a l u e o f v o l t a g e i s %f t i m e s maximum

    v o l t a g e\n , E r m s / V )8 E m e a n = i n t e g r a t e ( V t/T , t , 0 , T ) / T9 k = E r m s / E m e a n

    10 mprintf ( Form f a c t o r o f t h i s wave=%f ,k )

    Scilab code Exa 6.10 Example on AC Wave Shapes

    1

    2 / / t h e g r ap h i s drawn c o n s i d e r i n g R=%pi3 R = % p i

    4 t h e t a = linspace (-%pi ,%pi ,100)

    5 V = sqrt ( R ^ 2 - t h e t a ^ 2 )

    6 plot2d ( t h e t a , V )

    7 xtitle ( Wave s h ap e f o r e xa mp le 6 . 1 0 , t h e t a , V o l t a g e )

    8 t h e t a = linspace (%pi ,3*%pi ,100)

    9 V = - sqrt (R^2-(theta -2*%pi)^2)10 plot2d ( t h e t a , V )

    11

    12 V r m s = sqrt ( i n t e g r a t e ( (R2x 2 ) / ( 2R) , x , - R , R ) )

    64

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    66/212

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    67/212

    13 mprintf ( RMS v a l u e o f s uc h a wave s ha pe w i l l be %f

    o f i t s maximum v o l t a g e , V r m s / R )

    Scilab code Exa 6.11 Example on Phase Difference

    1

    2 / / c o n s i d e r p a r t ( i )3 p h i = % p i / 1 2

    4 mprintf ( Fo r p a r t ( i ) \ n Vo lt ag e l e a d s t he c u r re n t

    wa ve by %d d e g r e e s \n , round ( p h i * 1 8 0 / % p i ) )5 f = 3 7 7 . 1 6 / ( 2 * % p i )6 mprintf ( F r e q u en c y o f t h e wa ve s h a p e=%d Hz\n ,f )7 / / c o n s i d e r p a r t ( i i )8 p h i = % p i / 3

    9 mprintf ( F or p a r t ( i i ) \ n Vo lt ag e l e a d s t he c u r r e nt by% d d e g r e e s\n , round ( p h i * 1 8 0 / % p i ) )

    10 mprintf ( F r e q u en c y o f t h e wa ve s h a p e=om eg a / ( 2p i ) \n)

    11 / / c o n s i d e r p a r t ( i i i )12 p h i = 0 - ( - % p i / 2 )

    13 mprintf ( F or p a r t ( i i i ) \ n Vo lt ag e l e a d s t he c u r r e n twa ve by %d d e g r e e s \n , round ( p h i * 1 8 0 / % p i ) )

    14 mprintf ( F r e q u en c y o f t h e wa ve s h a p e=om eg a / p i \n )15 / / c o n s i d e r p a r t ( i v )16 mprintf ( Fo r p a r t ( i v ) \ n Cu rr en t wave l a g s t h e

    v o l t a g e by an a n g l e =a l p h a+a t an ( x /R) and t h ef r e qu e n cy o f t h i s wave s ha pe i s omega / ( 2p i ) )

    Scilab code Exa 6.13 Example on Simple AC Circuits

    1

    2 V = 2 3 0 // a p p l i e d v o l t a g e3 L = 6 0 D - 3 // i nd u ct an c e o f c o i l

    66

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    68/212

    4 f = 5 0 / / f r e q u e n c y o f s u p pl y

    5 X l = 2 * % p i * f * L6 I = 2 3 0 / X l

    7 // i f f r e qu e n cy i s r ed uc ed t o 20 Hz8 X l = 2 * % p i * 2 0 * L

    9 I 1 = V / X l

    10 mprintf ( C ur re n t t hr ou gh t he c o i l i f f r eq u en c y i sr e d u c e d t o 2 0 Hz=%f A\n , I 1 )

    11 // i f f r eq u en c y i s i n c r e a se d t o 60 Hz12 X l = 2 * % p i * 6 0 * L

    13 I 2 = V / X l

    14 mprintf ( C ur re n t t hr ou gh t he c o i l i f f r eq u en c y i s

    i n c r e a s e d t o 6 0 Hz=%f A\n , I 2 )15 // i f f r eq u en c y i s i n c r e a se d t o 100 Hz16 X l = 2 * % p i * 1 0 0 * L

    17 I 3 = V / X l

    18 mprintf ( C ur re n t t hr ou gh t he c o i l i f f r eq u en c y i si n c r e a s e d t o 1 00 Hz=%f A\n , I 3 )

    Scilab code Exa 6.14 Example on Simple AC Circuits

    1

    2 // c a l c u l a t i n g r e a c ta n ce o f c a p ac i t o r3 C = 1 0 0 D - 6

    4 X c = 1 / ( 2 * % p i * 5 0 * C )

    5 mprintf ( C a p a c i t i v e r e a c t a n c e , X c=%f ohm\n , X c )6 // c a l c u l a t i n g RMS v a lu e o f c u r r e nt7 V = 2 0 0

    8 I r m s = V / X c

    9 mprintf ( RMS v a l u e o f c u r r e n t =%f A\n , I r m s )

    10 // c a l c u l a t i n g max c u r r e nt11 I m a x = I r m s * sqrt (2)12 mprintf ( Maximum c u r r e n t=%f A , I m a x )

    67

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    69/212

    Chapter 7

    AC Series Circuit

    Scilab code Exa 7.1 Example on AC Series Circuit

    1

    2 / / c a l c u l a t i n g c u rr e n t f l ow i n g i n t h e c i r c u i t3 L = 0 . 1 / / i n d u c t a n c e4 f = 5 0 / / f r e q u e n c y5 X l = 2 * % p i * f * L

    6 R = 1 5 // t o t a l r e s i s t a n c e i n t h e c i r c u i t

    7 Z = sqrt ( R ^ 2 + X l ^ 2 )8 V = 2 3 0 // v o l t a g e a p p l i e d t o s e r i e s c i r c u i t9 I = V / Z

    10 mprintf ( C ur re n t f l o w i n g i n t he c i r c u i t =%f A\n ,I )11 // c a l c u l a t i n g power f a c t o r12 p f = R / Z

    13 mprintf ( Power f a c t o r o f t he c i r c u i t i s %f ( l a g g i n g ) \n V ol t ag e a c r o s s r e a c t o r =%f V\ n Vo lt ag e a c r o s sr e s i s t o r =%f V , p f , I * X l , I * R )

    Scilab code Exa 7.2 Example on AC Series Circuit

    68

  • 7/24/2019 Basic Electrical Engineering_A. Mittle and v. N. Mittle

    70/212

    1

    2 V 1 = 2 0 0 // v o l t a g e a p p l i e d t o noni n d u c t i v e l oa d3 I 1 = 2 0 // c u r r e nt f l o w i n g t hr ou gh t he l o ad4 R = V 1 / I 1

    5 V = 2 3 0 // a p pl i ed v o l t a ge t o s e r i e s c on ne c t i o n o f R andL

    6 I = I 1

    7 Z = V / I

    8 Xl = sqrt ( Z ^ 2 - R ^ 2 )

    9 L = X l / ( 2 * % p i * 5 0 )

    10 p h i = a t a n d ( X l / R )

    11 mprintf ( I n d u ct a nc e o f t he r e a c t o r =%f H, p