Introduction

The concept of performing difference operations using automatic machine was proposed by Charles Babbage around two centuries ago1. Although his revolutionary machine represented a milestone in human history, its potential was never realized due to its inherent complexity and the simultaneous rise of digital computing technologies2. The search for an energy-efficient difference engine has been re-launched in response to the challenges of energy efficiency and swift response posed by the management of massive volume of daily data3. Difference extraction is essential for video applications such as video compression4, motion detection5,6, moving object segmentation systems and intelligent monitoring7,8,9. Currently, visual image acquisition is predominantly executed through CMOS image sensors (CIS). The traditional motion extraction involves image detection, data transmission, memory storage and differential calculations performed by a microcontroller unit (MCU) (Fig. 1a). This process not only requires a large amount of memory space to store past and present images, but also a large amount of data transfer between the memory and the MCU, which substantially increases time and energy consumption10,11. Inspired by local information processing in neural networks of the human brain, people are pursuing biomimetic strategy that transferring computing tasks into memory unit itself9,12. As proposed in Fig.1b, combining differential calculations into the memory unit could significantly improve the efficiency of motion extraction operations. This concept gives rise to an in-memory differentiator capable of performing large-scale differential computations in real-time with enhanced efficiency.

Fig. 1: Differential method based on micro control unit (MCU) and in-memory differentiator for processing motion images.
figure 1

a A flowchart of MCU-based motion image processing. Inset shows that differential operations are serially performed by the MCU. b Same as (a) but with an in-memory differentiator. Inset shows that the in-memory differentiator enables both the storage of the previous frame image and the acquisition of the frame difference through ferroelectric domain dynamics.

In this work, we present an in-memory differentiator implemented using ferroelectric random-access memory (FeRAM) with a 40 × 40 passive crossbar array of ferroelectric capacitors. The array is fabricated using poly(vinylidene fluoride) trifluoroethylene (P(VDF-TrFE)) copolymers. It is observed that the domain switching signal of each capacitor in the passive crossbar array is minimally affected by the detrimental sneak paths due to the nonlinear domain dynamics with a narrow switching window. It successfully calculates both first- and second-order derivative solutions for a parabolic function. In addition, the usefulness of this differentiator for visual processing tasks is demonstrated. It allows the temporal acquisition of image differences with respect to the previous image through domain dynamics. Video pixels from a CIS camera are converted into sequences of voltage signal and inputted into the ferroelectric capacitor crossbar array, with one capacitor corresponding to one pixel. Taking advantage of the nonvolatility of the ferroelectric domains, only pixels that change between consecutive frames trigger domain switching, thus producing motion information from the domain switching signals. This method successfully demonstrates the extraction of moving targets (Fig. 1b). Unlike complicated processing steps including two times of memory access and one logic operation for each differential calculus in the traditional motion extraction (e.g, CMOS-based methods), only one reading access could complete the differential calculus using the ferroelectric in-memory differentiator. The energy consumption of each differential calculus using the ferroelectric in-memory differentiator is estimated to be as low as 0.24 fJ. The in-memory differentiator operates efficiently at a high frequency of 1 MHz, with the potential to further improve speed using other ferroelectrics due to their sub-picosecond domain switching times13. The retention capability exceeds five days, enabling the ferroelectric in-memory differentiator to detect moving objects in slow dynamic scenarios without any additional operations.

Results

FeRAM based on passive crossbar array of ferroelectric P(VDF-TrFE) capacitors

