Probing the Molecular Ordering in Azopolymer Thin Films by Second-Order Nonlinear Optics

Second-harmonic generation (SHG), a second-order nonlinear optical technique, was used to investigate the molecular ordering of self-assembled layer-by-layer films of PAH, a cationic polyelectrolyte, and PS-119, an anionic polyelectrolyte containing photoisomerizable azo groups. Possible phase transitions in these multilayer films and their thermal stability were investigated by probing the SHG signal as a function of temperature and comparing the molecular order before and after thermal treat‐ ment. These studies were also performed with different pH values for the assembling solutions, a relevant parameter for polyelectrolyte adsorption. The results have shown that the films are not thermally stable, with the SHG signal nearly vanishing at a tem‐ perature of 150°C, in contrast to what is reported in the literature. SHG measurements have also confirmed that the films are isotropic in the plane of the samples, independ‐ ent of their number of layers or the pH of assembling solutions. SHG signal before and after heating indicates that the SHG signal was considerably reduced at high tem‐ peratures, but after slow cooling it was recovered to almost the same value as before heating, showing that the thermal disorder is reversible. No phase transition was ob‐ served, since the SHG signal reduction was slow and gradual, without any sudden change that would characterize a glass transition. We demonstrate that the SHG tech‐ nique provides information on the film arrangement at the microscopic level which could be difficult to get with traditional techniques. function of temperature. It allows measurements either in air or vacuum, and for alignment purposes it is positioned on a mirror mount attached to the rotation/transla‐ tion stage. teristic of this metal. Thus, the SHG signal from gold is independent of orientation and is fairly strong. 2.4, to (28) – (33) determine χ 1 through χ 6 , the best fit lines Figure Using their definitions (Equations (22) – (27)) and the orien‐ tation distribution function given by Equation (34), the six equations were solved to find the orientation parameters in F(θ, φ). For these films, the following values were determined: θ 0 = 37.41±0.24, σ = 12.85±0.53, d 1 = 0.009±0.001, d 2 = 0.014±0.002, d 3 = -0.001±0.003, and Ω 0 = -11.87±4.78, which fully characterize the orientational distribution of azo-groups in the sample. orientation, leading to a linear increase of the optical nonlinearity with thickness. Instead, we find that for films fabricated at low or high pH, the nonlinearity tends to decrease for thick films (~10 bilayers). Films fabricated at neutral pH generate an SHG signal that does not vary significantly with thickness, except for a slight alternation in intensity for films with odd or even number of layers. These results are due to the influence of adjacent polyelectrolyte layers on the order of an adsorbed layer, that is, the order of the last adsorbed layer is different than that for layers within the film. Phase measurements of the SHG signal confirm the reorientation of polymer groups in the last layer after adsorption of an additional polyelectrolyte layer. Finally, we have also studied the thermal stability of the molecular arrangement by SHG measurements as a function of sample temperature. We found that the nonlinear response presents a gradual and significant reduction upon heating, so that a clear glass transition temperature cannot be defined for these ultrathin layer-by-layer films. Again, the thermal stability of the samples depends on their fabrication conditions (pH and thickness), with higher charge density in the polyelectrolytes and substrate promoting better complexation and improving their thermal stability. We also noted that the disordering effect of heating is reversible, and the SHG signal is recovered upon cooling. However, a few samples had their molecular arrangement becoming anisotropic after a heating/cooling cycle, as a result of aggregation and formation of molecular domains at the scale of tens of micrometers. We hope that these examples of SHG applied to the study of thin nonlinear optical polymer films have shown how powerful the technique can be to obtain information about the film structure at the molecular level, with also important consequences for their applications in optical devices.


Introduction
The molecular organization and thermal stability of self-assembled thin films containing azopolymers are important to their applications, such as organic diodes [1,2], optical storage [3], and biosensors [4,5], to name a few. Here we are interested in probing the molecular organization of azopolymer thin films fabricated by the layer-by-layer technique resulting from their intermolecular and interlayer interactions. The thermal stability of these films will also be studied by measuring the nonlinear optical signal from second-harmonic generation (SHG) while the sample is heated.
Polymeric thin films may be very different from thick films. Moreover, the surface properties of thick films can be very different from those of their bulk [6]. For a full characterization of polymeric thin films, it is necessary to probe their thermal behavior, including the glass transition temperature, T g , that is, the temperature where molecules acquire a more mobile state, which leads to lower film viscosity. Particularly, the T g of polymeric materials gives us information about the intermolecular interactions. Furthermore, glass transition temperatures have practical importance for optical storage devices because near T g the information recorded in the molecular arrangement is lost due to increased motion, which leads to molecular disorder.
In this sense, several techniques have been used to characterize these polymeric materials, and the most common are differential scanning calorimetric (DSC), thermal gravimetric analysis (TGA), and dynamic mechanical analysis (DMA). However, these thermal techniques characterize bulk samples but are ineffective for studying films with thickness on the order of a few nanometers. Some authors have applied these techniques to probe free-standing films of polystyrene (PS) [7], but for films adsorbed on solid substrates, such as layer-by-layer (LbL) and Langmuir-Blodgett (LB) films, or on liquid interfaces, such as Langmuir films, those techniques cannot be applied.
Recently, Lutkenhaus et al. have reported an alternative methodology for using traditional techniques (DSC and TGA) to study LbL films fabricated by secondary interactions [8], like Hbonding for PEO/PAA films, and PAH/PAA films fabricated by electrostatic interaction [9]. The method is based on using films with many (around 100 or 200) layers, and average thickness per bilayer about 80 nm. These films were removed from the inert substrate (Teflon) to be investigated by conventional techniques. Curiously, for PEO/PAA films (assembled by secondary interactions) it was possible to find a T g , but not for PAH/PAA (strongly bound by electrostatic interaction). However, those films are not exactly what we could call ultrathin LbL films, because both films are very thick (2-8 μm), and the methodology removes the influence of the substrate. This influence is retained only in the conformation of the initial layers, but their contribution is negligible in the thermal analysis. It is therefore quite challenging to investigate the T g of ultrathin polymeric films, and in particular of LbL films with only a few bilayers.
Optical techniques such as ellipsometry and Raman spectroscopy [10] have been used to probe the T g of thin films, but they do not allow to investigate how the molecular arrangement is changed during the glass transition, although their results show excellent agreement with the values of T g obtained by other techniques. Because T g is associated with a transition to a state of molecular disorder, it is natural to apply second-order nonlinear optical techniques, such as second-harmonic generation (SHG), which are quite sensitive to molecular orientation [11][12][13]. With increasing temperature, the molecules become increasingly mobile (more random and dynamic conformation), resulting in increased disorder and reduced SHG signal, which is dependent on orientational ordering. Therefore, for a system consisting of only one material, we would expect a sudden variation of the signal when the T g of the material is reached [14].
Another issue that is interesting is the thermal stability of the films. Here, we do not consider thermal degradation of the film, but the film's ability to maintain its molecular arrangement while temperature varies. Lvov et al. showed that the SHG signal from of PDDA/PAZO LbL films was substantially reduced when heated to about 120°C [15], showing that the ordering of the films was destroyed and they were not thermally stable. It is worth mentioning that, unlike the work of Han et al. [14], ref. [15] does not directly aim at measuring the T g of LbL films, but intends only to check their thermal stability. However, some authors have described thermally stable layer-by-layer films, showing stability around 20% [16].
In this chapter, we will describe the basic theory for SHG in thin films, showing how its polarization dependence can be used to determine the orientation of chromophores in azopolymer LbL films, and how phase measurements of the SHG signal can probe the molecular reorientation after azopolymer adsorption. SHG measurements as a function of number of layers, of sample azimuthal angle, and of pH of the self-assembly solution reveal how the molecular organization depends on sample fabrication conditions. We also probe the thermal stability and effect of heat treatment on molecular ordering.

