Electrically Programmed Doping Gradients Optimize the Thermoelectric Power Factor of a Conjugated Polymer

Functionally graded materials (FGMs) are widely explored in the context of inorganic thermoelectrics, but not yet in organic thermoelectrics. Here, the impact of doping gradients on the thermoelectric properties of a chemically doped conjugated polymer is studied. The in‐plane drift of counterions in moderate electric fields is used to create lateral doping gradients in films composed of a polythiophene with oligoether side chains, doped with 2,3,5,6‐tetrafluoro‐tetracyanoquinodimethane (F4TCNQ). Raman microscopy reveals that a bias voltage of as little as 5 V across a 50 µm wide channel is sufficient to trigger counterion drift, resulting in doping gradients. The effective electrical conductivity of the graded channel decreases with bias voltage, while an overall increase in Seebeck coefficient is observed, yielding an up to eight‐fold enhancement in power factor. Kinetic Monte Carlo simulations of graded films explain the increase in power factor in terms of a roll‐off of the Seebeck coefficient at high electrical conductivities in combination with a mobility decay due to increased Coulomb scattering at high dopant concentrations. Therefore, the FGM concept is found to be a way to improve the thermoelectric performance of not yet optimally doped organic semiconductors, which may ease the screening of new materials as well as the fabrication of devices.


Introduction
[3] The performance of thermoelectric materials is given by the figure of merit ZT =  2 T/ where  is the Seebeck coefficient,  the electrical conductivity,  the thermal conductivity and T the absolute temperature.Neat, conjugated polymers are intrinsic semiconductors that lack free charge carriers.Chemical doping, which involves the addition of a (strong) molecular oxidizing or reducing agent, is widely explored as a means to optimize the electrical and thermal properties of conjugated polymers. [4,5]opant molecules undergo electron transfer with the semiconductor, which creates a net charge (polaron) on the polymer backbone, leaving behind a counterion that balances the polaron charge.The dopant and conjugated polymer can either be co-processed from the same solvent (or melt), or the former can be allowed to sequentially dope a polymer film. [6,7]Chemical doping is usually considered to result in films that feature a macroscopically uniform distribution of dopant molecules (and counterions) with no lateral dependence of the thermoelectric properties.
10] FGMs of inorganic semiconductors allow to match the temperature-dependent figure of merit ZT with the local temperature along a temperature gradient ΔT in a thermoelectric device.This approach, however, is only effective in case of large ΔT, and hence is less applicable to organic semiconductors because they tend to degrade rapidly above 200 °C and thus are more likely to be used in combination with a relatively narrow ΔT.It may, however, be possible to use FGMs of organic semiconductors in other ways, for instance to exploit the complex interplay of their thermoelectric parameters.In case of organic semiconductors,  and  strongly vary with the doping level (charge-carrier concentration c).At low and intermediate doping levels  and  typically follow an approximate, empirical power law, ∝ −0.25 , [11] followed by a sharp decrease in  at high doping levels. [12,13]Given the complex interplay between  and , it is not obvious how the thermoelectric power factor  2  of an organic FGM would compare with that of a homogeneously doped film.
Spatial control of the electrical properties of conjugated polymers has rarely been explored in the context of organic thermoelectrics. [14]This is surprising given the numerous methods that exist to create continuous or stepwise patterns in nanostructure or doping level in polymer films.[21] Likewise, local exposure to dopant vapor, [14,15] local sublimation, [14,22] local changes in dopant solubility [23,24] and drift of counterions in an electric field [25] have been used to create well-defined patterns or continuous doping gradients.Hence, the question arises whether doped polymer films with judiciously selected gradient profiles can display any improvement in thermoelectric properties.In this context, one recent study by Patel et al. examined the thermoelectric properties of poly(2,5-bis(3-alkyl-2-thienyl)thieno[3,2b]thiophene) (PBTTT) thin films with a stepwise dopant gradient but found no improvement compared to reference homogeneous films. [14]Hence, there is a need for methods that allow to screen gradient profiles, which would allow to explore if the FGM approach can result in an improvement in the thermoelectric properties of organic materials.
We set out to create lateral dopant gradients in polymer films by means of the drift of counterions in an electric field.In case of polymers such as regio-regular poly(3-hexylthiophene) (P3HT) an electric field of at least 3 V μm −1 is required to cause drift of 2,3,5,6-tetrafluoro-tetracyanoquinodimethane (F 4 TCNQ) anions. [25]We instead chose to work with the more polar polythiophene p(g 4 2T-T) (see Figure 1 for chemical structure) because it has a larger dielectric constant than P3HT ( r = 4.4 instead of 2.7).A larger dielectric constant can be expected to reduce the Coulomb interactions between F 4 TCNQ (di)anions and the charged polymer backbone, [13] which may ease drift of anions in an electric field.We show that a bias voltage V bias = 5 V across a 50 μm long channel (electric field of 0.1 V μm −1 ) is sufficient to laterally dedope p(g 4 2T-T) films close to the negatively charged electrode as a result of F 4 TCNQ counterions drifting toward the positive electrode.Hence, variation of V bias can be used to program different doping gradients without changing the sample, which allows to screen the impact of different doping gradients on the thermoelectric properties.By gradually changing V bias we are able to establish that suitable doping gradients exist that permit to enhance the thermoelectric power factor  2  relative to homogeneously doped films.

