Ion intercalation dynamics of electrosynthesized mesoporous WO3 thin films studied by multi-scale coupled electrogravimetric methods.

Mesoporous WO 3 thin films were prepared electrochemically by using an ionic surfactant during the synthesis, and the electrochemical properties are investigated in comparison with their dense analogues. This report specifically highlights the suitability of a time resolved coupled electrogravimetric method to follow meticulously the ion intercalation/extraction phenomena which revealed the enhanced ion intercalation/ extraction behavior of electrodeposited mesoporous WO 3 thin films for diverse applications in energy storage and electrochromism. This methodology (electrochemical impedance spectroscopy (EIS) and its coupling with a fast quartz crystal microbalance (QCM)) has the ability to detect the contribution of the charged or uncharged species during the electrochemical processes, and to deconvolute the global EQCM responses into the anionic, cationic, and the free solvent contributions. Our study identifies the involvement of several charged species (Li + , Li + (cid:2) H 2 O) in the compensation of charge, and H 2 O molecules indirectly contribute to the process in both dense and mesoporous WO 3 thin films. Even a slight contribution of ClO 4 (cid:3) ions was detected in the case of mesoporous analogues. The results of the study indicate that the transfer resistances of Li + and Li + (cid:2) H 2 O are decreased when the WO 3 films are mesoporous. A more significant diﬀerence is observed for the larger and partially dehydrated Li + (cid:2) H 2 O ions, suggesting that increased surface area and pore volume created by mesoporous morphology facilitate the transfer of larger charged species. The relative concentration changes of cations are also magnified in the mesoporous films. The final concentration variations are higher in mesoporous films than that in the dense analogues; B 4 times and B 10 times higher for Li + and for Li + (cid:2) H 2 O, respectively. To the best of our knowledge, an unambiguous identification of species other than desolvated cations ( e.g. Li + ions), the information on their transfer dynamics and quantification of the transferred species have never been reported in the literature to describe the charge compensation process in WO 3 based electrodes.


