Servicios
Servicios
Buscar
Idiomas
P. Completa
Electrochemical noise analysis to obtain the Rsn value via FFT using Excel
Sidineia Barrozo; Riberto Nunes Peres; Marcus José Witzler;
Sidineia Barrozo; Riberto Nunes Peres; Marcus José Witzler; Assis Vicente Benedetti; Cecílio Sadao Fugivara
Electrochemical noise analysis to obtain the Rsn value via FFT using Excel
Eclética Química, vol. 45, no. 4, pp. 57-75, 2020
Universidade Estadual Paulista Júlio de Mesquita Filho
resúmenes
secciones
referencias
imágenes

Abstract: Electrochemical noise (EN) measurements are based on the fluctuations of the electrochemical potential and the current that occur during, for example, a corrosion process without an external signal perturbation. EN analysis (ENA) allows assessment of the type of corrosion and rapid determination of the corrosion rate. Microsoft Excel®, an inexpensive and readily available software package, is an excellent tool for performing repetitive calculations, with automation that saves time for the users. It is a useful tool for the analysis of EN data using fast Fourier transform (FFT), a process that is often made repeatedly and, if not automated, is quite laborious. This work presents a step-by-step procedure using Excel to perform these calculations, automating the process of obtaining the spectral electrochemical noise resistance, Importar imagen. This routine was used to analyze experimental potential and current noise data recorded for chalcopyrite. The results were comparable to those obtained for the same set of experimental data using Origin® software.

Keywords:ENAENA,ExcelExcel,spectral electrochemical noise resistancespectral electrochemical noise resistance,detrendingdetrending,Hann windowHann window.

Carátula del artículo

Electrochemical noise analysis to obtain the Rsn value via FFT using Excel

Sidineia Barrozo
São Paulo State University (Unesp), Institute of Chemistry, Engineering, Physics and Mathematics Department, Brasil
Riberto Nunes Peres
São Paulo State University (Unesp), Institute of Chemistry, Department of Analytical Chemistry, Physical Chemistry, and Inorganic, Brasil
Marcus José Witzler
EMBRAER, Brasil
Assis Vicente Benedetti
São Paulo State University (Unesp), Institute of Chemistry, Department of Analytical Chemistry, Physical Chemistry, and Inorganic, Brasil
Cecílio Sadao Fugivara
São Paulo State University (Unesp), Institute of Chemistry, Department of Analytical Chemistry, Physical Chemistry, and Inorganic, Brasil
Eclética Química, vol. 45, no. 4, pp. 57-75, 2020
Universidade Estadual Paulista Júlio de Mesquita Filho

Received: 02 June 2020

Accepted: 06 August 2020

Published: 01 October 2020

1. Introduction

Electrochemical noise (EN) measurements concern the fluctuations of the electrochemical potential and the current that occur during corrosion processes, without applying an external signal perturbation. EN can be used to monitor the type of corrosion and to rapidly obtain the corrosion rate. The electrochemical potential and current noises are simultaneously measured either by coupling two nominally similar working electrodes connected by a zero-resistance ammeter (ZRA), so that the potential difference between the working electrodes is zero, or by measuring with respect to a reference electrode1-3. In EN studies, the electrochemical noise resistance (Rn), determined as the standard deviation of the potential noise divided by the standard deviation of the electrical current noise, is generally considered as an estimation of the corrosion rate1.

Time domain analysis does not lead directly to comparative values of corrosion rates between systems being studied, hence necessitating frequency domain analysis. In the frequency domain, the power spectral density (PSD) is useful for predicting the corrosion mechanism and, in some cases, has been used in calculating noise impedance. PSD plots are computed using algorithms such as fast Fourier transforms (FFT)2, which are advantageous when repetitive signals are measured, and the data sets acquired have large numbers of sampling points. The square root of the ratio of the voltage PSD to the current PSD, as a function of frequency, enables calculation of the low frequency noise impedance, Rsn.

Excel software is an excellent tool for performing repetitive calculations, with automation providing considerable saving of time for users. In order to automate a repetitive task, a macro is recorded using the Macro Recorder in Excel4 , applying the desired format, which can then be replayed whenever needed. An example of this is the possibility of its use, still little explored, for the treatment of electrochemical noise data using FFT, a process that is usually performed repeatedly and is quite laborious, if not automated. Therefore, this work presents a stepby-step procedure for performing these calculations using Excel software, automating the process of obtaining the spectral electrochemical noise resistance, 𝑅𝑠𝑛 0 , using experimental potential and current noise data recorded for chalcopyrite in the laboratory. The 𝑅𝑠𝑛 0 value is calculated, as proposed by Mansfeld and Lee5 , using Eq. 1:

