Modeling and characterization of stochastic resistive switching in single Ag2S nanowires

Chalcogenide resistive switches (RS), such as Ag2S, change resistance due to the growth of metallic filaments between electrodes along the electric field gradient. Therefore, they are candidates for neuromorphic and volatile memory applications. This work analyzed the RS of individual Ag2S nanowires (NWs) and extended the basic RS model to reproduce experimental observations. The work models resistivity of the device as a percolation of the conductive filaments. It also addressed continuous fluctuations of the resistivity with a stochastic change in volume fractions of the filaments in the device. As a result, these fluctuations cause unpredictable patterns in current-voltage characteristics and include a spontaneous change in resistance of the device during the linear sweep that conventional memristor models with constant resistivity cannot represent. The parameters of the presented stochastic model of a single Ag2S NW were fitted to the experimental data and reproduced key features of RS in the physical devices. Moreover, the model suggested a non-core shell structure of the Ag2S NWs. The outcome of this work is aimed to aid in simulating large self-assembled memristive networks and help to extend existing RS models.

Resistive switching devices attract much interest due to potential applications in neuromorphic computing. Unlike conventional computing architectures, neuromorphic computers store and process data in one place, and therefore can perform massively parallel computations at low energy cost 1-3 that is not constrained by the von Neumann bottleneck 4 .
Ionically conductive silver chalcogenides are one of the most attractive RS materials due to the simplicity of their production. RS in chalcogenides have been extensively studied [5][6][7][8][9][10] and have already shown potential use in proof of concept neuromorphic applications such as arbitrary signal generation 11 , speech processing 12 , and decision-making devices 13,14 . Furthermore, the low cost and ease of large-scale production of Ag 2 S NWs offer a convenient way to manufacture neuromorphic computing devices through random self-assembly 11,15 . Moreover, Ag 2 S NWs provide the possibility of manufacturing high-density 3D neuromorphic circuits 16,17 .
In silico simulation of the neuromorphic devices offers a convenient way to understand the properties of these materials. However, while the simulation of individual devices in cross-bar array neuromorphic architectures yields reproducible results 18 , reliable simulation of randomly assembled memristive networks has not been reported yet. Noise and unpredictable phase change in individual devices pose the main obstacles in simulating random and self-assembled neuromorphic devices. In particular, the characteristics of RS of Ag 2 S NWs exhibits noise 19,20 and nonlinear behavior that cannot be fully explained by a simple thin film memristor model first proposed by Strukov et al. 21 .
Modeling of large RS nanowire networks, such as Ag 2 S NW, can be improved by understanding the morphology of the material and its dynamic properties. There are several polymorphs of Ag 2 S that exist in a narrow temperature range. For example, acanthite Ag 2 S-α is a low-temperature polymorph with a monoclinic crystal structure that is stable up to ~450 K 22 . Above 450 K and up to ~860 K Ag 2 S is in argentite Ag 2 S-β phase with an ordered bcc lattice of sulfur atoms and Ag + ions that partially occupy tetrahedral and octahedral sites that gives it excellent ion mobility and increased electrical conductivity [22][23][24][25] .
Besides temperature, the transformation between acanthite and argentite can also be induced by an external electric field that displays hysteresis in the current vs. voltage 5,24 . However, unlike transition metal oxide RS devices 26,27 , the current in Ag 2 S devices exhibits considerably more instability and noise related to the instability of Ag filaments and Joule heating 5,6 . It was recently reported that the noise in Ag 2 S follows a 1/f pattern caused by dynamical point defects in the metallic filaments causing temporal instability 19,20 . This observation provided www.nature.com/scientificreports/ the motivation to explore the model described here, in which we approximate thermal effects with stochastic parameter that controls the volume fraction in a percolation model of the filaments in the Ag 2 S NW and therefore simulates the effects of Joule heating. Scattered Ag nano-islands in a volume and on a surface of oxide ionic conductors were reported in other experimental configurations with Ag filaments serving as resistive switches. In particular, Ag clusters were observed on the surface of ZnO nanowires during RS cycles in an Ag/ZnO/Pt system 28 . In another study, Wang et al. showed an in situ formation of Ag nanoclusters with HRTEM in a planar system of Au/SiO x N y :Ag/Au 29 . Other observations showed spontaneous protrusions of Ag nano-islands in the Ag 2 S phase 30 and under electric field bias 13 . Finally, a detailed study of RS of Ag 2 S ionic conductors performed with HRTEM clarified the mechanism of RS in Ag 2 S devices 24 .
The main contribution of this work is a stochastic model of RS of a single Ag 2 S NW that is based on singlewire measurements performed with a nanomanipulator under an optical microscope and is comparable to other reports that studied RS in chalcogenides. The model extends the basic RS model by Strukov et al. 21 with the modification of resistivity of the device in the ON state and an assumption that resistivity of highly conductive state changes according to the laws of percolation theory. Some previous models of RS in memristive devices were based on simplified assumptions of 2D percolation 31,32 . In the present 3D RS model, the resistance of the device R ON changes proportionally to the volume fraction of spontaneously created and destroyed metallic Ag nano-islands and conductive filaments in the mixed matrix of Ag 2 S-α and Ag 2 S-β.
The fitted model exhibited key features of the RS of single Ag 2 S NW, such as a spontaneous change in resistivity expressed in IV loop twisting and reversal during the linear voltage sweep.