Introduction
In recent years, the use of metal oxide thin films with nanoscale porosity for diverse electrochemical applications, e.g. energy storage, electrochromic devices, etc. has become a subject of growing interest. [1][2][3][4] Among these materials, tungsten(VI) oxide (WO 3 ) is a particular metal oxide which can offer a wide range of technological applications. It is a representative metal oxide of a group of chromogenic materials due to the coloration effects associated with various processes. [2][3][4][5][6][7] Aside from its potential applications including Li-ion batteries, [8][9][10] photoelectrochemical, [11][12][13] solar, 14,15 and fuel cells; [16][17][18][19] WO 3 has been extensively studied as a promising electrochromic material. Meanwhile, WO 3 has already been integrated in low-voltage electrochromic devices for smart windows, which emphasizes the high technological relevance of this kind of material. Nevertheless, currently available devices still suffer from several shortcomings, such as quite long electrochromic response times. 20 Thus, new developments and approaches to improve such systems may have a direct technological impact.
Even though not all the underlying details of the mechanism of electrochromism are fully understood, the overall process generally involves the simultaneous insertion of cations and a Sorbonne Universités, UPMC Univ Paris 06, UMR 8235, Laboratoire Interfaces et electrons into the inorganic matrix during the reduction step (W +6 /W +5 ), and the subsequent formation of coloring centers (W +5 ). 7,20,21 This reversible electrochemical insertion or intercalation of electrolyte ions into an electrode material is the fundamental operation principle of many electrochemical devices; therefore it is crucial to optimize the interactions between electrolyte ions and electrode materials.
For the improvement of the performance of metal oxide based electrodes, main attention has been attributed to their nanostructuration with various morphologies due to the unique properties and functionalities that can effectively be exploited in electrochemical devices. [2][3][4][20][21][22] Various synthesis methods such as sol-gel, 2,3,20 spray pyrolysis/sputtering, 23,24 and hydrothermal synthesis, 25,26 are commonly employed for the elaboration of WO 3 leading to different morphologies. However, electrochemical synthesis remains to be a fast, simple, lowcost and low-temperature technique which may also lead to the formation of homogenous nanoscale films with desirable qualities. 6,[27][28][29][30] The incorporation of surfactant molecules in the electrogenerated film results in the production of thin nanostructured films by using potential-controlled self-assembly of surfactant-inorganic aggregates at solid-liquid interfaces. 6 This approach manipulates surfactant-inorganic assemblies only in the thin interfacial region by electrochemically controlling surface interactions, which allows the formation of nanostructured films from dilute surfactant solutions. After deposition, surfactants can be easily removed from the pores by washing with a suitable alcohol, leading to the porous inorganic replicas of the surfactant phases. 6 These nanostructures, with small sizes, and large surface area to volume ratios, are expected to facilitate the ion intercalation/extraction process. These improvements are often attributed to (i) a facilitated transfer and short diffusion length for ions transport, (ii) a high electrode/electrolyte contact area, and (iii) a better stress/strain management of the material during ion intercalation/extraction. The morphology dependent performance and ion intercalation behaviour of electrochromic WO 3 thin films have been investigated by several in situ or ex situ characterization techniques, [31][32][33][34][35] including electrochemical and optical methods, 5,20,22 wide-angle X-ray scattering combined with electrochemical studies, 20 Raman spectroscopy, 21 and X-ray photoelectron spectroscopy studying electrochromic materials before and after cation intercalation. 5,36 However, none of these methods alone provide the information on the exact identification of the intercalated ionic species, their dynamics of transfer at the interfaces, as well as the role of electrolyte composition and the effect of ions solvation on the intercalation/extraction phenomena. The status of inserted ions is not a quite solved problem and the characterization of their transfer dynamics is not straightforward using conventional characterization tools. The main challenge is to find an eligible technique offering mechanistic solutions in a single body that can be used to study ion intercalation phenomena in situ and in contact with an electrolyte. There have been studies using quartz crystal microbalance (QCM) as an in situ gravimetric probe to study the insertion and/or electroadsorption of ions in metal oxide or carbon based electrodes. [37][38][39][40][41][42] Conducting electrodes coated on the QCM resonator surface are used as working electrodes in an electrochemical cell, and thus, the electrodeposition process can be monitored. Materials of interest deposited are studied in terms of mass changes during the electrochemical processes. Santos et al. studied the Li + ion intercalation/extraction behaviour of dense WO 3  ) or solvent molecules (acetonitrile) of the study. The equivalent weight values, higher than that of Li + (7 g mol À1 ) were simply attributed to the acetonitrile molecules, accompanying the Li + ions. 37 A similar study by Vondrak et al. investigated the electrochemical insertion of H + , Li + , Na + ions into thin layers of WO 3 by EQCM in propylene carbonate. EQCM data of their work also detected molar mass values higher than that would correspond to the cation present in the electrolyte. Therefore, it was suggested that ions do not enter the space lattice alone but may be accompanied by propylene carbonate solvent molecules. 38 These studies are significant contributions to highlight the complexity of the electrochromic system, and to show that simplified electrical charge compensation processes may not be realistic to describe the ion intercalation/extraction mechanisms in metal oxide based electrodes. However, the limitations of the technique appear here clearly. EQCM gives a global response corresponding in fact to several possible pathways such that ions, ions with solvation shells and even indirectly free solvent molecules can contribute to the electrochemical process. Additionally, ions may lose a part of their solvation to access to the sites in smaller nanopores. 42 These possible pathways, and kinetic or dynamic aspects of the ion intercalation/extraction processes have never been characterized in the previous EQCM studies due to the limitations of the technique.
Here an alternative characterization tool was proposed to overcome the limitations of the classical EQCM to study the ion intercalation/extraction mechanisms in metal oxide based electrodes. Specifically, the electrochromic behavior related to the cation intercalation/extraction in WO 3 thin films was investigated by coupled time resolved characterization methods (fast QCM/electrochemical impedance spectroscopy). This method, so-called ac-electrogravimetry consists of in situ coupling of electrochemical impedance spectroscopy (EIS) and fast quartz crystal microbalance (QCM). [43][44][45][46][47][48] Although QCM exists more or less routinely in laboratories these days, this coupling has been developed in a limited number of laboratories worldwide. The ac-electrogravimetry simultaneously measures the electrochemical impedance, DE/DI(o), and the mass/potential transfer functions (Dm/DE(o)) during a sinusoidal potential perturbation with a small amplitude applied to the modified electrode. [43][44][45][46][47][48] The mass/potential transfer functions allow the change in mass due to a unit charge passing through the electrode/film/electrolyte interfaces to be determined. It provides the access to the relevant information on (i) the kinetics of species transferred at the solid/ solution interfaces, and their transport in the bulk of the materials, (ii) the nature of these species as well as their relative concentration within the material. This coupling dominates over the limitations of QCM technique and has the ability to deconvolute the global mass variations provided by QCM measurements. Specifically, it detects the contribution of the charged or uncharged species and to identify anionic, cationic, and the free solvent contributions during various redox processes, and recently has been applied to study pseudo-capacitive charge storage mechanisms in Li-birnessite type MnO 2 electrodes. 48 In the present work, this coupled methodology is exploited to study the ion intercalation/extraction behaviour of mesoporous WO 3 films. For their fabrication, an electrochemical pathway was chosen, so-called surfactant-assisted electrodeposition, 6,27,29 which provides a facile, low temperature and rapid alternative to the mesoporous thin film synthesis. In the literature, cation intercalation/extraction studied by UV-vis spectroscopy during cyclic voltammetry measurement revealed that both amorphous and crystalline mesoporous films significantly improve the electrochromic response times due to the shortening of the mean diffusion path lengths. 20,49 The other studies discussed that the crystalline materials increase the energy barrier for lithium ions, and thus, their electrochemical capacity may be inferior than their amorphous analogues. 5,21,50 Here, we particularly focus on the amorphous materials rather than crystalline ones to emphasize its role in the electrochemical performance of WO 3 films. The structure, morphology and the composition of the mesoporous electrochemically synthesized films were characterized, and compared with their dense counterparts. The electrochemical performance and ion intercalation/extraction mechanisms were studied in aqueous LiClO 4 electrolytes by electrogravimetric methods (EQCM, and ac-electrogravimetry). Special attention was given to the poorly understood aspects, such as the nature of the ions involved in the charge compensation, solvation and the role of the electrolytes and the dynamic information of ions transfer at the electrode/electrolyte interfaces. It has been demonstrated herein that the ac-electrogravimetry responses of the electrodeposited WO 3 thin films can serve as a gravimetric probe to study the complex Li + intercalation/extraction mechanisms and to extract subtleties unreachable with classical tools.