Ferroelectricity is a property of certain materials that exhibit spontaneous electric polarization that can be reversed by the external electric field14,15,16,17,18. Displacement currents due to polarization reversal can be detected when the applied electric field is higher than the coercive field13,19. The non-volatile nature of ferroelectric materials, coupled with their ability to gradually change polarization states in response to external stimuli, makes them excellent candidates for simulating biomimetic synaptic devices20,21,22,23 and for constituting in-memory computing hardware24,25,26,27,28,29,30,31. P(VDF-TrFE) is a leading organic ferroelectric material known for its superior ferroelectric characteristics, robust chemical stability and biocompatibility32,33,34. In this study, solution-processed ferroelectric P(VDF-TrFE) thin films with a molar composition of 70:30 are used to construct devices for FeRAM. The ferroelectric nature of these fabricated P(VDF-TrFE) films was validated by distinct butterfly-shaped amplitude hysteresis loops and 180°-reversed phase hysteresis loops observed using piezoresponse force microscopy (PFM) (Supplementary Fig. 1a). Reliable ferroelectric domains with reduced amplitude at domain boundaries, as illustrated in Supplementary Fig. 1b, and 180° phase rotation between adjacent domains, as shown in Supplementary Fig. 1c, can be efficiently created using an electrical writing process. As shown in Supplementary Fig. 2a, the atomic force microscope topography exhibits no noticeable macroscopic defects, pinholes, or visible cracks from atomic force microscope images. The root means square roughness is of ~1.25 nm as derived from Supplementary Fig. 2a, indicating that uniform and smooth P(VDF-TrFE) films are successfully obtained. The X-ray diffraction (XRD) pattern of the P(VDF-TrFE) films exhibit a distinct Bragg peak at 19.6° (Supplementary Fig. 2b), which is the characteristic of its ferroelectric β phase. As sketched in Fig. 2a, the ferroelectricity of P(VDF-TrFE) films arises mainly from the β polar phase of sandwiched crystalline lamellas, in which molecules are in all-trans (TTTT) conformation35. The orientation of the ferroelectric domains can be reproducibly switched by alternating positive and negative electric field whose amplitude is higher than the coercive field. The upper panel of Fig. 2b displays the polarization versus electric field (P-E) curve for a ferroelectric capacitor, exhibiting hysteresis behavior typical for ferroelectric materials. In the bottom panel of the same figure, the current density versus electric field (J-E) curve demonstrates a characteristic “ridged” profile, further revealing the nonlinear dynamics of ferroelectric domains under external electric field. Figure 2c presents the remanent polarization (Pr) as a function of the amplitude of the applied electric field for 16 representative ferroelectric P(VDF-TrFE) capacitors, as detailed in the upper panels of Supplementary Fig. 3. It is found that the window between initial domain switching and full domain switching is quite narrow for both upward switching (highlighted by transparent green color) and downward switching (highlighted by transparent blue color) processes. This narrow switching window can be understood by the nonlinear creep of the domain walls during the domain switching in P(VDF-TrFE) films36. The J peaks during these electric field sweepings depend on the domain wall velocity that follows a creep model37:

$$J \sim v \sim \exp \left[-\frac{R}{{K}_{B}T}{\left(\frac{{E}_{0}}{E}\right)}^{\mu }\right],$$
(1)

where KB is Boltzmann constant, E0 is a critical field. The dynamic exponent (µ) of P(VDF-TrFE) films is reported as 1/236, implying that the switching process is dominated by the propagation of two-dimensional domain walls. Following Eq. (1), log(J) versus (E)(-1/2) curves are plotted for these 16 ferroelectric P(VDF-TrFE) capacitors (bottom panels in Supplementary Fig. 3) and presented in Fig. 2d. As highlighted by transparent green and blue stripes, a good linear relationship for the upward and downward switching processes is observed in our P(VDF-TrFE) films.

Fig. 2: Nonlinear ferroelectric domain dynamics and ferroelectric random-access memory (FeRAM) based on passive capacitor crossbar array.
figure 2

a A sketch of the “trans” molecular structure of polar P(VDF-TrFE) (top panel) and domain orientation under downward electric field (middle panel) and upward electric field (bottom panel) of a P(VDF-TrFE) capacitor. b The multiple polarization versus electric field (P-E) hysteresis loops (up panel) and the corresponding current density versus electric field (J-E) hysteresis loops (bottom panel) of a typical ferroelectric P(VDF-TrFE) capacitor. c Evolution of the permanent polarization (Pr) as a function of the amplitude of the applied electric field. d Evolution of J peak versus the inverse of the square root of the amplitude of the applied electric field for upward domain switching (up panel) and downward domain switching (down panel) respectively. The linear relationship highlighted by the transparent green and blue colors implies a µ value of 0.5 in Eq. (1). e Schematic of a 40 × 40 ferroelectric capacitor array based on P(VDF-TrFE) ferroelectric polymers. The inset shows the structure of a ferroelectric capacitor unit. f The transient current versus electric field (I-E) curves obtained from 200 sampled units of the ferroelectric capacitor crossbar array. g Orientation of the ferroelectric capacitor domains in the crossbar array that was programmed according to the shape of East China Normal University logo. h The evolution of voltage pulse sequences and the transient output currents over time. Arrows indicate the orientation of the ferroelectric domains. The large displacement current peaks involving the polarization reversal only occur when the voltage pulse has a different polarity to that of the ferroelectric domain. Source data are provided as a Source Data file.