(1)

with

(2)

where 𝑃𝑆𝐷𝐸(𝑓) and 𝑃𝑆𝐷𝑖(𝑓) are the power spectral density of the potential, E(t), and the current density, i(t), respectively, in the frequency domain 𝑓.

In the practical process, 𝑅𝑠𝑛 0 is determined by the linear regression of 𝑙𝑜𝑔( 𝑅𝑠𝑛(𝑓)) 𝑣𝑠. 𝑙𝑜𝑔( 𝑓) at the “plateau” in the low frequency region, as suggested in the literature3 , covering a minimum of 10 frequency points. The straight-line equation fitted is evaluated using the lowest frequency of the recorded data, with the result being the 𝑅𝑠𝑛 0 value. In this work, the PSD calculation employs Eq. 36 :

(3)

where 𝑋𝑇(𝑓) is the Fourier transform of x(t), given by Eq. 5, 𝑇 is the experimental time (𝑇 = 𝑁𝛥𝑡, where N is the number of experimental data points and 𝛥𝑡 is the time interval between measurements), and the number 2 indicates that only positive frequencies are considered, since the Fourier transform can also apply to negative frequencies. The Fourier transform of a function x(t) is defined by Eq. 4:

(4)

where 𝑗2 = −1 is the imaginary unit and, among other properties, converts the time domain into a frequency domain. Since the signals are considered in the time interval between 0 and 𝑇, the Fourier transform calculations are made from the integral, according to Eq. 5:

(5)

with the integral being numerically calculated by Eq. 6, called a discrete Fourier transform6:

(6)

where 𝑓𝑚 = 𝑚𝛥𝑓 is the frequency related to the m-th sampling point and x is the function to be transformed (in this case, the potential E and the current density i). The FFT is an algorithm that optimizes the calculations by making them faster, compared to the discrete Fourier transform, and for its use the data set should contain a number of points equal to a power of 2 (for example, 2048= 211). In Excel, this algorithm is implemented using the “Fourier Analysis” function.

Note that Eq. 2, for calculation of 𝑅𝑠𝑛(𝑓), involves the ratio between PSDE and PSDi, so the factor 2/T of Eq. 3 will be canceled in the operation. Hence, in this work, PSDE and PSDi will be obtained using Eq. 7:

(7)

since 𝑋𝑇(𝑓) is a complex number, and the modulus of a complex number z = a + bj is given by |𝑧| = √𝑎2 + 𝑏2, so |𝑧|2 = 𝑎2 + 𝑏2.

As the goal of this work is to provide a routine to obtain R0sn using Excel software, we indicate the criterion that will be used for delimiting the frequency region, without elaborating on any particular merits of this procedure, leaving it to the ENA user to select the criterion most suitable for the study being undertaken. In addition to describing how the value of R0sn can be calculated using Excel, the results are compared with those obtained for the same set of experimental data using Origin® software.

2. Methodology

The Excel commands presented in this guide follow the 2010/2013 versions of the software. If another version is used, it would be necessary to check the equivalent commands. It is recommended to use the configuration with a dot as the decimal separator, since the original data is generated in this format. To make the change from comma to dot, follow these commands: File → Options → Advanced → Editing options → Use system separators → make the change.

This analysis considered 2048 points of an experimental data set obtained in the low frequency region, but the routine can be applied to any other number of points, as long as the number is a power of 2. The experimental data were arranged in three columns, considering time (t) in seconds (s), potential (E) in volts (V), and current (I) in amperes (A), in a worksheet named Data. It is possible that the experimental data set could have more than 2048 points, so it is important to count the number of data points in the spreadsheet (Formulas → Insert Function → COUNT → OK → select a set of data (column) → OK), in order to leave only 2048 points, deleting the points in excess in the high frequency region. An example of an input spreadsheet is shown in Fig. 1.


Figure 1.
Example of data presentation used in the analysis.

Considering that it is often necessary to remove the drift before analyzing the data7,8, this guide suggests a polynomial removal procedure. For this, graphs are constructed of potential or current against time, adding a trendline that provides the best fit to the data. This can be performed using the following commands: position the cursor on the graph and press the right button of the mouse → Add Trendline → Polynomial → choose the order that provides the best fit → mark Display Equation on chart → Close. Note that the polynomial orders for potential and current may be different each other. Format the graph and trendline, as desired. Fig. 2 shows examples.


Figure 2.
Examples of potential and current graphs, with trendlines.