Results and Discussion
Laterally homogeneous films of p(g 4 2T-T) doped with F 4 TCNQ were prepared by solution co-processing (see Figure 1b for schematic of doping method).UV-vis-NIR spectra of doped films show that the absorption peak around 600 nm, assigned to neat, undoped polymer, decreases with dopant concentration, indicating a strongly doped film in case of 23 mol% dopant (Figure 1c).Concomitantly, polaronic absorption peaks arise in the NIR.For 17 and 23 mol% F 4 TCNQ, we observe additional absorption features at 800-900 nm, which are characteristic for F 4 TCNQ anions.We conclude that films with a dopant concentration of 3 to 9 mol% F 4 TCNQ mostly contain F 4 TCNQ dianions, which in contrast to anions do not absorb above the bandgap of p(g 4 2T-T). [26]The presence of dianions at low dopant concentrations is confirmed by FTIR spectra, which show peaks at 2130 and 2162 cm −1 that are characteristic for the cyano stretch vibration of F 4 TCNQ dianions (Figure S1, Supporting  Information).Comparison of the doping concentration with previously reported results for p(g 4 2T-T) co-processed with F 4 TCNQ indicates that films with 3-9 mol% F 4 TCNQ are rich in dianions, [27] resulting in an ionization efficiency  ion ≈ 180 to 200%, while films with 17 and 23 mol% F 4 TCNQ mostly feature anions, yielding  ion ≈ 100 to 140% (cf.Table 1; note that  ion ≈ 100% is an overestimate for 23 mol% F 4 TCNQ because the corresponding UV-vis-NIR spectrum shows an absorption peak characteristic for neutral F 4 TCNQ).We fabricated a series of 4-terminal lateral devices comprising four parallel line-shaped Au electrodes with an inner channel length of L 1 = 50 μm to examine at which applied bias F 4 TCNQ (di)anions start to drift (Figure 2; see Experimental Section for details).We applied different bias voltages V bias between the inner electrodes and measured the transient current as a function of time.For V bias = 2.5 V the current is constant with time and changes sign upon reversal of the bias voltage, indicating that counterions remain immobile.Instead, for V bias ≥ 5 V we find that the current changes with time (Figure 2b).The threshold bias voltage of 5 V that is required to cause drift of counterions in p(g 4 2T-T) corresponds to an electric field of 0.1 V μm −1 , which is much smaller than the critical electrical field of 3 V μm −1 previously reported for P3HT doped with F 4 TCNQ. [25]The first time a sufficiently high V bias = 5 V is applied at 400 s, the current decreases for all investigated doping levels, which we assign to a decrease in the degree of oxidation of F 4 TCNQ-doped p(g 4 2T-T) close to the negatively charged electrode (cf.Raman spectroscopy in Figure 3).For films doped with 3 to 9 mol% F 4 TCNQ, reversal of the applied bias to V bias = −5 V first results in an initial increase in current, which we explain with the drift of (di)anions in the opposite direction that overwrites the previous doping gradient (Figure S2, Supporting Information).Subsequently, the current decreases again because of depletion of the film close to the opposite (now negative) inner electrode.Instead, the film doped with 17 mol% F 4 TCNQ features a significantly more rapid current decay, which we tentatively assign to the fact that many of the counterions are instead F 4 TCNQ anions (see Table 1), which can be expected to be less strongly Coulombically bound than dianions, leading to a higher drift mobility.It cannot be ruled out that the applied V bias triggers reactions at the electrodes, which may be aggravated by the presence of water in the active layer film because of the polar oligoether side chains of p(g 4 2T-T).
In order to estimate the mobility of the dopant ions, we carried out drift-diffusion simulations with SIMsalabim, [28,29] to simulate the current transients for different ion mobilities  ion (ranging from 10 −9 to 10 −7 cm 2 V −1 s −1 ).These simulations reproduce  the measured current transients (Figure 2b) and qualitatively reproduce the main features observed in the experiments, including an initial increase in current followed by a gradual decay (Figure 2c).Comparison of the simulated and measured current transients allowed us to estimate the drift mobilities of samples doped with different amounts of F 4 TCNQ, yielding a value of  ion ≈ 10 −9 cm 2 V −1 s −1 for p(g 4 2T-T) doped with 3 mol% F 4 TCNQ, and  ion > 10 −8 cm 2 V −1 s −1 for 17 mol% F 4 TCNQ.We tentatively assign the increase in drift mobility with oxidation level to the shift from F 4 TCNQ dianions to anions (see Figure S1, Sup-porting Information; Table 1), resulting in less strongly Coulombically bound and thus more mobile counterions.
Raman microscopy was used to map the electrically programmed gradients.We first recorded Raman spectra of homogeneously doped films in order to identify key spectroscopic features that change with the oxidation level.Neat p(g 4 2T-T) exhibits two intense Raman bands located at Raman shifts of  1 ≈ 1405 cm −1 (peak 1) and  2 ≈ 1445 cm −1 (peak 2), which we assign to C═C symmetric stretch vibrations, in analogy to Raman spectroscopy studies of poly(3-alkylthiophene)s [29][30][31] and polythiophenes with alkoxy side chains. [32,33]Doping of p(g 4 2T-T) results in a relative decrease of the intensity of peak 2. The peaks at 1405 and 1445 cm −1 were fitted with Lorentzian functions (Figure S3, Supporting Information) and the ratio of the areas under these two peaks A 2 /A 1 as well as the peak position could be used to qualitatively describe the oxidation level (Figure S4, Supporting Information), with A 2 /A 1 = 0.9-1.3corresponding to a number of polarons N p ≤ 1. × 10 26 m −3 and A 2 /A 1 ≈ 0.5 to N p ≥ 1.6 × 10 26 m −3 (cf.Table 1).Spatially resolved Raman spectra, recorded along the channel of electrically biased films, could thus be used to verify the development of a doping gradient, which may be accompanied by a structural gradient since doping with F 4 TCNQ strongly alters the degree of order and texture of p(g 4 2T-T). [27,34]For homogeneous films that had not yet experienced an electric field, the recorded Raman intensity at 1445 cm −1 did not vary as a function of position along the inner channel of our devices (Figure 3a).In contrast, upon application of V bias = 10 V (see Figure 2b) the relative Raman intensity of peak 2 increased close to the negative electrode (see Figure 3a).For films that were initially doped with 9 and 17 mol% F 4 TCNQ, the ratio of the peak areas A 2 /A 1 as a function of channel position x first decreased rapidly as a function of distance from the negative electrode and then, for x > 10 μm, displayed a value of A 2 /A 1 < 0.5, typical for oxidized p(g 4 2T-T) (see Figure 3b; Figure S5, Supporting Information).The position  2 of peak 2 displayed a similar evolution across the channel (Figure 3c; Figure S5, Supporting Information).Note that the evolution of Raman signals for conjugated polymers does not tend to scale linearly with the doping level [35] and hence the change in A 2 /A 1 across the channel likely differs from the actual dopant concentration.
We utilized the strong drift of ionized F 4 TCNQ in p(g 4 2T-T) to construct organic FGMs with a laterally varying oxidation level.In-plane devices were fabricated by depositing doped films on glass substrates patterned with four Au electrodes (distance L 1 = 500 μm between the inner electrodes; see Figure 4a for schematic of the setup).A stepwise increasing bias voltage (starting with 5 V for 5 min followed by a stepwise increase) was applied along the channel between the two inner electrodes to create different doping gradients, followed by measuring of the thermoelectric properties after each bias step.One set of devices was used to measure the effective electrical conductivity  via 4-point probe measurements by applying a current between the outer electrodes and recording the voltage drop across the inner electrodes.The effective Seebeck coefficient  was determined by equipping a second set of devices with a reference constantan wire at the bottom of the glass substrate followed by measurements of the thermovoltages V 1 and V 2 (see Figure 4a for schematic of the setup and Experimental Section for details), which allowed to detect the temperature difference between the two inner electrodes assuming a linear temperature gradient across the device.The electrically programmed gradients were stable for at least several minutes once the bias was removed and  and  were measured immediately after biasing.However, gradual changes occurred over longer periods of time, evidenced by a return of the channel resistance to close to its original value over a period of approxi-mately 2 hours (observed for a film doped with 9 mol% F 4 TCNQ and biased with V bias = 50 V), which can be explained with gradual equilibration of the oxidation level along the channel.
Devices comprising co-processed films with initial dopant levels ranging from 3 to 23 mol% F 4 TCNQ were investigated (see Table 1 for initial thermoelectric properties).The effective  of the channel gradually decreased because of the formation of a highly resistive region close to the negative electrode (cf.Raman microscopy in Figure 3), which dominates the overall resistance of the channel at sufficiently high bias voltages, leading to  << 1 S cm −1 (Figure 4b).In contrast, the effective  of the channel increased with V bias .Interestingly, at intermediate V bias the effective power factor  2  reached a maximum for all films with a highest value that was approximately two times larger than corresponding values of homogeneous films (Table 1).The highest effective power factor of  2  = 14.5 μW m −1 K −2 was obtained for a p(g 4 2T-T) film initially doped with 23 mol% F 4 TCNQ and a gradient programmed with V bias = 15 V (Figure 4b).
We also investigated the impact of doping gradients on a sequentially doped film, which featured initial values of  = 166 S cm −1 ,  = 5.5 μV K −1 and  2  = 0.5 μW m −1 K −2 , indicating a high oxidation level (Figure S6, Supporting Information).A doping gradient programmed with V bias = 25 V resulted in an 8-fold increase in power factor to  2  = 14.2 μW m −1 K −2 , which is comparable to the highest value obtained for films that were prepared by coprocessing dopant and polymer (Figure 4).The here obtained  2  values are higher than values that have been previously obtained for p(g 4 2T-T) [36] but are at least one order of magnitude lower than values reported for champion p-type polymers. [13]n order to investigate if the direction of the applied doping gradient and the ΔT used to determine the Seebeck coefficient influences the observed enhancement of  2 , we carried out an experiment where the sign of the applied bias was alternated.Doping gradients with opposite direction were created in devices comprising a sequentially doped p(g 4 2T-T) film by applying a V bias = +5 V then −5 V, +10 V, −10 V, etc.We observed a symmetric decrease in  and increase in  when comparing both cases, i.e., the doping gradient is (1) parallel with the direction of ΔT if V bias < 0 and (2) antiparallel if V bias > 0 (Figure S7, Supporting Information).The direction of the FGM with regard to ΔT, which can be reversibly programmed, does not affect the overall enhancement in  2 , which indicates that the thermoelectric parameters result from a linear response of the sample to the applied temperature gradient.
Kinetic Monte Carlo (kMC) simulations in combination with a simple series connection model for gradient devices allowed us to understand under which conditions a doping gradient can result in an increase in power factor.The kMC model has been described in detail in previous publications and calculates charge and energy transport parameters for electronic charge carriers (holes) performing variable range hopping (quantified by Miller-Abraham rates) on a cubic lattice with periodic boundary conditions, where all Coulomb interactions (hole-hole and hole-ion) are accounted for (see Section S1, Supporting Information, and ref. [38] for details and a list of all model parameters).Consistent with earlier findings, [38] the charge-carrier mobility decays with increasing dopant concentration due to an increase in energetic disorder and concomitantly charge trapping by the ionized dopants that overwhelms the beneficial effects of state filling (Figure 5a,b).Likewise, the power law relationship ∝ −0.25 first proposed by Glaudell et al. [11] is obeyed at low and intermediate doping levels, followed by a rapid decrease in  at high  (Figure 5b).][41] The used kMC model provides a natural explanation in terms of an increasing importance of Coulomb interactions, leading to a gradually changing density of states (DOS), followed by the opening of a hard Coulomb gap that leads to a drop and eventually a sign inversion of . [39]e used an interpolation scheme to calculate the effective  and  for a layer with an arbitrary gradient by considering the graded device as a series connection of thin, homogeneous slabs of varying composition.For simplicity, a linear gradient was used.We compared two cases, model A where  = const and ∝ −0.25 (dashed lines in Figure 5) and model B where ∝c −0.33 before the onset of the roll-off of  and ∝ − with  ≫ 0.33 beyond the onset of the roll-off (solid lines in Figure 5).Both models predict a monotonous decrease in effective conductivity due to the regions of lowest electrical conductivity (highest resistivity) dominating the series connection of regions with varying doping concentration.Likewise, both models predict a monotonous increase in effective Seebeck coefficient due to the decreasing average electrical conductivity.However, only Model B can, in contrast to Model A, reproduce the characteristic features of the experiment (Figure 5c).The reason for this is twofold: (i) in case of model B, the decay in effective conductivity is suppressed by the concentration dependence of the charge-carrier mobility, and (ii) the characteristic bump observed for intermediate gradients (cf. Figure 4b) is only reproduced when the roll-off in  is accounted for (Model B).
Specifically, the mean doping concentration must lie somewhat beyond the onset of the roll-off, in which case an initially strong increase in  due to the strong dependence of  on  is followed by plateau region.Further increases in  on the lowconcentration side of the device become less pronounced (locally ∝ −0.25 ) while the counteracting decrease in  on the highconcentration side remains strong (locally ∝ − ).The simulation results for electrical conductivity and thermopower agree with the experimental results, but with a smaller overall increase in  and therefore  2 .
Using model B, the numerical simulations now allow to understand the occurrence of a maximum in power factor in terms of the gain in effective Seebeck coefficient being larger than the loss in effective conductivity.As such, one may expect that optimally doped materials, i.e., when the mean doping concentration corresponds to the maximum in power factor, cannot be improved by introducing a gradient.Explicit numerical calculations show that this is indeed the case.Moreover, appreciable power factor maxima can only be reproduced when both the effects of Coulomb interactions on the mobility and the roll-off in Seebeck coefficient are accounted for.Hence, the use of doping gradients in combination with a small ΔT should be considered as a tool that allows to improve the thermoelectric performance of non-optimally doped samples.The identification of the optimal doping level tends to be a laborious process that usually involves the comparison of many processing techniques and dopant concentrations, resulting in numerous samples that need to be analyzed.Instead, doping gradients offer an alternative method for exploring the potential of different polymer:dopant pairs as a thermoelectric material using only a limited set of samples.
In a final set of experiments, we investigated the impact of doping on the thermal conductivity of p(g 4 2T-T).We used a frequency-domain thermoreflectance (FDTR) method to measure  in the out-of-plane direction [42] and observe that  decreases from 0.23 W m −1 K −1 for the neat polymer to  < 0.15 W m −1 K −1 for all investigated dopant concentrations, ranging from 3 to 23 mol% F 4 TCNQ (Figure 6).A similar decrease in  upon doping has recently been observed for PBTTT doped with F 4 TCNQ and was rationalized with a decrease in the lattice thermal conductivity due to alloy scattering, which occurred even for low dopant concentrations of 1 mol% per repeat unit.Considering that  has a similar value for a wide range of dopant concentrations, we argue that the formation of doping gradients in p(g 4 2T-T) films does not strongly alter the effective thermal conductivity  of the channel.We used a value of  = 0.15 W m −1 K −1 to estimate the figure of merit of the here investigated graded samples and obtain an upper bound for ZT of 0.03 at 300 K for a sequentially doped p(g 4 2T-T) film with an optimal doping gradient, an 8-fold increase compared to the initially homogeneous film.Note that  was measured in the out- of-plane direction while all electrical measurements were carried out in-plane, and differences with direction due to the film texture cannot be ruled out.In case of F 4 TCNQ-doped P3HT, which had been aligned by solid-state pressing in a channel die,  was found to be higher along the -stacking direction compared with the lamellar stacking direction. [43]Since films of p(g 4 2T-T) co-processed with F 4 TCNQ tend to have a face-on texture, with preferential out-of-plane -stacking, [34,36] we argue that the thin films studied in the current work can be expected to show the highest  value out-of-plane.Thus, the here estimated ZT value of 0.03 is possibly an underestimate for the in-plane direction.

