1 Introduction To State Estimation
1 Introduction To State Estimation
+
(
(
(
(
(
=
(
(
(
(
4
3
2
1
2
1
42 41
32 31
22 21
12 11
4
3
2
1
e
e
e
e
x
x
h h
h h
h h
h h
z
z
z
z
e = z - H x (6)
Just as
true
z = H x we can write,
.
z = H
.
x
where
.
x is the estimated state values and
.
z is the estimated measurements.
Estimated errors are obtained as
. .
= z - z e
.
= x H - z (7)
Substituting z = H x + e in eq. (7)
=
.
e H x + e - H
.
x = e - H (
.
x - x ) (8)
PROCEDURE
First find the estimated state
.
x
From this compute estimated measurement
.
z using
.
z = H
.
x
Finally find estimated error
.
e using
. .
= z - z e
.
= x H - z
It is to be noted that
.
x ,
.
z and
.
e are related.
We need to find the state variables for which weighted sum of squares
of errors is minimum. i.e. it is required to minimize
2
4 4
2
3 3
2
2 2
2
1 1
2
j
4
1 j
j
e w e w e w e w e w f + + + = =
=
(9)
Noting that error is related to and necessary conditions for f
to be minimum are
.
x = 0
]
x
e
e w
x
e
e w
x
e
e w
x
e
e w [ 2
x
f
21
4
4 4
2
3
3 3
2
2
2 2
2
1
1 1
2
c
c
+
c
c
+
c
c
+
c
c
=
c
c
]
x
e
e w
x
e
e w
x
e
e w
x
e
e w [ 2
x
f
1
4
4 4
1
3
3 3
1
2
2 2
1
1
1 1
1
c
c
+
c
c
+
c
c
+
c
c
=
c
c
.
x
.
x
.
x = 0
(10)
(11)
(
=
(
(
(
(
(
(
(
(
(
(
(
(
(
(
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
.
.
.
.
0
0
e
e
e
e
w
w
w
w
x
e
x
e
x
e
x
e
x
e
x
e
x
e
x
e
4
3
2
1
4
3
2
1
2
4
2
3
2
2
2
1
1
4
1
3
1
2
1
1
(12)
.
x
i
e
1
x
2
x
(
(
(
(
(
(
(
(
(
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
2
4
1
4
2
3
1
3
2
2
1
2
2
1
1
1
x
e
x
e
x
e
x
e
x
e
x
e
x
e
x
e
= -
(
(
(
(
42 41
32 31
22 21
12 11
h h
h h
h h
h h
= - H where matrix H =
(
(
(
(
42 41
32 31
22 21
12 11
h h
h h
h h
h h
Note that the elements of H matrix are independent of state variables x
1
and x
2
. This is true only
when the measurements are LINEARLY related to state variables as shown in eq. (1)
2 42 1 41 4 4
2 32 1 31 3 3
2 22 1 21 2 2
2 12 1 11 1 1
x h x h z e
x h x h z e
x h x h z e
x h x h z e
(3) eq. From
=
=
=
=
T
Using the above result in eq.(12) we have
(
(
(
(
42 41
32 31
22 21
12 11
h h
h h
h h
h h
(
=
(
(
(
(
(
(
(
(
(
(
.
.
.
.
0
0
e
e
e
e
w
w
w
w
4
3
2
1
4
3
2
1
(13)
We are more interested on
.
x rather than
.
e. We can replace
.
e by
.
x .
Using compact notation
MATRIX GAIN the as called is G
H W H G where
(14) z W H G x Therefore
z W H x H W H Thus
0 ) x H z ( W H i.e. 0 ) z z ( W H i.e. 0 e W H
T
T 1
T T
T T T
=
=
=
= = =
.
.
. . .
We expect
.
X to be close to the true values of X. Let us now develop an expression for
.
X - X.
Substituting z = H X + e in eq.(14) namely z W H G x
T 1
.
=
(15) e W H G X X Thus
e W H G X e W H G X H W H G ) e X H ( W H G X
T 1
T 1 T 1 T 1 T 1
.
.
=
+ = + = + =
For the example circuit
(
(
(
(
=
(
(
.
.
4
3
2
1
2 2
1 1
e
e
e
e
* * * *
* * * *
x x
x x
(16)
This means that any one or more of the four errors
4 3 2 1
e and e , e , e can influence the
difference between each of the state estimate and its true value. i.e. WLS calculation
spreads the effect of the error in any one measurement, to some or all the estimates.
Similarly, we can compute the estimated error as (using Eq. 15)
(17) e ) W H G H I (
e ) W H G ( H e ) X X ( H e X H e X H z z e
T 1
T 1
. . . .
=
= = + = =
Use of eqs. (15) and (17) will be given after introducing the statistical
properties of errors.
Summary of formulas:
z = H X + e
e = z - H X
Using WLS method, z W H G X
T 1
.
= where G = H W H
T
.
z = H
.
x
) X X ( H e X H e X H z z e = + = =
. . . .
Procedure for DC State Estimation:
1. Generally a set of measurements and weighting factors of errors will be the
input data.
2. Relate each measurement to the state variables and thereby find the H
matrix.
3. Compute the gain matrix G from G = H
T
W H
4. Determine estimated state variables from z W H G x
T 1
.
=
5. Compute
. .
= x H z
6. Calculate the estimated errors from
. .
= z - z e
Example 1
In the dc circuit of Fig.1, the meter readings are
1
z = 9.01 A,
2
z = 3.02 A,
3
z = 6.98 V and
4
z = 5.01 V. Assuming that the ammeters are more
accurate than the voltmeters, let us assign the measurement weight
100 w
1
= , 50 w and 50 w 100, w
4 3 2
= = = respectively. Determine WLS
estimates of the voltage sources
2 1
V and V . Also calculate the estimated
measurements and the estimated errors in the measurements.
Solution
Given ;
50
50
100
100
W ;
5.01
6.98
3.02
9.01
z
(
(
(
(
=
(
(
(
(
=
it is required to find
. . .
e and z , x .
For the DC circuit shown in Fig. 1, measurements are related to the state
variables as
Thus
(
(
(
(
=
0.375 0.125
0.125 0.375
0.625 0.125
0.125 0.625
H
4 2 1 4
3 2 1 3
2 2 1 2
1 2 1 1
e x
8
3
x
8
1
z
e x
8
1
x
8
3
z
e x
8
5
x
8
1
z
e x
8
1
x
8
5
z
+ + =
+ + =
+ + =
+ =
Gain matrix G = H W H
T
W H
T
=
(
0.375 0.125 0.625 0.125
0.125 0.375 0.125 0.625
(
(
(
(
50
50
100
100
=
(
18.75 6.25 62.50 12.50
6.25 18.75 12.50 62.50
Gain matrix G =
(
18.75 6.25 62.50 12.50
6.25 18.75 12.50 62.50
(
(
(
(
0.375 0.125
0.125 0.375
0.625 0.125
0.125 0.625
=
(
48.4375 10.9375
10.9375 48.4375
Its inverse
1
G
=
(
0.0218 0.0049
0.0049 0.0218
Estimated state vector
z W H G X
T 1
.
=
=
(
0.0218 0.0049
0.0049 0.0218
(
18.75 6.25 62.50 12.50
6.25 18.75 12.50 62.50
(
(
(
(
5.01
6.98
3.02
9.01
=
(
5.01
6.98
3.02
9.01
=
(
V 8.0261
V 16.0072
G
-1
H
T
W
Estimated measurements
. .
= X H Z =
(
(
(
(
0.375 0.125
0.125 0.375
0.625 0.125
0.125 0.625
(
8.0261
16.0072
=
(
(
(
(
5.01070
7.00596
3.01544
9.00123
Estimated errors
. .
= z z e =
(
(
(
(
5.01
6.98
3.02
9.01
-
(
(
(
(
5.01070
7.00596
3.01544
9.00123
=
(
(
(
(
V 0.00070 -
V 0.02596 -
A 0.00456
A 0.0877
In the proceeding example the state of the system is estimated using WLS
method. The results are of little values if we cannot measure, by some
means, how good the estimate is.
Consider for instance, that the voltmeter reading
4
z of Fig.1 is 4.40 V
rather than 5.01 V used in Example 1. If other three meter readings are
unchanged, we can determine
.
X ,
.
z and
.
e as follows.
z W H G X
T 1
.
=
=
(
4.40
6.98
3.02
9.01
=
(
V 7.75860
V 15.86807
. .
= X H z =
(
(
(
(
0.375 0.125
0.125 0.375
0.625 0.125
0.125 0.625
(
7.75860
15.86807
=
(
(
(
(
4.89298
6.92035
2.86562
8.94772
. .
= z z e =
(
(
(
(
4.40
6.98
3.02
9.01
-
(
(
(
(
4.89298
6.92035
2.86562
8.94772
=
(
(
(
(
V 0.49298 -
V 0.05965
A 0.15438
A 0.06228
It is meaningless to compare the results obtained in the above two cases,
because at any one time, only one set of measurement will be available.
Given a set of measurements, how we can decide if the corresponding
results should be accepted as good estimates of the true values? What
criterion for acceptance is reasonable?
If a grossly erroneous meter reading is present, can we detect that fact and
identify the BAD DATA ?
STATISTICS, ERRORS AND ESTIMATES
Generally unavoidable random noise enters into measurement
process and distorts the results from the true values.
Repeated measurements of the same quantity reveals certain
statistical properties from which the true value can be estimated.
If the measured values of a random variable are plotted, taking
the measured values along the horizontal axis and their relative
frequency of occurrence along the vertical axis, a bell shaped
function is obtained. This function is called the Gaussian or
normal probability density function and has the formula
(18)
2
)
x
(
2
1
2
1
f(x)
=
where x: randam variable
: mean or expected value of x = E(x)
: standard deviation of x
This function will have the maximum value when x =
The probability of x to lie between to + is 0.342
Area under the curve gives the probability with the corresponding
intervals of the horizontal axis.
f(x) has its maximum value when x equals , which is the expected
value of x, denoted by E(x) and defined by
}
= = dx ) (x f x ) (x E
The expected value is often called the MEAN.
(19)
The degree to which the curve f(x) spreads out about depends on
the variance of x defined by
2
dx ) x ( f ) x ( ] ) x ( [ E
2 2 2
}
= = (20)
The positive square root of the variance is the standard deviation
of x.
The total area of the curve is one.
We assume that the noise terms
4 3 2 1
e and e , e , e are independent Gaussian
random variables with zero means and the respective variances are
. and , ,
2
4
2
3
2
2
2
1
Two random variables
j i
e and e are independent when E (
j i
e e ) = 0 for j i = .
Later we encounter the product vector, e and its transpose
T
e . This is
given by
e
T
e =
(
(
(
(
4
3
2
1
e
e
e
e
| |
(
(
(
(
(
=
2
4 3 4 2 4 1 4
4 3
2
3 2 3 1 3
4 2 3 2
2
2 1 2
4 1 3 1 2 1
2
1
4 3 2 1
e e e e e e e
e e e e e e e
e e e e e e e
e e e e e e e
e e e e (21)
The expected values of diagonal elements are nonzero and correspond to
the variance. Then the expected value of Eq.(21) becomes
E ( e
T
e ) = R =
(
(
(
(
(
2
4
2
3
2
2
2
1
0 0 0
0 0 0
0 0 0
0 0 0
(22)
We know
1 true 1 1
e z z + =
The shift of e
1
by z
1 true
in no way alter the shape and spread of the
probability density function of e
1
. Hence, z
1
also has a Gaussian
probability density function with a mean value
1
equal to the true value
z
1 true
and variance
1
2
equal to that of e
1
. Similar remarks are applicable to
other three measurements also.
Meters with smaller error variances have narrower curves and provide
more accurate measurements. In formulating the objective function f of
Eq. (9), preferential weighting is given to more accurate measurements by
choosing the weight w
i
as the reciprocal of the corresponding variance
i
2
.
Henceforth, we specify the weighting matrix W of Eqs. (15) and (17) as
(
(
(
(
(
(
(
(
(
= =
2
4
2
3
2
2
2
1
1
1
R W (23)
and the gain matrix G then becomes
H R H G
1 T
= (24)
In Example 1, the weight for the first ammeter is taken as 100. This means
that its variance is 1/100 = 0.01. Thus its standard deviation is 0.1. This
means that there is 99% probability for this ammeter, when functioning
properly, to give readings within 0.3 A (3 = 0.3 A) deviation from the true
values of its measured current. Similar interpretation can be given for the
other meters.
Let us see how close the estimated value is to the true value.
From Eq. (19),
which defines the expected value the random variable x, we can show that
E[ax + b] = a E[x] + b if a and b are constants. Therefore, taking the
expected value of both side of Eq.(15) namely
(15) e W H G X X
T 1
.
= gives
(
(
] x x [ E
] x x [ E
2
^
2
1
^
1
=
(
(
2
^
2
1
^
1
x x [ E
x x [ E
]
]
= G
-1
H
T
R
-1
(
(
(
(
] e [ E
] e [ E
] e [ E
] [e E
4
3
2
1
=
(
0
0
(25)
From the above equation it follows that
E [
i
^
i
x ] x = (26)
which implies that the WLS estimate of each state variable has an expected
value equal to the true value.
}
= = dx ) (x f x ) (x E
Similarly we can find how close estimated measurement is to the true
measurement.
Consider (17) e ) W H G H I ( z z e
T 1
. .
= =
Then E
(
(
(
(
(
(
^
4
^
3
^
2
^
1
e
e
e
e
= E
(
(
(
(
(
(
^
4 4
^
3 3
^
2 2
^
1 1
z z
z z
z z
z z
= [ I - H G
-1
H
T
W ] E
(
(
(
(
4
3
2
1
e
e
e
e
=
(
(
(
(
0
0
0
0
(27)
From the above
E [
^
j
z ] = E [ z
j
] = E [ z
j true
+ e
j
] = z
j true
(28)
Equations (26) and (28) state that the WLS estimates of the state variables
and the measured quantities, on the average, are equal to their true values -
an obviously desirable property, and the estimates are said to be unbiased.
The estimated values can be accepted as unbiased estimates of the true
values provided no bad measurement data are present.
TEST FOR BAD DATA
When the system model is correct and the measurements are accurate,
there is good reason to accept the state estimates calculated by the WLS
estimator. But if a measurement is grossly erroneous or bad, it should be
detected and then identified so that it can be removed from estimator
calculations. The statistical properties of the measurement errors facilitate
such detection and identification.
As seen from Eq. (27), each estimated measurement error,
^
j
e = ( z
j
-
^
j
z ) is a
Gaussian random variable with zero mean. A formula for the variance of
^
j
e
can be determined from Eq. (17) namely
(17) e ) W H G H I (
e ) W H G ( H e ) X X ( H e X H e X H z z e
T 1
T 1
. . . .
=
= = + = =
in two steps.
Step 1
Using Eq. (17)
^
e
T
^
e = (z -
^
z ) (z -
^
z )
T
= [ I - H G
-1
H
T
R
-1
] e e
T
[ I - R
-1
H
G
-1
H
T
] (29)
It is to be noted that
1. LHS of Eq. (29) is a square matrix.
2. The two matrices on the RHS contain only constant elements and are
transpose of one another.
3. As seen in Eq. (22) E [ e e
T
] = R
Step 2
We take the expected value of both sides of Eq. (29)
E [
^
e
T
^
e ] = [ I - H G
-1
H
T
R
-1
] E [ e e
T
] [ I - R
-1
H
G
-1
H
T
]
= [ I - H G
-1
H
T
R
-1
] R [ I - R
-1
H
G
-1
H
T
]
= [ I - H G
-1
H
T
R
-1
] [ R - H G
-1
H
T
]
= [ I - H G
-1
H
T
R
-1
] [ R - H G
-1
H
T
R
-1
R ]
= [ I - H G
-1
H
T
R
-1
] [ I - H G
-1
H
T
R
-1
] R (30)
It can be verified that the matrix [ I - H G
-1
H
T
R
-1
] multiplied by itself
remains unaltered and so
E [
^
e
T
^
e ] = [ I - H G
-1
H
T
R
-1
] R
= R - H G
-1
H
T
(31)
The square matrix
^
e
T
^
e takes the form of Eq. (21) with typical entries given
by
^
j
^
i
e e . Therefore, substituting for
^
j
e = ( z
j
-
^
j
z ) in the diagonal entries,
we obtain
E [
2
^
j
e ] = E [ (z
j
-
^
j
z )
2
] = R
j j
(32)
where
R
j j
is symbol for the jth diagonal element of the matrix R
= R - H G
-1
H
T
.
Eq. (32) is actually the formula for the variance of
^
j
e , which makes j j
'
R
the standard deviation. Dividing each side of Eq. (32) by the number R
j j
gives
E
(
(
(
j j
'
2
^
j
R
e
= 1 (33)
E
(
(
(
j j
'
2
^
j
R
e
= 1 (33)
(34)
R
e
that interpreat can we above, the From
j j
'
^
j
is a STANDARD GAUSSIAN RANDAM VARIABLE with zero mean and
variance equals to 1.
Matrices R, given by R =
(
(
(
(
(
2
4
2
3
2
2
2
1
0 0 0
0 0 0
0 0 0
0 0 0
is the covariance matrix while
R
= R - H G
-1
H
T
is known as the modified covariance matrix.
Also from Eq. (15) namely e W H G x x
T 1
^
= we get
( x -
^
x ) ( x -
^
x )
T
= G
-1
H
T
R
-1
e e
T
R
-1
H G
-1
. Therefore,
E [ ( x -
^
x ) ( x -
^
x )
T
] = G
-1
H
T
R
-1
R R
-1
H G
-1
= G
-1
H
T
R
-1
H G
-1
= G
-1
= (H
T
R
-1
H)
-1
(35)
Now let us see how to detect the presence of bad data.
It is to be recalled that true measurement error e
j
, given by z
j
- z
j true
, is
never known in engineering applications. The best that can be done is to
calculate the estimated error
^
j
e , which then replaces e
j
in the objective
function. Accordingly, objective function value is obtained as
(36)
e
e w f
m m
N
1 j
2
j
2
^
j
2
N
1 j
^
j j
^
= =
= =
where N
m
is the number of measurements and the weighting factor w
j
is set
equal to 1/
j
2
. This weighted sum of squares of estimated errors,
^
f itself is
a random variable which has a well known probability distribution with
values (areas) already available in tabulated form. In order to use those
tables, we need to know the mean value of
^
f which can be determined as
discussed below.
(36)
e
e w f
m m
N
1 j
2
j
2
^
j
2
N
1 j
^
j j
^
= =
= =
Multiplying the numerator and the denominator of each term in Eq. (36) by
the calculated variance R
j j
we get
(37)
R
e R
f
m
N
1 j
2
j j
'
2
j
^
j
j j
'
^
=
=
Taking the expected value on both sides we get
E [ ] f
^
= E
(
(
(
=
m
N
1 j
j j
'
2
^
j
2
j
j j
'
R
e
R
(38)
Use of Eq. (33), namely E
(
(
(
j j
'
2
^
j
R
e
= 1 in the above results in
E [ ] f
^
=
=
m
N
1 j
2
j
j j
'
R
(39)
(The above result will be more clear by expanding Eq. (38), taking N
m
= 4)
For the dc circuit considered in Example 1, it will be shown in Example 2,
that the right hand side of the above equation has the numerical value of 2
(= 4- 2) for the four measurements and two state variables. More generally,
the expected value of
^
f is always numerically equal to the number of
degrees of freedom; i.e.
E [ ] f
^
= N
m
- N
s
(40)
where N
m
is the number of measurements and N
s
is the number of state
variables.
Thus the mean value of
^
f is an integer which is equal to N
m
- N
s
. This
number is also called as redundancy of the measurement scheme.
Statistical theory shows that the weighted sum of squares of estimated
errors
^
f has Chi-square distribution
2
k,
where is a Greek letter called
Chi, k is the number of degrees of freedom and relates to the area under
the
2
k,
curve. The Chi-square distribution very closely matches the
standard Gaussian distribution when k is large (k > 30), which is often the
case in power system applications.
p( )
2
for k degree of freedom
2
k,
Area (1 - )
Area
The figure below shows the probability density function of
2
k,
for a
representative small value of k. As usual, the total area under the curve
equals to 1, but here it is not symmetrically distributed.
The area under the curve to the right of k,
2
in Fig. equals . which is the
probability that
^
f
exceeds
k,
2
. The remaining area under the curve is the
probability (1 - ) that the calculated value of the
^
f
with k degree of
freedom, will take on a value less than
k,
2
i.e.
Pr (
^
f <
k,
2
) = (1 - )
(41)
Based on this, the critical value of
^
f
can be determined using the tabulated
value of
k,
2
shown in the Table below.
Table 1: Critical values of
2
k,
k 0.05 0.025 0.01 0.005 k 0.05 0.025 0.01 0.005
1 3.84 5.02 6.64 7.88 11 19.68 21.92 24.73 26.76
2 5.99 7.38 9.21 10.60 12 21.03 23.34 26.22 28.30
3 7.82 9.35 11.35 12.84 13 22.36 24.74 27.69 29.82
4 9.49 11.14 13.28 14.86 14 23.69 26.12 29.14 31.32
5 11.07 12.83 15.09 16.75 15 25.00 27.49 30.58 32.80
6 12.59 14.45 16.81 18.55 16 26.30 28.85 32.00 34.27
7 14.07 16.01 18.48 20.28 17 27.59 30.19 33.41 35.72
8 15.51 17.54 20.09 21.96 18 28.87 31.53 34.81 37.16
9 16.92 19.02 21.67 23.59 19 30.14 32.85 36.19 38.58
10 18.31 20.48 23.21 25.19 20 31.41 34.17 37.57 40.00
For example, choosing = 0.01 and k = (N
m
- N
s
) = 2, we can conclude that
the calculated value of
^
f
is less than the critical value of 9.21 with a
probability of (1 - 0.01) or 99% confidence since
2
0.01 2,
in Table.
The statistical properties of the measurement errors facilitate detection and
identification of bad measurement data.
The Chi-square distribution of
.
f provides a test for detection of bad
measurement. The procedure is as follows:
- Use the raw measurements z from the system to determine the WLS
estimates x of the system state from
z W H G x
T 1
.
=
- Substitute the estimates
.
x in equation
. .
= x H z .
- Calculated the estimated errors
. .
=
j j j
z z e
- Evaluate the sum of weighted squared estimated errors from
=
.
=
. .
= =
m m
N
1 j
2
j
2
j
N
1 j
2
j j
e
e w f (29)
- For the appropriate number of degrees of freedom
s m
N N k = and
a specified probability , find the critical Chi-square value
2
k,
from Table 1. Determine whether or not
.
f <
2
k,
(30)
is satisfied. If it is, then the measured raw data and the estimated
values of the state variables are accepted as being accurate.
- When the requirement of inequality (30) is not met, there is reason to
suspect the presence of at least one bad measurement. In that case
compute the diagonal elements of modified covariance matrix R
given by
R ] R H G H I [ R R H G H R H G H R R
1 T 1 -1 T 1 T 1 '
= = = (31)
and designate them as
'
j j
R .
It is to be noted that matrix R
is independent of measurements.
- Omit the measurement corresponding to the largest standardized
error, (considering only the magnitudes) namely
'
j j
j
R
e
.
(32)
and reevaluate the state estimates along with the sum of weighted
squared errors
.
f .
- If the new value of
.
f satisfies the Chi-square test of inequality (30),
then the omitted measurement has been successfully identified as
the bad data.
Example 2
Suppose that the weighting factors
4 1
w to w in Example 1 are the
corresponding reciprocals of error variances for the four meters of Fig,1.
Show that the expected value of
.
f is equal to the degree of freedom.
Solution
Expected value of
.
f is given by
=
.
=
m
N
1 j
2
j
'
j j
R
] f [ E
First let us evaluate the diagonal elements of
T 1 '
H G H R R
=
To take advantage of previous calculations in Example 1, we write the
matrix
'
R in the form
R ] R H G H I [ R
1 T 1 '
=
Then from Example 1, taking value of
1 T 1
R H G
we can compute
1 T 1
R H G H
=
(
(
(
(
(
0.4386 0.2281 1.2982 0.0351
0.2281 0.4386 0.0351 1.2982
0.375 0.125
0.125 0.375
0.625 0.125
0.125 0.625
Only the diagonal elements resulting from this equations are required or
calculating ] f [ E
.
.
1 T 1
R H G H
=
(
(
(
(
0.1930 * * *
* 0.1930 * *
* * 0.8070 *
* * * 0.8070
(
(
(
(
(
(
(
(
(
(
(
(
(
=
(
(
(
(
(
2
4
2
3
2
2
2
1
'
44
'
33
'
22
'
11
. . .
. . .
. . .
. . .
0.1930 * * *
* 0.1930 * *
* * 0.8070 *
* * * 0.8070
1 . . .
. 1 . .
. . 1 .
. . . 1
R . . .
. R . .
. . R .
. . . R
31 eq. From ,
The expected value of
.
f is
=
.
=
4
1 j
2
j
'
j j
R
] f [ E
=
2
4
2
4
2
3
2
3
2
2
2
2
2
1
2
1
) 0.193 1 (
) 0.193 1 (
) 0.807 1 (
) 0.807 1 (
+
= ( 1 + 1 + 1 + 1 ) ( 0.807 + 0.807 + 0.193 + 0.193 ) = 4 2 = 2
which is the number of degrees of freedom when the system of Example 1
has 4 measurements and 2 state variables.
Example 3
Using the Chi-square test of inequality
.
f <
2
k,
check for the presence
of bad data in raw measurements of Example 1. Choose = 0.01.
Solution
2 N and 4 N
s m
= = . Then k = 4 2 = 2
With k = 2 and = 0.01, Chi-square critical value
2
0.01 2,
as given in Table
1 is 9.21.
In Example 1,
(
(
(
(
=
(
(
(
(
(
(
.
.
.
.
0.00070
0.02596
0.00456
0.00875
e
e
e
e
4
3
2
1
Estimated sum of squares
.
f , is calculated as
=
.
.
=
4
1 j
2
j
2
j
e
f =
2
4
2
3
2
2
2
1
e 50 e 50 e 100 e 100
. . . .
+ + +
=
2 2 2 2
) 0.00070 ( 50 ) 0.02596 ( 50 ) 0.00456 ( 100 ) 0.00877 ( 100 + + +
= 0.043507
This value is less than the Chi-square critical value of 9.21. Therefore, we
conclude that the raw measurement set of Example 1 has no bad
measurement.
Example 4
Suppose that the raw measurement set for the system of Fig.1 is given by
(
(
(
(
=
(
(
(
(
V 4.40
V 6.98
A 3.02
A 9.01
z
z
z
z
4
3
2
1
Check for the presence of bad data using Chi-square test for = 0.01.
Eliminate any bad data detected and calculate the resultant state estimate
from the reduced data set.
Solution
For the given set of measurement we already calculated the estimated
errors as
(
(
(
(
=
(
(
(
(
(
(
.
.
.
.
0.49298 -
0.05965
0.15439
0.06228
e
e
e
e
4
3
2
1
Therefore
.
f =
2
4
2
3
2
2
2
1
e 50 e 50 e 100 e 100
. . . .
+ + +
=
2 2 2 2
) 0.49298 ( 50 ) 0.05965 ( 50 ) 0.15439 ( 100 ) 0.06228 ( 100 + + +
= 0.3879 + 2.3836 + 0.1779 + 12.1515 = 15.1009
This value of
.
f exceeds
2
0.01 2,
value of 9.21 and so we conclude that there
is at least one bad measurement. The standardized error estimates are
next calculated using the diagonal elements
'
j j
R as follows:
Matrix R
= [ I H G
-1
H
T
R
-1
] R
Then taking value of
1 T 1
R H G
from Example 1, we can compute
1 T 1
R H G H
=
(
(
(
(
(
0.4386 0.2281 1.2982 0.0351
0.2281 0.4386 0.0351 1.2982
0.375 0.125
0.125 0.375
0.625 0.125
0.125 0.625
Only the diagonal elements resulting from this equations are required,
diag. elements of
1 T 1
R H G H
=
(
(
(
(
0.1930 * * *
* 0.1930 * *
* * 0.8070 *
* * * 0.8070
From eq. 31, knowing R
= [ I H G
-1
H
T
R
-1
] R
(
(
(
(
(
(
(
(
(
(
(
(
(
=
(
(
(
(
(
2
4
2
3
2
2
2
1
'
44
'
33
'
22
'
11
. . .
. . .
. . .
. . .
0.1930 * * *
* 0.1930 * *
* * 0.8070 *
* * * 0.8070
1 . . .
. 1 . .
. . 1 .
. . . 1
R . . .
. R . .
. . R .
. . . R
R
=
(
(
(
(
(
(
(
(
50
0.193 - 1
. . .
.
50
0.1930 - 1
. .
. .
100
0.807 - 1
.
. . .
100
0.807 - 1
;
'
R =
(
(
(
(
0.1270 . . .
. 0.1270 . .
. . 0.04393 .
. . . 0.04393
Standardized estimated errors are computed as
3.8804
0.127
0.49298
R
e
0.4697
0.127
0.05965
R
e
3.5145
0.04393
0.15439
R
e
1.4177
0.04393
0.06228
R
e
'
44
4
'
33
3
'
22
2
'
11
1
=
=
= =
= =
= =
.
.
.
.
The magnitude of the largest standardized error corresponds to
measurement
4
z in this case. Therefore we identify
4
z as the bad
measurement and omit it, from the state estimation calculations. With the
three remaining measurements
. .
e hence and x are now computed.
H =
(
(
(
0.125 0.375
0.625 0.125
0.125 0.625
H
50
100
100
0.125 0.625 0.125
0.375 0.125 0.625
H R H G
1 T
(
(
(
= =
=
(
=
(
(
(
41.40625 13.28125
13.28125 47.65625
0.125 0.375
0.625 0.125
0.125 0.625
6.25 62.5 12.5
18.75 12.5 62.5
z R H G x
1 T 1
.
=
=
(
0.026522 0.007391
0.007391 0.023043
(
6.25 62.5 12.5
18.75 12.5 62.5
z
=
(
=
(
(
(
V 8.0265
V 16.0074
6.98
3.02
9.01
0.30435 1.56522 0.13044
0.477826 0.17391 1.34783
This gives
(
(
(
=
(
(
(
(
= =
. .
A 7.0061
A 3.0157
A 9.0013
8.0265
16.0074
0.125 0.375
0.625 0.125
0.125 0.625
X H Z
Thus
(
(
(
=
(
(
(
(
(
(
= =
. .
0.0261
0.0043
0.0087
7.0061
3.0157
9.0013
6.98
3.02
9.01
Z Z e
Sum of squares
.
f is calculated as
=
.
.
=
3
1 j
2
j
2
j
e
f =
2
3
2
2
2
1
e 50 e 100 e 100
. . .
+ +
= 0.0435 ) 0.0261 ( 50 ) 0.0043 ( 100 ) 0.0087 ( 100
2 2 2
= + +
Corresponding to k = 1 and = 0.01, Chi-square critical value is 6.64. Thus
.
f <
2
k,
. This means that the calculated state of
V 8.0265 x V, 16.0074 x
2 1
= = is quite acceptable. The new state estimate
based on the three good measurements essentially match those of
Example 1. ( V 8.0261 x V, 16.0072 x
2 1
= = )
+
Fig. 1
V
2
V
1
1
1
1
1
1
x
1 x
2
x
3
+
+
+
-
-
-
-
z
1
z
2
z
3
z
4
PROBLEM SET 1
1. Consider the circuit shown in Fig. 1, in which three loop current variables are
identified as x
1
, x
2
and x
3
. Measurement weights are w
1
= 100, w
2
= 100, w
3
= 50
and w
4
= 50. Meter readings are z
1
= 9.01 A, z
2
= 3.02 A, z
3
= 6.98 V and z
4
= 5.01 V.
Determine the weighted least square estimate of the three loop currents.
Determine the source voltages V
1
and V2 using (i) estimated loop currents (ii)
estimated measurements.
A A
V
V
2 1
+
Fig. 1
V
2
V
1
1
1
1
1
1
x
1 x
2
x
3
+
+
+
-
-
-
-
z
1
z
2
z
3
z
4
2. In the circuit shown in Fig. 1, consider the voltages at nodes 1 and 2 as state
variables. Measurements and measurement weights are same as in problem 1.
Determine the weighted least square estimates of the nodal voltages. Also
calculate the estimated measurements and estimated errors.
A A
V
V
2 1
Fig. 2
1
3
3
1
3
-
+
+
+
+
+
-
-
-
-
I
2 I
1
3. Five ammeters numbered A
1
to A
5
are used in the dc circuit shown in Fig. 2 to
determine the two unknown sources I
1
and I
2
. The standard deviations of meter
errors are 0.2 A for meters A
2
and A
5
. and 0.1 A for the other three meters. The
readings of the five meters are: 0.12 A, 1.18 A, 3.7 A, 0.81 A and 7.1 A
respectively.
a) Determine the weighted least square estimate of the source currents I
1
and I
2
.
b) Using the Chi-square test for = 0.01, identify the bad measurement, if any.
c) Find the WLS estimates of the source currents using reduced data set and
check if the result is statistically acceptable.
A
1
1
2 3
A
2
A
5
A
3
A
4
4. Redo Problem 3 when the unknowns to be determined are not the source
currents but, rather, the voltages at the nodes 1, 2 and 3 in Fig. 2.
5. Consider the circuit of Fig. 2 for which accuracy of ammeters and their
readings are the same as those specified in Problem 3. It is required to estimate
voltages at nodes 1, 2 and 3 treating those node voltages as state variables for
the following cases.
a) Suppose that meters A
4
and A
5
are found to be out of order, and therefore
only three measurements z
1
= 0.12 A, z
2
= 1.18 A and z
3
= 3.7 A are available.
Determine WLS estimate of the nodal voltages and the estimated errors.
b) Suppose meters A
2
and A
5
are out of order and measurements z
1
= 0.12 A, z
3
= 3.7 A and z
4
= 0.81 A, can the nodal voltages be estimated? Explain why by
examining the gain matrix.
6. Suppose that the two voltage sources of circuit shown in Fig. 1 are replaced
with new ones, and the meter readings are z
1
= 2.9 A, z
2
= 10.2 A, z
3
= 5.1 V and z
4
= 7.2 V. Measurement weights are: w
1
= 100, w
2
= 100, w
3
= 50 and w
4
= 50.
a) Taking the source voltages as state variables, determine their WLS estimates.
b) Using the Chi-square test for = 0.005, detect bad data.
c) Eliminate the bad data and determine again the WLS estimates of the source
voltages.
d) Check the result in part c again using Chi-square test.
40 MW
60 MW
70 MW
50 MW
Fig. 3
7. Five wattmeters are installed on the four-bus system of Fig. 3 to measure line
real power flows, where per-unit reactances of the lines are X
12
= 0.05, X
13
= 0.1,
X
23
= 0.04, X
24
= 0.0625 and X
34
= 0.08. Suppose that the meter readings show that
z
1
= P
12
= 0.34 p.u., z
2
= P
13
= 0.26 p.u., z
3
= P
23
= 0.17 p.u., z
4
= P
24
= - 0.24 p.u. and
z
5
= P
34
= - 0.22 p.u. where the variances of measurement error of all the meters
are given by
i
2
= 0.01
2
.
z
1
z
5
z
4
z
3
z
2
1
G
G
2
3 4
a) Apply the dc power flow method with bus 1 as reference and determine the
measurement Jacobian matrix H. Then compute WLS estimate of the phase
angles of the bus voltages in radians.
b) Using the Chi-square test for = 0.01, identify two bad measurements. If both
bad measurements are eliminated simultaneously, would it be possible to
estimate the states of the system?
c) Eliminate one of the bad measurements identified in part b and determine the
WLS estimates of the phase angles of the bus voltages using the reduced data
set. Do the same for the other bad measurement.
ANSWERS
1.
(
(
(
^
3
^
2
^
1
x
x
x
=
(
(
(
A 2.0100
A 3.0133
A 9.0033
; V
1
= 15.9966 V V
2
= 8.0366 V
2.
(
2
1
V
V
=
(
V 5.0107
V 7.0060
; z
^
=
(
(
(
(
5.0107
7.0060
3.0154
9.0013
; e
^
=
(
(
(
(
0.0007 -
0.0260 -
0.0046
0.0087
3.
(
^
2
^
1
I
I
=
(
A 8.0451
A 3.7218
; z
4
is identified as bad measurement.
(
^
2
^
1
I
I
=
(
A 8.2276
A 3.7576
4.
(
(
(
3
2
1
V
V
V
=
(
(
(
V 7.0375
V 2.9351
V 3.6595
; No bad data
5.
(
(
(
3
2
1
V
V
V
=
(
(
(
V 6.88
V 3.34
V 3.70
; Node 3 is not represented and hence node voltages cannot be
estimated.
6.
(
2
1
V
V
=
(
V 17.6649
V 8.0018
; z
2
is identified as the bad measurement.
(
2
1
V
V
=
(
V 16.5909
V 7.9727
; No bad data.
7. H =
(
(
(
(
(
(
12.5 12.5 0
16 0 16
0 25 25
0 10 0
0 0 20
;
(
(
(
4
3
2
=
(
(
(
rad 0.0040 -
rad 0.0240 -
rad 0.0175 -
Note that the standardized errors for the 4
th
and 5
th
measurements are equally
bad. If both are discarded, bus 4 will be virtually be disconnected from the
system, making state estimation impossible, The elimination of both z
4
and z
5
is
equivalent to deleting the 4
th
and 5
th
rows from H. it is easy to check that the
resulting gain matrix cannot be inverted.
By deleting z
4
:
(
(
(
4
3
2
=
(
(
(
rad 0.0068 -
rad 0.0244 -
rad 0.0174 -
By deleting z
5
:
(
(
(
4
3
2
=
(
(
(
rad 0.0024 -
rad 0.0244 -
rad 0.0174 -