It should be noted that the nonlinear domain dynamics with narrow switching window play crucial role in eliminating the sneak issue in passive crossbar arrays21,25,38. It is therefore possible that a passive crossbar array of P(VDF-TrFE) capacitors constitute a FeRAM39. To confirm this possibility, passive crossbar arrays with 40×40 ferroelectric P(VDF-TrFE) capacitors are fabricated (Fig. 2e). Fabrication details are provided in the Experimental Section. Transient current versus electric field (I-E) curves are performed in 200 sampled cells to verify the uniformity of domain switching (Fig. 2f). The coercive field obtained from the transient current peaks (Fig. 2f) gives a very slight variation (Supplementary Fig. 4). As expected, the ferroelectric capacitors-based passive crossbar array shows good immunity to the sneak-path effect (Supplementary Fig. 5 and Supplementary Note 1). The passive capacitor crossbar array can be programed column by column. As shown in Supplementary Fig. 6a, b, the rows of the passive capacitor array are used as parallel inputs, and the columns are controlled ON and OFF by the matrix switch, which realizes parallel programming of specific column. It programs the array column by column. Supplementary Fig. 6a and b sketch the programing process in which positive (Supplementary Fig. 6a) and negative (Supplementary Fig. 6b) voltage pulses are input into the ferroelectric capacitor crossbar array to align the polarization of target cells upward and downward respectively. Companying with the target path, there are sneak paths in a passive crossbar structure (Supplementary Fig. 6c, d), in which the applied voltage is shared by two capacitors in sneak paths. Due to the nonlinear ferroelectric dynamics of P(VDF-TrFE), polarization switching only occurs when the input voltage is larger than the coercive voltage of ferroelectric films (Supplementary Fig. 6e). The polarization switching hardly happen for these half-biased capacitors in sneak paths, resulting in the disturb immunity of ferroelectric capacitor crossbar array. Thus, the domain configuration in the ferroelectric capacitor crossbar array can be precisely controlled. Figure 2g demonstrates that the East China Normal University logo is successfully programmed by domain configurations in which cells with upward (downward) domains are represented in light blue (green) color.

To confirm the reproducibility of the process across batches and the yield of functional devices in the crossbar array, two batches of 40 × 40 capacitor crossbar array were reproduced, in which 100 capacitors were randomly selected in each array to confirm their yield and device-to-device variation. The device uniformity of the 40 × 40 capacitor crossbar array is checked by measuring transient I-V curves of 100 random-selected capacitors (Supplementary Fig. 7a, b) where transient current peaks correspond to ferroelectric coercive electric field25. Gaussian distributions with a σ/µ ratio of 5.4% for negative coercive field and 1.8% for positive coercive field in the array reproduced at first batch (Supplementary Fig. 7c) and a σ/µ ratio of 2.5% for negative coercive field and 1.1% for positive coercive field in the array reproduced at second batch (Supplementary Fig. 7d) are obtained, confirming the high uniformity among array capacitors and good reproducibility across batches. One should note that, a near-perfect yield of 100% in the capacitor crossbar array is obtained during these examinations, implying the great potential for practical massive reproducibility.

The information represented by domain orientation in the FeRAM can be read out by voltage pulses with an amplitude higher than the coercive voltage of the ferroelectric capacitor (Supplementary Fig. 8 and Supplementary note 2). The current peak is composed of both domain-switching displacement currents and capacitive charging currents (blue color in Supplementary Fig. 8) when the domain orientation is opposite to the applied electric field. There is only capacitive charging current (red color in Supplementary Fig. 8) with a much smaller amplitude when the domain orientation is the same as the applied electric field. In a traditional FeRAM, a recovery operation is required to restore the original information. Here in our work, programming and reading are completed in same operations. We in-situ obtain the difference by reading the transient currents in the programing process. After programing the ferroelectric capacitors based on the inputting signals, the final inputted signals are stored into the ferroelectric capacitors and the difference between the final signals and the previous one is obtained. As shown in Fig. 2h, if a sequence of voltage pulse with an amplitude higher than the coercive voltage is applied to the ferroelectric capacitor, only voltage pulses whose polarity (electric field orientation) are different from that of the ferroelectric domain would trigger domain switching and result in large current peak due to polarization reversal. As the polarization orientation represents the polarity of the previous voltage pulse, observation of the domain switching signal also indicates the change of voltage pulse polarity. In this way, if we encode signals using the polarity of inputting voltage pulses, we can filter out unchanged signals and extract the difference between adjacent signals by detecting polarization reversal currents.

Calculating the derivative of mathematical functions