Fundamentals of nonlinear optics
Radiation-matter interaction processes lead to numerous effects due to light-induced polarization, which acts as a source of new electromagnetic waves. The polarization induced by the electric field of the electromagnetic wave, E → (r → , t), is responsible for several optical processes.
If this electric field is relatively weak in comparison to the electrostatic field acting on electrons within an atom or molecule, the polarization has a linear dependence on the electric field: where χ is the linear susceptibility and P → is the linear polarization. This is the linear optics regime.
However, if the electric field of the electromagnetic wave is strong, new contributions turn out to be significant. Then, an approximate relation between electric field (cause) and polarization (effect) is a power series in E → (r → , t): The terms χ (n) and P (n) are the susceptibilities and polarizations of n th -order, respectively. Figure  1 shows the linear polarization of Equation (1) and a typical example of the nonlinear response, Equation (2).
The terms χ (n) and P (n) are the susceptibilities and polarizations of n th -order, respectively. Figure 1 sh polarization of Equation (1) and a typical example of the nonlinear response, Equation (2). Here, we are interested in second-order effects, which are related to the second-order nonlinear susc the moment we will neglect the vector character of the electric field and polarization, and consider i instantaneous relation (neglecting spatial and frequency dispersion) between the field and the oscill polarization. With the applied electric field , the polarization up to third order is Using the trigonometric relations cos 1 cos 2 and cos 3 cos cos 3 w We can see that polarization generated by electric field produces light with the same of incident light frequency (named second-and third-harmonic, respectively), and a static compone rectification).
In general, if we have an incident electric field such as , representing tw frequencies ω1 and ω2 travelling through the material, it is easy to show that From Equation (5) we can expect the generation of static fields, second-harmonic generation, a term Here, we are interested in second-order effects, which are related to the second-order nonlinear susceptibility, χ (2) . For the moment we will neglect the vector character of the electric field and polarization, and consider initially the local and instantaneous relation (neglecting spatial and frequency dispersion) between the field and the oscillating induced polarization. With the applied electric field E(t) = E 0 cos ωt, the polarization up to third order is We can see that polarization generated by electric field E (t) = E 0 cosωt produces light with the same, double and triple of incident light frequency (named second-and third-harmonic, respectively), and a static component (optical rectification).
In general, if we have an incident electric field such as E (t) = E 1 cosω 1 t + E 2 cosω 2 t, representing two waves of frequencies ω 1 and ω 2 travelling through the material, it is easy to show that (5) we can expect the generation of static fields, second-harmonic generation, a term that oscillates with the difference of incident frequencies (difference-frequency generation -DFG), and a term that oscillates with the sum of incident frequencies (sum-frequency generation -SFG). Therefore, it is possible to generate light with new frequencies through wave mixing nonlinear processes.
In the preceding equations, the susceptibility relates the electric field with the respective polarization. If both E → (t) and P → (t) are vector quantities, the nonlinear n th -order susceptibility is an (n + 1) th rank tensor. A convenient form to express the term in Equation (5) responsible for SFG is: 3  1  2  3  1  2  1  2  1  2  , ; , w w w c w w w w w w w The ijk indices run through the xyz Cartesian coordinates of electric field and polarization.

Origin of nonlinear response of molecules
The correct interpretation of nonlinear phenomena such as sum-frequency generation (SFG) or second-harmonic generation (SHG) is related to the understanding of nonlinear secondorder susceptibility, χ (2) . Here, we are going to discuss only the main characteristics of χ (2) , but many publications [17][18][19][20][21][22][23] present a complete theory of χ (2) effects. However, we will try to be succinct while addressing relevant issues. The classical treatment is well-known, providing satisfactory results with a phenomenological theory. However, the quantum interpretation is more comprehensive and generally allows calculating the nonlinear susceptibilities and their dispersion.
The origin of nonlinear optical activity of organic molecules can be understood by a Taylor series expansion of the induced dipole moment of the molecule [21]: ...
In Equation (7), α lm is the (first order) linear polarizability, β lmn and γ lmno are the second-and third-order hyperpolarizabilities, respectively.
Through second-order time-dependent perturbation theory [17], we can derive an expression for β lmn that is quite complicated. But a simplification happens when we consider the case of SHG with the fundamental frequency ω away from electronic resonances, but with the secondharmonic 2ω resonant with an electronic transition of the molecule, ω vg [22]: where Γ is the width of the electronic transition. Terms P mn and Q l are due to off-resonance and resonant transition moments, respectively. They are given by In Equations (9) and (10), μ is the electric dipole operator, | g is the fundamental state, | ν is the excited state resonant with the second-harmonic, and | s is any other state.

