project 103 - nonlinear equations++

Upload: asif-e-elahi-pabon

Post on 03-Jun-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Project 103 - Nonlinear Equations++

    1/38

    ENGR 103 Computer-Aided Analysis Tools for Engineers

    Department of Electrical EngineeringThe City College of The City University of New

    York (CCNY)

    Spring 2014Session 5

    ProjectNon Linear Equations Numerical Analysis

    Dr. Nidal Khrais

  • 8/12/2019 Project 103 - Nonlinear Equations++

    2/38

    y4 y3 y1

    y2

    I4

    I3 I2

    I1 43

    2

    1y34

    y23

    y13

    y12

    Kirchoffs Current Law (KCL) requires that each of the current injections beequal to the sum of the currents flowing out of the bus and into the linesconnecting the bus to other buses, or to the ground. Therefore, recallingOhms Law, I=V/Z=VY, the current injected into bus 1 may be written as: I1=(V1-V2)y12 + (V 1-V3)y13 + V 1y1

  • 8/12/2019 Project 103 - Nonlinear Equations++

    3/38

  • 8/12/2019 Project 103 - Nonlinear Equations++

    4/38

    Similarly, we may develop the current injections at buses 2, 3,and 4 as:

    I2= V 1(-y21) + V 2( y2 + y 21 + y 23 + y24) + V 3(-y23) + V 4(-y24)

    I3= V 1(-y31)+ V 2(-y32) + V 3( y3 + y31 + y 32 + y 34) + V 4(-y34)

    I4= V 1(-y41)+ V 2(-y42) + V 3(-y34)+ V 4( y4 + y41 + y42 + y 43)

    where we recognize that the admittance of the circuit from bus k to bus i is the same as the admittance from bus i to bus k, i.e., yki=yik

  • 8/12/2019 Project 103 - Nonlinear Equations++

    5/38

    current injections are linear functions of the nodal voltages.Therefore, we may write these equations in a more compact formusing matrices according to:

    4

    3

    2

    1

    4342414434241

    3434323133231

    2423242321221

    1413121413121

    4

    3

    2

    1

    V

    V

    V V

    y y y y y y y

    y y y y y y y

    y y y y y y y y y y y y y y

    I

    I

    I I

    4342414434241

    3434323133231

    2423242321221

    1413121413121

    y y y y y y y

    y y y y y y y

    y y y y y y y

    y y y y y y y

    Y

  • 8/12/2019 Project 103 - Nonlinear Equations++

    6/38

    Denoting the element in row i, column j, as Y ij, we rewrite as:

    4 44 34 24 1

    3 43 33 23 1

    2 42 32 22 1

    1 41 31 21 1

    Y Y Y Y

    Y Y Y Y

    Y Y Y Y Y Y Y Y

    Y

    where the terms Y ij are not admittances but ratherelements of the admittance matrix. Therefore, eq. becomes:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    7/38

    4

    3

    2

    1

    44434241

    34333231

    24232221

    14131211

    4

    3

    2

    1

    V

    V V

    V

    Y Y Y Y

    Y Y Y Y Y Y Y Y

    Y Y Y Y

    I

    I I

    I

    4

    3

    2

    1

    4

    3

    2

    1

    ,

    I

    I

    I I

    I

    V

    V

    V V

    V

    Defining the vectors V and I, we may write in compact form:

    V Y I

  • 8/12/2019 Project 103 - Nonlinear Equations++

    8/38

    several observations about the admittance matrix1) The matrix is symmetric, i.e., Y ij=Y ji.

    2) A diagonal element Y ii is obtained as the sum of admittancesfor all branches connected to bus i,i.e., N

    ik k ik iii y yY

    ,1

    3) The off-diagonal elements are the negative of the admittances

    connecting buses i and j, i.e., Y ij=-y ji.

  • 8/12/2019 Project 103 - Nonlinear Equations++

    9/38

    iQ P VI S *2424323222121 I V Y V Y V Y V Y

  • 8/12/2019 Project 103 - Nonlinear Equations++

    10/38

    Relationship between real Power and Reactive powersupplied to the system at bus i and the current

    injected into the system at that bus:

    where Vi is the voltage at the bus; Ii* - complex conjugateof the current injected at the bus; Pi and Qi are real andreactive powers. Therefore,

    iiii I V jQ P *

  • 8/12/2019 Project 103 - Nonlinear Equations++

    11/38

    Given that:

    j

    n

    j iji

    jijiii

    bus

    V Y I

    V Y V Y V Y I

    I V Y

    1

    2211 ......

    Therefore:

    iiii I V jQ P

    slide previous from*

    : _ _

  • 8/12/2019 Project 103 - Nonlinear Equations++

    12/38Non Linear Equations- Numerical Analysis

  • 8/12/2019 Project 103 - Nonlinear Equations++

    13/38

    There are 4 variables that are associated with each bus:o P

    o Qo Vo Meanwhile, there are two power flow equations

    associated with each bus. In a power flow study, two of the four variables aredefined an the other two are unknown.That way, we have the same number of equations asthe number of unknown. The known and unknown variables depend on thetype of bus.

  • 8/12/2019 Project 103 - Nonlinear Equations++

    14/38

    Bus Types1)Load Bus PQ Bus:a-Active Power P is knownb-Reactive Power Q is knownc-voltage magnitude |v| is unknownD- voltage angle is unknown

    2) Generator Bus (Voltage Bus) PV Bus: a-P is knownb-|V| is knownc-Voltage angle is unknownd-Q is unknown.

    3) Slack Bus: choose a reference bus (must beA generator bus) . Assume :|V| = 1.0

    = 0

    Mechanical Pow erP: ElectricalPower

    |V|Generator ExcitationField Current

    Electric Generator/Generator Bus

    Q & are unknown

  • 8/12/2019 Project 103 - Nonlinear Equations++

    15/38

    Note that the power flow equations are non-linear, thuscannot be solved analytically. A numerical iterativealgorithm is required to solve such equations. A standard

    procedure follows:1.Create a bus admittance matrix Ybus for the powersystem;

    2.Make an initial estimate for the voltages (bothmagnitude and phase angle) at each bus in the system;3.Substitute in the power flow equations and determinethe deviations from the solution.

    4.Update the estimated voltages based on somecommonly known numerical algorithms (e.g., Gauss-Seidel, Newton-Raphson).5.Repeat the above process until the deviations from thesolution are minimal.

  • 8/12/2019 Project 103 - Nonlinear Equations++

    16/38

    The power flow Analysis equations

    I V Y bus

    4

    3

    2

    1

    44434241

    34333231

    24232221

    14131211

    4

    3

    2

    1

    V

    V

    V

    V

    Y Y Y Y

    Y Y Y Y

    Y Y Y Y

    Y Y Y Y

    I

    I

    I

    I

    2424323222121 I V Y V Y V Y V Y

  • 8/12/2019 Project 103 - Nonlinear Equations++

    17/38

    The current injected at bus 2 can be found as:

    *

    2

    222

    2

    22*

    2

    22

    *

    22

    V jQ P

    I

    V jQ P

    I

    jQ P I V

  • 8/12/2019 Project 103 - Nonlinear Equations++

    18/38

    )]([1

    )]([1

    )]([1

    : _ _

    )]([1

    : _ _

    )1(343

    )1(242

    )0(141)0*(

    4

    44

    44

    )1(4

    )0(434

    )1(232

    )0(131)0*(

    3

    33

    33

    )1(3

    )0(424

    )0(323

    )0(121)0*(

    2

    22

    22

    )1(2

    424323121*2

    22

    222

    2

    *2

    224243232221212

    V Y V Y V Y V

    jQ P Y

    V

    V Y V Y V Y V jQ P

    Y V

    V Y V Y V Y V

    jQ P Y

    V iterationoneafter

    V Y V Y V Y V

    jQ P Y

    V

    V for solving

    V jQ P

    V Y V Y V Y V Y I

    (Assume V1 is a slack bus:|V1| = 1.0 ; = 0 )

  • 8/12/2019 Project 103 - Nonlinear Equations++

    19/38

    Gauss-Seidel MethodThis method is also known as the method of successive

    displacements. Consider the nonlinear equation f (x) = 0 . Re-write the equation in different form: x = g( x) . We assume x(0) is an initial "guess" of the solution, then "refine" the solution using:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    20/38

    If this process is convergent, then the successivesolutions approach a value which is declared asthe solution. Thus if at some step k +1 we have:

    where is the desired "accuracy",

  • 8/12/2019 Project 103 - Nonlinear Equations++

    21/38

    Example: Use the Gauss-Seidel method to obtainthe roots of the equation:

    1) First using analytical solution:Roots:4.00001.0000 + 0.0000i1.0000 - 0.0000i

    Note the doubleroot at x = 1

  • 8/12/2019 Project 103 - Nonlinear Equations++

    22/38

    2) Using Gauss-Seidel Technique: First the equation isexpressed in a different form thus:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    23/38

    Next the process is generalized for n equations in nvariables:

    Solving for one variable from each equation, the systemof equations car be represented as follows:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    24/38

    First a starting solution is assumed to be: Now there are two ways to proceed:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    25/38

    Acceleration factor:An acceleration factor can be used as before, thus at

    each step upgrade the estimate asFollows:

    Clearly if = 1 then the iteration is the same asbefore. Usually but not muchlarger than unity.

    1

  • 8/12/2019 Project 103 - Nonlinear Equations++

    26/38

    Newton-Raphson MethodConsider the Taylor-series expansion of the function f(x)

    about a value x = xo:

    Using only the first two terms of the expansion, a firstapproximation to the root of the equation f(x) = 0

    can be obtained from:

    ...))(!2/)(''())((')()( 200000 x x x f x x x f x f x f

  • 8/12/2019 Project 103 - Nonlinear Equations++

    27/38

    Such approximation is given by:

    The Newton-Raphson method consists in obtainingimproved values of the approximate root through the

    recurrent application of equation above. For example, thesecond and third approximations to that root will be given by:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    28/38

    This iterative procedure can be generalized by writingthe following equation, where i represents the iteration

    number:

    After each iteration the program should check to see ifthe convergence condition, below, is satisfied:

    |)()1(| ii x f x f

  • 8/12/2019 Project 103 - Nonlinear Equations++

    29/38

    The figure below illustrates the way in which the solution is found by using the Newton-Raphson method.At x = x0, the equation f(x) = 0 f(xo)+f'(xo)(x1 -xo) represents a straight linetangent to the curve y = f(x). The tangent line intersects the x-axis

    (i.e., y =f(x) = 0) at the point x1 as given by x1 = xo - f(xo)/f'(xo).

    At x = x1, the equation f(x) = 0 f(x1)+f'(x1)(x2 x1) represents a straight linetangent to the curve y = f(x). The tangent line intersects the x-axis(i.e., y =f(x) = 0) at the point x2 as given by x2 = x1 - f(x1)/f'(x1).

  • 8/12/2019 Project 103 - Nonlinear Equations++

    30/38

    The Newton-Raphson method converges relatively fast formost functions regardless of the initial value chosen. The

    main disadvantage is that you need to know not only thefunction f(x), but also its derivative, f'(x), in order toachieve a solution.

    Example: find the solution for f(x) = 0 using 3 as the initialestimate where f(x) is shown below:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    31/38

  • 8/12/2019 Project 103 - Nonlinear Equations++

    32/38

    Note: Analytical solution gives:

    16227766.310 x

    100)( 2 x x f

  • 8/12/2019 Project 103 - Nonlinear Equations++

    33/38

    The Project:1) Given the following simple power system that has 4busses, 5 transmission lines, 1 generator, and 3 loads.

    iQ P VI S

    I V Y bu s*

  • 8/12/2019 Project 103 - Nonlinear Equations++

    34/38

    2) given that the corresponding is shown below:busY

    puQ

    pu P

    puQ

    pu P puQ

    pu P

    15.0

    2.0

    05.0

    1.02.0

    3.0

    4

    4

    3

    3

    2

    2

    3) Given the following power values in per unit (pu) at the load buses 2, 3, 4 are:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    35/38

    Find the node (bus) voltages using:1) Gauss iteration

    2) Gauss-Seidel iteration3) Gauss-Seidel using an acceleration factor = 1.64) Using Newton-Raphson Method5) For each method, draw the flowchart

    6) For each method, write the pseudocode

  • 8/12/2019 Project 103 - Nonlinear Equations++

    36/38

    Example:

  • 8/12/2019 Project 103 - Nonlinear Equations++

    37/38

    Continue

  • 8/12/2019 Project 103 - Nonlinear Equations++

    38/38

    Continue