In order to remove the drift, create new columns with the following parameters: time (t); potential value from the trendline (yE(t)), using the polynomial coefficients given by the potential fit; current value from the trendline (yI(t)), using the polynomial coefficients given by the current fit; and the differences between the experimental and fitted values for potential and current (E(t) - yE(t) and I(t) - yI(t), respectively), as shown in Fig. 3.


Figure 3.
Example of columns for removal of the drift from the potential and current data.

It is recommended to construct graphs of potential and current after removing the drift, in order to visualize the results and confirm that the values are near y = 0. Figure 4 shows an example.


Figure 4.
Examples of potential and current graphs after removing the drift.

In many cases, it is necessary to use appropriate windows to improve the quality of treatment by FFT. This guide uses the Hann window6,9, which is one of the most suitable. It is defined by the function:

(8)

where N is the total number of points used (in this case, 2048) and n is the position of each experimental point, initiating at zero. This function must be multiplied by the values of E(t) - yE(t) and I(t) - yI(t), which are calculated as described above. Figure 5 shows the Data spreadsheet updated so far, where a column with numbers n was created (column T) to apply the Hann window (columns U and V) and the value of N (fixed, in this case given in cell D2). Note that to fix a cell, just click on it, and press the F4 key on the keyboard.


Figure 5.
Spreadsheet example with the Hann window applied to data of the R and S columns.

Therefore, if the Hann window is not applied, the data of columns O, R, and S should be directly used in the analysis; if the Hann window is applied, the data of columns O, U, and V should be used.

Once the input data are organized, insert a new worksheet in the spreadsheet, in this example named Analysis, to perform the calculations. The step-by-step procedures for building the Analysis worksheet are presented below.

Save the spreadsheet with extension .xlsm (Excel Macro Enabled Workbook). Copy the input data (columns O, R, and S of the Data worksheet, if the Hann window is not used in the input data, or columns O, U, and V, if it is used) and paste from the 5th or 6th row of the first column (A) of the Analysis worksheet, in order to leave the starting lines for captions, comments, and new data to be inserted. We suggest, for example, that the number of data points (N) is informed at the beginning of column A, the time interval between measurements (∆t) in column B, the electrode area (cm2) in column C, and a scale factor with magnitude of 102 or 103 in column D, as this information will be used in future calculations. We also suggest using Excel facilities to count the number of data and the value of ∆t, which will minimize errors. The electrode area and the scale factor must be entered manually, as they are values known by the user.

It is important to note that Excel works internally with 14 significant digits. Therefore, since the input data values can be very small, especially for the current data, some values may be considered null and the FFT calculation may fail. A way to overcome this issue is to introduce a scale factor at the beginning of the spreadsheet (in this example, in cell D2), which is used to multiply the current density values before calculating the FFT, increasing the values to the required order of magnitude (102, 103, ...). After the calculations, the scale factor is removed by means of a division. However, it is not necessary to perform this calculation manually since it is included in the automation of the FFT calculations. It is necessary to insert the scale factor according to the order of magnitude of i (which in this case is 10-14 or 10-13, consequently requiring a correction with minimal order of 103). Figure 6 shows this procedure.

The calculations presented here are performed using Hann window and current density (i, in A cm-2), so the experimental data related to current are divided by the electrode area, placing the result (=C6/$C$2) in column D. Note that as the electrode area is constant, it must be fixed when dividing. In column E, list the input data (n = 0, 1, 2, 3, ...) used for calculating the frequency (in Hz). The frequencies will be calculated in column F, using the formula: f = n / (N*t). Although there is no zero frequency, it is necessary to start at n = 0 for the FFT calculation. To insert the formula, position the cursor in the desired cell (in the example, F6) and do: =E6/($A$2*$B$2). Note that N and ∆t are fixed, so it is necessary to fix these values, which in the example are in cells A2 and B2. Remember to copy a formula for all cells in the column, just positioning the cursor at the lower right corner of the cell to be copied and, when a cross appears, double-click. An example of the spreadsheet up to this step is shown in Fig. 6.


Figure 6.
Example of a spreadsheet constructed to calculate Rsn.

To calculate the FFTE of the potential, place the cursor in column G, aligned to the data, and follow the commands: Data → Data Analysis → Fourier Analysis → OK. A window similar to the one shown in Fig. 7 appears and, in the Input Range option, select the data from the Potential column (in the example, the data from column B). As an output option, choose “Output Range” and click on the cell where it is desired to place the FFTE values (in the example, cell G6). Click OK and all the FFTE values are calculated.

