Lab No. 9 Jacobian Matrix Formulation and Importance Problem Statement: Objective
Lab No. 9 Jacobian Matrix Formulation and Importance Problem Statement: Objective
9
Jacobian matrix formulation and importance
Problem statement:
Using Jacobian matrix solve 5 bus system power flow system.
Objective:
To understand the mathematical basics of Newton Raphson iterative load flow technique.
To understand the basic algorithm of Jacobian matrix formulation.
To understand and implement the generic code of Newton Raphson method for a given power
system.
Discussion:
In vector calculus, the Jacobian matrix is the matrixof all first-order partial derivatives of
a vector-valued function. When the matrix is a square matrix, both the matrix and
its determinant are referred to as the Jacobian.
As an application, in the field of control engineering the use of Jacobian matrices allows the
local (approximate) linearisation of non-linear systems around a given equilibrium point and
so allows the use of linear systems techniques, such as the calculation of eigenvalues (and
thus allows an indication of the type of the equilibrium point).
Jacobians are also used in the estimation of the internal states of non-linear systems in the
construction of the extended Kalman filter, and also if the extended Kalman filter is to be
used to provide joint state and parameter estimates for a linear system (since this is a non-
linear system analysis due to the products of what are then effectively inputs and outputs of
the system).Through jacobian matrix, a linear relation can be established between variables
of a otherwise nonlinear system of equations. It is the basic core of Newton Raphson load
flow method as described in the following section.
Basic Mathematics:
In modelling systems, we see that nearly all systems are nonlinear, in that the differential
equations governing the evolution of the system's variables are nonlinear. However, most of
the theory we have developed has centred on linear systems. So, a question arises: In what
limited sense can a nonlinear system be viewed as a linear system? In this section we develop
what is called a \Jacobian linearization of a nonlinear system," about a specific operating
point, called an equilibrium point.
Similar to all other load flow techniques, it is also based on basic equation of complex power
Where substitution produces
Then
From which
As active and reactive power flows in a system are dependent on voltage magnitudes and
angles. The simplified linear relationship is shown in following matrix form.
bus 1 of total 'n' buses is excluded as it is slack bus.
In general the short form of above relation is written as
MATLAB MATHWORK:
Procedure:
1. A 7 bus system is given along with the impedance of the buses
2. Identify the each bus type. Bus 1 is slack bus or reference bus.
3. Bus 2 ,3 and 4 are load buses.
4. Bus 5 is power bus.
Since N=5 buses NO. of equations=2(N-1)=8 Jacobian matrix will have dimension 8х8 .
MATLAB command to calculate jacobian
clc
clear all
% n=input("enter number of buses")
n=5;
% v= input("enter initial bus voltages")
v=[1.05 1 1 1 1.02];
ybus=input("enter ybus matrix of the system");
loop for iterations:
for i=1:n
for j=1:n
y(i,j)=abs(ybus(i,j));
yn(i,j)=angle(ybus(i,j));
v(i)=abs(v(i));
vn(i)=angle(v(i));
end
end
Arbitrary matrix
J1=zeros(n,n);
J2=zeros(n,n);
J3=zeros(n,n);
J4=zeros(n,n);
i=2;
calculation
while i<=n
J2(i,i)=J2(i,i)+2*v(i)*y(i,i)*cos(yn(i,i));
J4(i,i)=J4(i,i)-2*v(i)*y(i,i)*sin(yn(i,i));
for j=1:n
if i==j
continue;
else
J1(i,i)=J1(i,i)+v(i)*v(j)*y(i,j)*sin(yn(i,j)-vn(i)+vn(j));
J1(i,j)=-1*v(i)*v(j)*y(i,j)*sin(yn(i,j)-vn(i)+vn(j));
J2(i,i)=J2(i,i)+v(j)*y(i,j)*cos(yn(i,j)-vn(i)+vn(j));
J2(i,j)=v(i)*y(i,j)*cos(yn(i,j)-vn(i)+vn(j));
J3(i,i)=J3(i,i)+v(i)*v(j)*y(i,j)*cos(yn(i,j)-vn(i)+vn(j));
J3(i,j)=-1*v(i)*v(j)*y(i,j)*cos(yn(i,j)-vn(i)+vn(j));
J4(i,i)=J4(i,i)-v(j)*y(i,j)*sin(yn(i,j)-vn(i)+vn(j));
J4(i,j)=-1*v(i)*y(i,j)*sin(yn(i,j)-vn(i)+vn(j));
end
end
i=i+1;
J11=J1(2:n,2:n);
J22=J2(2:n,2:n);
J33=J3(2:n,2:n);
J44=J4(2:n,2:n);
Jacobian=[J11 J22;J33 J44]
Simulation/results:
Conclusion:
In modelling systems, nearly all systems are nonlinear, in that the differential equations
governing the evolution of the system's variables are nonlinear Jacobian linearize a nonlinear
system," about a specific operating point, called an equilibrium point.