Based on the above mechanism, we can calculate the derivative of mathematical functions. Figure 3a sketches how the domains configurations of 14 ferroelectric capacitors are used to store digit data from −7 to 7. As a result, the value of the function f(x) = −x can be presented by the evolution of the domain configuration sequence over x. The upward (downward) domains are written by +20 V (−20 V) voltage pulses (0.1 s) on bottom electrode while the top electrodes are grounded. Figure 3b proposes the strategy for calculating the differential value by collecting the charges due to ferroelectric domains switching. The upward (downward) domain switching is labeled purple and green, respectively. Note that this strategy requires a linear relationship between the sum of charges and the number of units performing domain switching. The evolution of transient currents and integral charges as a function of time are systematically readout during the inputting process of programing voltage pulses. Either in the case where the number of capacitors with upward domain switching is increased monotonically from 1 to 14 in steps of 1 (Fig. 3c), or in the case where the number of capacitors with upward domain switching is increased monotonically from 0 to 7 in steps of 1 and then kept constant at 7, while the number of capacitors with downward domain switching first remains constant at 7 and then decreases monotonically from 7 to 0 in steps of 1 (Fig. 3d), it clearly shows a linear relationship with a slope of 2.85 mC/unit between integral charges and hybrid (upward or downward) domains reversals. This linear relationship allows the analogue calculation of the differential value (B-A) between data A and data B, by evaluating the value of integral charges over 2.85 mC when it alters domains configuration from data A to data B.

Fig. 3: In-memory differential computing for solving mathematical derivative functions.
figure 3

a A schematic diagram showing how the domain configuration in 14 ferroelectric capacitors stores data with values varying from −7 to 7. Inset shows the function f(x)=−x, where ∆x = 1, a = −4 and b = 4. b A schematic diagram showing how the ferroelectric domains switching calculates the differential value. The upward (downward) domain switching is labeled in blue and red, respectively. c, d The evolution of transient currents (left) and integral charges (right) with time. In the case of (c), as time increases periodically, the number of capacitors with upward domain switching increases monotonically from 1 to 14 in steps of 1 (inset of c). In the case of (d), as time increases periodically, the number of capacitors with upward domain switching increases monotonically from 0 to 7 in steps of 1 and then remains constant at 7, while the number of capacitors with downward domain switching first remains constant at 7 and then decreases monotonically from 7 to 0 in steps of 1 (inset of d). e The parabolic function g(x)=x2-2x + 1. f The evolution of transient currents (left) and integral charges (right) as a function of time. As time increases periodically, the switching of domains computes g(0)-g(−1), g(1)-g(0), g(2)-g(1) and g(3)-g(2), respectively. g By dividing with the ∆x of 1, that is [g(0)-g(−1)]/[0-(−1)] = g’(−0.5), [g(1)-g(0)]/[1-0] =g’(0.5), [g(2)-g(1)]/[2-1] =g’(1.5) and [g(3)-g(2)]/[3-2] =g’(2.5), the domains switching gives the first-order derivative function g’(x) = 2x−2. The experimental measurements are repeated 12 times to exclude randomness. h The evolution of transient currents (left) and integral charges (right) with time. As time increases periodically, the domains switching calculates g’(0.5)-g’(−0.5), g’(1.5)-g’(0.5) and g’(2.5)-g’(1.5), respectively. i By dividing with the ∆x of 1, that is [g’(0.5)-g’(−0.5)]/[0.5-(−0.5)] = g”(0), [g’(1.5)-g’(0.5)]/[1.5-0.5] = g”(1) and [g’(2.5)-g’(1.5)]/[2.5-1.5] = g”(2), the domains switching gives the second-order derivative function g”(x) = 2. The experimental measurements are repeated 12 times to exclude randomness. Source data are provided as a Source Data file.

The availability of the mathematical calculation of derivatives using ferroelectric capacitors is demonstrated by calculating the first-order and second-order derivative solution of a parabolic function g(x) = x2 − 2x + 1 (Fig. 3e). The value of g(x) is written sequentially in the ferroelectric capacitor following the rule defined in Fig. 3a. Figure 3f shows the evolution of the transient currents (left) and integral charges (right) as a function of time. When the domains configuration changes from g(−1) = 4 to g(0) = 1, the domains switching calculates g(0)-g(-1), that is g(0)-g(−1)= integral charges/2.85 mC ~ -3. Similarly, g(1)-g(0), g(2)-g(1) and g(3)-g(2) are calculated to be ~−1, ~1 and ~3 respectively. Dividing with the ∆x of 1, that is [g(0)-g(−1)]/[0-(−1)]=g’(−0.5), [g(1)-g(0)]/[1-0] =g’(0.5), [g(2)-g(1)]/[2-1] =g’(1.5) and [g(3)-g(2)]/[3-2] =g’(2.5), the domains switching gives a first-order derivative function of g’(x) = 2x − 2 (Fig. 3g). Similarly, g’(0.5)-g’(-0.5), g’(1.5)-g’(0.5) and g’(2.5)-g’(1.5) are calculated experimentally (Fig. 3h) and a second-order derivative function g”(x) = 2 is obtained (Fig. 3i). These experimental measurements are repeated 12 times to exclude randomness. The good agreement between the experimental measurements and the ideal mathematical calculations is demonstrated (Fig. 3g, i), confirming the ability of the ferroelectric capacitors to solve mathematical derivative functions. Since these differential mathematical calculations are performed in the FeRAM itself, we refer to it hereafter as in-memory differentiator.