WO 3 thin film synthesis
The electrodeposition solutions for the synthesis of dense and mesoporous WO 3 thin films were prepared as described elsewhere. 6,30 Briefly, 0.9 g W powder was dissolved in 30 ml of 30% H 2 O 2 which takes about 4 hours for complete dissolution. A small portion of Pt black was then added to remove the excess of H 2 O 2 . This removal process can be accelerated by heating the solution up to 70 1C to obtain a pale-yellow solution of PTA. The solution was diluted to 50 mM with a 50 : 50 water and isopropanol mixture. For the mesoporous thin film synthesis, the solution also contained 0.05 M sodium dodecyl sulfate (SDS).
Gold-patterned quartz substrates of 9 MHz (Temex, France) were used as working electrodes. A platinum grid and an Ag/ AgCl (3 M KCl saturated with AgCl) served as counter electrode and reference electrode, respectively. The electrochemical WO 3 synthesis was performed by potentiostatic electrodeposition at À0.5 V vs. Ag/AgCl (3 M KCl saturated with AgCl). During electrodeposition, a salt-bridge junction equipped with a porous glass frit on the end was used to prevent the reference electrode from being contaminated by the media and vice versa. The electrodeposition was performed by using a potentiostat (Autolab PGSTAT100) and the deposition process was monitored by quartz crystal microbalance measurements. Film area is 0.25 cm 2 (gold electrode on the quartz resonator) and the film thickness was controlled by the electrodeposition time, typically for 15, 20 or 30 minutes. The SDS surfactant in the WO 3 thin films was extracted from the inorganic matrix by washing with ethanol-water mixture before the electrogravimetric studies.
For high resolution transmission electron microscopy (HR-TEM) studies, WO 3 thin films were also deposited on gold substrates (gold foil, 0.05 mm thickness, 99.95% purity (Goodfellow)) by surfactant assisted electrodeposition at À0.5 V for 30 min, followed by a thermal treatment at 450 1C for 2 h (heating rate of 5 1C min À1 ). The samples were scraped off from the gold substrates and ultrasonically dispersed in ethanol.

Structural characterization
The film morphology and the thickness were investigated by field emission gun scanning electron microscopy (FEG-SEM) (Zeiss, Supra 55). The elemental analysis was performed with an energy dispersive X-ray (EDX) detector associated to the FEG-SEM equipment. The oxidation state of the tungsten and composition of the films were determined by X-ray photoelectron spectroscopy (XPS) (on a VG ESCALAB 250i-XL spectrometer using monochromatic Al Ka radiation as the X-ray source). High resolution transmission Electron Microscopy (HR-TEM) analysis was performed using a JEOL 2010 UHR microscope operating at 200 kV equipped with a TCD camera.
The electrochemical synthesis was monitored by a lab-made QCM device providing the electrodeposited mass to be determined by frequency variation (Df m ) of the quartz crystal resonator based on the Sauerbrey equation. 51 The (Df m ) can be converted into the mass change (Dm) of the quartz crystal by using the Sauerbrey equation: where r q is the density of quartz (2.648 g cm À3 ), m q is the shear modulus of quartz (2.947 Â 10 11 g cm À1 s À2 ), f 0 is the fundamental resonance frequency of the quartz, and k s is the theoretical sensitivity factor. An experimental value, 1.09 ng Hz À1 , of this constant was used in this work as justified previously. 52 The classical EQCM measurements are based on the coupling of cyclic voltammetry (CV) with QCM measurements, and provide the information on the mass variations (calculated from eqn (1)) of the electrode during electrochemical processes.
For ac-electrogravimetry, a four-channel frequency response analyzer (FRA, Solartron 1254) and a potentiostat (SOTELEM-PGSTAT) are used. The QCM is used under dynamic regime, the modified working electrode (0.2 cm 2 ) is polarized at a selected potential, and a sinusoidal small amplitude potential perturbation (50 mV rms) is superimposed. The microbalance frequency change, Df m , corresponding to the mass response, Dm, of the modified working electrode is measured simultaneously with the ac response, DI, of the electrochemical system. The frequency range is between 63 kHz and 10 mHz. The resulting signals are sent to the four-channel FRA, which allowed the electrogravimetric transfer function, Dm DE ðoÞ, and the electrochemical impedance, DE DI ðoÞ, to be simultaneously obtained at a given potential.
The electrochemical experiments were performed in aqueous 0.5 M LiClO 4 solution. The gold-patterned quartz substrates of 9 MHz (Temex, France) were used as working electrodes. A platinum grid and an Ag/AgCl (3 M KCl saturated with AgCl) served as the counter electrode and the reference electrode, respectively. During electrochemical tests, a salt-bridge junction equipped with a porous glass frit on the end was used to prevent the reference electrode from being contaminated by the media and vice versa.