Second-order susceptibility
The nonlinear second-order susceptibility is a macroscopic average of second-order nonlinear polarizability β. It is defined as the term that describes the interaction between the material medium and the optical electric field [23]. The relation between χ (2) and β can be described by a coordinate transformation from the molecular reference frame to the laboratory frame, as shown in the following equation: .
where N is the number of molecules by volume, and R(ψ)R(θ)R(φ) is the product of three rotation matrices that relate the molecular coordinate system (l, m, n) to the laboratory coordinate system. The symbol represents the orientational average. If we know the β tensor for molecules, measurements of χ (2) elements can give us information about their molecular orientation, as will be described in Section 2.4.
Second-harmonic generation (SHG) arises from a term of Equation (5) proportional to cos(2ωt), when just one electric field at frequency ω is applied. In that case, Equation (6) becomes: SHG is intrinsically sensitive to surfaces and interfaces due to its selection rule. As we will see later [see Equation (13)], the SHG intensity is proportional to the square of the second-order susceptibility χ (2) . As a polar third-rank tensor, χ (2) changes sign under the inversion operation (under the electric dipole approximation): χ ijk . However, in centrosymmetric media χ (2) remains unchanged upon inversion of coordinates: χ ijk . Therefore, the only possible solution for the two earlier equations is χ (2) = 0. We can conclude that, under the electric dipole approximation, for media with inversion symmetry, no second-order optical process is possible, including SHG. Most bulk molecular materials do have inversion symmetry. This is because the functional groups in the bulk of these systems are, in general, randomly or oppositely oriented [24]. However, because inversion symmetry is usually broken at the surface/interface, SHG is not forbidden in those cases. Figure 2 illustrates SHG at an interface between two centrosymmetric media. The incidence angles obey the momentum conservation along the interface plane: for refraction of incident laser: k ω sinα ω (1) (Snell's law); for reflective/refractive SHG generation: k 2ω sinα ω (1) ; and k 2ω (2) sinα 2ω sinα ω (1) . Index (i), i = 1, 2, refer to media 1 and 2 in Figure 2. For the specific case of thin polymeric films adsorbed on solid substrate such layer-by-layer films, if asymmetric molecules (or functional groups) adsorb with random orientations, the net SHG signal is canceled out. Conversely, if there is a substantial SHG signal, we can conclude that molecules have a net average orientation at the interface. More detailed considerations about the importance of symmetry on the interpretation of SHG (and other second-order processes, such as SFG) can be found elsewhere [13,17,18,22].
For second-harmonic generation at interfaces between two different media, as shown in Figure  2, Y. R. Shen demonstrated [13,18] that the intensity of the second-harmonic signal is given by where the SHG signal is expressed in terms of the net second-order susceptibility of the surface χ s (2) . The term χ eff is the effective susceptibility, which also depends on the polarizations of the input and output beams, є(ω i ) and the Fresnel factors L nn (ω i ), since ê(ω i ) = є(ω i ) ⋅ L ↔ (ω i ). The Fresnel factors are given by the following expressions: From Equation (13), we can see that the SHG signal I(2ω) is proportional to |χ eff (2) | 2 , the effective second-order susceptibility of surface. From Equations (8) and (11), we can write χ eff (2) as a complex number: where |χ eff (2) | is its modulus and ϕ is the phase. Frequently, it is necessary to experimentally measure the phase of χ eff (2) , because it is related to the relative orientation (up or down) of molecules at the interface. This can be accomplished by interference between SHG signals from sample (polymer films) and a nonlinear reference, like crystalline quartz or zinc sulfide, ZnS [25,26]. In practice, we measure the effective χ eff (2) that is the sum of the reference and the film signals: λ Δl is the phase difference between two signals, and Δl is the difference of optical length due to a compensator inserted in the detection beam path (amorphous quartz window). Figure 3 shows the experimental setup. The angle θ of the compensator determines the additional optical path Δl = Δn d cosθ traveled by the SHG and pump beams from the sample to the detector, where Δn is the difference in refractive indices of the compensator for the fundamental and SHG beams. Therefore, the phase difference between the two signals is given by

Molecular orientation from SHG measurements
As seen earlier, Equation (11), the macroscopic quantity is related to microscopic quantity through an orientational average of a coordinate transformation,

Molecular orientation from SHG measurements
As seen earlier, Equation (11), the macroscopic quantity χ ijk (2) is related to microscopic quantity β lmn through an orientational average of a coordinate transformation, where β lmn is a tensor that relates the components of the second-order contribution to the dipole moment p → of the molecule to local electric field components E → local . The frame (x, y, z) is the sample reference frame, with xz as a mirror plane. The (X, Y, Z) frame is the laboratory coordinate system, with XZ as the incidence plane. The molecule is tilted by the polar angle θ with respect to the surface normal, and φ is the azimuthal angle with respect to the sample symmetry direction, which in turn is rotated by Ω with respect to the incidence plane (X direction).
For molecules with electrons delocalized mainly along a single direction, the hyperpolarizability β lmn will have only one element, that is, β ξξξ , along the molecular axis ξ, as shown in Figure 4 for an azobenzene group. Then, for the case of a molecular monolayer adsorbed on the surface, Equation (11) can be written as The transformation of coordinates from the molecular frame l, m ^, and n ^ to the sample frame î, ĵ, and k is given byˆ, ˆ, x q j × = j sin sin (20) .
Considering a medium with a C 1v symmetric distribution of molecules on the plane xy (xz is the sample plane of symmetry), we obtain six independent elements of the tensor χ ijk (2) 27]: Therefore, measuring these six elements in the preceding equations allows determining up to five parameters of the orientation distribution function of the adsorbed monolayer (since usually the product Nβ ξξξ is unknown). This can be performed by SHG measurements with several combinations of polarization, such as S in S out , S in P out , P in S out , P in P out , M in S out , M in P out , where the first polarization is for the pump beam at ω and the other is for the generated beam at 2ω. S indicates the polarization with the electric field perpendicular to the incidence plane, and P is with the electric field parallel to the incidence plane. M polarization is that where the electric field has equal components perpendicular and parallel to the incidence plane (mixed polarization). Figure 2 shows both S and P polarization.
We should note, however, that in general the laboratory coordinate system (XYZ), defined by incidence plane XZ and the sample plane XY, is not coincident with the sample coordinate system (xyz), defined by the sample plane xy and the plane of mirror symmetry xz. We define the angle Ω describing the relation between the two coordinate systems, as shown in Figure 4.
Therefore, to fully determine χ eff (2) in laboratory frame, we need to do an additional coordinate transformation from the sample frame (xyz) to the laboratory frame (XYZ). Thus, we obtain χ eff (2) for six possible polarization combinations as a function of independent components χ 1 to χ 6 (Equations (22) to (27)), which characterizes the distribution of orientations for the molecules in study: Advanced Electromagnetic Waves 40 In practice, SHG measurements consist in recording the SH intensity as a function of the sample azimuthal angle Ω for several polarization combinations. From them, we can determine the independent components, from χ 1 to χ 6 , that are related to the orientational distribution of molecules on the sample. For example, for the case of an isotropic sample on its xy plane, only χ 1 and χ 3 = χ 4 will be nonvanishing, so that all χ eff (2) are either null or independent of azimuthal angle Ω, as expected. In this case, the ratio cosθ − cos 3 θ depends only on the average molecular tilt with respect to the normal direction (polar angle θ). Therefore, measurements can immediately be qualitatively interpreted to determine if samples are isotropic or not about the surface, and in that case, if polar orientation changes significantly.
In order to fully determine the orientation of adsorbed molecules at an interface (film), we assume that this orientation is described by a distribution function such as The first term of F (θ, φ) is a Gaussian distribution function of the polar angle θ, where θ 0 is the average molecular tilt and σ is the polar distribution width. A is a normalization constant, given by This distribution describes the orientation angle of adsorbed molecules with respect to the zaxis, which is perpendicular to plane of sample (see Figure 4).
The second factor of Equation (34) is a Fourier series on the azimuthal angle φ, truncated at the third term. There, d 0 is the normalization constant equal to 1 / 2π. This distribution describes the anisotropy of adsorbed molecules along to plane of sample, with respect to the mirror plane xz.
In order to obtain the parameters in the orientational distribution function F(θ, φ), we need to experimentally measure χ eff (2) in the six polarization combinations as the sample is rotated (varying the sample azimuthal angle Ω). We then adjust the data (simultaneous fitting) to Equations (28) to (33) in order to find the parameters θ 0 , σ, d 1 , d 2 , and d 3 , as well as the initial sample azimuth Ω 0 (initial angle between sample symmetry direction and laboratory frames, see Figure 4).
In this chapter, we are interested in probing the molecular orientation of layer-by-layer films of azopolymers and their thermal stability using the SHG technique. In the next section, we will briefly describe the most important characteristics of these ultrathin films that are relevant to the physical interpretation of SHG results.