In-memory differential computing for motion extraction

Enabling the motion extraction function possessed by the frog-eye visual system (Fig. 4a) is important for visual applications in either daily life or military scene9. We propose to use the in-memory ferroelectric differentiator to obtain motion information (Fig. 4b). First, the video pixels of a CIS camera are encoded into sequences of analogue voltage signals whose amplitude is higher than the coercive voltage (VC) of these ferroelectric capacitors and the polarities “+” and “−” correspond to the light and dark pixels, respectively (Fig. 4c). The voltage signal sequences are then inputted into the ferroelectric capacitor array. The good immunity to the sneak path (Supplementary Figs. 5, 6) allows a strict one-to-one correspondence relationship between capacitors and pixels. Thanks to the nonvolatility of the ferroelectric domains, only those voltage pulses of opposite polarity (pixels changing between neighboring frames) trigger ferroelectric domain switching (Fig. 4c). Thus, the domain switching signals enables autonomous extraction of temporal contrast without additional differential calculations. A moving ball video is used to demonstrate the motion extraction function of the in-memory ferroelectric differentiator. By collecting these domain switching signals, it obtains moving objects between neighboring frames (Fig. 4d), in which only the trajectory of the moving ball during the shooting process are obtained while the fixed basketball stand and hoop are filtered by ferroelectric domain dynamics (Fig. 4d and Supplementary Movie 1).

Fig. 4: In-memory differential computing for motion extraction.
figure 4

Sketch of the biological frog retina (a) and ferroelectric capacitors as an in-memory differentiator (b) for motion information extraction. c These charts show the process of implementing frame differences using the ferroelectric in-memory differentiator. By inputting images that are encoded by programming domain configurations into the ferroelectric in-memory differentiator, the ferroelectric domain switching signals simultaneously give motion pixels. d Acquisition of frame difference of a basketball shot through the domain switching signals of the ferroelectric in-memory differentiator.

The frequency response, an essential parameter for dynamic visual analysis, is characterized by applying voltage waveforms at different frequencies. A short video with two moving cars (Supplementary Fig. 9 and Supplementary Movie 2) is also processed using a sequence of voltage pulses (amplitude of 40 V) with different widths/periods. A vehicle video is preconditioned to contain 40 × 160 pixels in each frame (Supplementary Fig. 9b) and the pixel-encoded voltage pulse sequences are inputted into 4 ferroelectric capacitor arrays (40 × 40). Supplementary Fig. 9c shows the results of successful processing of the moving car information with the voltage pulses (width of 2 μs and amplitude of 40 V). As presented in Supplementary Fig. 10a, when the voltage pulse width (Δt) is 2 μs, a clear current peak followed by silent currents is observed at the first opposite voltage pulse. As Δt decreases, the capacitor charge and discharge currents increase accordingly (Δt is 2 μs in Supplementary Fig. 10a, 1 μs in Supplementary Fig. 10c and 500 ns in Supplementary Fig. 10e). When Δt gradually decreases to 500 ns (Supplementary Fig. 10e), the current peak at the first opposite voltage pulse decays rapidly and subsequent current peak signals are also observed, implying that the shorter voltage pulses cannot operate the entire polarization reversal. The results of processing the moving car information using the voltage pulses with width of 2 μs, 1 μs and 500 ns are shown in Supplementary Fig. 10b, Supplementary Fig. 10d and Supplementary Fig. 10f, respectively. It is found that both the disturbance of the subsequent current peaks due to the fragmentary polarization switching and enhanced capacitor charge current noises result in the margin window to distinguish pixel alteration not being large enough to give accurate and clear moving information when Δt ≤500 ns (Supplementary Fig. 10f). These results demonstrate that the frequency limit of the capacitor array based on organic ferroelectrics is 1 MHz. It should be noted that the operating speed can be further improved if rather inorganic ferroelectrics are involved since their domain switching time is at sub-picosecond scale13.

In-situ motion extraction using the in-memory differentiator