Theory
The ac-electrogravimetry methodology and theoretical background were previously discussed by Gabrielli et al. 43,44 Briefly, ac-electrogravimetry consists of coupling of electrochemical impedance spectroscopy (EIS) with a fast quartz crystal microbalance (QCM) used in ac-mode. It allows the response in current, DE DI ðoÞ, electrical transfer function, and in mass, Dm DE ðoÞ mass-potential transfer function to be simultaneously obtained owing to a sinusoidal potential perturbation with a small amplitude (DE). The combination of such transfer functions provides the possibility of a fair separation of different electrochemical processes, which involves concomitantly the mass and charge changes. The transfer of two cations (c1 and c2), and an anion (a) in the electroactive films incorporating three different and independent sites, P1, P2, and P3 during the redox reaction of the host material hPi where a single electronic transfer takes place can be expressed as: where hP1c1i and hP2c2i are the film matrices doped with cations, and hP3ai is the film matrices doped with anions. The cation and anion transfers at the film|solution interface are only taken into account as rate-limiting steps since the ionic transports inside the thin film and in the solution are supposed to be fast enough through thin films or in sufficiently concentrated electrolytes. Under the effect of a sinusoidal potential perturbation with low amplitude, DE, imposed to the electrode/film/electrolyte system, sinusoidal fluctuations of concentration, DC i , are observed. In the present case, for electroactive metal oxide thin films, the change of the concentration, DC i , of each species (cation 1 (c1), cation 2 (c2), anion (a), and free solvent (s)) with potential DE can be calculated using eqn (5)- (8): where o = 2pf is the pulsation, d f is the film thickness and K i and G i are the partial derivatives of the flux, J i , (ESI, † eqn (S10) and (S11)) with respect to the concentration and the potential for the flux of the species i crossing the film/electrolyte interface. More precisely, K i is the kinetics rate of transfer and G i is the inverse of the transfer resistance, R ti , of the species at the film/electrolyte interface (where i is the cation c1 or c2, the anion a, or the free solvent s). The ESI † Section B (eqn (S10)-(S14)) provides detailed information on these parameters. The concentration/potential transfer function (eqn (5)-(8)) permits us to obtain all the other theoretical transfer functions. Therefore, the following theoretical expressions are used to fit the experimental responses of electrochemical impedance, charge/potential, electrogravimetric and partial electrogravimetric transfer functions.
The charge/potential transfer function, Dq DE th ðoÞ, is calculated for the insertion/expulsion of the two cations, c1 and c2 and an anion, a and by using the Faraday number, F, and the film thickness, d f : Then, the theoretical Faradaic impedance, Z F | th (o) relative to the global ionic transfer of the electroactive film for three charged species, cations (c1 and c2) and anion involved in the charge compensation is: where m c1 , m c2 , m a and m s are the atomic weight of involved species. Partial mass/potential TFs are also estimated either by  (1)). The mass variation profiles during potentiostatic electrodeposition for both dense and mesoporous films are presented in Fig. 1. The initial deposition current is higher for mesoporous thin films than that of dense WO 3 thin films (Fig. 1).
The deposition current density depends on both the sheet resistance of the working electrode and the electrical conductivity of the PTA electrolyte solution. 53 Since identical substrates (gold coated quartz resonators) are used as working electrodes, the higher initial deposition current for the mesoporous WO 3 deposit (Fig. 1B) is mainly due to the higher conductivity of the deposition solution resulted from the addition of the ionic surfactant molecules (SDS). In both cases, the deposition current initially decreases, finally approaching a steady value (Fig. 1), which is consistent with previous reports. 53 The gold electrode is a conductor while the WO 3 is a semiconductor and the contributions of the two components determine the relative amount of the deposition current decrease. The time for stabilization of the deposition current is higher for the films synthesized in the presence of SDS surfactant (Fig. 1B) than that of a dense film electrodeposition. In the absence of SDS templates, impingement/percolation probably takes place at relatively lower thickness of the WO 3 deposits since larger grain formation may easily occur. But in the presence of SDS, the grain growth is limited due to the presence of SDS micellar structures on the gold electrode/solution interface. This may result in a slight delay in approaching a steady current value (Fig. 1B). Therefore, the differences in the deposition current profiles in Fig. 1 already give indications of the formation of different morphologies of WO 3 thin films in the presence and absence of SDS templating agents. In other words, the mechanism of electrogeneration appears strongly dependent on the bath composition. The characteristic frequency of the quartz resonator decreases as a function of the electrodeposition time (Fig. S1, ESI †) corresponding to a mass increase of the gold electrode of the quartz resonator. The mass variations calculated from the frequency variations are also presented in Fig. 1. The total deposited mass is higher for the films synthesized in the presence of SDS surfactant (Fig. 1B), indicating the incorporation of the surfactant molecules. These films are considered to be inorganic-organic hybrids composed of a WO 3 inorganic matrix surrounding the SDS surfactant micelles, and they are extracted from the inorganic matrix in a subsequent step following the electrodeposition.
The morphology of the electrochemically synthesized WO 3 thin films was characterized by FEG-SEM and HR-TEM. In the absence of the surfactant molecules, fairly dense thin films composed of sphere-like shape nanoparticles of WO 3 are obtained, which is consistent with previous reports (Fig. 2). 6,53 Similar morphologies are obtained for the mesoporous counterparts on the scale of FEG-SEM observations. The average film thickness is B300 nm under these experimental conditions (Fig. 2B), and it can be tailored by changing the electrodeposition time.
The EDX analysis coupled with FEG-SEM observations indicates the presence of W and O in as-deposited dense thin films (Fig. S2, ESI †). A small contribution of Au also appears which is due to the gold electrode of the quartz crystal substrate. The EDX spectrum of films synthesized in the presence of SDS templates shows additional peaks (Fig. S3, ESI †) corresponding to Na element, indicating the successful incorporation of the SDS templates in the inorganic-organic hybrids. The contribution of Na peak is substantially decreased after the extraction of the SDS templates, signifying the facile removal of the SDS templates (Fig. S4, ESI †).
The pore morphology of the WO 3 thin films electrodeposited in the presence of SDS templates was investigated by HR-TEM (Fig. 3) which revealed spherical mesopores of around 2-5 nm. The mesopores in the present films are randomly ordered and have a certain dispersity in their pore size but fairly homogeneous domains expand within the film. Compared with the mesoporous thin film preparations based on the evaporation induced self-assembly (EISA), surfactant assisted electrodeposition method employs more dilute surfactant solutions. The main principle is based on the potential-controlled selfassembly of surfactant-inorganic aggregates at solid-liquid interfaces. 6 The concentration increase at the electrode surface leads to the formation of surfactant micelles, and the electrodeposition process occurs around these template structures. The subsequent removal of surfactant micelles leads to the formation of mesoporous films which are inverse replicas of the micellar structures, as shown in Fig. 3. Elemental composition analysis of the mesoporous WO 3 thin films was also obtained by EDX analysis coupled with HR-TEM observations. The main contributions in the EDX spectrum in Fig. 3D are attributed to the presence of W and O elements (Cu peaks in Fig. 3D are originated from TEM grids).
To determine the exact composition and the oxidation state of the W species, as-deposited thin films were characterized by X-ray photoelectron spectroscopy (XPS) and the results are