Note: If the Data Analysis option is not enabled in the version of Excel used, follow the commands: File → Options → Add-ins → Manage: Excel Add-ins → Go → Analysis Tools or Analysis ToolPak → OK).


Figure 7.
Fourier Analysis function window in Excel.

Repeat the same procedure to generate a column with FFTi (to calculate the FFT of the current density data), changing only the Input data to column D, and the output location to cell H6.

The result of the FFT is a complex number, so in order to perform the following calculations, it is necessary to separate the real and the imaginary parts into different columns. To do this, place the cursor on the next free column, aligned to the data (in the example, I6), and follow the commands for the real part: Formulas → Insert Function → IMREAL → click on the cell of the complex number (G6) and then on OK. The command window is shown in Fig. 8.


Figure 8.
Function window of Excel for discrimination of the real part of a complex number.

Then, drag the formula to all the data (double-click on the little cross in the lower right corner of the cell). Do the same for the column of the imaginary part, using the function IMAGINARY. After performing the procedure for the potential and current data, a spreadsheet similar to the one shown in Fig. 9 is obtained.


Figure 9.
Spreadsheet with FFT values and their real and imaginary parts discriminated.

The PSDE of the potential is calculated using Eq. 7, which must be introduced in the next free column (M). In this example, it is: =I6^2+J6^2. Drag to all cells in the column and repeat the procedure to calculate the PSDi of the current, which should be entered in column N.

In the next free column (O), where Rsn is calculated using Eq. 2, type: =SQRT(M6/N6) and drag to all cells in the column.

To calculate the slope and linear coefficients of the line obtained by the linear regression of log(Rsn) vs.log(f), it is necessary to calculate the logarithms (base 10) for these two columns. To do this, in the next two free columns (P and Q) do: =LOG10(F6) and =LOG10(O6), respectively, and drag to the entire columns. Note that as the first frequency value is f = 0, its logarithm cannot be calculated, so the expression “#NUM!” appears in cell P6. This is not a problem, as this point can be excluded during graph construction. Figure 10 shows the example in progress.


Figure 10.
Spreadsheet with the calculations required to obtain Rsn.

This work presents a way to build the graph in Excel by adding a slider on the abscissa axis to define the region of linear regression. This selection is important for the final result of the analysis and can be performed by following the steps below. However, it is also desirable that the user should be able to see the entire graph in a background, together with the interval chosen for linear regression and using a logarithmic scale, in order to facilitate interpretation of the results, observing the results as frequency, rather than logarithm of frequency. Therefore, the graph is constructed using a logarithmic scale.

Firstly, insert two slider bars in an empty region on the worksheet, using the following commands: Developer → Insert → Scroll Bar (in Form Controls box) → choose the place where you want to put the bars, click, and drag the mouse horizontally. The bars must be placed in a position where there is space to put a graph above them (Fig. 11).

Note: If the “Developer” option is not enabled in the ribbon, follow the commands: Files → Options → Customize Ribbon → Developer (in Main Tabs box) OK.


Figure 11.
Illustration of commands for creating a slider bar in Excel.

Position the cursor in a cell next to the bars (in the example, T16) and type a name for the cell in the identification space (upper left corner of the worksheet), for example, “Start_Point”, as shown in Fig. 12. Repeat the procedure in the cell below, naming it “End_Point”. On the left side of these cells, it is recommended to write the words “Initial index” and “Final index”, to indicate that the cells on the right show the positions (n) of the first and last points used in the linear fit. With this procedure, these cells have the function of variables for delimitation of the graph, using the slider.


Figure 12.
Cells declaring the variables.

Now position the cursor in cell P7 (the first valid value of the log (f) column) and give it a name (in the example, Ref_X_Plot), as shown in Fig. 13. These names are now used as variables in the following formulas and commands.


Figure 13.
Referencing the start of the log (f) data for plotting.

Click with the right button of the mouse on each bar, select the option “Format Control” and configure each bar according to the information in Fig. 14.


Figure 14.
Configuration for formatting the sliders in this example.

It is then necessary to declare the variables not linked to cells, in order to store the data range to be plotted. For this, the OFFSET function is used, so that they have a dynamic behavior, following the commands: Formulas → Name Manager → New. A name is then typed for the first variable. In this example, Range_X is suggested. Then type the expression: =OFFSET(Ref_X_Plot; Start_Point; -10; End_Point-Start_Point; 1) in the option “Refers to” in the box → OK. Figure 15 shows this procedure.


Figure 15.
Declaring variables to store a range of data.

Repeat the procedure for the other variables, as shown below:

Name: Range_X_Lin → Refers to: =OFFSET(Ref_X_Plot; Start_Point; 0; End_Point-Start_Point; 1)

Name: Range_Y → Refers to: =OFFSET(Ref_X_Plot; Start_Point; -1; End_Point-Start_Point; 1)

Name: Range_Y_Lin → Refers to: =OFFSET(Ref_X_Plot; Start_Point; 1; End_Point-Start_Point: 1)

Now, clicking on “Name Manager”, a window similar to the one shown in Fig. 16 opens.


Figure 16.
Window showing the variables declared in order to store a range of data.

It is now possible to make the graph. Place the cursor in an empty cell, click on “Insert” (in the ribbon) and, in the Charts group, choose preferentially the option “Scatter with Straight Lines” (Fig. 17).


Figure 17.
Steps to build the graph.

This command generates a clean graph area. Press the right mouse button on the area of that graph and select the option “Select Data”. In the dialog box that opens, select the option “Add” (Fig. 18) and a new dialog box (Edit Series) appears. In the “Series X values” option, select the frequency data (except f = 0), and in the “Series Y values” option, select the data for Rsn, except the value corresponding to f = 0. Click OK in both windows and the graph appears, with a linear scale. To change the scale of the graph to logarithmic, press the right mouse button on the scale of the axes → Format Axis → Logarithmic scale (Base 10). Do this for both axes.


Figure 18.
Windows to finish building the graph.

Change the color of the data to a light color, as it is overlaid by the region that is chosen for analysis. To do this, click on the graph with the right mouse button, select Format Data Series → Line Color → Solid Line, and choose a light color, as shown in Fig. 19. Also format the window type, line thickness, axis scale, font, etc., as desired by the user.


Figure 19.
Choosing the color of the data string.

A new data string must be inserted in the graph to overlay the data selected by the scroll bars. To do this, click with the right mouse button on the graph area and select the options: Select Data → Add. Fill the fields “Series X values” and “Series Y values”, as shown in Fig. 20, and click on OK. A new box “Select Data Source” appears; click on OK.


Figure 20.
Dialog box to insert the part of the graph where the linear regression is to occur.

Following the procedure shown above, choose a dark color for this second data stream.

For the purposes of this work, it is necessary to add a trendline, which is used to perform the linear fit of the experimental data to a mathematical function (linear regression), using the least squares method. To do this linear regression, click with the right mouse button on the new data sequence (the darkest graph) and choose the option “Add Trendline”. Click on “Power”, as shown in Fig. 21, since the graph axes are on a logarithmic scale and the logarithm properties transform powers into products, so the result is a line. Change the properties “Line Color” and “Line Style”, as desired.


Figure 21.
Window to choose and format the trendline.

Position the graph above the slider bars. If highlighting is desired, select the cells behind the graph, color them, and describe the function of the control, in order to facilitate its use. Figure 22 shows an example.

Note that the purpose of the slider bars (placed below the graph) is to delimit the region that will be fitted by the trendline, which can be done by clicking on the arrows (to move 1 point each click), or on the bar itself (to move 10 points for each click). It is also possible to click on the vertical mark and drag.


Figure 22.
Example image of the graph generated.

The angular and linear coefficients of the fitted line must be inserted in a cell since they are used to calculate R0sn. Hence, the cursor is placed in the cell where the slope is to be located (in this example, T8), typing: =SLOPE(Range_Y_Lin; Range_X_Lin). In the cell where the intercept or linear coefficient is to be inserted (in this example, T9), type: =INTERCEPT(Range_Y_Lin; Range_X_Lin).

In the cell where it is desired to insert the calculation of y using the first value of x (lowest value of the experimental frequency), in this example named log(R0sn), type: =(REF_X_Plot)*T8+T9, since REF_X_Plot is the cell that indicates the first x value used in the plot, and T8 and T9 are the cells in which the slope and y-intercept values of the trendline were calculated, respectively. If different cells are used, then the same logic should be followed.

Once log(R0sn) has been obtained, calculate R0sn by doing 10log(R0sn) (in this example: =10^T10). To facilitate visualization of the initial and final values of the fitted region, the following formulae can be inserted in cells next to the graph: =INDEX(F7:F2053; Start_Point + 1), for the initial value of the frequency range, and =INDEX(F7:F2053; End_Point), for the end value of the frequency range. Figure 23 illustrates the example being used in this work.


Figure 23.
Chart with calculated values of interest.