Conclusion
In summary, we employed the drift of dopant (di)anions in an electric field to create polymer films with doping gradients that enhance the overall thermoelectric performance.In this proof-ofconcept study, the polymer p(g 4 2T-T) was used as the host material, which was doped with F 4 TCNQ.Drift of (di)anions was found to occur at a relatively low bias voltage of ≈5 V, which also leads to the formation of doping gradients across doped p(g 4 2T-T) films.Intermediate doping gradients displayed a lower effective  but increase in effective , resulting in an overall increase in thermoelectric power factor compared to initially homogeneous films.A model based on kinetic Monte Carlo simulations of charge and energy transport in disordered media with varying dopant concentration could explain the observed increase in power factor as the combined result of a power law decay of the charge-carrier mobility with doping concentration and another power law relation between  and  at low and intermediate doping levels, followed by a roll-off in  at high doping levels.Doping of p(g 4 2T-T) with F 4 TCNQ was found to result in a decrease in the out-of-plane thermal conductivity to  < 0.15 W m −1 K −1 for a wide range of dopant concentrations, suggesting that  does not strongly vary across the programmed doping gradients.The here presented results establish that the concept of functionally graded materials (FGMs) can be employed to doped conjugated polymers, which opens up a new avenue for optimizing the thermoelectric performance of organic materials.
In future studies, it will be interesting to create electrically programmed gradients with other polymer/dopant combinations, including those with higher power factors and ZT values.In addition, variations of the nanostructure along the gradient should be elucidated, which likely changes with the doping level, resulting not only in a doping gradient but also a structural gradient.It is also feasible that other types of gradients such as structural gradients and thickness gradients can be used to modulate the thermoelectric properties of conjugated polymer films.For gradients to become relevant for the construction of thermoelectric devices, it will be necessary to achieve stable profiles that do not change with time and temperature.
Sample Preparation: p(g 4 2T-T) and F 4 TCNQ were separately dissolved at 35 °C and room temperature and concentrations of 20 (or 14.5) and 2 g L −1 in a 1:1 mixture of CH 3 CN and CHCl 3 .Different volumes were combined to obtain mixed polymer:dopant solutions with a polymer content of 3 to 10 g L −1 and 0 to 23 mol% F 4 TCNQ with regard to the g 4 2T-T repeat unit.Thin films with a thickness of 90 to 160 nm were prepared by spin-coating neat p(g 4 2T-T) or mixed p(g 4 2T-T):F 4 TCNQ solutions on glass (cleaned with acetone and isopropanol), CaF 2 substrates (cleaned with acetone and isopropanol), Au patterned glass substrates or silicon substrates (cleaned with acetone and isopropanol and treated by ozone for 5 min).The resulting thin film samples were annealed on a hotplate at 90 °C for 2 min.Sequential doping was carried out by adding 70 μL of dopant solution (F 4 TCNQ in anhydrous AcN, 2.5 g L −1 ) on top of the film for 30 s.The dopant solution was then spun off at 3000 rpm followed by rinsing with dry AcN and finally the film was dried with N 2 .For electrical programming of gradients four parallel line-shaped Au electrodes with a length of 50 μm were deposited on glass substrates as the bottom contacts, followed by spin-coating of polymer films.The channel width was 5 mm in all cases, the channel length was L 1 = 50 μm for Raman measurements and L 1 = 500 μm for electrical measurements (see Figures 3a  and 4a).
Patterning of Au Electrodes: To prepare substrates with Au electrodes for current transient and Raman mapping measurements, AZ 1512 HS photoresist was spin coated on the surface of cleaned glass substrates and patterned by maskless lithography (Smart Print).An 80 nm-thick Au layer was thermally deposited in a vacuum chamber with a pressure of <10 −8 bar, followed by a lift-off process by soaking in hot dimethyl sulfoxide (DMSO) at 90 °C to prepare four parallel line-shaped Au electrodes with a channel width of 5 mm and channel and electrode length of 50 μm.To prepare substrates with Au electrodes for thermoelectric characterization, an 80 nm-thick Au layer was sputtered on clean glass substrates in a vacuum chamber with a pressure of <10 −8 bar to prepare four parallel line-shaped Au electrodes with a channel width of 5 mm and a channel length of 500 μm.
FTIR Spectroscopy: FTIR spectra were recorded with a PerkinElmer FTIR Spectrometer "Frontier" in transmission mode with a resolution of 4 cm −1 .
Raman Spectroscopy: Raman spectra were recorded at ambient conditions with a Renishaw InVia confocal Raman microscope using a 50X Leica objective, a laser with a wavelength of 785 nm and a low power of ≈3 mW (estimated at the source) to minimize local heating (10 s accumulation time).The spatial and spectral resolution under these conditions were ≈1.9 μm and 1 cm −1 (1200 mm −1 grating).For mapping of electricallyprogrammed gradients, Raman spectra were recorded before and after application of different voltage biases, between the inner Au electrodes with a step size of 1.5 μm covering a 54 μm × 4.5 μm wide area.
Electrical Characterization: For electrical conductivity and current transient measurements polymer films were spin-coated on glass substrates with four parallel line-shaped Au electrodes (L 1 = 50 μm).The electrical conductivity of spin-coated films was measured with a four-point probe setup (Table 1).For current transient measurements, different V bias were applied between the inner electrodes and the transient current versus time between the inner electrodes was recorded.For thermoelectric characterization, polymer films were spin-coated on glass substrates with four parallel line-shape Au electrodes (L 1 = 500 μm; see Figure 4a).The electrical biasing treatment was done by applying a stepwise increasing external voltage to the two middle Au electrodes of a device for 300 s each, followed by an electrical measurement (either  or  as described below) after each bias step.The electrical conductivity of the inner channel of one set of samples was determined via 4-point conductivity measurements, by passing a current of up to ±100 μA between the outer Au electrodes and measuring the voltage drop across the inner two Au electrodes.Seebeck coefficient measurements were done for a separate set of devices, which were placed between two heat stages with a temperature difference ΔT = T hot − T cold with T hot ≈ 50 °C and T cold ≈ 25 °C.A constantan wire (with an effective length L 2 determined by optical microscopy) was attached to the back of the glass substrate as the reference (see Figure 4a).The thermovoltages V 1 between the two middle electrodes and V 2 between the two terminals of the constantan wire were measured, calibrated by the values measured at ΔT = 0 and the Seebeck coefficient was calculated according to: where  ref = −40 μV K −1 is the Seebeck coefficient of constantan at room temperature.Electrical biasing treatment was done by applying a stepwise increasing external voltage to the two middle Au electrodes for 300 s each, followed by an electrical measurement.All electrical measurements were conducted using a source measure unit (Keithley 2400) controlled by Lab-VIEW or MATLAB software.
Thermal Conductivity Measurements: The thermal conductivity was measured using the frequency-domain thermoreflectance (FDTR) method. [42]The setup consisted of two lasers to heat (pump) and probe (probe) the local temperature (spot size of ≈10 μm in diameter) at the sample surface.In order to limit the optical penetration and improve the thermal sensitivity of the method, a 55 nm thick gold transducer was thermally evaporated onto the surface of the samples.The wavelength of the pump and probe lasers was set to 405 and 532 nm, respectively.The output power of the pump laser was modulated to a harmonic waveform in the frequency range between 30 kHz and 40 MHz.The pump laser generates thermally induced harmonic oscillations of the reflectivity of the sample, thus, leading to a modulation of the reflected power of the continuous wave probe laser.The phase lag between the pump and probe harmonic waves was measured by using a lock-in amplifier and modeled by numerically solving the parabolic heat equation.Thus, the cross-plane thermal conductivity was obtained by fitting the phase lag versus the applied frequency.
The specific heat capacity of neat p(g 4 2T-T) was measured with a DSC2 from Metter Toledo using a temperature-modulated DSC (TMDSC) method with a sapphire reference.Measurements were performed in the temperature range from 10 to 50 °C with a heating rate of 1 °C min −1 .The DSC was calibrated in the same temperature region before each run, using a sapphire sample.