Results
The Ag NWs were produced with a simple polyol method [33][34][35] and further sulfurized in a sulfur-rich ethanol (EtOH) suspension at different times (see "Methods"). The surface morphology of the resulting Ag and Ag 2 S NWs were examined by high-resolution Transmission Electron Microscopy (Talos F200X G2) as shown in Fig. 1a-c and scanning electron microscopy (JEOL, JSM-6010LA ), as shown in Fig. 1d. Before sulfur treatment, the mean length and diameter of Ag NWs were about 53 µ m and 128 nm, respectively. In contrast, the sulfurization modified mechanical properties and surface appearance of the wires that reduced their length to average length to 25 µ m and increased diameter to 135 nm, respectively. Length reduction of the wires can also be attributed to the presense of heteronanostructures in the Ag 2 S NWs. In particular Fig. 1c shows nonhomogenious distribution of density within a single NW, which is a result of a partial conversion of Ag into Ag 2 S 36 . Thus the effective length of the Ag 2 S NW is shorter than the actual length due to the presence of Ag segments. Figure 1e shows X-ray Diffraction (XRD) spectra of Ag NWs before sulfurization on top (inset shows the color of Ag NWs suspension), Ag NWs with partial Ag 2 S inclusions when the suspension is brown in the middle frame, and black Ag 2 S NWs at the bottom of the acanthite Ag 2 S-α phase. These results are comparable with Levard et al. 's XRD data of Ag nanoparticles sulfurization, which showed the existence of an additional phase that caused a change in intensity by modifying the ratio of S/Ag 37 .
The Energy Dispersive X-ray Spectroscopy (EDS) spectra and quantitative elemental data of different time intervals of AgNW exposure to sulfur are shown in Fig. 1d,e. The color of the wires attests to the overall amount of the embedded sulfur and therefore expected conductivity, with light brown being the most conductive and dark brown and black being the least conductive 38 .
The schematic drawings in Fig. 1d have been designed based on the elemental weight percentage from the EDS and the Scanning Electron Micrograph (SEM) images. Since SEM collects data from the surface of the material, after a short reaction time when the suspension was still light brown (top), more S was on the surface of the wires. In contrast, as more time passed the color became darker, sulfur diffused deeper inside the bulk of wires gradually, and there were still Ag regions as well (middle). Hence, in the bottom frame, which illustrates the black suspension, there are islands of Ag and Ag 2 S inside the bulk of the wires and still, some S particles on the wires' surface, which is consistent with observations in prior work 13,24,30,39-42 . Electrical characterization. Figure 2 shows the experimental setup for single wire measurements. In the setup, an electrochemically etched Platinum-Iridium (Pt/Ir) wire of 127 µ m diameter was composed of 20 %wt. Ir (Alfa Aesar) microprobe was produced with an adopted method described by Zhang et al. 43 and Khan et al. 44 . The Pt/Ir microprobe was installed on a nanomanipulator (Kleindiek MM3A) attached to the XY-stage of an optical microscope (Nikon Optiphot 100). A microscope slide was used as the insulator substrate, and Ag paint was applied on the substrate to make the reactive electrode while the Pt/Ir microprobe served as the inert electrode.
In this configuration, the Ag paint electrode is connected to copper tape at one end and to the microprobe's tip on the dangling end, forming a two-terminal device, as shown in Fig. 2a. The system was connected to a source measure unit (SMU) (Keithley 2636B) with the "high" end connected to the tip of the nanoprobe and the "low" end through a 100 resistor to prevent damage. Simultaneously, the process was observed with a microscope at 1000× magnification and long working distance optics to navigate the tip of the nanomanipulator.
A few different lengths of the same wire were stimulated with one period of bipolar triangular voltage as shown in Fig. 2b,c correspondingly. First, the 20 µ m long Ag 2 S NW was chosen, and contact with the nanomanipulator's tip was established for two-probe IV characterization Fig. 2b. Then the characteristics were measured with the same wire whose length was mechanically reduced to 10 µ m, Fig. 2c.
There are several noticeable features in the IV characteristic of the wire during a positive and negative triangular sweep shown in Fig. 2b. In the beginning of the stimulation, the 1st quadrant of the IV characteristics in Fig. 2b showed a negligibly small current that correspond to the OFF state of the device. The device remained in  www.nature.com/scientificreports/ point), designating the device's true ON (SET) state. At this point, the current magnitude was non-destructive and did not prevent spontaneous growth of metallic filaments that provided a sufficient number of conducting channels for increased conductivity. The ON state remained stable until the value of zero voltage was reached.
As the polarity of the voltage sweep crossed into negative values, the current in the 3rd quadrant of Fig. 2b still showed the device ON state reaching a peak near −4.5 V and −6.5 nA (6th point) and rapidly dropping to 0.5 nA at the end of the cycle at −5 V (7th point). In particular the increase of the current at point 6 designates the existence of relatively strong filaments that subsequently broke down at higher absolute values of the voltage at point 7. Interestingly, the switching pattern in the first quadrant of the Fig. 2b is identical to the observation of RS in a shorter Ag 2 S NW previously reported by Liao et al. 6 . In particular, rapid increase in conductivity upon reaching a particular voltage threshold (4 V in our case and 3.5 reported by Liao et al. 6 ), the twisting of the loop caused by Joule heating and retention of the ON state after the device was SET. The loop twisting phenomenon was only observed in a half of the measurements, with another half having narrow loops. Thus the temperature effects in the Ag 2 S NW can be approximated by a stochastic parameter that will be described in the modelling section.
In order to show the stochastic and percolation nature of the RS behavior in a single Ag 2 S NW, Fig. 2c, the same wire's length was mechanically reduced to L = 10 µ m and stimulated with the same triangular voltage bias as in Fig. 2b. In this setup, the wire exhibited a different RS pattern. As with the longer wire in Fig. 2b, the device remained in OFF state during the initial negative to positive sweep (1st arrow), until a hard RS took place at 4 V (2nd arrow) setting the wire to the ON state. Upon reaching the maximum value of the current at 14 nA, the destructive action of Joule heating resulted in a slight decrease of the current before the voltage reached its maximum value of 5 V. Upon reversal of the voltage the wire remained in the ON state for a short period (3rd arrow) until an abrupt drop to 0 nA at 2.2 V. The Ag 2 S non-conducting state persisted all the way to the negative portion of the sweep, but the wire showed reduced conductivity near −2.5 V marked by the 4th arrow. The small current at the end of the sweep cycle manifests the reduced conductivity of the remaining filaments and also corresponds to the pattern of bipolar RS 45 . Similar to previous reports, the rapid jumps in the wire's conductivity at 4 V denotes the stochastic nature of conductive filament formation 6 . Whereas the shortening of the wire in Fig. 2c did not cause change in the threshold voltage and could be attributed to a formation of a stable Ag 2 S-α bottleneck close to the Ag paint that remained intact after shortening. The bottleneck mediated formation of a conductive argentite Ag 2 S-β nanocrystalls and caused sudden increase in conductivity as was reported in other work 24 .
The value of the maximum current in the shortened wire increased by nearly 75% compared to the long wire, namely 14 nA in the short wire vs 7.8 nA in the long wire. This observation supports the proportionality of the resistance to the length of the wire. We also confirmed this dependency in other experiments with different lengths of the wires and found an approximate resistance of the produced Ag 2 S NW to be 10 /nm and www.nature.com/scientificreports/ is similar to previously reported values 5 . The above observations point that the RS process is not restricted to a single location of formation of conductive filaments within the wire, instead, it is multiple filaments grow and destroy creating a complex conductive network, that can be modelled with percolation theory. The pinched hysteresis of the switching shown in Fig. 2b,c can be well described by the model of RS in a thin film TiO 2−x memristor 21 . Although this model reproduces the key features of memristive behavior, such as pinched hysteresis, it does not describe all RS regimes, particularly the stochastic reversal of the loop near the maximum voltage we observed in Fig. 2b 2nd and 3rd red points and Fig. 2c. The twisting of the loop is spontaneous and is likely caused by Joule heating that leads to partial breakdown of Ag filaments, formed within the argentite Ag 2 S-β phase as first described by Liao et al. 6 .
Thermal and crystalline vibrations 19,20 induce distortions in the conducting filaments and nano-filaments that can break down and contribute to the conductivity instabilities. However, it is likely that these instabilities are partially compensated by the scattered nano-islands and more developed filaments, as is supported by the smoother current curve during the negative portion of the bias voltage displayed in Fig. 2b,c. Memristor model. In the basic memristive model 21 , the memristance M of the thin film RS element with thickness D is calculated by Eq. (1).
In Eq. (1), R ON and R OFF correspond to memristor being in either a highly conducting R ON state or a low conducting R OFF state correspondingly or an intermediate state according to the x parameter. The x parameter is a state variable that describes the boundary of the distribution of dopants, such as oxygen vacancies in anionic devices such as TiO 2−x or the effective length of the filaments grown on the cathode towards the anode in cationic memristive devices such as Ag 2 S and which rate of filament length change is described by Eq. (2).
The Ag 2 S NWs' dimensions used in the experiment had an average diameter of 120 nm and an average length of 20 µ m. Therefore, different degrees of sulfurization will produce large variability of resistances of the Ag 2 S wires even for the same length as a function of concentration and distribution of randomly scattered islands of argentite Ag 2 S-β with Ag atoms inclusions and spontaneously formed Ag clusters in them under the influence of electric field bias. Furthermore, the Ag 2 S-β pathways that penetrate the Ag 2 S-α phase along the electric field not only have lower resistivity compared to Ag 2 S-α but also allow for rapid migration of Ag + ions under the influence of an electric field but also provide an environment for the formation of Ag nanocrystals from agglomerated Ag + ions or remnants of metallic filaments as shown in Fig. 2d,e 24 .
Equations (3) and (4) introduce the R ON function that depends on stochastic parameter δ that governs the filament breakdown shown in Fig. 2d,e. The parameter δ represents the volume fraction of metallic nano-islands and is constrained by Eqs. (5) and (6). Similar to x in the basic memristor model Eqs. (1) and (2), the unitless ω parameter represents an effective normalized length of the conductive filaments L f within the wire relative to its actual length L. Namely ω = L f /L and ω takes values between 0 and 1. Note that while L denotes an actual length measured with a microscope, in the simulation we replaced it with an effective length variable L e .
The stochastic parameter δ governs the magnitude of R ON and specifies the volume fraction of nano-islands and conductive filaments in the Ag 2 S matrix. Due to the fluctuations caused by Ag + ion redox exchange and metastable atomic positions, the conductive channel's thickness will also fluctuate unpredictably 19,46 , altering the volume fraction of the filaments in the NW and conductivity. Therefore, thermal fluctuations can be modeled with a stochastic process described by Eqs. (5) and (6) with normally distributed noise with standard deviation parameter σ . Metallic Ag nano-clusters are formed and reorganized spontaneously within the volume of the Ag 2 S phase due to the heat and electric field-induced relocation of Ag + ions in 3D volume 23,38 . Therefore, percolation theory is used to connect the conductivity in the ON state via the R ON variable with the volume fraction of Ag nano-islands in the mixture of Ag 2 S-α and Ag 2 S-β phases and thus is described by the power-law in Eq. (5). Determination of the percolation threshold is a mundane task. Thus in the simulator, we set (δ) = (δ) − (δ) 0 where δ can take only positive values or zero. Thus in the model high concentration of scattered nano-islands will produce a low R ON value and a low effective length L of the wire for fixed mobility µ found in the literature 23,47 . On the other hand, a low concentration of scattered islands will result in a high magnitude of R ON and effective length of the wire L e close to observed L. www.nature.com/scientificreports/ To test our hypothesis of spontaneous R ON update, we simulated a memristive nanowire described by Eqs. (3) to (6) with the CircuitSymphony circuit simulator 48 with the parameters of the following simulations. In Eqs. (3) to (6), the magnitudes of R ON and R OFF are proportional to the length of the Ag 2 S NW with the ρ OFF and ρ ON multiplier. To avoid an explicit definition of the minimum and maximum resistivity values in the ON state, we defined the boundary volume fractions δ min and δ max that confine the overall changes of the resistance. R ONmin and R ONmax are used as multipliers to the fixed value of resistivity ρon of the device in the ON state, to define the magnitude of R ON and satisfy the following inequality R ONmin < R ONmax that defines the boundary of fluctuations of R ON .
Thus at the percolation threshold, when the volume fraction of Ag filaments δ is at its minimum, namely (δ) = (δ min ) > (δ 0 ) , the R ON will be at its maximum value, R ON = (ρ ON )L((δ min ) − (δ 0 )) − β = R ONmax L(ρ ON ) and when the volume fraction of Ag nanocrystals is above percolation threshold at some maximum value (δ) = (δ max ), R ON = (ρ ON )L((δ max ) − (δ 0 )) −β = R ONmin L(ρ ON ) will correspond to the minimum value of R ON . In the simulation, the dynamics of δ follow a random walk process. In the relationship, β is the percolation exponent for 3D systems and can take values between 1.3 and 3 49 .
The boundary check of δ is provided in Eq. (6) and is used at each iteration step in the simulator to prevent an unconstrained drift. If at some iteration step, the new value of δ produces R ON below R ONmin Lρ ON , then the value of δ will be set to be equal to the highest value of δ max . On the other hand, if the new randomly assigned value of δ causes R ON to grow above R ONmax Lρ ON the value of δ will be replaced with the smallest magnitude at the lower boundary δ min .
The experimental simulation results are shown in Fig. 3a, where a 16 µ m long Ag 2 S NW was stimulated with four positive and four negative triangular pulses with 10 s period. The memristor was modeled with the parameters listed in Table 1. The fitting was performed with Bayesian optimization provided by Optuna library 50 , over a set of hand-picked discrete values of the model parameters. The loss was calculated as a Euclidean distance, or root-mean-squared distance, between the laboratory data points and model output at a particular time step for  www.nature.com/scientificreports/ the whole duration of the stimulation. Thus, each iteration was comprised of 50 independent measurements, after which the mean loss was the metric of performance of the model for the iteration. Fig. 3c shows time-lapse of the deformation of the wire caused by the flow of Ag + ions and their deposition near the Pt/Ir electrode. The snapshots were taken near the peak values of the input voltage during the first 40 s of the stimulation shown in Fig. 3a,b. Interestingly, fitted values were found close to the actual values reported in the literature. In particular, the mobility µ was found between 1 × 10 3 to 8 × 10 3 µm 2 /(sV) and was only slightly below the mobility experimentally observed for the cubic Ag 2 S-β phase µ = 15 × 10 3 µm 2 /(sV) at T = 450 K (for comparison the Ag + mobility in the monoclinic phase of Ag 2 S-α , is µ~1 µm 2 /(sV) at T = 300 K) 23,47 . The difference could be attributed to the presence of different charge carriers, namely electrons and Ag + ions, and a mixture of acanthite and argentite phases 38 .
The evidence of the Ag nano-crystal formation in Ag 2 S NW is also supported by comparing switching times in thin films and long wires. In an acanthite, Ag 2 S-α wire model with an effective length of 16 µ m, switching between ON/OFF states would take approximately 50 s at 3 V driving voltage potential due to relatively low mobility of Ag + ions in the phase, namely µ = 0.5 µm 2 /(sV) 23,47 . However, in the experiment and the best-fitted parameters of the model to the experimental data of a single Ag 2 S NW ( Fig. 3d and Table 1), switching occurs within tens of seconds. The best-fitting was found only when the wire had a shorter effective length between L e = 8 µ m and L e = 12 µ m, compared to actual L = 16 µ m, and supports the hypothesis of scattered nano-islands in the volume of a single Ag 2 S NW device. Thus the area between electrodes is filled with a mixture of high ionic mobility argentite, low ionic mobility acanthite, and islands of Ag inclusions. Since the model only exhibits stochastic current pattern in ON state, there is no stochastic pattern in the OFF state as can be noticed comparing currents during negative sweep in Fig. 3a,d. The IV characteristics of the model with zeroed noise parameter is identical to characteristics of a conventional memristor model 21 and is shown in Fig. 3e.
The reduction of the effective length of the wire compared to the actual length, namely the fitted parameters of the model showed an effective length range to be L e = 8 µ m to L e = 12 µ m, which is less than the actual length of L = 16 µ m. The shortening of the wire, obtained from the fittings, also argues against the core-shell structure of the wire (i.e. nonexistence of a unit Ag core) and speaks in support of the fragmented organization with Ag inclusions within the Ag 2 S NW that shortens its effective length. The inset in Fig. 3a shows the loop reversal in both 1st and 3rd quadrant during the stimulation of the previously set to ON state memristive Ag 2 S NW with alternating negative and positive triangular voltage pulses. During the first stimulation period, the loop goes clockwise. During the second portion, the loop is also clockwise, which signifies spontaneous (perhaps Joule heating-dominated) destruction of the conducting Ag filaments within the NW. Simulation results exhibit behavior similar to experimental data and are shown in Fig. 3b. The probability of loop twisting and reversal can be controlled in the memristor model by changing R ONmin and R ONmax and noise factor σ.

Discussion
This work presented a simple method of measuring the electronic properties of individual nanowires with a nanomanipulator under an optical microscope. Based on the experimental IV characteristics of a single Ag 2 S NW, we modified a basic memristor model with a resistivity of the memristor varying as a function of a volume fraction of conducting filaments that spontaneously create percolating pathways that result in noise and variability in the current. The model also reproduced key features of the experimental data, such as spontaneous loop reversal and loop twisting during voltage sweep, and suggests that further refinement could be achieved through an in-depth investigation of the percolative nature of resistive switching in a single NW. The results obtained in this work can be used to develop larger models of randomly self-assembled neuromorphic systems that naturally exhibit instability and noise.
In the presented model, the resistive switching mechanism was dependant on two-state variables ω and δ . The length of the conductive Ag filament is described by variable ω . The stochastic variable δ describes the decay and spontaneous creation of the conducting channel due to the random redox processes. Also, the variable δ represents the thickness of the formed conductive channels, the process that is governed by the percolation theory. www.nature.com/scientificreports/ Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.