Layer-by-layer thin films
G. Decher and co-workers [28,29] were the first to propose this simple and efficient method of physical deposition. Specifically, layer-by-layer (LbL) deposition is a fast and practical deposition process based on the electrostatic interaction between polyelectrolytes and opposite charges on solid substrates, such as glass, silica, or mica [29][30][31][32][33]. It can be used to fabricate thin films from a few nanometers to hundreds of nanometers. In most cases the mechanism responsible for adsorption is mainly the electrostatic interaction, but secondary interactions such as hydrophobicity, Van der Waals, or H-bonding are also relevant [7].
Some advantages of electrostatic LbL with respect to other thin film fabrication techniques, for example, Langmuir-Blodgett (LB) depositions, are the use of water-soluble molecules involving a large variety of materials, its independence of size and topology of substrate [31,32], and the applicability to almost any hydrophobic or hydrophilic solid, such as glass, quartz, mica, and gold [33].
In the LbL self-assembly process, spontaneous sequential adsorption of oppositely charged polyelectrolytes (polyions) is carried out from most often dilute aqueous solutions on charged surfaces. Figure 5 illustrates the experimental procedures for adsorbing LbL films. Typically, a charged substrate (frequently glass or quartz) is immersed in an oppositely charged polyion solution. Electrostatic attraction occurs between the charged surface and the oppositely charged molecules in solution. It is expected that adsorption occurs until overall charge neutrality or charge reversal is reached at the substrate surface, implying that the adsorption process is self-limited. After washing the substrate with an aqueous solution (usually of the same pH as the adsorption solution) in order to remove excess adsorbed material and to ensure that only one strongly adsorbed monolayer remains, the substrate is dried by N 2 flow. We have shown that this drying step promotes the inhomogeneity of the film in the micrometer scale [34], making it unfit for certain applications. The next step is immersing the substrate with the first adsorbed layer in an oppositely charged polyion solution. The oppositely charged polyelectrolytes will complex at the film/solution interface, leading to adsorption of the second layer and overall charge reversal again. Now the signal of net surface charge (substrate plus adsorbed film) is restored to that of the original substrate. Other rinsing and drying steps complete the fabrications of the first bilayer. The whole procedure can be repeated as many times as necessary, with the same or a different pair of materials, which may also include nanoparticles, dendrimers, enzymes, etc. Therefore, in addition to allowing precise control of film thickness, the LbL method allows making films with their compositions controlled at the nanometer scale up to several hundreds of nanometers in thickness, simply by properly choosing the materials used for fabricating each layer.
Since there are no restrictions in the selection of polyelectrolytes, there are many materials that may be employed in the manufacture of LbL films. Thus, some of the most used are the PEI (poly(ethylene imine)), PAH (poly(allylamine chloride)), and PDAC (poly(dimethyldiallylammonium chloride)) as polycations; and PVS (poly(vinyl sulfonic acid)), PSS (poly(sodium styrene sulfonate)), Ma-co-DR13 (a side-chain-substituted azobenzene copolymer derived from azodye Disperse Red 13), PS-119 (Poly(vinylamine) backbone azo chromophore), and PAA (poly(acrylic acid)) as polyanions. Figure 6 displays the structural formulas of some of these polyelectrolytes.  In this chapter, we discuss the molecular orientation of self-assembled LbL films fabricated with polyelectrolytes containing the azo-group. PAH (M w = 15000) and Poly S-119 (M w = unknown) were obtained from Aldrich and used as received. LbL films on BK7 glass substrates (area 10 x 30 mm 2 , thickness 4 mm) were prepared from aqueous solutions of PAH and Poly S-119 with 1.0 mg/ml concentration and pH 3.5, 7.0, and 10.0. For a given choice of pH, both polyelectrolyte solutions and the rinsing solution had the same pH value, which was adjusted by addition of HCl (from Qhemis, 37%, analytical grade) and NaOH (from Aldrich, electronic grade, purity 99.99%). Substrates were cleaned by piranha solutions (H 2 SO 4 /H 2 O 2 at 3:1 proportions by volume) for 20 min, extensively rinsed with Milli-Q water (resistivity 18.3 MΩ•cm) and dried by nitrogen-flow right before use.
The LbL films were prepared by alternate adsorption of cationic (PAH) and anionic (Poly S-119) polyelectrolytes on the BK7 glass substrates, as described in literature [29,33]. In this work, we used just one final drying process: drying by slow water evaporation, that is, the films were prepared without any drying after adsorption or rinsing stages. In order to dry the samples after the self-assembly is complete, the substrates were loosely covered by a Petri dish to avoid contamination and stored for a period of 48 hours at room temperature (~ 23°C) and air humidity around 40%. Only after this period, the second-harmonic signals were recorded. Figure 7 shows absorbance at 445 nm (due to the azodye sidechain of PS-119) as a function of number of bilayers for films fabricated with three different pH values. As we can see, the film content of PS-119 increases linearly with the number of bilayers, demonstrating that the same amount of azopolymer is adsorbed at each bilayer. Figure 7 also shows that the adsorbed amount per layer is larger for pH 10, suggesting the formation of thicker films under such conditions [35].
contamination and stored for a period of 48 hours at room temperature (~ 23°C) a this period, the second-harmonic signals were recorded. Figure 7 shows absorbance at 445 nm (due to the azodye sidechain of PS-119) as a films fabricated with three different pH values. As we can see, the film content of number of bilayers, demonstrating that the same amount of azopolymer is adsorb that the adsorbed amount per layer is larger for pH 10, suggesting the formation o [35].  Our SHG instrumentation is shown in Figure 8 for SHG measurements as a function of azimuthal angle Ω, where we can see a double-functional rotation/translation stage, allowing rotation of sample around the z axis (azimuthal angle Ω), and its translation on the horizontal plane xy. A pulsed Nd 3+ :YAG laser is used to excite the samples. The repetition rate, pulse duration, and the pump energy of the IR beam at 1064 nm were 20 Hz, 30 ps, and 2.0 mJ, respectively. The area of beam on the sample surface was approximately 2 mm 2 , and the angles of incidence/reflection were 60°, since the phase matching condition along the surface plane leads to k SHG sinα SHG = 2k IR sinα IR , which gives α SHG = α IR in the reflection direction (air side).
Polarizers are used to set the polarization combination.  For studying the effect of heating, we used a temperature-controlled sample cell and the S in P out polarization combination. Figure 9 shows the sample cell for SHG measurements as a function of temperature, which is aligned by a mirror mount positioned on top of a computerized xy translation and rotation stage. A commercial temperature controller was used to vary the temperature with ~ 0.34°C/min heating rate from room temperature (around 25°C) to 190°C. Figure 9 also shows in more detail the heating cell used in this experiment, with a sample inside.
on top of a computerized xy translation and rotation stage. A commercial temperature controller was used to vary the temperature with ~ 0.34C/min heating rate from room temperature (around 25C) to 190C. Figure 9 also shows in more detail the heating cell used in this experiment, with a sample inside.