An in-situ motion extraction system comprising a camera to directly capture natural events and an in-memory differentiator to isolate motion information is designed (Fig. 5a, Supplementary Fig. 11a–d, Supplementary Movie 3). Figure 5b show the optical image of the 40 × 40 in-memory differentiator with an 8 × 10 region selected and used for the demonstration below. Real-time pictures captured by the camera are transmitted to a computer via USB where they are compressed and binarized to 8 × 10 pixels in situ and converted to 8 voltage pulses sequences for each frame of image. When it inputs an image, white and black pixels are separated into two images and encoded to positive and negative voltage pulses respectively, while blank pixels are encoded to zero voltage biases (Fig. 5c and Supplementary Fig. 12a–d). In other words, each image is divided into all white-pixels one and all black-pixels one (Supplementary Fig. 13a–d) and the capacitors encoded by the white (black) pixels experience positive (negative) voltage pulses (amplitude of 24 V, width of 0.06 s) while the capacitors without pixels (blue color in VI and V of Supplementary Fig. 13a–e) experience zero voltage biases during these operations. Supplementary Fig. 13b, c and Supplementary Fig. 13e (red-color current bulge in) show unambiguously that polarization reversals are observed when the pixels of the previous frame are opposite to those of the current frame, whereas only charge currents (black color in Supplementary Fig. 13d) are observed when the pixels in the previous frame are identical to those of the current frame. Supplementary Fig. 13e exemplifies that an “F” shape is clearly obtained when the white “F” pixels are transformed into black pixels.

Fig. 5: In situ motion detection system consisting of the ferroelectric in-memory differentiator.
figure 5

a Sketch of an in situ motion detection system comprising a camera to directly capture natural events and a ferroelectric capacitor crossbar array as the in-memory differentiator to isolate motion information. b The optical image of a 40 × 40 ferroelectric capacitor crossbar array hardware. c A schematic diagram showing how pixels in the image are encoded by voltage pulses and inputted to the ferroelectric capacitor crossbar array. dg Four typical cases of pixel alteration and the corresponding transient currents. A positive polarization reversal (positive current bulge) is obtained when the white pixel follows a black pixel (d), the polarization reversal (current bulge) is absent when the white pixel follows the same pixel as a previous pixel (e) and when the black pixel follows the same pixel as a previous pixel (f), and a negative polarization reversal (negative current hump) is obtained when the black pixel follows a white pixel (g). Yellow color highlights the current hump. The cases of (d), (e, f) and (g) are defined for white, blue, and black pixels, respectively. hi Two adjacent frames of images. jk The compressed and binarized images with 8 × 10 pixels. lm The moving pixels obtain by ideal computation and experimental ferroelectric domain switching signals. n The transient current response of the ferroelectric capacitor hardware during image (k) processing. Following the rule of (dg), the ferroelectric domain switching signals in (n) give the motion image (m). Source data are provided as a Source Data file.

Based on the bulge transient currents once there is domain switching (Supplementary Fig. 14), four typical cases of pixel alteration and the corresponding transient currents (labeled as red color) are shown in Fig. 5d–g. A positive current bulge due to upward polarization switching is obtained when the black pixel is converted to a white pixel (Fig. 5d). There is no current bulge when the white (black) pixel follows the same pixel as the previous one (Fig. 5e, f) and a negative current bulge is obtained when the white pixel is converted to a black pixel (Fig. 5g). Note that the integration value of the transient currents during the voltage pulse period is zero if there are only capacitive charging (pulse on) or discharging (pulse off) processes (Fig. 5e, f), while the integration result is a positive (negative) value due to the bulge region (highlighted by the yellow color) if there are upward (Fig. 5d) or downward (Fig. 5g) polarization reversal processes. The positive (Fig. 5d), zero (Fig. 5e, f) and negative (Fig. 5g) integration value are defined for a white, blue, and black colored pixel respectively, aiming for presenting motion pixels using these domain switching signals.

Real-time motion extraction of people’s movements is demonstrated (Fig. 5h–n, Supplementary Figs. 1522 and Supplementary Movie 4). Figure 5g–i shows two adjacent frames of images that have been compressed and binarized to 8×10 pixels (Fig. 5j to Fig. 5h and Fig. 5k to Fig. 5i). The transient current response of the ferroelectric capacitor for the processing Fig. 5k is presented in Fig. 5n, resulting in a motion image (Fig. 5m). Interestingly, the experimentally obtained results (Fig. 5m) correspond well to the ideal one (Fig. 5l). The final accuracy of identification of the people motion using the ferroelectric capacitor array hardware is estimated at 98.9% (Supplementary Figs. 1522 and Supplementary Movie 4).

Extracting image differences over ultra large time scale