Drift-Diffusion Simulations:
The open-source drift-diffusion simulation package SIMsalabim [28,29] was used to simulate a doped organic semiconductor with an electron mobility of 0.1 cm 2 V −1 s −1 , a thickness of 5 μm and a relative dielectric constant of 4. The injection of holes was excluded by imposing a suitable injection barrier.The doping level was fixed at 10 26 m −3 .The ion mobility was varied from 10 −9 to 10 −7 cm 2 V −1 s −1 .Initially, the bias voltage was 0 V. Next, the bias voltage was chosen such that the average electric field equals that of the experiments shown in Figure 2a.

Figure 2 .
Figure 2. Current transients during electrical programming of doping gradients.a) Bias voltage V bias applied between the inner electrodes; b) current between the outer electrodes at various constant V bias of alternating polarity for p(g 4 2T-T) films doped with 3 to 17 mol% F 4 TCNQ; and c) simulated current transients during electrical programming of doping gradients for different mobilities of the dopant ions.

Figure 3 .
Figure 3. Raman microscopy of a p(g 4 2T-T) film doped with 17 mol% F 4 TCNQ.a) Map of the Raman intensity I p2 at 1445 cm −1 (peak 2) recorded at different positions within the 50 μm wide channel without any bias applied between the inner electrodes (top) and after applying a V bias = 10 V (bottom); b) Raman spectra normalized to the intensity of peak 1; and c) area ratio A 2 /A 1 of the integrated areas under peak 1 and peak 2 (top) and center position  2 of peak 2 (bottom) obtained by fitting Lorentzian functions to the Raman spectra recorded at different positions x within the channel.Solid lines in (c) are fits with an exponential function.

