Welcome to the world of Optimizations

In this blog concepts of conventional and unconventional optimization techniques are discussed.

Thursday, November 18, 2010

Power System State Estimation: Part 1


Introduction

Power system state estimation is defined as the act of estimating the state of the network from the redundant telemetry measurements. Static state estimation refers to the procedure of obtaining the voltage phasors at all of the system buses at a given point in time. This can be achieved by direct means which involve very accurate synchronized phasor measurements of all bus voltages in the system. However, such an approach would be very vulnerable to measurement errors or telemetery failures. 

Instead,state estimation procedure makes use of a set of redundant measurements in order to filter out such errors and find an optimal estimate.The measurements may include not only the conventional power and voltage measurements, but also those others such as the current magnitude or synchronized voltage phasor measurements as well. Simultaneous measurement of quantities at different parts of the system is practically impossible, hence a certain amount of time skew between measurements is commonly tolerated. This tolerance is justified due to the slowly varying operating conditions of the power systems under normal operating conditions..

Data for State Estimation

1. Network data
2. Measured Data
(i) Real Power (P)
(ii) Reactive Power (Q)
(iii) Real Line Flow (Pij)
(iv) Reactive Line Flow (Qij)
(v)Magnitude of Line current( [Iij] )
(vi) Voltage magnitude ([V])










Saturday, November 13, 2010

Solving Linear and Quadratic Programming Problems by MATLAB

Introduction
Optimization is defined as Minimizing (or Maximizing) an objective function subject to some constraints .If the objective function and the all the constrains are linear it is called linear programming. If the objective function is quadratic and the all the constraints are linear, it is known as quadratic programming. Let us learn how to use the linear and quadratic programming routines of the MATLAB.
Linear programming
The command for implementing the matlab linear programming routine is ‘linprog’.
Let us consider a linear programming problem with ‘n’ variables, ‘m’ inequality constraints, ‘k’ equality constraints, and the lower ,upper bounds LB and UB.
The linear programming is defined in matlab like this
min f'*x    subject to:   A*x <= b, Aeq*x = beq ,LB≤ x ≤ UB
x-=[x1 x2 x3 ….xn]T x is a column matrix of 1 X n) to be determined.  
f=[c1 c2 c3 ….cn]  f is a vector(row matrix of n X 1)
A is the matrix of inequalities having a size of m X n
Aeq is the matrix of equalities having a size of k X n
LB-=[l1 l2 l3 ….ln]T x is a column matrix of 1 X n)
UB= [u1 u2, u3 ….un]T x is a column matrix of 1 X n)
Example
f=[10 5 12 13 20];
A= [10     6     1     0     8
     2     8     4     7     0
     6     9     8     4     7
     5     7     0     9     4
     9     2     1     5     8
     8     4     2     4     5
     5     9     2     8     7
     0     9     6     5     4
     8     4     3     2     3
     4     9     2     7     2];
b=[70    63   104    80    81    68   101    81    53    71]';
Aeq=[1 1 1 1 1]
beq=15;
LB=[0 0 0 0 0]'
UB=[20 20 20 20 20]'
X=linprog(f,A,b,Aeq,beq,LB,UB)
Solution
Optimization terminated.
X =
    2.1683
    0.0000
    9.6931
    2.8416
    0.2970
Quadratic programming
The command for implementing the matlab quadratic programming routine is ‘quadprog’.Let us consider a quadratic programming problem with ‘n’ variables, ‘m’ inequality constraints, ‘k’ equality constraints, and the lower, upper bounds LB and UB.
The quadratic programming is defined in matlab like this
   min 0.5*x'*H*x + f'*x    subject to:   A*x <= b, Aeq*x = beq ,LB≤ x ≤ UB
x-=[x1 x2 x3 ….xn]T x is a column matrix of 1 X n) to be determined.  
H= is a square matrix of n X n
f=[c1 c2 c3 ….cn]  f is a vector(row matrix of n X 1)
A is the matrix of inequalities having a size of m X n
Aeq is the matrix of equalities having a size of k X n
LB-=[l1 l2 l3 ….ln]T x is a column matrix of 1 X n)
UB= [u1 u2, u3 ….un]T x is a column matrix of 1 X n)
Example
Minimize x1^2+x1x2+x22+3x1+5x2
Subject to the constraints
x1+x2=20;
2x1+3x2≤100
[0 0]T≤x1,x2≤[50 50]T
H=[2 1;1 2];
f=[3 5];
A= [2 3];
b=[100];
Aeq=[1 1]
beq=20;
LB=[0 0 0 0 0]';
UB=[50 50]';
[X ff]=quadprog(H,f,A,b,Aeq,beq,LB,UB)
Solution
X =
   11.0000
    9.0000
ff is the objective function value
ff =  379.0000