As demonstrated in Fig. 6a, our in-memory ferroelectric differentiator is proposed for extracting image differences. Notably, a good retention property of more than 5 days is confirmed in the ferroelectric capacitors (Supplementary Fig. 23), implying the possibility of processing two temporal images over an ultra large time scale. The polarization retention capability of P(VDF-TrFE) capacitors under temperature of 25 °C, 50 °C and 85 °C (Supplementary Fig. 24) and after device aging of 104 cycles, 105 cycles and 106 cycles (Supplementary Fig. 25) were examined, which demonstrated stable retention ability of P(VDF-TrFE) films.

Fig. 6: Extraction of image differences between events over a large range of interval.
figure 6

a A schematic diagram showing how a ferroelectric capacitor array is used to extract image differences. b A schematic diagram showing how a ferroelectric capacitor array is used to identify defective dies on a silicon wafer. cf A schematic diagram showing how a ferroelectric capacitor array is used to assess the change in track direction. The track direction is to the right (closed switch) in (c) image and it is forward (open switch) in (d) image. If the track direction is changed from right to front, a clear image differences can be obtained using ferroelectric domain switching signals (e). However, if the track direction is always to the right, a clean blue image is then obtained without ferroelectric domain switching signals (f).

Identifying differences between similar images is important for daily life and manufacturing industry, such as e.g., for detecting defects in silicon wafers. During the manufacturing process, defects can affect the functionality and performance of the chip, and even cause it to fail. Therefore, it is necessary to effectively detect wafer defects. Figure 6b demonstrates that the ferroelectric capacitor crossbar array can be used to identify defective dies by comparing the die images of the wafer with those of the ideal wafer. A clean blue image without ferroelectric domain switching signals is obtained when a normal die passes (Supplementary Fig. 26), while pixels highlighted by ferroelectric domain switching signals are obtained when an unusual die with a dirty spot appears (Supplementary Fig. 27).

Benefiting from the excellent retention property, images of the rails acquired at 9:00 am (Fig. 6c) and 4:00 pm (Fig. 6d), respectively are successfully processed to assess the change in track direction. The track direction is to the right in Fig. 6c and forward in Fig. 6d. By processing these temporal images using the ferroelectric capacitor crossbar array, the change of track direction can be easily obtained. When the track direction is changed from right to forward, a clear image difference by ferroelectric domain switching signals is obtained (Fig. 6e and Supplementary Fig. 28). However, if the track direction is always to the right, a clean blue image without ferroelectric domain switching signals is then obtained (Fig. 6f and Supplementary Fig. 29).

This in-memory ferroelectric differentiator is also potential for an unmanned sentinel application. Supplementary Fig. 30a, b are two images of campus gate before and after one of roadblock (highlighted by green frame) is moved away. Supplementary Fig. 30c show the specific display of monitored different parts of the two images using the in-memory ferroelectric differentiator. The transient currents during the dealing process are presented in Supplementary Fig. 30d. Once the differentiator recognizes a difference between the two images, it indicates that some objects in the view field are moved. Similarly, it can monitor the safety status of instruments in a laboratory or museum in real time without a watchman on duty and can immediately detect and issue an alarm if an instrument is moved or is stole. It should be noted that during the processing process of all above cases, no additional memory unit is required to store these previously acquired images.

Discussion

A FeRAM based on passive crossbar array of 1.6 k P(VDF-TrFE) ferroelectric capacitors has been realized. The detrimental sneak path issue is effectively eliminated by the nonlinear dynamic of the ferroelectric domains with a narrow switching window. The configuration of the domains can be purposely programmed in each unit of this selector-free ferroelectric capacitor array. It should be noted that the disturbance immunity of the passive crossbar-based FeRAM can be further improved through disturbance recovery operations40. A lower operation voltage is more preferred for IoT applications. A smaller operating voltage can be obtained by reducing the thickness of ferroelectric layer or using other ferroelectrics with a lower coercive voltage, such as the popular sub-ten-nanometer hafnium-based ferroelectric, whose operating voltage can be reduced to 2.4 V40. Considering that hafnia-based ferroelectric films can be deposited through atomic layer deposition in high aspect-ratio trenches, a 3D stackable cross-point array structure has been proposed40. As have been discussed in Supplementary Fig. 6, the non-linear dynamics play a crucial role on the disturb immunity in a passive cross-point ferroelectric capacitors array. Specially, the coercive switching of polarization in the ferroelectric capacitors, that is, there is no polarization switching at all if the input voltage is below the coercive voltage of ferroelectric films (Fig. 2b, c, Supplementary Fig. 6e), make it functionable for a massive, in-principle not limited scale, ferroelectric capacitor crossbar array. These results imply the possibility of a massive FeRAM based on passive crossbar array of ferroelectric capacitors.

