Method and device for calculating frequency domain amplitude and phase angle in memristor array
By calculating the current data of cosine and sine mixed signals in a memristor array, and using a phase detector and a peak detector to read the phase and amplitude information of the frequency point, the problem of not being able to directly calculate the amplitude and phase in the prior art is solved, and efficient frequency domain amplitude and phase angle calculation is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2024-10-24
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies cannot directly calculate the amplitude and phase in the frequency domain of a memristor array without increasing additional hardware overhead and computational latency, thus affecting computational efficiency.
The time-domain input signal of the target memristor array is acquired, and a mixing signal is calculated based on the cosine and sine signals. This signal is then applied to the row lines of the array. The current data is calculated using the discrete Fourier transform matrix, and the phase and amplitude information is read through a phase detector and a peak detector.
The amplitude and phase of the signal at each frequency point can be obtained directly in the analog domain, which reduces hardware overhead and computational latency and improves computational efficiency.
Smart Images

Figure CN119673247B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of memristor array technology, and in particular to a method and apparatus for calculating the amplitude and phase angle in the frequency domain of a memristor array. Background Technology
[0002] Time-frequency transformation is the most commonly used signal analysis method in the field of signal processing. By observing the amplitude and phase of the signal at each frequency point, researchers can obtain richer information.
[0003] Currently, memristor arrays can be used to perform time-frequency transformation of discrete signals, and the basic principle is as follows: Figure 1 As shown, the discrete Fourier transform matrix is stored in the form of conductance values on the memristor array (the real and imaginary parts need to be separated during mapping). When the real part Re(x) and imaginary part Im(x) of the input signal x are simultaneously input onto the row lines of the memristor array, the real part Re(y) and imaginary part Im(y) of the time-frequency transformed result y will be output onto the column lines. The formula for calculating the real part is Re(y) = Re(x)Re(W) - Im(x)Im(W), and the formula for calculating the imaginary part is Im(y) = Re(x)Im(W) + Im(x)Re(W) (for simplicity, the sign of the elements in the parameter matrix is not considered). In practice, to map a parameter matrix containing both positive and negative numbers, a memristor array of twice the size is needed to represent the parameter matrix in differential form. Generally, one memristor array is used to represent one parameter matrix (elements can be positive or negative), such as... Figure 2 As shown.
[0004] However, current methods can only calculate the real and imaginary parts of each frequency point, and cannot directly calculate the amplitude and phase, making it difficult to intuitively obtain spectrum information. Existing technologies can also introduce digital circuits to obtain the amplitude and phase, but this requires complex square summation, square root, and trigonometric function calculations in the digital domain, resulting in additional hardware overhead and computational delay.
[0005] In summary, existing technologies cannot directly calculate amplitude and phase without increasing additional hardware overhead and computational latency, which greatly affects the efficiency of frequency domain amplitude and phase angle calculation and urgently needs to be addressed. Summary of the Invention
[0006] This application provides a method and apparatus for calculating the amplitude and phase angle in the frequency domain of a memristor array, in order to solve the problems of existing technologies being unable to directly calculate the amplitude and phase without increasing additional hardware overhead and computational latency, which greatly affects the efficiency of frequency domain amplitude and phase angle calculation.
[0007] The first aspect of this application provides a method for calculating the frequency domain amplitude and phase angle in a memristor array, comprising the following steps: acquiring a time-domain input signal corresponding to a target memristor array, and calculating a cosine mixing signal and a sine mixing signal based on the time-domain input signal, a preset cosine signal, and a sine signal; applying the cosine mixing signal and the sine mixing signal to the corresponding row lines of the target memristor array respectively, and calculating the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal based on the discrete Fourier transform matrix of the corresponding row lines; obtaining the current information of each frequency point in the target memristor array based on the cosine current data and the sine current data, and reading the phase information and amplitude information corresponding to each frequency point in the current information through a preset phase detector and a peak detector respectively.
[0008] Optionally, in one embodiment of this application, the step of obtaining the time-domain input signal corresponding to the target memristor array and calculating the cosine mixed signal and the sine mixed signal based on the time-domain input signal, a preset cosine signal, and a sine signal includes: inputting the real part and the imaginary part of the time-domain input signal of the target memristor array to a preset digital-to-analog converter to generate an analog voltage signal corresponding to the time-domain input signal; inputting the analog voltage signal to a preset mixer to generate a mixed signal corresponding to the time-domain input signal; generating the cosine signal and the sine signal through a preset cosine wave generator and a sine wave generator, and multiplying the mixed signal by the cosine signal and the sine signal respectively to obtain the cosine mixed signal and the sine mixed signal.
[0009] Optionally, in one embodiment of this application, the step of applying the cosine mixing signal and the sine mixing signal to the corresponding row lines of the target memristor array, respectively, to calculate the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal based on the discrete Fourier transform matrix of the corresponding row lines, includes: applying the cosine mixing signal to the upper half of the row lines of the target memristor array through a preset multiplexer, and obtaining the discrete Fourier transform matrix of the upper half of the row lines. The cosine mixing signal is multiplied by the negatives of the real and imaginary parts of the discrete Fourier transform matrix of the upper half of the row lines to obtain the cosine current data; the sinusoidal mixing signal is applied to the lower half of the row lines of the target memristor array through the multiplexer, and the discrete Fourier transform matrix of the lower half of the row lines is obtained; the sinusoidal mixing signal is multiplied by the real and imaginary parts of the discrete Fourier transform matrix of the lower half of the row lines to obtain the sinusoidal current data.
[0010] Optionally, in one embodiment of this application, obtaining current information at each frequency point in the target memristor array based on the cosine current data and the sine current data, and reading the phase information and amplitude information corresponding to each frequency point in the current information through a preset phase detector and a peak detector, includes: obtaining current information at each frequency point based on the cosine current data, the sine current data, and a preset Kirchhoff's current law; extracting target coefficients through the current information and transmitting the current information to a preset transimpedance amplifier to generate a voltage signal corresponding to the current information; and inputting the voltage signal to the phase detector and the peak detector to read the phase information and amplitude information corresponding to each frequency point in the target coefficients.
[0011] A second aspect of this application provides a device for calculating the frequency domain amplitude and phase angle of a memristor array, comprising: an acquisition module for acquiring a time-domain input signal corresponding to a target memristor array, and calculating a cosine mixed signal and a sine mixed signal based on the time-domain input signal, a preset cosine signal, and a sine signal; an application module for applying the cosine mixed signal and the sine mixed signal to corresponding row lines of the target memristor array, respectively, and calculating cosine current data corresponding to the cosine mixed signal and sine current data corresponding to the sine mixed signal based on the discrete Fourier transform matrix of the corresponding row lines; and a reading module for obtaining current information at each frequency point in the target memristor array based on the cosine current data and the sine current data, and reading the phase information and amplitude information corresponding to each frequency point in the current information through a preset phase detector and a peak detector, respectively.
[0012] Optionally, in one embodiment of this application, the acquisition module includes: a first generation unit, configured to input the real and imaginary parts of the time-domain input signal of the target memristor array to a preset digital-to-analog converter to generate an analog voltage signal corresponding to the time-domain input signal; a second generation unit, configured to input the analog voltage signal to a preset mixer to generate a mixed signal corresponding to the time-domain input signal; and a third generation unit, configured to generate the cosine signal and the sine signal through preset cosine wave generators and sine wave generators, and multiply the mixed signal by the cosine signal and the sine signal respectively to obtain the cosine mixed signal and the sine mixed signal.
[0013] Optionally, in one embodiment of this application, the application module includes: a first allocation unit, configured to apply the cosine mixing signal to the upper half of the target memristor array through a preset multiplexer, and obtain the discrete Fourier transform matrix of the upper half of the array; a first calculation unit, configured to multiply the cosine mixing signal by the negatives of the real and imaginary parts of the discrete Fourier transform matrix of the upper half of the array to obtain the cosine current data; a second allocation unit, configured to apply the sinusoidal mixing signal to the lower half of the target memristor array through the multiplexer, and obtain the discrete Fourier transform matrix of the lower half of the array; and a second calculation unit, configured to multiply the sinusoidal mixing signal by the real and imaginary parts of the discrete Fourier transform matrix of the lower half of the array to obtain the sinusoidal current data.
[0014] Optionally, in one embodiment of this application, the reading module includes: a third calculation unit, configured to acquire current information at each frequency point based on the cosine current data, the sine current data, and a preset Kirchhoff's current law; an extraction unit, configured to extract target coefficients through the current information and transmit the current information to a preset transimpedance amplifier to generate a voltage signal corresponding to the current information; and an input unit, configured to input the voltage signal to the phase detector and the peak detector to read the phase information and amplitude information corresponding to each frequency point in the target coefficients.
[0015] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the method for calculating the frequency domain amplitude and phase angle in a memristor array as described in the above embodiments.
[0016] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for calculating the frequency domain amplitude and phase angle in a memristor array.
[0017] A fifth aspect of this application provides a computer program product, including a computer program that is executed to implement the above-described method for calculating the frequency domain amplitude and phase angle in a memristor array.
[0018] Therefore, the embodiments of this application have the following beneficial effects:
[0019] The embodiments of this application can obtain the time-domain input signal corresponding to the target memristor array, and calculate the cosine mixing signal and the sine mixing signal based on the time-domain input signal, a preset cosine signal, and a sine signal. The cosine mixing signal and the sine mixing signal are applied to the corresponding row lines of the target memristor array, and the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal are calculated based on the discrete Fourier transform matrix of the corresponding row lines. Based on the cosine current data and the sine current data, the current information of each frequency point in the target memristor array is obtained, and the phase information and amplitude information corresponding to each frequency point in the current information are read through a preset phase detector and a peak detector. This application only requires a small number of hardware units to directly obtain the amplitude and phase of each frequency point of the signal in the analog domain, greatly reducing energy efficiency and computational latency. Therefore, it solves the problem that existing technologies cannot directly calculate the amplitude and phase without increasing additional hardware overhead and computational latency, which greatly affects the efficiency of frequency domain amplitude and phase angle calculation.
[0020] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0021] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0022] Figure 1 A schematic diagram of a discrete Fourier transform based on a memristor array, provided as an embodiment of this application, without considering the positive and negative elements of the parameter matrix;
[0023] Figure 2 A schematic diagram of a discrete Fourier transform based on a memristor array, considering the positive and negative elements of a parameter matrix, is provided as an embodiment of this application.
[0024] Figure 3 This is a flowchart illustrating a method for calculating the amplitude and phase angle in the frequency domain of a memristor array according to an embodiment of this application.
[0025] Figure 4 A schematic diagram of the logic architecture of a method for calculating the amplitude and phase angle in the frequency domain of a memristor array, provided as an embodiment of this application;
[0026] Figure 5 A hardware circuit diagram of a method for calculating the amplitude and phase angle in the frequency domain of a memristor array, provided as an embodiment of this application;
[0027] Figure 6 A schematic diagram of a phase detector circuit is provided for one embodiment of this application;
[0028] Figure 7 A schematic diagram of a peak detection circuit is provided for one embodiment of this application;
[0029] Figure 8 This is an example diagram of a device for calculating the frequency domain amplitude and phase angle in a memristor array according to an embodiment of this application;
[0030] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0031] Among them, 10 is a calculation device for the amplitude and phase angle in the frequency domain of the memristor array, 100 is an acquisition module, 200 is an application module, 300 is a reading module, 901 is a memory, 902 is a processor, and 903 is a communication interface. Detailed Implementation
[0032] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0033] The following describes a method and apparatus for calculating the frequency domain amplitude and phase angle of a memristor array according to embodiments of this application, with reference to the accompanying drawings. Addressing the problems mentioned in the background art, this application provides a method for calculating the frequency domain amplitude and phase angle of a memristor array. In this method, the time-domain input signal corresponding to the target memristor array is obtained, and a cosine mixing signal and a sine mixing signal are calculated based on the time-domain input signal and preset cosine and sine signals. The cosine mixing signal and the sine mixing signal are applied to the corresponding row lines of the target memristor array, and the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal are calculated based on the discrete Fourier transform matrix of the corresponding row lines. Based on the cosine current data and the sine current data, the current information at each frequency point in the target memristor array is obtained, and the phase information and amplitude information corresponding to each frequency point in the current information are read through preset phase detectors and peak detectors. This application only requires a small number of hardware units to directly obtain the amplitude and phase of each frequency point of the signal in the analog domain, greatly reducing energy efficiency and computational latency. This solves the problem that existing technologies cannot directly calculate amplitude and phase without increasing additional hardware overhead and computational latency, which greatly affects the efficiency of frequency domain amplitude and phase angle calculation.
[0034] Specifically, Figure 3 This is a flowchart illustrating a method for calculating the frequency domain amplitude and phase angle in a memristor array, as provided in an embodiment of this application.
[0035] like Figure 3As shown, the method for calculating the frequency domain amplitude and phase angle of this memristor array includes the following steps:
[0036] In step S301, the time-domain input signal corresponding to the target memristor array is obtained, and the cosine mixing signal and the sine mixing signal are calculated based on the time-domain input signal, the preset cosine signal and sine signal.
[0037] The embodiments of this application first obtain the time-domain input signal x corresponding to the memristor array, and combine it with the cosine and sine signals generated by the cosine wave generator and the sine wave generator to calculate the cosine mixed signal and the sine mixed signal.
[0038] The memristor array in this application includes, but is not limited to, the following structures:
[0039] 1. Use different types of memristors (such as resistive random access memory, phase change memory, magnetic random access memory, etc.);
[0040] 2. Use in-memory computing crossover arrays of other memory types (such as SRAM arrays, DRAM arrays, FLASH arrays, etc.);
[0041] 3. Adopt in-memory computing architectures or units with different structures (such as 1T1R, 2T2R, 2T1R, etc.).
[0042] Optionally, in one embodiment of this application, obtaining the time-domain input signal corresponding to the target memristor array, and calculating the cosine mixed signal and the sine mixed signal based on the time-domain input signal, a preset cosine signal, and a sine signal, includes: inputting the real part and the imaginary part of the time-domain input signal of the target memristor array to a preset digital-to-analog converter to generate an analog voltage signal corresponding to the time-domain input signal; inputting the analog voltage signal to a preset mixer to generate a mixed signal corresponding to the time-domain input signal; generating the cosine signal and the sine signal through a preset cosine wave generator and a sine wave generator, and multiplying the mixed signal with the cosine signal and the sine signal respectively to obtain the cosine mixed signal and the sine mixed signal.
[0043] In actual implementation, embodiments of this application can input the real part Re(x) and imaginary part Im(x) of the input time-domain input signal x to a digital-to-analog converter (DAC) to convert it into a corresponding analog voltage signal, and then transmit the analog voltage signal to a mixer to generate a mixed signal.
[0044] After that, as Figure 4As shown, in the embodiments of this application, the mixed signal can be multiplied by the cosine signal cos wt generated by the cosine wave generator and the sine signal sin wt generated by the sine wave generator, respectively, to obtain the cosine mixed signals Re(x)cos wt and Im(x)cos wt corresponding to the cosine signal, and the sine mixed signals Re(x)sin wt and Im(x)sin wt corresponding to the sine signal.
[0045] Therefore, the embodiments of this application calculate the cosine mixing signal and the sine mixing signal corresponding to the time-domain input signal, thereby providing reliable data for the subsequent calculation of frequency-domain amplitude and phase angle.
[0046] In step S302, the cosine mixing signal and the sine mixing signal are applied to the corresponding row lines of the target memristor array, respectively, and the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal are calculated based on the discrete Fourier transform matrix of the corresponding row lines.
[0047] Furthermore, embodiments of this application also require applying the cosine mixing signal and the sine mixing signal to the corresponding row lines of the target memristor array, and combining the discrete Fourier transform strategy to calculate the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal.
[0048] Optionally, in one embodiment of this application, a cosine mixing signal and a sine mixing signal are applied to the corresponding rows of the target memristor array, respectively, to calculate the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal based on the discrete Fourier transform matrix of the corresponding rows. This includes: applying the cosine mixing signal to the upper half of the rows of the target memristor array through a preset multiplexer and obtaining the discrete Fourier transform matrix of the upper half of the rows; multiplying the cosine mixing signal by the negatives of the real and imaginary parts of the discrete Fourier transform matrix of the upper half of the rows to obtain the cosine current data; applying the sine mixing signal to the lower half of the rows of the target memristor array through a multiplexer and obtaining the discrete Fourier transform matrix of the lower half of the rows; and multiplying the sine mixing signal by the real and imaginary parts of the discrete Fourier transform matrix of the lower half of the rows to obtain the sine current data.
[0049] It should be noted that, under the control of the signal BL_sw[1:N], the embodiments of this application can apply the cosine mixing data obtained above to the row lines of the upper half of the memristor array through the MUX at the BL terminal; subsequently, the embodiments of this application can, based on Ohm's law and Kirchhoff's current law, mix the cosine mixing data with the real part matrix G of the discrete Fourier transform matrix stored on the array. real The negative of the imaginary part matrix -G img Multiplication, such as Figure 5 As shown, the corresponding SL current calculation result can be obtained at this time, that is, the cosine current data Re(y)cos wt.
[0050] Similarly, under the control of the signal BL_sw[1:N], embodiments of this application can also apply the sinusoidal mixing data obtained above to the row lines of the lower half of the memristor array through the multiplexer (MUX) at the BL terminal; then, embodiments of this application can, based on Ohm's law and Kirchhoff's current law, mix the sinusoidal mixing data with the imaginary part matrix G of the discrete Fourier transform matrix stored in the array. img Real part matrix G real Multiplication, such as Figure 5 As shown, the corresponding SL current calculation result can be obtained at this time, that is, the sinusoidal current data Im(y)sin wt.
[0051] In step S303, based on cosine current data and sine current data, the current information of each frequency point in the target memristor array is obtained, and the phase information and amplitude information corresponding to each frequency point in the current information are read through a preset phase detector and peak detector, respectively.
[0052] Subsequently, embodiments of this application can calculate the current information at each frequency point in the memristor array based on cosine current data and sine current data, and read the phase information and amplitude information corresponding to each frequency point in the current information through a phase detector and a peak detector, respectively.
[0053] Optionally, in one embodiment of this application, current information at each frequency point in the target memristor array is obtained based on cosine current data and sine current data, and the phase information and amplitude information corresponding to each frequency point in the current information are read through a preset phase detector and peak detector, respectively. This includes: obtaining current information at each frequency point based on cosine current data, sine current data and a preset Kirchhoff's current law; extracting target coefficients through the current information and transmitting the current information to a preset transimpedance amplifier to generate a voltage signal corresponding to the current information; and inputting the voltage signal to the phase detector and peak detector to read the phase information and amplitude information corresponding to each frequency point in the target coefficients.
[0054] Specifically, embodiments of this application can calculate the final complete output result of the entire array based on cosine current data and sinusoidal current data, combined with Kirchhoff's current law:
[0055] Re(y)cos wt+Im(y)sin wt (1)
[0056] For a single frequency point y, the above formula can be written as:
[0057] Re(y)cos wt+Im(y)sin wt (2)
[0058] Here, y represents a single frequency point, rather than the entire output vector y.
[0059] Furthermore, the embodiments of this application can extract the target coefficients based on the derivation of trigonometric function formulas. Then equation (2) can be rewritten as:
[0060]
[0061] Furthermore, equation (2) can also be written as:
[0062]
[0063] in,
[0064]
[0065]
[0066] Therefore, the final equation (2) can be written as:
[0067]
[0068] Based on equation (7), it can be seen that each frequency point calculated by the memristor array contains amplitude information. Therefore, embodiments of this application can directly read the amplitude information at each frequency point using a peak detector. Meanwhile, considering... In accordance with the definition of phase, each frequency point calculated by the memristor array also contains phase information θ. Therefore, in the embodiments of this application, the phase information of each frequency point can also be directly read by the phase detector (i.e., phase detector).
[0069] In actual calculations, such as Figure 5 As shown, the MUX at the WL end is controlled by the signal WL_sw[1:M], which transmits all signals V_WL[1:M] into the array, controlling all WLs to be turned on. At this time, the MUX at the SL end is controlled by the signal SL_sw[1:M], which transmits the current signal on SL to the transimpedance amplifier (TIA). Here, the current signal is converted into a voltage signal, which is then sent to the phase detector and peak detector to directly obtain the amplitude spectrum (amplitude) and phase spectrum (phase) of the signal in the analog domain.
[0070] The following description, in conjunction with the accompanying drawings, illustrates a typical phase detector circuit and a peak detection circuit, to enable those skilled in the art to understand the execution process of the frequency domain amplitude and phase angle calculation method in the memristor array of this application.
[0071] Figure 6 This is a schematic diagram of a phase detector circuit. Figure 6 As shown, under the control of the clock CLK, the phase detector calculates the proportion of high and low levels within half a cycle to obtain the phase value.
[0072] Figure 7 This is a schematic diagram of a peak detection circuit. Figure 7 As shown, this peak detection circuit is controlled by a diode, and the upper plate of the capacitor can only be charged, not discharged; therefore, after one cycle, the voltage U across the capacitor will be... out That is, input U in The peak value is obtained, thus yielding the amplitude value at that frequency point.
[0073] It should be noted that, in the specific implementation process, those skilled in the art can design or select appropriate phase detector circuits and peak detection circuits according to the actual situation, and no specific limitations are made here.
[0074] According to the method for calculating the amplitude and phase angle in the frequency domain of a memristor array proposed in this application, the time-domain input signal corresponding to the target memristor array is obtained, and a cosine mixing signal and a sine mixing signal are calculated based on the time-domain input signal, a preset cosine signal, and a sine signal. The cosine mixing signal and the sine mixing signal are applied to the corresponding row lines of the target memristor array, and the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal are calculated based on the discrete Fourier transform matrix of the corresponding row lines. Based on the cosine current data and the sine current data, the current information of each frequency point in the target memristor array is obtained, and the phase information and amplitude information corresponding to each frequency point in the current information are read through a preset phase detector and a peak detector. This application only requires a small number of hardware units to directly obtain the amplitude and phase of each frequency point of the signal in the analog domain, which greatly reduces energy efficiency and computational latency.
[0075] Secondly, with reference to the accompanying drawings, a calculation device for the frequency domain amplitude and phase angle of a memristor array according to an embodiment of this application is described.
[0076] Figure 8 This is a block diagram of a device for calculating the frequency domain amplitude and phase angle in a memristor array according to an embodiment of this application.
[0077] like Figure 8 As shown, the frequency domain amplitude and phase angle calculation device 10 in the memristor array includes: an acquisition module 100, an application module 200, and a reading module 300.
[0078] The acquisition module 100 is used to acquire the time-domain input signal corresponding to the target memristor array, and calculate the cosine mixing signal and the sine mixing signal based on the time-domain input signal, the preset cosine signal and sine signal.
[0079] The application module 200 is used to apply the cosine mixing signal and the sine mixing signal to the corresponding row lines of the target memristor array, respectively, and calculate the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal based on the discrete Fourier transform matrix of the corresponding row lines.
[0080] The reading module 300 is used to obtain the current information of each frequency point in the target memristor array based on cosine current data and sine current data, and read the phase information and amplitude information corresponding to each frequency point in the current information through a preset phase detector and peak detector respectively.
[0081] Optionally, in one embodiment of this application, the acquisition module 100 includes: a first generation unit, a second generation unit, and a third generation unit.
[0082] The first generation unit is used to input the real and imaginary parts of the time-domain input signal of the target memristor array to a preset digital-to-analog converter to generate an analog voltage signal corresponding to the time-domain input signal.
[0083] The second generation unit is used to input the analog voltage signal into a preset mixer to generate a mixed signal corresponding to the time-domain input signal.
[0084] The third generation unit is used to generate cosine and sine signals through preset cosine wave generators and sine wave generators, and multiply the mixed signal with the cosine and sine signals respectively to obtain cosine mixed signal and sine mixed signal.
[0085] Optionally, in one embodiment of this application, the application module 200 includes: a first allocation unit, a first calculation unit, a second allocation unit, and a second calculation unit.
[0086] The first allocation unit is used to apply the cosine mixing signal to the upper half of the target memristor array through a preset multiplexer, and to obtain the discrete Fourier transform matrix of the upper half of the array.
[0087] The first calculation unit is used to multiply the cosine mixing signal by the negative numbers of the real and imaginary parts of the discrete Fourier transform matrix of the upper half of the row lines to obtain the cosine current data.
[0088] The second allocation unit is used to apply the sinusoidal mixing signal to the lower half of the target memristor array through a multiplexer and to obtain the discrete Fourier transform matrix of the lower half of the array.
[0089] The second calculation unit is used to multiply the sinusoidal mixed signal by the real and imaginary parts of the discrete Fourier transform matrix of the lower half of the row lines to obtain sinusoidal current data.
[0090] Optionally, in one embodiment of this application, the reading module 300 includes: a third calculation unit, an extraction unit, and an input unit.
[0091] The third calculation unit is used to obtain current information at each frequency point based on cosine current data, sine current data and the preset Kirchhoff current law.
[0092] The extraction unit is used to extract the target coefficient through the current information and transmit the current information to a preset transimpedance amplifier to generate a voltage signal corresponding to the current information.
[0093] The input unit is used to input the voltage signal to the phase detector and peak detector to read the phase information and amplitude information corresponding to each frequency point in the target coefficient.
[0094] It should be noted that the explanation of the above-described method for calculating the frequency domain amplitude and phase angle in a memristor array also applies to the calculation device for the frequency domain amplitude and phase angle in the memristor array of this embodiment, and will not be repeated here.
[0095] The calculation device for frequency domain amplitude and phase angle in a memristor array according to the embodiments of this application includes an acquisition module for acquiring the time-domain input signal corresponding to the target memristor array, and calculating a cosine mixed signal and a sine mixed signal based on the time-domain input signal and preset cosine and sine signals; an application module for applying the cosine mixed signal and the sine mixed signal to the corresponding row lines of the target memristor array respectively, and calculating the cosine current data corresponding to the cosine mixed signal and the sine current data corresponding to the sine mixed signal based on the discrete Fourier transform matrix of the corresponding row lines; and a reading module for obtaining the current information of each frequency point in the target memristor array based on the cosine current data and the sine current data, and reading the phase information and amplitude information corresponding to each frequency point in the current information through preset phase detectors and peak detectors respectively. This application only requires the introduction of a small number of hardware units to directly obtain the amplitude and phase of each frequency point of the signal in the analog domain, greatly reducing energy efficiency and computational latency.
[0096] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0097] The memory 901, the processor 902, and the computer program stored on the memory 901 and capable of running on the processor 902.
[0098] When the processor 902 executes the program, it implements the method for calculating the frequency domain amplitude and phase angle of the memristor array provided in the above embodiments.
[0099] Furthermore, electronic devices also include:
[0100] Communication interface 903 is used for communication between memory 901 and processor 902.
[0101] The memory 901 is used to store computer programs that can run on the processor 902.
[0102] The memory 901 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0103] If the memory 901, processor 902, and communication interface 903 are implemented independently, then the communication interface 903, memory 901, and processor 902 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0104] Optionally, in a specific implementation, if the memory 901, processor 902, and communication interface 903 are integrated on a single chip, then the memory 901, processor 902, and communication interface 903 can communicate with each other through an internal interface.
[0105] The processor 902 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0106] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for calculating the frequency domain amplitude and phase angle in a memristor array.
[0107] This application also provides a computer program product, including a computer program, which, when executed, is used to implement the above-described method for calculating the frequency domain amplitude and phase angle in a memristor array.
[0108] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0109] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0110] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0111] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0112] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0113] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0115] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for calculating the amplitude and phase angle in the frequency domain of a memristor array, characterized in that, Includes the following steps: Obtain the time-domain input signal corresponding to the target memristor array, and calculate the cosine mixing signal and the sine mixing signal based on the time-domain input signal, the preset cosine signal and sine signal; The cosine mixing signal and the sine mixing signal are respectively applied to the corresponding row lines of the target memristor array, and the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal are calculated based on the discrete Fourier transform matrix of the corresponding row lines. Based on the cosine current data and the sine current data, the current information of each frequency point in the target memristor array is obtained, and the phase information and amplitude information corresponding to each frequency point in the current information are read by a preset phase detector and a peak detector, respectively. The step of acquiring the time-domain input signal corresponding to the target memristor array, and calculating the cosine mixer signal and the sine mixer signal based on the time-domain input signal, a preset cosine signal, and a sine signal, includes: The real and imaginary parts of the time-domain input signal of the target memristor array are input to a preset digital-to-analog converter to generate an analog voltage signal corresponding to the time-domain input signal; The analog voltage signal is input into a preset mixer to generate a mixed signal corresponding to the time-domain input signal; The cosine signal and the sine signal are generated by a preset cosine wave generator and a sine wave generator, and the mixed signal is multiplied by the cosine signal and the sine signal respectively to obtain the cosine mixed signal and the sine mixed signal. The step of applying the cosine mixing signal and the sine mixing signal to the corresponding row lines of the target memristor array, respectively, and calculating the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal based on the discrete Fourier transform matrix of the corresponding row lines, includes: The cosine mixing signal is applied to the upper half of the target memristor array using a preset multiplexer, and the discrete Fourier transform matrix of the upper half of the array is obtained. The cosine mixing signal is multiplied by the negative numbers of the real part matrix and the imaginary part matrix of the discrete Fourier transform matrix of the upper half row line to obtain the cosine current data. The sinusoidal mixing signal is applied to the lower half of the target memristor array through the multiplexer, and the discrete Fourier transform matrix of the lower half of the array is obtained. The sinusoidal mixed signal is multiplied by the real part and the imaginary part of the discrete Fourier transform matrix of the lower half of the row line to obtain the sinusoidal current data.
2. The method according to claim 1, characterized in that, The process involves obtaining current information at each frequency point in the target memristor array based on the cosine current data and the sine current data, and reading the phase information and amplitude information corresponding to each frequency point in the current information through a preset phase detector and peak detector, including: Based on the cosine current data, the sine current data, and the preset Kirchhoff's current law, the current information at each frequency point is obtained; The target coefficient is extracted using the current information, and the current information is transmitted to a preset transimpedance amplifier to generate the voltage signal corresponding to the current information. The voltage signal is input to the phase detector and the peak detector to read the phase information and amplitude information corresponding to each frequency point in the target coefficient.
3. A device for calculating the amplitude and phase angle in the frequency domain of a memristor array, characterized in that, include: The acquisition module is used to acquire the time-domain input signal corresponding to the target memristor array, and calculate the cosine mixing signal and the sine mixing signal based on the time-domain input signal, the preset cosine signal and sine signal; An application module is used to apply the cosine mixing signal and the sine mixing signal to the corresponding row lines of the target memristor array, respectively, so as to calculate the cosine current data corresponding to the cosine mixing signal and the sine current data corresponding to the sine mixing signal based on the discrete Fourier transform matrix of the corresponding row lines. The reading module is used to obtain the current information of each frequency point in the target memristor array based on the cosine current data and the sine current data, and to read the phase information and amplitude information corresponding to each frequency point in the current information through a preset phase detector and peak detector respectively. The acquisition module includes: The first generation unit is used to input the real part and imaginary part of the time-domain input signal of the target memristor array to a preset digital-to-analog converter to generate an analog voltage signal corresponding to the time-domain input signal; The second generation unit is used to input the analog voltage signal into a preset mixer to generate a mixed signal corresponding to the time-domain input signal; The third generation unit is used to generate the cosine signal and the sine signal through a preset cosine wave generator and a sine wave generator, and multiply the mixed signal with the cosine signal and the sine signal respectively to obtain the cosine mixed signal and the sine mixed signal. The application module includes: The first allocation unit is used to apply the cosine mixing signal to the upper half of the row lines of the target memristor array through a preset multiplexer, and to obtain the discrete Fourier transform matrix of the upper half of the row lines. The first calculation unit is used to multiply the cosine mixing signal by the negative numbers of the real part matrix and the imaginary part matrix of the discrete Fourier transform matrix of the upper half row line, respectively, to obtain the cosine current data. The second allocation unit is used to apply the sinusoidal mixing signal to the lower half of the target memristor array through the multiplexer, and to obtain the discrete Fourier transform matrix of the lower half of the array. The second calculation unit is used to multiply the sinusoidal mixing signal by the real part matrix and the imaginary part matrix of the discrete Fourier transform matrix of the lower half row line, respectively, to obtain the sinusoidal current data.
4. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the method for calculating the frequency domain amplitude and phase angle in a memristor array as described in any one of claims 1-2.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method for calculating the frequency domain amplitude and phase angle in a memristor array as described in any one of claims 1-2.
6. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the method for calculating the frequency domain amplitude and phase angle in a memristor array as described in any one of claims 1-2.
Citation Information
Patent Citations
Dynamic power analysis method based on frequency domain interpolation
CN109946512A
Memristor array-based data processing method, and electronic device
WO2022222498A1