Electrochemical studies
The optical variation of the WO 3 can be controlled by the application of a reversible voltage based on the double intercalation/extraction of cations and electrons into/out from the material. The general coloration process of WO 3 , which is a cathodic coloring electrochromic material is often presented in the literature by the following equation: WO 3 (colorless) + xe À + xM + $ M x WO 3 (blue) (12) where M + refers to a non-solvated cation such as H + , Li + , Na + . This simplified intercalation/extraction mechanism is based on the charge compensation process by cations. When applying a negative voltage on WO 3 layer, electrons and cations are inserted, and the electrons reduce the W 6+ ions to W 5+ . Whereas by applying positive voltage, electrons and cations are extracted, and W 5+ ions are oxidized to W 6+ . The general view in the literature is that the integrated cathodic current density over time equates to the amount of cation intercalated to form tungsten bronze M x WO 3 (eqn (12)), indicating that a higher current density means faster cation intercalation kinetics. 54 However, this simplified scheme does not take into account of (i) the ion solvation effect, (ii) the possible presence of more than one ionic species which may favour/disfavour the kinetics of the electrochromism and charge/discharge rates, and (iii) the influence of free electrolyte molecules that can interact, indirectly, with porous electrodes. Although often stated as a paradigm, to the best of our knowledge, the indirect effect of the solvent molecules on the charge compensation mechanisms has not been thoroughly studied. In the following part, these aspects of the intercalation/extraction mechanism will be discussed in detail by EQCM and ac-electrogravimetry  characterizations for both dense and mesoporous amorphous WO 3 thin films in aqueous LiClO 4 electrolytes.

The cyclic voltammetry and EQCM study.
The EQCM is a simultaneous measurement of the resonance frequency variation of a quartz resonator determined by QCM during CV measurements. A typical EQCM curve gives the potential vs. current profile, simultaneous to the frequency variation vs. potential response. The quartz resonance frequency variations are converted into mass changes of the electrodes by Sauerbrey relation, 51 e.g. the mass variations of the WO 3 electrodes during coloration (reduction bias) and bleaching (oxidation bias) can be monitored.
The EQCM results of a dense and mesoporous WO 3 film tested at room temperature in aqueous 0.5 M LiClO 4 electrolytes are presented in Fig. 5. The CV curves show a capacitive response in the anodic region whereas the coloration reaction is observed in the potential range of À0.15 V to À0.5 V vs. Ag/ AgCl. In agreement with the literature data under similar dynamic conditions, an asymmetric voltammogram is obtained with a broad anodic loop displaying an extraction of cationic species that is slower than its cathodic insertion at this scan rate (Fig. 5). The capacitive behaviour is somehow more pronounced in the CV response of the dense films compared with that for a mesoporous film (Fig. 5). This suggests a higher contribution of surface electroadsorption process, compared with the faradaic response (shown by blue arrows in Fig. 5) in the case of dense WO 3 thin films. The cathodic and anodic current density of the mesoporous films (Fig. 5B) are higher than those observed for the dense films (Fig. 5A), which may indicate faster cation intercalation/extraction kinetics, as discussed in ref. 54. The current values measured are almost four times higher than that obtained for a dense film. The mass variations are also influenced by the presence of the mesopores (Fig. 5), and the QCM response is amplified (B4 times) in the case of a mesoporous film. This enhanced behaviour can probably be attributed to the increased specific surface area and pore volume as a result of the mesopores providing a better accommodation of the electroactive sites and have an advantageous effect on the coloration process. The mass responses shown in the reduction branches (Fig. 5) correspond to the resonance frequency drops of the modified quartz resonators due to the mass increases of the films during reduction bias (coloration). In a reverse process, during oxidation bias (bleaching), the inserted species are expelled out from the film, resulting in a decrease of the electrode mass. The molecular mass of the species (cations and/or the other ionic/non-ionic species if present) involved in the charge compensation can be obtained roughly with further calculation. To do so, F Â Dm Dq function was from the EQCM data. Fig. 6 depicts the variation of F Â Dm Dq values as a function of the applied potential for a dense and a mesoporous WO 3 thin film. According to this calculation, an absolute molecular mass value of B5-6 g mol À1 was obtained for mesoporous films measured in 0.5 M aqueous solutions of LiClO 4 with a scan rate of 50 mV s À1 , which is close to the molecular weight of Li + . If there is strictly one species involved, the F Â Dm Dq function should be equivalent to the molecular mass of the species intercalated/extracted. However, for a complex electrochemical system, these values correspond to an average molecular weight related to the various species, and it is actually an average in terms of mass and kinetics. Therefore, at this point, one can arguably discuss that at this fast scan rate (50 mV s À1 ), Li + ions are exclusively involved in the charge compensation process. However, it cannot guarantee the absence of any other species which may have different time constants and cannot be detected at this scan rate (such as heavier ions including ClO 4 À , hydrated forms of lithium ions, or free water molecules). Indeed, these results show the limitations of the classical EQCM technique. The EQCM gives a global response, and does not provide unambiguous information on which of the possible scenarios actually takes place. To investigate the subtleties that cannot be reachable by EQCM method, an ac-electrogravimetry study was performed on mesoporous WO 3 films and compared with their dense analogues.