Molecular ordering as a function of number of layers
Measurements of SHG as a function of azimuthal angle of rotation Ω were performed for the SP (S pump and P SHG signal, or S in P out ) and SS (S pump and S SHG signal, or S in S out ) polarization combinations for LbL films of PAH/PS-119, varying the number of monolayers and the pH of the adsorption/rinsing solutions. For samples with isotropic ordering, the signal in the SP polarization combination should be intense, while for the SS polarization combination the SHG signal is only allowed if the sample is anisotropic. However, if there are orientational domains much smaller than the area of the pump beam in the sample, but larger than the wavelength of the beam, there should be an intense and isotropic SHG signal for both SP and SS polarization, confirming the microscopic anisotropy of the sample. Therefore, the absence of signal in the SS polarization is indicative of an isotropic molecular arrangement at the scale of the pump beam wavelength.
As a control measurement, an SHG rotational scan was obtained for a sample of z-cut quartz crystal and also for a gold surface prepared by thermal evaporation on glass. As can be seen in Figure 10, the measurement for quartz presents six directions where the signal is maximum, reflecting the C 3v symmetry of this quartz crystal surface. For the gold surface, it is isotropic and the electronic resonance at 532 nm yields a high second-order susceptibility [22] charac-teristic of this metal. Thus, the SHG signal from gold is independent of orientation and is fairly strong.
As an example of determining the orientational distribution function for layer-by-layer films, we consider the results displayed in Figure 11, where we can see the SHG signal as a function of azimuthal angle Ω for a 10 bilayer film of PAH/Ma-co-DR13 [36]. As described in Section 2.4, the results were adjusted to Equations (28) -(33) to determine χ 1 through χ 6 , and the best fit lines are shown in Figure 11. Using their definitions (Equations (22) - (27)) and the orientation distribution function given by Equation (34), the six equations were solved to find the orientation parameters in F(θ, φ). For these films, the following values were determined: θ 0 = 37.41±0.24, σ = 12.85±0.53, d 1 = 0.009±0.001, d 2 = 0.014±0.002, d 3 = -0.001±0.003, and Ω 0 = -11.87±4.78, which fully characterize the orientational distribution of azo-groups in the sample.
As an example of determining the orientational distribution function for layer-bylayer films, we consider the results displayed in Figure 11, where we can see the SHG signal as a function of azimuthal angle  for a 10 bilayer film of PAH/Ma-co-DR13 [36].
As described in Section 2.4, the results were adjusted to Equations (28) -(33) to determine  1 through  6 , and the best fit lines are shown in Figure 11. Using their definitions (Equations (22) -(27)) and the orientation distribution function given by Equation (34)  The marked effect of drying on the molecular arrangement of azopolymer LbL films can also be investigated by SHG. Figure 12(a) shows SHG measurements as a function of azimuthal angle  for a one bilayer film of (PAH/PS-119) obtained at three  The marked effect of drying on the molecular arrangement of azopolymer LbL films can also be investigated by SHG. Figure 12(a) shows SHG measurements as a function of azimuthal angle Ω for a one bilayer film of (PAH/PS-119) obtained at three different points on each sample, for two samples fabricated with solutions of different pH values and dried by slow evaporation. They show that this fabrication procedure leads to isotropic and homogeneous LbL films, in agreement with the results already found for films of PAH/PSS [34]. The opposite was observed for self-assembled films of PAH/Ma-co-DR13, shown in Figure 12(b), which were fabricated with dry nitrogen flow drying. Indeed BAM (Brewster Angle Microscopy) measurements revealed the presence of orientational domains and inhomogeneity [36]. However, we have found that thicker films tend to became globally (not locally) more isotropic, since the SHG signals show smaller variations as a function of rotation, but the SS polarization combination does not vanish. The marked effect of drying on the molecular arrangement of azopolymer LbL films can also be in Figure 12(a) shows SHG measurements as a function of azimuthal angle Ω for a one bilayer film o obtained at three different points on each sample, for two samples fabricated with solutions of dif dried by slow evaporation. They show that this fabrication procedure leads to isotropic and homo agreement with the results already found for films of PAH/PSS [34]. The opposite was observed fo of PAH/Ma-co-DR13, shown in Figure 12(b), which were fabricated with dry nitrogen flow drying (Brewster Angle Microscopy) measurements revealed the presence of orientational domains and i However, we have found that thicker films tend to became globally (not locally) more isotropic, si show smaller variations as a function of rotation, but the SS polarization combination does not van SHG measurements as a function of the azimuthal angle Ω for films of PAH/PS-119 of different th pH 7 showed that the films are always isotropic in the sample plane, since they have strong signal combination that is independent of the sample orientation. Furthermore, the SS polarization signa whatever the number of layers, indicating that the samples are also microscopically isotropic. How SP signal undergoes a change with the number of layers, which is related to the relative orientatio each layer. SHG measurements as a function of the azimuthal angle Ω for films of PAH/PS-119 of different thicknesses prepared at pH 7 showed that the films are always isotropic in the sample plane, since they have strong signal with SP polarization combination that is independent of the sample orientation. Furthermore, the SS polarization signal is practically zero whatever the number of layers, indicating that the samples are also microscopically isotropic. However, we note that the SP signal undergoes a change with the number of layers, which is related to the relative orientation of the azo-groups in each layer.
Similarly to the study of PAH/PSS films [24], for PAH/PS-119 films fabricated at pH 7.0 there is an alternation of the SP intensities as the last layer of the film is PAH or PS-119. Since the samples are always isotropic, Figure 13 shows the average intensities of the azimuthal SHG measurements with SP polarization as a function of the number of layers for the three pH values studied. Some groups have reported a linear increase of χ (2) with the number of bilayers, especially above 10 bilayers [37][38][39][40][41], implying that average chromosphere orientations in each bilayer is the same (e.g., all pointing up, on average, in every bilayer). As noted in Figure 13, the square root of the SHG signal (which is related to the effective value of χ (2) ) does not grow linearly with the number of bilayers for these PAH/PS-119 films. For pH 10.0, the signal rapidly decreases with the number of layers, up to 20 layers, but remains approximately constant for pH 7. In the case of pH 3.5, there is a slight increase of signal with thickness up to 10 bilayers, but the signal is significantly reduced for thicker films, around 30 bilayers (not shown). Moreover, we always noted alternating SHG intensity after adsorption of each polyelectrolyte (integer vs. half-integer number of bilayers), at least for the first few bilayers. Specifically, for the films of PAH/PS-119 at pH 3.5 the authors of references [38] and [39] report a linear growth of χ (2) for films up to 100 bilayers. However, we observe that for the same pH value the signal initially grows with the number of bilayers, but also alternating as the last layer is PAH or PS-119, and decreases from ~ 10 bilayers, in disagreement with references [37][38][39][40][41]. Even for other films fabricated at other pH values, the increase was not linear. This behavior was reproduced in another set of samples manufactured with other solutions. Similar effect was observed by Lvov and co-workers for PDDA/PAZO LbL films where they reported an increase of χ (2) up to 5 bilayers, but a reduction for thicker films [15]. At the moment we have no explanation for this discrepancy between our experimental results and those of references [37][38][39][40][41]. However, we have reported the changes in molecular conformation including the molecular ordering after adsorption of the subsequent layer [24], and therefore a linear increasing of χ (2) would be quite surprising, because that would mean that each and every PS-119 layer has an identical average orientation, and in the same direction. This would be especially unexpected considering effects such as interpenetration of layers and increasing film roughness with the number of layers, as has been observed for films of POMA/PVS [43] and PAH/Ma-co-DR13 [42].
In summary, comparing the intensities in Figure 13, we see that the signal initially grows with the number of layers for low pH (3.5), and it only decreases for high pH (10.0) and remains nearly unchanged for almost neutral pH (7.0). When the number of bilayers is high, we observed that the SHG signal always decreases considerably.
From the absorbance measurements in Figure 7, the amount of PS-119 per bilayer is constant in each sample for all three pH values. Therefore, we may conclude that the azopolymer chains do not remain with the same degree of ordering as the film grows, otherwise we should have observed a linear increase of χ (2) with thickness. Specifically, since there is a decrease in signal with increasing number of layers, it is necessary that the adsorption of the last layers is affected by the average ordering of the previous layers, pointing on average in the opposite direction of the first ones. If the first few layers were ordered and the following ones had an isotropic arrangement, the SHG signal should initially grow and then saturate at a constant value for thick films.
At pH 3.5, PAH has an ionization degree of about 100%, while the glass is hardly ionized (only about 9% of the surface Si-OH groups, according to references [43,44]) and the first layer of PAH would be expected to be very thin due to the high charge density in the chains and low substrate charge. However, due to a high ionic strength, the electrostatic shield makes the PAH chain a little more coiled. Therefore, these films at pH 3.5 are slightly thicker and rougher due to the reduction of electrostatic interactions by an increased ionic strength. This means that the SHG signal initially increases with thickness, but the net ordering of each additional bilayer is reduced for thick films, leading to a saturation (and eventual reduction) of SHG signal, as shown in Figure 13. For pH 10, the glass is highly charged, but the PAH is only about 30% ionized, thus forming more folded layers than at pH 3.5. Therefore, the adsorbed amount is large but there are few sites in the PAH layer available for complexation with the PS-119, thus decreasing the drive for orientational ordering of PS-119 and leading to films that rapidly become disordered with increasing thickness, reducing the SHG signal. For pH 7, both the substrate and PAH are quite charged, with a low ionic strength in the solutions, favoring electrostatic interactions and allowing the film growth with a relative stability of the SHG signal.
LbL films where they reported an increase of χ up to 5 bilayers, but a reduction for thicker films [15]. At the moment we have no explanation for this discrepancy between our experimental results and those of references [37][38][39][40][41]. However, we have reported the changes in molecular conformation including the molecular ordering after adsorption of the subsequent layer [24], and therefore a linear increasing of χ (2) would be quite surprising, because that would mean that each and every PS-119 layer has an identical average orientation, and in the same direction. This would be especially unexpected considering effects such as interpenetration of layers and increasing film roughness with the number of layers, as has been observed for films of POMA/PVS [43] and PAH/Ma-co-DR13 [42].  In summary, comparing the intensities in Figure 13, we see that the signal initially grows with the number of layers for low pH (3.5), and it only decreases for high pH (10.0) and remains nearly unchanged for almost neutral pH (7.0). When the number of bilayers is high, we observed that the SHG signal always decreases considerably. Another interesting feature is the alternation of the SHG signal for films of a few bilayers (data not shown). For example, for the film of 3 layers (or 1.5 bilayers), (PAH/PS-119)/PAH, typically the signal is canceled out or significantly reduced, except for pH 7 where the alternating signals are all large. Here, we will consider only the films formed at pH 3.5 and 10, which show a different behavior from that observed in our previous report [24]. Compared to the first bilayer, PAH/PS-119, which presents considerable SHG signal, the (PAH/PS-119)/PAH film has a new ordering of PS-119 azo-groups, with random or symmetric configuration in the z-direction of film growth, which yields a vanishing SHG signal. This because in the 1 bilayer film, the negatively charged azo-groups of PS-119 are oriented on average toward the cationic PAH layer. In the three-layer film, the signal is greatly reduced, since the third PAH layer modifies the orientation of the previously adsorbed PS-119 layer, thereby reducing the SHG signal. In particular, for pH 3.5 the signal is almost completely canceled, indicating an almost perfectly symmetrical configuration of the azopolymer active groups. This is reasonable because the two PAH layers of the PAH/PS-119/PAH film are highly and equally charged, exerting nearly the same influence on the central PS-119 layer.
To investigate in more detail the orientation of azo-groups of PS-119 in very thin films, in the anomalous region of ordering as a function of thickness for pH 3.5 films (see Figure 13), we performed a direct measurement of the phase of χ (2) with the SP polarization combination, using as a reference a thin film of zinc sulfide (ZnS), as described in Section 2.3. Figure 14(a) shows that the phase of the SHG signal from the sample, which is related to the average direction of orientation of the azopolymer is always the same for films formed at pH 3.5 with an integer number of bilayers where the last layer is the azopolymer, covering a highly charged cationic layer of PAH. For the first bilayer, it is expected that the preferred arrangement of the azo-groups of PS-119 is toward the highly charged layer of PAH, that is, toward the substrate side. Thus, this behavior is preserved for all films whose last layer is PS-119. Since the signal for the film with 3 layers, PAH/PS-119/PAH, is null, we can conclude that occurs a rearrangement of the chromophores in direction to both layers of PAH, such as observed for PAH/PSS films [24]. Therefore, the results in Figure 14(a) confirm our assumptions about the orientation of the azopolymer groups. Figure 14(a) shows that the phase of the SHG signal from the sample, which is related to the average direction of orientation of the azopolymer is always the same for films formed at pH 3.5 with an integer number of bilayers where the last layer is the azopolymer, covering a highly charged cationic layer of PAH. For the first bilayer, it is expected that the preferred arrangement of the azo-groups of PS-119 is toward the highly charged layer of PAH, that is, toward the substrate side. Thus, this behavior is preserved for all films whose last layer is PS-119. Since the signal for the film with 3 layers, PAH/PS-119/PAH, is null, we can conclude that occurs a rearrangement of the chromophores in direction to both layers of PAH, such as observed for PAH/PSS films [24]. Therefore, the results in Figure 14(a) confirm our assumptions about the orientation of the azopolymer groups. For films with 2 or 2.5 bilayers, whose signals are less intense, the phase measurement, while difficult to be performed, confirms that the reordering of the azogroups also occurs, as shown in Figure 14   For films with 2 or 2.5 bilayers, whose signals are less intense, the phase measurement, while difficult to be performed, confirms that the reordering of the azo-groups also occurs, as shown in Figure 14(b). When the film is finished with a layer of PAH, PS-119 chromophores undergo reorientation and then acquire a small average ordering in the direction opposite to the substrate, causing a reversal of the phase of the SHG signal. Therefore, films with an even number of layers have the same phase, with azo-groups pointing toward the substrate, while the 2.5 layer film had the opposite net orientation.