Once the spreadsheet is built, the goal is to use it to automate the work, performing the analysis of the quantity of data sets it is desired to study, simply by replacing the input data. However, the FFT function does not update automatically with the replacement of the input data. Hence, it is necessary to either manually delete and redo the values calculated by the FFT, every time a new set of input data is used, or implement a macro, which is an Excel feature for automatically performing programmed tasks. This can be done as follows:

On the ribbon, click Developer → Visual Basic. In the window that appears in the left part of the screen, right-click on Microsoft Excel Objects → Insert → Module, as shown in Fig. 24.


Figure 24.
Visual Basic window for creating a macro in Excel.

This creates a workspace. Place the cursor in it and enter the codes described below (note that the cells indicated in the codes refer to the current example). Thus, G6 is the cell where the initial value of FFTE is positioned, while cells B6 to B2053 contain the range of potential data, E. Analogously, H6 is the cell where the FFTi values start, while cells D6 to D2053 contain the current data, i. It should be noted that multiplication by the scale factor, mentioned previously, is already included in this macro.

Sub Button1 ()

'FFT of Potential

Range("G6"). Select

Range(Selection, Selection.End(xlDown)).Select

Selection.ClearContents

Application.Run "Fourier", ActiveSheet.Range("$B$6:$B$2053"), ActiveSheet.Range("$G$6"), False, False

'Copy of the current multiplied by the scale factor

Range("$D$6:$D$2053").Copy

Range("$AH$6:$AH$2053").PasteSpecial xlPasteValues

Range("D2").Copy

Range("$AH$6:$AH$2053").PasteSpecial xlPasteAll, xlMultiply

'FFT of the current

Range("H6").Select

Range(Selection, Selection.End(xlDown)).Select

Selection.ClearContents

Application.Run "Fourier", ActiveSheet.Range("$AH$6:$AH$2053"), ActiveSheet.Range("$H$6"), False, False

'Erases the current multiplied by the scale factor

Range("$AH$6:$AH$2053").Select

Selection.ClearContents

'Reposition the worksheet focus

Range("$A$1").Select

End Sub

Return to the Analysis spreadsheet and choose the location where it is desired to place a button that is to be clicked to update the FFT calculations when a new data set is introduced. In the Developer tab, click on Insert and then click on the image of a button, as shown in Fig. 25.


Figure 25.
Procedure for insertion of a button in an Excel macro.

Next, click where it is desired to create the button, dragging the cursor to form a rectangle. Release the mouse when the desired size is reached. At this point, a window called Assign Macro opens. Click on Button 1 and then OK (Fig. 26).


Figure 26.
Procedure in Excel for assigning a macro to a button.

In order to change the text on the button, right-click on it, and select Edit Text. To change the font, select the Format option. The result looks like Fig. 27.


Figure 27.
Image of a worksheet containing the FFT update button.

Every time the input data is changed, click on the FFT button to remake the FFTE and FFTi calculations. All other calculations are automatically updated.

The procedure presented above was also performed without Hann window. The results obtained with Excel were compared with those obtained with Origin® (see the Supplementary Information 1), a software package widely used by chemists, using the same experimental data and the same linear regression frequency region. The results are presented in Tab. 1.

Table 1.
Values of R0sn obtained with Excel and Origin® routines using the same experimental data for a carbon paste electrode (CPE) modified with chalcopyrite obtained in solution A (T&K) + 0.02 mol L-1 Cu(II) .

Supplementary materials

Supplementary information (pdf) .

The Supplementary Information 1 describes the procedures to calculate Importar imagen using OriginÒ software and to obtain electrochemical noise data, and a file .xlms with the experimental data used to applied the described routine.

How can ENA data be analyzed using Origin® software?

To make the same analysis, described in the main text, using Origin® software follows the steps below:

Copy the data of time (t), potential (E(t) – yE(t)) and current (I(t) - yI(t)) in the first three columns (A, B and C). Divide the current values by the electrode area and put the results in column D (select the column D and follows the commands: Column → Set Columns Values → in the box, type Col(C)/area value → Ok).

Select the potential column and follows the commands: Analysis → Signal Processing → FFT → FFT → Open Dialog (Fig. S1a). In the window that appears, choose the option Window Hanning → uncheck Shift → in Spectrum Type box, choose One-sided → uncheck Result Graph Sheet → Ok (Fig. S1b). If you do not use the Hann window, mark Window Rectangle, as in Fig. S1c:


Figure S1

FFT Origin® command with (B) and without (C) Hann window.

A new tab is created (FFTResultData1) that has all necessary information to potential analysis, including frequency and PSDE, which is in column of “Power as MSA”. Repeat the proceeding for the column of the current. The Fig. S2 shows the tab FFTResultData1.


