1.1.0 Algorithms used in the software
In this section, the algorithms used in the software are described.
1.1.1 Segmentation of the Original Dataset
In order to obtain time-dependent quantities (noise impedance, noise resistance, average charge of a corrosion event, average frequency of corrosion events), the original dataset is segmented in shorter consecutive and partially overlapping datasets. The calculation of the relevant quantities is the performed iteratively using the potential and current segment as input data. In practice, at the first iteration, a segment of a number of points defined by the parameter length of FFT is extracted and used for the calculation, as described below. The results of the calculations are assigned to the time corresponding to the time of the first point of the extracted segment.The time position of the first point of the segment being extracted is represented graphically by the moving points in the screen Time Record.
Figure 1.0 Segmentation of the Original Data Set
Figure 2.0 The Calculations are performed iteratively using potential and current segments
1.1.2 Calculation of potential and current power spectral densities
At the next iteration, a segment of identical size is extracted from the time record, the calculation repeated, and the results assigned to the time value corresponding to the first point of the second extracted segment. The spacing between segment can be adjusted by modifying the overlap parameter in the preference window. For example, if a step size of 1024 is selected and an overlap of 50 % is selected, the first points of two consecutive segments is spaced of 512 points. The spacing between one segment and the following is displayed on the Parameters screen and is rounded to the higher closest integer. Any value between 1% and 99% overlap can be selected in the preferences menu.
Figure 3.0. The Time position is represented graphically by a moving point ( a diamond shape ) in the Time record.
Figure 4.0 ECN Analysis 1.0 calculates the linear trend for the potential and current segments
The segment iteratively extracted from the complete potential and current noises time records are displayed on the Processing screen. The length of the extracted segment can be adjusted between 128 and 4096 points in the preference menu by changing the Length of FFT parameter. On the same screen, the linear trend line is displayed overlapped the extracted segment. Such trend line is subtracted, to obtain the linear trend removed potential and current segment, required for FFTs.
Fig 5.0 Linear Trend Removal
Prior to performing fast fourier transform (FFT), a window is applied to the linear trend removed segments . The window type can be selected from the preference menu under “window type”. Once the segment are de-trended and windowed, the power spectral density is calculated by using FFT (single side), and displayed both in screen Processing and screen PSD.
Figure 6.0 Current Power Spectral Density and Potential Power spectral Density.
1.1.3 Calculation of noise impedance spectra
The noise impedance spectrum is calculated from power spectral densities of noise potential and noise current. The potential power spectral density is divided by the current power spectral density , and the square root of this result provides the noise impedance spectrum. This is illustrated in Figure7.0 .
Figure 7.0 Noise Impedance is calculated from Potential PSD and Current PSD.
1.1.4 Averaging of noise impedance spectra
Generally, the noise impedance spectra are relatively noisy and it is useful to average several impedance spectra to obtain a less noisy spectrum. In the screen PSD, the Averaged Impedance graph displays a moving average of a number of spectra. The number of spectra used to calculate the moving average can be selected in the preferences menu.
Figure 8.0 Noise Impedance spectra are usually noisy and averaging is required to improve readability.
1.1.5 Calculation of the low-frequency noise impedance
In order to plot the time evolution of the low-frequency noise impedance, the value of the low-frequency noise impedance at each iteration must be extracted. This is performed by averaging a given number of points at the low-frequency end of the time-averaged noise impedance spectrum. The number of points from the low frequency end of the noise impedance spectrum that are used to perform such operation can be selected in the preferences menu (Points Average for low frequency impedance). The point obtained from FFT at 0 frequency is excluded from this computation.
Figure 9.0 Calculation of low frequency noise impedance
The calculation of the average charge of a corrosion event is performed for each segment by the following equation
q = ( v VPSD * v CPSD ) / B (Equation 1.0 )
Where VPSD and CPSD are the low-frequency values of potential and current power spectral densities, and B is the Stearn-Geary coefficient. The low frequency value of the potential and current power spectral density is obtained averaging a number of points in the low-frequency end of the potential and current power spectral density spectra. The number of points for such average and the appropriate value for the Stearn-Geary coefficient can be selected in the preference window.
1.1.6 Calculation of average charge and frequency of corrosion events
Fig 10.0 The average charge of corrosion events is calculated from the low frequency values of current and potential power spectral densities .
The calculation of the frequency of corrosion events 'f' is performed for each segment by the following equation
f = ICORR / q (Equation 2.0 )
f = B2 / VPSD (Equation 3.0 )
Where 'VPSD' is the low-frequency values of potential power spectral density, ICORR is the corrosion current, q is the charge and B is the Stearn-Geary coefficient. The low frequency value of the potential power spectral density is obtained averaging a number of points in the low-frequency end of the potential and current power spectral density spectra. The number of points for such average can be selected in the preference window.
1.1.7 Calculation of noise resistance
The noise resistance for each segment is calculated by taking the square root of the potential variance divided by the current variance. This is shown in both in the first and in fourth screen. The fourth screen has four quadrants showing low-frequency noise impedance, noise resistance, average charge of corrosion events and frequency of corrosion events respectively.
Fig 11.0 The fourth screen ( Resistance/Charge/Frequency ) displays noise impedance, noise resistance,average charge and
frequency of corrosion events
1.1.8 Graphical Representation of the calculation algorithm
The complete algorithm is graphically illustrated in figure 13.0 below. The steps used for the calculations of noise resistance, noise impedance, charge and frequency of corrosion events are explained in details in the previous sections.
Figure 12.0 Graphical Illustration of the calculation algorithm