Effect of temperature on the ordering of azopolymer films
Now, we shall discuss the effect of heating on the ordering of azopolymer films. Figure 15 shows results for PAH/PS-119 films fabricated from solutions at pH 3.5, which are illustrative of the general behavior of molecular ordering as a function of heating. We begin at room temperature (~ 20°C) and ramp the temperature up to 190°C. As can be seen, there is no abrupt variation of SHG signal, but a gradual and significant decrease of intensity, even for thicker films with 5 or 10 bilayers. Similar behavior was observed for PDDA/PAZO films [15].
opposite to the substrate, causing a reversal of the phase of the SHG signal. Therefore, films with a layers have the same phase, with azo-groups pointing toward the substrate, while the 2.5 layer film orientation.

Effect of temperature on the ordering of azopolymer films
Now, we shall discuss the effect of heating on the ordering of azopolymer films. Figure 15 shows r films fabricated from solutions at pH 3.5, which are illustrative of the general behavior of molecula function of heating. We begin at room temperature (~ 20°C) and ramp the temperature up to 190°C is no abrupt variation of SHG signal, but a gradual and significant decrease of intensity, even for th 10 bilayers. Similar behavior was observed for PDDA/PAZO films [15]. It is interesting to note that the literature reports that these films are quite thermally stable. They st signal decreases about 20% from the initial value at room temperature, for temperatures above Tg ( Figure 15 shows that thermal stability was not confirmed. The SHG intensity goes to almost zero in for the (PAH/PS-119)/PAH film (result not shown). The SHG signal for the 1 bilayer film at 150°C i signal at 20°C: a reduction of 75%, instead of only 20% as previously reported [16,38,40]. Howeve mention how this Tg was measured. It is not clear if it is for the LbL film, including the substrate ef molecules in the bulk.
The fact that we do not observe an abrupt decrease of the SHG signal (indicating a glass transition due interactions in the film that are different from those in the bulk materials, like lateral interactio interlayer interactions. Furthermore, our films are formed by two different molecules and we shou substrate effect, because the films studied here have only a few layers and the substrate/polymer el is considerable. Our results on films fabricated at pH 7.0 show this influence on the film adsorption [45]). For these films, it was observed that the SHG signal vanishes at high temperatures for a 2-bila thicker films. This suggests that these thicker films, with a more efficient complexation between lay improved thermal stability because it is more difficult to thermally induce disorder. It is interesting to note that the literature reports that these films are quite thermally stable. They state that the SHG signal decreases about 20% from the initial value at room temperature, for temperatures above T g (~ 140°C). Clearly, Figure 15 shows that thermal stability was not confirmed. The SHG intensity goes to almost zero in some cases, such as for the (PAH/PS-119)/ PAH film (result not shown). The SHG signal for the 1 bilayer film at 150°C is only ~ 25% of initial signal at 20°C: a reduction of 75%, instead of only 20% as previously reported [16,38,40]. However, these authors do not mention how this T g was measured. It is not clear if it is for the LbL film, including the substrate effect, or for complexed molecules in the bulk.
The fact that we do not observe an abrupt decrease of the SHG signal (indicating a glass transition temperature) can be due interactions in the film that are different from those in the bulk materials, like lateral (intralayer) or interlayer interactions. Furthermore, our films are formed by two different molecules and we should also consider the substrate effect because the films studied here have only a few layers and the substrate/polymer electrostatic interaction is considerable. Our results on films fabricated at pH 7.0 show this influence on the film adsorption (data not shown [45]). For these films, it was observed that the SHG signal vanishes at high temperatures for a 2-bilayer film, but not for thicker films. This suggests that these thicker films, with a more efficient complexation between layers, have an improved thermal stability because it is more difficult to thermally induce disorder. Figure 16 shows the ratio of χ (2) at 180°C and 30°C as a function of the number of bilayers, for films fabricated at both pH 7 and 3.5. Thicker films are more stable at pH 7, but for films at pH 3.5, that ratio was quite independent of thickness. However, there is an important difference in the temperature at which the SHG signal reaches the lowest value for pH 3.5 films. For a 1bilayer film, this temperature is around 180°C, but for films with 5 and 10 bilayers, this temperature is near 160°C. This behavior suggests a significant influence of substrate charge density on the first layers, increasing the complexation effect between layers and the thermal stability for these thin films. For thicker films, the complexation/interpenetration of layers is not as disturbed as for thin films and the thermal stability increases. However, at pH 3.5 the silica substrate is less charged and has less influence on the complexation of layers, resulting in a thermal stability which is independent of film thickness, with only a slight reduction in the stabilization temperature for thicker films. For films fabricated at pH 7, the substrate charge is higher, which promotes more efficient complexation between the polyelectrolytes and yields more thermally stable films (except for a 2-bilayer film that presents an anomalous behavior).
stability which is independent of film thickness, with only a slight reduction in the stabilization temperature for thicker films. For films fabricated at pH 7, the substrate charge is higher, which promotes more efficient complexation between the polyelectrolytes and yields more thermally stable films (except for a 2-bilayer film that presents an anomalous behavior). In order to verify the effect of heating on the structure of films, we compare the SHG signal for films at pH 3.5 before heating, and after slow cooling to room temperature. Results indicate that thermally induced disordering is not permanent because the SHG signal is restored after slow cooling. This behavior is similar to what happens in the spontaneous drying assembly, since as the film cools the chains are losing mobility, but slowly enough for them to recover the best configuration induced by electrostatic interaction, thus recovering the order and restoring the SHG signal. For the films fabricated at pH 3.5, the SHG signal as a function of the azimuthal angle has the same isotropic profile before and after heating. On the other hand, the same was not verified for films fabricated at pH 10, where we can observe that after heating the ordering is no longer isotropic, as shown in Figure 17 for a 1-bilayer PAH/PS-119 film. This suggests that the films fabricated at this pH value have larger mobility than those at pH 3.5 or 7, which allows the rearrangement of chains to form macroscopic domains (~ hundreds of micrometers) with preferential orientation along the substrate plane. Figure 16. Reduction of χ (2) due to heating as a function of number of layers, for films fabricated at pH 7.0 and 3.5. The points are the ratio of χ (2) measured at 180°C to that at 30°C, and the lines are guides to the eye.
In order to verify the effect of heating on the structure of films, we compare the SHG signal for films at pH 3.5 before heating, and after slow cooling to room temperature. Results indicate that thermally induced disordering is not permanent because the SHG signal is restored after slow cooling. This behavior is similar to what happens in the spontaneous drying assembly, since as the film cools the chains are losing mobility, but slowly enough for them to recover the best configuration induced by electrostatic interaction, thus recovering the order and restoring the SHG signal. For the films fabricated at pH 3.5, the SHG signal as a function of the azimuthal angle has the same isotropic profile before and after heating. On the other hand, the same was not verified for films fabricated at pH 10, where we can observe that after heating the ordering is no longer isotropic, as shown in Figure 17 for a 1-bilayer PAH/PS-119 film. This suggests that the films fabricated at this pH value have larger mobility than those at pH 3.5 or 7, which allows the rearrangement of chains to form macroscopic domains (~ hundreds of micrometers) with preferential orientation along the substrate plane.
profile before and after heating. On the other hand, the same was not verified for films fabricated at pH 10, where we can observe that after heating the ordering is no longer isotropic, as shown in Figure 17 for a 1-bilayer PAH/PS-119 film. This suggests that the films fabricated at this pH value have larger mobility than those at pH 3.5 or 7, which allows the rearrangement of chains to form macroscopic domains (~ hundreds of micrometers) with preferential orientation along the substrate plane.

Conclusions
In this chapter we have discussed how nonlinear optical methods, and in particular second-harmonic generation (SHG), can be used to investigate the molecular order in polyelectrolyte layer-by-layer films containing azopolymers. After a brief outline of the basic theory of SHG for interface studies, we have shown how its polarization dependence can be used to obtain quantitative information about the orientational distribution function of azo-groups in these thin films. However, even a qualitative analysis of the SHG signal can give important information about the film structure. For example, the SHG dependence on the azimuthal rotation of the sample has shown that the way the films are dried has a marked influence of their molecular arrangement, which is isotropic for slow (spontaneous) drying, while it becomes anisotropic and inhomogeneous with nitrogen-flow drying.
We have also investigated how the molecular ordering depends on the film thickness and fabrication conditions, especially the pH of the assembling/rinsing solutions.
In contrast to previous reports in the literature, we did not find that all layers keep the same Figure 17. SHG signal in SS and SP polarization combination for a one-bilayer PAH/PS-119 film fabricated at pH 10, before and after heating to 190°C.

Conclusions
In this chapter we have discussed how nonlinear optical methods, and in particular secondharmonic generation (SHG), can be used to investigate the molecular order in polyelectrolyte layer-by-layer films containing azopolymers. After a brief outline of the basic theory of SHG for interface studies, we have shown how its polarization dependence can be used to obtain quantitative information about the orientational distribution function of azo-groups in these thin films. However, even a qualitative analysis of the SHG signal can give important information about the film structure. For example, the SHG dependence on the azimuthal rotation of the sample has shown that the way the films are dried has a marked influence of their molecular arrangement, which is isotropic for slow (spontaneous) drying, while it becomes anisotropic and inhomogeneous with nitrogen-flow drying.
We have also investigated how the molecular ordering depends on the film thickness and fabrication conditions, especially the pH of the assembling/rinsing solutions. In contrast to previous reports in the literature, we did not find that all layers keep the same relative orientation, leading to a linear increase of the optical nonlinearity with thickness. Instead, we find that for films fabricated at low or high pH, the nonlinearity tends to decrease for thick films (~10 bilayers). Films fabricated at neutral pH generate an SHG signal that does not vary significantly with thickness, except for a slight alternation in intensity for films with odd or even number of layers. These results are due to the influence of adjacent polyelectrolyte layers on the order of an adsorbed layer, that is, the order of the last adsorbed layer is different than that for layers within the film. Phase measurements of the SHG signal confirm the reorientation of polymer groups in the last layer after adsorption of an additional polyelectrolyte layer. Finally, we have also studied the thermal stability of the molecular arrangement by SHG measurements as a function of sample temperature. We found that the nonlinear response presents a gradual and significant reduction upon heating, so that a clear glass transition temperature cannot be defined for these ultrathin layer-by-layer films. Again, the thermal stability of the samples depends on their fabrication conditions (pH and thickness), with higher charge density in the polyelectrolytes and substrate promoting better complexation and improving their thermal stability. We also noted that the disordering effect of heating is reversible, and the SHG signal is recovered upon cooling. However, a few samples had their molecular arrangement becoming anisotropic after a heating/cooling cycle, as a result of aggregation and formation of molecular domains at the scale of tens of micrometers. We hope that these examples of SHG applied to the study of thin nonlinear optical polymer films have shown how powerful the technique can be to obtain information about the film structure at the molecular level, with also important consequences for their applications in optical devices.

Author details
Heurison S. Silva