Figure S2

Results of the FFT routine applied to Potential data using Origin®.

Copy the column “Power as MSA” of the tab FFTResultData1 (PSDE) and paste it in column E of the Sheet1 and repeat the proceeding for Current density (i), pasting the PSDI in column F of the Sheet1.

Select the column G in the Sheet1 and follow the commands: Column → Set Columns Values → in the box, type Sqrt(Col(E)/Col(F)) → Ok, to calculate Rsn. Figure S3 shows this proceeding.


Figure S3

Command to calculate √PSDE/PSDI.

Copy the frequency column (Freq(X)) of the tab FFTResultData1 and paste it in column H of the Sheet1. In the column I calculate log10 f making: select the column I → Column → Set Columns Values → in the box, type log(Col(H)) → Ok. Use the same proceeding to calculate log10(Rsn) in the column J. Your folder Sheet1 should look like Fig. S4.


Figure S4

Table of sheet1 with necessary values to calculate R0sn.

To make the graph select the column I → Column → Set as X; select the column J → Column → Set as Y. How the study is made in low frequency, select only the values of interesting to make the fit. In this case, the interval between row 2 and 29 was chosen to compare with Excel results (using Hann window). Make the graph using the commands: Plot → Line → Line (see Fig. S5).


Figure S5

Commands to make a graph using line.

Fit the straight line to graph (linear regression) by commands: Analysis → Fitting → Linear Fit → Ok. A new tab will be open, and the values of slope and intercept are presented in Parameters, like in the Fig. S6. Use these parameters to calculate R0sn, as described in the paper.


Figure S6.

Results of the linear regression.

Obtention of electrochemical noise data

Current and potential noise data were obtained in a Potentiostat / Galvanostat Reference 600 using the ESA410 software, from GAMRY Instruments®. The data contained in the spreadsheets were treated with the Excel software and compared with the treatment made with the Origin® software, with and without the Hann window option.

Electrochemical noise measurements were carried out using carbon paste electrodes modified with chalcopyrite powder. The powdered chalcopyrite (Øaverage = 38 μm) stored in argon atmosphere was mixed with graphite powder (Alfa Aesar, Øaverage = 42 μm) in the proportion of 50 wt.% plus a drop of binder (mineral oil) and 0.6 mL of chloroform, according to the literature1. The resulting paste was placed on a cavity electrode, constituting the carbon paste electrode (CPE), expounding an area of 0.282 cm2 to the solution.

The solution A of the T&K medium2 containing 0.5 g L-1 of each of Mg2+ and NH4+ sulfate and potassium phosphate salts, 0.08 mol L-1 ionic strength, pH 1.8 (adjusted with diluted H2SO4) plus 0.020 mol L-1 CuSO4 was used as electrolyte.

The electrochemical cell (Fig. S7) consisted of a glass cylinder placed horizontally, having two similar CPE electrodes fixed to the opposite sides of the cylinder and a reference electrode of Ag/AgCl/KCl3mol L-1 in a Lugging capillary positioned close to one of the CPE electrodes. Once the electrochemical cell was connected to the potentiostat, all current and potential filters were activated for automatic scaling. The electrochemical cell was switched on and the potential and current noise were expected to stabilize before starting to record the 2048 points at the frequencies of 1 Hz. The experiments last 34 min and 8 s (1 Hz). Experimental data are in Excel in Supplementary information 2.


Figure S7.

Electrochemical cell for obtaining the ENA data.

Acknowledgments

The author Riberto N. Peres thanks the Brazilian funding CAPES (proc. no. 88882.330063/2019) for a scholarship. The authors also thank Fundunesp (2557/2016) Vale S.A for financial support.