In the process of solving the mathematical derivative functions in Fig. 3, the number of capacitors is used to simulate the value of the digits. The linearity of the integral charge versus the domain switching events is crucial for the analog differential calculus, in which the statistical variation across multiple devices have a direct impact on the accuracy. The variation of switchable double remanent polarization (2Pr) across 16 P(VDF-TrFE) capacitors, whose polarization versus applied electric field (P-E) curves are shown in Supplementary Fig. 3, is summarized and presented in Supplementary Fig. 31. The ratio of variation (maximal value – minimum value, 1.57 µC/cm2) over average value (15.94 µC/cm2) is ~9.8% for these 16 capacitors. Note that linear summation of domain switching charges is obtained during the analog differential calculus, the final error of the cumulative results would be the same with the variation across multiple devices, independent on the device quantity. This unideal problem can be solved by introducing a weighting coefficient, in which the polarization switching judge the signal change and trigger the weighting currents that is produced by mature circuits (Supplementary Fig. 32). For example, when defining a binary format with the help of peripheral circuits, only 16 capacitors can simulate all the digits from “-255” to “255” (Supplementary Fig. 32). The first- and second-order derivative solution of e.g., a sine function is successfully demonstrated using the 16 binary-format ferroelectric capacitors (Supplementary Fig. 33). The simulation further shows that ferroelectric capacitors are very convenient for solving mathematical derivative functions.

Another important application of this ferroelectric in-memory differentiator is the extraction of moving objects and image differences. As highlighted in Fig. 1b, the motion information can be extracted simultaneously during the ferroelectric memory access process. Unlike complicated processing steps including two times of memory access and one logic operation for each differential calculus in the MCU-based motion extraction, only one reading access could complete the differential calculus using the ferroelectric in-memory differentiator. The energy consumption of each differential calculus using the ferroelectric in-memory differentiator is estimated to be ~0.24 fJ by a formula of E=UIt, where the operation voltage of 24 V, pulse width of 1 µs and leakage current of 10 pA are used41. This low energy consumption per operation allows high energy efficiency of ~4.17 POPS/W when they constitute a massive hardware, which is 5 and 6 orders higher than 9.5 GOPS/W of CPU (Intel-12900) and 100 GOPS/W of GPU (NVIDIA V100) respectively42. One should also note that peripheral circuits mainly comprising amplifiers and matrix switches are necessary for a functional system-level chip, which consume energy uninterruptedly and will decay a certain degree of energy efficiency.

Methods

Device preparation

Pt electrode (50 nm) was deposited on the substrate by magnetron sputtering at room temperature. The chamber pressure, working power, and Ar flow rate were 0.3 Pa, 100 W, and 50 sccm, respectively. The P(VDF-TrFE) (70:30 mol%) ferroelectric polymer powder was first dissolved in the diethyl carbonate with 2.5 wt%. Then, the P(VDF-TrFE) films were prepared by spin coating on top of Pt. The P(VDF-TrFE) films were then annealed at 135 °C for 4 h to improve their crystallinity. The thickness of the P(VDF-TrFE) films is between 200 and 300 nm, depending on the spin coating layers with each layer of ~75 nm. Finally, the Al (40 nm) electrodes were deposited by thermal evaporation at room temperature. Herein, the above electrode preparation process was completed with a metal mask, and the size of each capacitor was ~200 × 200 µm2.

Electrical measurements

The electrical measurements in Fig. 4 and Supplementary Figs. 5 and 810 were performed using a Keithley 4200A-SCS parameter analyzer with remote preamplifiers under ambient conditions and at room temperature. Electrical measurements in Figs. 2, 5, 6, Supplementary Figs. 1223 and 2629 were performed using the Multiple-channel of NI (PXIe-4163) with the assistant of a matrix switch. We have built a home-made in-situ testing platform using four modules from National Instruments (NI): PXIe-4163, PXI-2532B, TB-2643B, and NI SCB-264X. The PXIe-4163 serves as the signal source, capable of arbitrarily editing voltage waveforms. The PXI-2532B is a high-density matrix switch module that allows for the construction of the required test topology. The TB-2643B and NI SCB-264X are connectors and connector blocks, which simplify the connection of signal lines to the test and measurement equipment. The piezoresponse force microscopy (PFM) measurements and P-V hysteresis loops were investigated using a commercial PFM (Asylum Cypher) and a ferroelectric analyzer (TF Analyzer 3000), respectively.