4.2.2
Ac-electrogravimetry study. To be able to have a resolution at the temporal level in the intercalation/expulsion mechanism, ac-electrogravimetry (electrochemical impedance spectroscopy (EIS) coupled with fast QCM) was used to characterize A. Ac-electrogravimetry study of dense and mesoporous WO 3 thin films at À0.3 V vs. Ag/AgCl. Fig. 7 (Fig. 7A and B) have the usual shape, when dealing with an ion-blocking electrode, from which it is difficult to easily extract information. The low frequency trend was related to a parasitic response which is more pronounced in the mesoporous films (Fig. 7B), and was fitted by using eqn (S21) in the ESI. † The experimental transfer function and the fitted data from the model (see theoretical part, eqn (10) and the ESI, † eqn (S21)) are reported on the same graphs; a good agreement between the two sets of data is evident in term of shape and frequency distribution (Fig. 7). It should be noted that there is no evident part with a slope equals to 451 or below in the electrochemical impedance response; therefore, the rate limiting step is not the mass transport in the films or in the solution but rather ionic transfer between the solution and the film. 40 The charge/potential transfer functions (TFs), Dq DE ðoÞ, (Fig. 8A and B) permit to separate the ionic contribution without any possibility to identify the ionic species involved. It should be indicated here that the contribution of the parasitic reaction, occurring at low frequencies, was removed for keeping only the ionic transfer response. A large and slightly suppressed loop was obtained for both dense and mesoporous WO 3 thin films without a fair separation. The theoretical functions in Fig. 8 indicated that there are more than one charged species involved in both cases ( Fig. 8A and B). Indeed, the time constants corresponding to each ionic transfer appear to be very close to each other. It is important to note that the Dq DE ðoÞ response of the mesoporous film is magnified (B5 times) (Fig. 8B), compared to the response of a dense film (Fig. 8A). At this stage, it is impossible to distinguish between the anion and the cation contributions and to determine the nature of the ionic species involved. Nevertheless, the K i and G i constants were determined for two ions (for dense) and three ions (for mesoporous) WO 3 thin films (see Table 1 for the K i and G i values) and were used in the following fittings.  This loop can be attributed to either one species or to two species where their time constants are not sufficiently different from each other. The loops in the third quadrant are characteristic for cation contributions or free solvent molecules in the same flux direction.
Another contribution also appears in Fig. 9B (for the mesoporous WO 3 thin film) at very low frequencies in the fourth quadrant (either anions or water molecules with opposite flux direction compared to cations) highlighting the challenge in obtaining an exact identification of these two or three loops. Therefore, several configurations were tested using theoretical functions (eqn (11)) to determine the exact contribution of each species. The mass response of a dense WO 3 thin film was fitted by considering three species cation 1 (c1 = Li + ), cation 2 (c2 = Li + Á H 2 O) and free solvent molecules (s = H 2 O) (Fig. 9A). In the case of a mesoporous WO 3 film, a similar response is obtained, but with an additional contribution from another charged species, the anion (a = ClO 4 À ). They appear characteristically in the fourth quadrant. Here, they are the slowest species transferred in the mesoporous films as they are detected at lower frequency region in Fig. 8 or 9B. It is important to note that eqn (11) involves the molecular weight of the ionic and/or nonionic species, providing their identification by their molecular weight. Therefore, cations or their hydrated forms can be detected with an estimation of the hydration level (e.g. cation 1 (c1 = Li + ), cation 2 (c2 = Li + ÁnH 2 O n = 1)). Since the bulk hydration numbers for Li + ions is high, n B 7-8, 55 the cation 2 (c2 = Li + ÁnH 2 O n = 1) detected in our study can be considered as partially dehydrated. The contribution of various species to electrochemical modulation with different kinetics of transfer has already been observed in the earlier work of Hillman et al. on nickel hydroxide thin films by combining probe beam deflection (PBD) technique and EQCM. [56][57][58] The partial mass/potential TFs were analyzed to validate our previous hypothesis involving three and four different species for dense and mesoporous films, respectively. Partial mass/ potential TFs are estimated for dense films (not shown), for example by removing the c2 contribution, calculating Dm DE  Table 1 Estimated values for K i (kinetics of transfer), G i (the inverse of the transfer resistance), R ti (transfer resistance) and ÀG i /K i (the quantity transferred per potential unit) parameters extracted from the fitting results of ac-electrogravimetry measurements in aqueous 0.5 M LiClO 4 at À0.3 V vs. Ag/AgCl for dense and mesoporous WO 3 films Species identification   Table 1). The G i parameters permit to calculate the resistance (R ti ) of the transfer for each species (eqn (S13), ESI †).
The kinetic constants (K i ) obtained from ac-electrogravimetry at À0.3 V vs. Ag/AgCl reveal the transfer rates of species at the electrode/electrolyte interfaces. Both for dense and mesoporous WO 3 thin films: (i) Li + species contribute at high frequencies (the fastest species), (ii) free water molecules appear at the intermediate frequencies, and (iii) Li + ÁH 2 O appears at low frequencies (the slowest species). In the case of mesoporous WO 3 thin films, an additional contribution is observed at the lowest frequency range corresponding to the anions transfer (ClO 4 À ) and their transfer kinetics is slower than cationic species and free water molecules (see values in Table 1). The G i values determined from the ac-electrogravimetry study are related to the transfer resistance, which can explain the ease or the difficulty of the transfer of the ionic or nonionic species at the electrode/electrolyte interface. The transfer resistance R t i values follow the order which is the inverse of that observed for the kinetics parameters (K i ) ( Table 1). Specifically, for dense films, it pursues the order: , and for mesoporous films the same order persists:  Table 1. One of the most remarkable differences is that the R t i (Li + ÁH 2 O) value for dense films is much higher than that for a mesoporous film. This strongly suggests that the transfer of hydrated lithium species (Li + ÁH 2 O) at the interfaces is much easier in mesoporous WO 3 thin films than in dense counterparts. Thus, the transfer of larger hydrated lithium species (Li + ÁH 2 O) is favored when WO 3 thin films are mesoporous. Based on the K i values, the Li + species are transferred slightly slower in the case of mesoporous films but their transfer resistance is in the same order of magnitude, or even slightly lower than that in dense films. These results indicate that mesoporous films facilitate both Li + and Li + ÁH 2 O transfer compared to dense WO 3 thin films. The ClO 4 À anions contribution was detected in mesoporous films, but their transfer is slow and more difficult compared to other species.
Another important parameter to compare is the value which can be considered as the quantity of the species transferred per potential unit at low frequencies of modulation. In other words, it is related to the capability to store charged or uncharged species in a particular material. It is evident that the quantity of the cationic species transferred per potential unit is much higher in mesoporous WO 3 thin films than in dense films. For the dense films, the higher capacitance related to the cations is obtained with Li + . On the contrary, for mesoporous films hydrated Li + gives the highest values ( Table 1). The contribution of anions which is only detected for mesoporous films, is rather small based on the quantity transferred per potential unit ( Table 1). The presence of large ClO 4 À anions, although in small quantity, is likely related to the mesoporosity of the WO 3 thin films. Probably due to its large ionic radius, ClO 4 À anions cannot be involved in the charge compensation process of a dense film. The transfer kinetics and the resistance of free water molecules are somehow similar to those of Li + species in both dense and mesoporous films, suggesting that these are the water molecules accompanying the transfer of Li + species most likely due to the electrodragging ( Table 1). The quantity of the water molecules transferred per potential unit is slightly higher for mesoporous films, which is in agreement with the increased pore volume.
The results obtained from the measurements at E = À0.3 V vs. Ag/AgCl, first of all indicate that there are other species than only Li + ions; such as hydrated lithium ions (Li + ÁH 2 O), free electrolyte molecules (water in the present case); or even anionic species present in the electrolyte may contribute to the charge compensation in the electrochromic process of WO 3 thin films. In the following, the kinetic parameters (K i ) and the transfer resistance (R t i ) of the species are investigated as a function of the applied potential.
B. Ac-electrogravimetry study of dense and mesoporous WO 3 thin films as a function of potential. Fig. 10 shows the evolution of the kinetic parameters (K i ) and the transfer resistance (R t i ) of the species as a function of the potential applied. This potential range corresponds to the conditions where the intercalation/ extraction process of the WO 3 thin films is observed. Based on the K i values presented in Fig. 10A and B, Li + ions are persistently the fastest species transferred both in dense and mesoporous WO 3 thin films.
It is obvious that there are two different cation populations (Li + and Li + ÁH 2 O) for both dense and mesoporous films at all the potentials studied. Compared to the dense films, the kinetics of transfer for Li + ions is slower in the mesoporous films and this could be related to the morphology of the films. The hydrated lithium ions Li + ÁH 2 O in the electrolyte lose their hydration shell and get transferred at the interface, (bulk electrolyte/dense WO 3 film interface). But if this transfer happens at an electrode/electrolyte interface of a confined pore wall (as in the case of a mesoporous WO 3 film), the dehydration of the hydrated lithium ions in a small confined space may occur slower than that may happen in the bulk of the electrolyte. Therefore, one can arguably discuss that the different dehydration kinetics may be responsible for the differences in the K i (Li + ) meso and K i (Li + ) dense values shown in Fig. 10. The transfer kinetics of the larger, partially dehydrated Li + ÁH 2 O is in the same order of magnitude in both mesoporous and dense films ( Fig. 10A and B). The transfer kinetics of free water molecules are somehow close to the values of the Li + ions in Fig. 10A and B. Additionally, these water molecules have the same flux directions with the cations, suggesting that they might be the water molecules accompanying the transfer of Li + species most likely due to the electrodragging. At all potential values studied, independent from the film morphology there are two types of cations,  against potential gives the insertion isotherm. Fig. 11 presents the relative concentration change, (C i À C 0 ) for Li + , Li + ÁH 2 O, H 2 O and ClO 4 À species for dense (Fig. 11A) and mesoporous WO 3 (Fig. 11B) thin films. A significant difference is observed in the relative concentration change of the species when WO 3 thin films are mesoporous. Both the (C i À C 0 ) values for Li + and Li + ÁH 2 O cations are magnified for mesoporous films. It is important to note that the kinetics of transfer values for Li + species were higher (faster kinetics) in dense films compared to that in mesoporous films, and their ease of transfer was in the same order of magnitude ( Fig. 10A-C). This point underlines the differences between kinetics and thermodynamics related to the transferred species. However, the final concentration variation is B4 times higher in mesoporous films than that in the dense films. Despite of the differences in their dynamics of transfer, the final concentration variations are magnified in the mesoporous WO 3 thin films. It should be noticed that these subtleties are underlined for the very first time for both dense and mesoporous WO 3 films. The (C i À C 0 ) values for Li + ÁH 2 O present a drastic difference between the two films, and it is B10 times higher in mesoporous films compared to the dense WO 3 . Their transfer resistance at the interfaces was also significantly smaller in mesoporous films (Fig. 10D), indicating that these large and partially dehydrated Li + ÁH 2 O species are much easier to be transferred. Thus, Li + ÁH 2 O ions are easily transferred in higher quantities when WO 3 films are mesoporous. The (C i À C 0 ) values for water molecules are in the same order of magnitude, or no significant difference is observed. The (C i À C 0 ) value for ClO 4 À anions is low compared with the cationic species, thus only a small quantity is transferred. Their kinetics of transfer was also slow and difficult as it was shown in Table 1.
Overall, the contribution of the charged species is certainly magnified in mesoporous WO 3 films compared to the dense films. This qualitative and quantitative study of ionic and nonionic species contribution in the charge compensation process, together with dynamic information of their interfacial transfer further proves the advantageous nature of nanostructuration of WO 3 films for potential applications. For most of these application (e.g. in electrochromism), it is important to have a fast switching during the coloration/decoloration process which is related to the charge compensation of the redox reaction between W 6+ /W 5+ . The beneficial aspect of mesoporous WO 3 films is more likely related to the better accommodation of both Li + and Li + ÁH 2 O cations. Particularly, hydrated lithium species Li + ÁH 2 O are transferred rapidly and easily at the mesoporous electrode/electrolyte interfaces, and their concentration variations in the electrode is significantly higher with respect to that in their dense analogues.

