Professional Documents
Culture Documents
Introduction
For this Problem-Based Learning activity, you and your colleagues represent a group
of electrical engineers commissioned by Tenaga Nasional Berhad (TNB) to develop
a new digital smart meter for measuring electricity consumption in a household
subscribed to a single-phase supply.
Your group has come up with a proof-of-concept design for the smart meter and is
now in the unit test phase. For this Problem-Based Learning (PBL) session, you are
tasked with two:
1. Propose an estimator of the voltage RMS
2. Compare the results of the unit test with a reference reading
Task 1
To read a voltage, the digital smart meter needs to sample the voltage from the
incoming AC supply line. It is typical to adapt the line voltage (230 V RMS, 50 Hz) to
a much lower voltage (0 – 5 V, 50 Hz) that can be used with a microcontroller
system. The adaptation scheme is given as in Figure 1.
R1
To microcontroller ADC
9 V RMS
230 V RMS
0–5V
s(t)
U(t) R2
AC Supply
Internal bias
voltage generator
10 μF
Vbias
2.5 V Microcontroller ground
The bias voltage 𝑉bias is used to bring the ‘zero level’ up to 2.5 V so that the input
voltage can vary from 0 V to 5 V.
𝑈(𝑡) = 𝐴0 cos(2𝜋𝑓0 𝑡 − 𝜙0 )
Where cos is the cosine function. We assume for simplicity that the frequency 𝑓0 =
50 Hz and the phase 𝜙0 = 0 radian. The objective of this task will be to estimate 𝐴0 ,
the sinusoid amplitude, from which the root-mean-square value is obtained
𝐴0
RMS =
√2
Note that there are two stages that step the voltage down from 230 V RMS to the
desired voltage:
1. The transformer ratio 𝑀 = 25.556
2. The resistor divider ratio 𝛼 = 0.1964
1
𝑠[𝑘] = ⋅ 𝛼 ⋅ 𝑈[𝑘] + 𝑉bias + 𝑤[𝑘]
𝑀
Primary Voltage Primary Current Power factor (𝜑) Power factor (𝜑ref )
RMS (V) RMS (A)
<data1> <data1> <data1> <data1>
<data2> <data2> <data2> <data2>
⋮ ⋮ ⋮ ⋮
A typical procedure to compare test data agreement between two devices is the
Bland-Altman analysis. It provides a graphical and quantitative analysis of the error
between the methods by plotting the average of two matched measures against the
difference of these measures. In theory, the average and difference of the measures
should not present any correlation. Figure 3 illustrates the case of ideal and non-
ideal outcome of the Bland-Altman analysis.
a) Calculate the average and the difference of the readings of the power factor
(3 marks)
b) Display the Bland-Altman plot for the power factor
(2 marks)
c) Observe the plot and propose a reason for such observation. You should
support your proposal by analysing the plot and determine some statistics
(e.g. correlation).
(5 marks)
Deliverables
On the day of the PBL session, the following items are required for grading
• Presentation of the results of both Tasks. Present only a summary of the
result.
• One (1) short report (<12 pages) detailing your works. The report should be
well-written and thorough: make sure you do your research!
Figure 3: Scatter plot of some data comparing two measurement methods A and B, and the
respective Bland-Altman plot. The top two graphs show the normal case where method A and B
matches or ‘agrees’ with each other. The bottom two graphs show an abnormal case where they do
not.
The least-squares estimation principle relies on the minimization of the cost function
T
𝐽(𝜃) = (𝑦 − 𝐻𝜃) (𝑦 − 𝐻𝜃)
By developing the expression above and taking a partial derivative with respect to
the unknown 𝜃, one can obtain the following least-square estimator
𝜃̂ = (𝐻 T 𝐻)−1 𝐻 T 𝑦