# Dynamic Impedance Estimation: Challenges and Considerations
## 2 Transducers Online Equalization
### Illustrative Results  
To illustrate the methodology's feasibility, a 15-bar system [22] was simulated in Simulink/SimPowerSys. A resistive divider was fixed at bus 2, and inductive VT was connected at bus 10. Figure 3 shows the frequency response of the inductive VT. Note that the transducer has a resonance in the 2.711 kHz component. Thus, the upper harmonics will have their magnitude and phase significantly altered by the transducer.  
Now, consider the voltage signal measured on the _p_-bus, where the reference transducer was connected, is described by:  
\[v(t)=Acos(\omega_{0}t)+0.025 Acos(5\omega_{0}t)+0.025 Acos(7\omega_{0}t)+0.025A cos(27\omega_{0}t)+0.025 Acos(34\omega_{0}t) \tag{1}\]  
where \(A\) is the rated voltage and \(\omega_{0}\) is the fundamental frequency.  
The transfer function between nodes \(p\) and \(q\) was previously estimated and introduced in the methodology presented in Figure 2. The samples of _d[n]_ and _u[n]_ were acquired to be used in equalization. The adaptive RLS algorithm shown in Algorithm 1 was used to estimate the parameters of the equalizer filter. After the coefficients' convergence, the equalizer is applied, and the harmonic phasors are estimated using the FFT. The results obtained are then compared with those expected, as described in Equation (1).  
Figure 3: The frequency response of a typical voltage transducer.  
```
1 Inputs:
2 x[n] the voltage (or current) at secondary of VT (or CT)
3 d(n) the voltage (or current) at secondary of the reference VT (or CT)
4\(H_{pq}\)(z) the transfer function between bus \(p\) and \(q\)
5 Initialization:
6\(\mathbf{P}[0]=\delta^{-1}\;\mathbf{I}\;,\delta:\;small\;positive\;constant\)
7\(\mathbf{\hat{w}}[0]=\mathbf{0}\;,\) or initializes with prior knowledge
8 M order of the equalizer
9 N size for FFT
10 For\(\mathbf{n=1,2,\ldots\mathbf{\hat{w}}}\) Do:
11\(u[n]=filter(x[n])\)
12\(\mathbf{U}[n]=[u[n]\;u[n-1]\ldots u[n-M+1]^{T}\)
13\(\mathbf{k}[\mathbf{n}]=\frac{1\cdot\mathbf{P}[n]-\mathbf{\hat{w}}[n]}{1+\lambda^{-1}\cdot\mathbf{ P}[n]}\;\mathbf{\hat{P}[n-1]}\;\mathbf{\hat{w}}[n]\)
14\(y[n]=\mathbf{\hat{w}}[n-1]\;\mathbf{U}[n]\)
15\(\mathcal{E}[n]=d[n]-y[n]\)
16\(\mathbf{\hat{w}}[n]=\mathbf{\hat{w}}[n-1]+\mathbf{k}[n]\;\mathcal{E}^{*}[n]\)
17\(\mathbf{P}[n]=\lambda^{-1}\;\mathbf{P}[n]-\lambda^{-1}\;\mathbf{k}[n]\;\mathbf{U}^{H}[n]\;\bm {P}[n]n-1)\)
18 No convergence obtained then go to 3.1
19 Convergence is obtained at \(\mathbf{n=n_{0}:}\)
20Y=\([y[n_{0}]\;y[n_{0}+1]\ldots\;y[n_{0}+N-1]\;]^{T}\)
21 Compute FFT(\(\gamma\))
22 Go to 3.1
```  
**Algorithm 1** The switching time instants to update the parameterization are integer multiples of a prefixed basic minimum constant sampling interval  
Figure 4 shows the TVE (total vector error) before and after equalization. The IEEE standard C37.118.2-2011 [23] specifies that the maximum TVE should be 1%. Before equalization, the TVE (%) for the transducer (black lines) had high values for interest harmonics. For example, harmonic 34 was close to 53%, as can be seen in the graphic. After the equalization (red lines), it is possible to observe a significant reduction in the TVE for all harmonics, which confirms the transducer frequency response's improvement. In the zoom, it is possible to note that the errors after the equalization are lower than 0.001%.  
Figure 4: Total vector error (TVE) before (black) and after (red) equalization.