Conclusions
Mesoporous WO 3 thin films were synthesized by surfactant assisted electrodeposition method. The idea of using an ionic surfactant (SDS) during the electrochemical preparation of WO 3 films led to the creation of B5 nm spherical mesopores which are templated by the corresponding spherical micelles. The dense analogues were also electrochemically synthesized under similar conditions but in the absence of SDS templates.
The electrochromic behavior related to the cation intercalation/ extraction in amorphous mesoporous and dense WO 3 thin films was investigated by coupled time resolved characterization methods (fast QCM/electrochemical impedance spectroscopy). The chemical nature and the role of each species (ions, solvated ions, and free solvent molecules), directly or indirectly involved in the electrochemical processes were estimated for the very first time.
Our study identifies the involvement of several charged species (Li + , Li + ÁH 2 O) in the charge compensation, and H 2 O molecules indirectly contribute to the process in both dense and mesoporous WO 3 thin films. Even a slight contribution of ClO 4 À ions was detected in the case of mesoporous analogues.
Compared to the dense films, the kinetics of transfer for Li + ions is slower in the mesoporous films. This surprising result can be attributed to the transfer of ions occurring at different sites in the films. This transfer probably happens at an electrode/electrolyte interface of a confined pore wall (as in the case of a mesoporous WO 3 film), the dehydration of the hydrated lithium ions in a small confined space may occur slower than that may happen in the bulk of the electrolyte. Therefore, the different dehydration kinetics may be responsible for the differences in the K i (Li + ) meso and K i (Li + ) dense . The transfer kinetics of the larger, partially dehydrated Li + ÁH 2 O is in the same order of magnitude in both mesoporous and dense films, indicating that these larger ions interact with the surface or close to surface sites of the mesoporous WO 3 films.
Contrary to the kinetics of transfer, both Li + and Li + ÁH 2 O have lower transfer resistance, indicating the ease of their transfer at the electrode/electrolyte interfaces when the WO 3 films are mesoporous. A more significant difference is observed for the larger and partially dehydrated Li + ÁH 2 O ions, suggesting that increased surface area and pore volume created by mesoporous morphology facilitate the larger charged species transfer.
The relative concentration changes of Li + and Li + ÁH 2 O cations are also magnified for the mesoporous films. The final concentration variation for Li + species is B4 times higher in mesoporous films than that in the dense films. For Li + ÁH 2 O, this value is B10 times higher in mesoporous films compared to the dense WO 3 .
This qualitative and quantitative study of ionic and nonionic species contribution in the charge compensation process, together with dynamic information of their interfacial transfer further proves the advantageous nature of nanostructuration of WO 3 films for potential applications. The results of the study indicate that the transfer resistances of the cations are much lower when the WO 3 films are mesoporous. This observation is probably in agreement with the previous reports in the literature indicating a fast switching during the coloration/decoloration process of the mesoporous films. Another beneficial aspect of mesoporous WO 3 films is related to the better accommodation of both Li + and Li + ÁH 2 O cations. Particularly, hydrated lithium species Li + ÁH 2 O are transferred rapidly and easily at the mesoporous electrode/electrolyte interfaces, and their concentration variations in the electrode is significantly higher with respect to that occurs in their dense analogues. To the best of our knowledge, an unambiguous identification of species other than Li + ions, the information on their transfer dynamics and quantification of the transferred species have never been reported in the literature.
This study particularly focuses on the investigation of amorphous mesoporous and dense WO 3 thin films. The fact that crystalline materials increase the energy barrier for lithium ions, and thus their electrochemical capacity may be inferior than their amorphous analogues has been discussed in the literature. 21,50 The aspect of crystallinity of the films can also be studied when WO 3 thin films thermally treated at different temperatures, thus possessing different degree of crystallinity. However, such an electrogravimetric study requires the utilization of the resonators as substrates that have better thermal resistance than quartz crystals, and will be the subject of a further study.
Overall, these results are exciting and the combination of fast QCM with electrochemical impedance spectroscopy offer a great opportunity for better understanding of the ion intercalation/ extraction dynamics in porous materials which is not possible with single EQCM measurements. Therefore, the establishment of the ac-electrogravimetry characterization in the nanostructured, ion-insertion materials is significant for designing optimized materials for the next generation electrochromic and energy storage devices.