Figure 4 .
Figure 4. Thermoelectric properties of films with electrically programmed doping gradients.a) Schematic of the devices used to measure the thermoelectric properties comprising four parallel line-shaped Au electrodes (yellow) with a distance L 1 = 500 μm between the inner electrodes, a distance of 1.5 mm between the outer electrodes and a constantan wire with length L 2 on the other bottom of the glass substrate in case of thermovoltage measurements; doping gradients were created for two sets of devices by applying a stepwise increasing bias voltage V bias between the inner electrodes followed by 1) a 4-point probe measurement of the effective electrical conductivity  or 2) measurements of the thermovoltages V 1 and V 2 to obtain the effective Seebeck coefficient ; b) effective values of  (black squares),  (blue open squares) and power factor  2  (red circles) obtained after applying different V bias to p(g 4 2T-T) films initially doped with 3 to 23 mol% F 4 TCNQ.Measurements were carried out with single devices; for  the mean and standard deviation of 30 voltage measurements are shown (cf.Equation (1)).

Figure 5 .
Figure 5. Numerical simulation of graded devices.Kinetic Monte Carlo simulation of a) charge-carrier mobility  versus (local) charge-carrier concentration c, and b) all experimentally obtained (effective)  versus (effective)  (light blue) and values obtained from kMC simulations; the dotted and solid lines are the functions used in models A and B, respectively; the red star marks the mean doping concentration (c 0 ); c) effective  (black),  (blue) and  2  (red) versus gradient strength G calculated using model A (dotted lines) and B (solid lines).The gradient strength (G) is defined such that it results in a local carrier concentration c x = 2c 0 × [0.5 − G, …, 0.5 + G].The results of the model A were shifted to match model B at a gradient strength of 0. To match the absolute values, the thermopower from the kMC simulation shown in (b) is rescaled by a factor of 0.4.This indicates that the kMC model is not perfectly adjusted on an absolute energy scale.

Figure 6 .
Figure 6.Out-of-plane thermal conductivity  of thin films of neat p(g 4 2T-T) and p(g 4 2T-T) co-processed with different mol% F 4 TCNQ measured by frequency-domain thermoreflectance (FDTR); for each dopant concentration one sample was measured and the result from the best fit of the phase lag as a function of the applied frequency is shown (see Experimental section for details).

Table 1 .
Electrical properties of co-processed thin films: mol% F 4 TCNQ per repeat unit and per thiophene ring, number of dopant molecules N dopant per unit volume, previously reported ionization efficiency  ion (cf.ion in ref.[27]for same mol% F 4 TCNQ per thiophene; for 1 and 2 mol%  ion = 200% is assumed), number of polarons N p = N dopant •  ion per unit volume, electrical conductivity , Seebeck coefficient  and power factor  2 ;  and  values are the mean and standard deviation of measurements of four devices on the same substrate.