References
[1] Cottis, R. A., Interpretation of electrochemical noise data, Corrosion 57 (3) (2001) 265-285. https://doi.org/10.5006/1.3290350.
[2] Bertocci, U., Gabrielli, C., Huet, F. Keddam, M., Rousseau, P., Noise resistance applied to corrosion measurements, Journal of The Electrochemical Society 144 (1) (1997) 37-43. https://doi.org/10.1149/1.1837362.
[3] Mansfeld, F., Su, Z., Hsu, C. H., Electrochemical noise analysis (ENA) for active and passive systems in chloride media, Electrochimica Acta 46 (24-25) (2001) 3651-3664. https://doi.org/10.1016/S0013-4686(01)00643-0.
[4] Microsoft, Excel for Windows training, 2016.
[5] Mansfeld, F., Lee, C. C., The frequency dependence of the noise resistance for polymer-coated metals, Journal of The Electrochemical Society 144 (6) (1997) 2068-2071. https://doi.org/10.1149/1.1837743.
[6] Ritter, S., Huet, F., Cottis, R. A., Guideline for an assessment of electrochemical noise measurement devices, Materials and Corrosion 63 (4) (2012) 297-302. https://doi.org/10.1002/maco.201005839.
[7] Bertocci, U., Huet, F., Nogueira, R. P., Rousseau, P., Drift removal procedures in the analysis of electrochemical noise, Corrosion 58 (4) (2002) 337-347. https://doi.org/10.5006/1.3287684.
[8] Homborg, A. M., Tinga, T., Zhang, X., van Westing, E. P. M., Oonincx, P. J., de Wit, J. H. W., Mol, J. M. C., Time-frequency methods for trend removal in electrochemical noise data, Electrochimica Acta 70 (2012) 199-209. https://doi.org/10.1016/j.electacta.2012.03.062.
[9] Bertocci, U., Frydman, J., Gabrielli, C., Huet, F., Keddam, M., Analysis of Electrochemical Noise by Power Spectral Density Applied to Corrosion Studies: Maximum Entropy Method or Fast Fourier Transform? Journal of The Electrochemical Society 145 (8) (1998) 2780-2786. https://doi.org/10.1149/1.1838714.
Supplementary information 1
[1] Horta, D. G., Bevilaqua, D., Acciari, H. A., Garcia Júnior, O., Benedetti, A. V., Optimization of the use of carbon paste electrodes (CPE) for electrochemical study of the chalcopyrite, Química Nova 32 (7) (2009) 1734-1738. https://doi.org/10.1590/S0100-40422009000700010.
[2] Tuovinen, O. H., Kelly, D. P., 1973. Studies on the growth of Thiobacillus ferrooxidans, Archiv für Mikrobiologie 88 (4) (1973) 285-298. https://doi.org/10.1007/BF00409941.
Notes
Author notes

sadao.fugivara@unesp.br


Figure 1.
Example of data presentation used in the analysis.

Figure 2.
Examples of potential and current graphs, with trendlines.

Figure 3.
Example of columns for removal of the drift from the potential and current data.

Figure 4.
Examples of potential and current graphs after removing the drift.

Figure 5.
Spreadsheet example with the Hann window applied to data of the R and S columns.

Figure 6.
Example of a spreadsheet constructed to calculate Rsn.

Figure 7.
Fourier Analysis function window in Excel.

Figure 8.
Function window of Excel for discrimination of the real part of a complex number.

Figure 9.
Spreadsheet with FFT values and their real and imaginary parts discriminated.

Figure 10.
Spreadsheet with the calculations required to obtain Rsn.

Figure 11.
Illustration of commands for creating a slider bar in Excel.

Figure 12.
Cells declaring the variables.

Figure 13.
Referencing the start of the log (f) data for plotting.

Figure 14.
Configuration for formatting the sliders in this example.

Figure 15.
Declaring variables to store a range of data.

Figure 16.
Window showing the variables declared in order to store a range of data.

Figure 17.
Steps to build the graph.

Figure 18.
Windows to finish building the graph.

Figure 19.
Choosing the color of the data string.

Figure 20.
Dialog box to insert the part of the graph where the linear regression is to occur.

Figure 21.
Window to choose and format the trendline.

Figure 22.
Example image of the graph generated.

Figure 23.
Chart with calculated values of interest.

Figure 24.
Visual Basic window for creating a macro in Excel.

Figure 25.
Procedure for insertion of a button in an Excel macro.

Figure 26.
Procedure in Excel for assigning a macro to a button.

Figure 27.
Image of a worksheet containing the FFT update button.
Table 1.
Values of R0sn obtained with Excel and Origin® routines using the same experimental data for a carbon paste electrode (CPE) modified with chalcopyrite obtained in solution A (T&K) + 0.02 mol L-1 Cu(II) .


Figure S1

FFT Origin® command with (B) and without (C) Hann window.


Figure S2

Results of the FFT routine applied to Potential data using Origin®.


Figure S3

Command to calculate √PSDE/PSDI.


Figure S4

Table of sheet1 with necessary values to calculate R0sn.


Figure S5

Commands to make a graph using line.


Figure S6.

Results of the linear regression.


Figure S7.

Electrochemical cell for obtaining the ENA data.

Buscar:
Contexto
Descargar
Todas
Imágenes
Scientific article viewer generated from XML JATS4R by Redalyc