Kalman filter based read threshold tracking method and apparatus
By optimizing the threshold voltage of flash memory cells using the Kalman filtering method, the data reading deviation problem caused by charge changes is solved, and the data reading accuracy and reliability of multi-bit storage cells are improved.
Patent Information
- Application Number
- CN201911338051.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-23
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2039-12-23
AI Technical Summary
The existing technology has deviations when reading data due to changes in the amount of charge in flash memory storage cells, and cannot accurately reflect the original information. In particular, the threshold voltage acquisition method is insufficient in multi-bit storage cells and 3D structures, and cannot accurately distinguish the storage cell state.
The Kalman filter method is adopted to predict and observe the optimal threshold voltage of the storage unit. The parameters such as the number of erase and write times of the storage unit, data recording time, and ambient temperature are used. The ambient temperature is obtained by combining with the temperature sensor. The Kalman filter algorithm is used to optimize the threshold voltage to accurately read data.
It improves the accuracy of data reading, reduces the bit error rate, enhances the ability to distinguish the state of storage units, adapts to the state changes of storage units, and improves the reliability of data reading.
Smart Images

Figure CN113096711B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a storage device, and in particular, to a method and apparatus for tracking changes in an optimal threshold voltage for reading data from an NVM chip using a Kalman filter. Background Art
[0002] Flash memory stores information by maintaining a charge in a memory cell. The charge in the memory cell determines the read voltage of the memory cell. When reading flash memory data, the read voltage of the memory cell is compared with the threshold voltage to identify the information stored in the memory cell. However, because the charge of the memory cell is affected by various factors such as the quality, lifespan, and time of the memory cell, as well as the non-uniformity of the signal transmission path from multiple memory cells to the sensitive amplifier, the read voltage of the memory cell changes, which in turn causes some deviations in the data read from the memory cell, and cannot accurately reflect the information originally written to the memory cell. The threshold voltage (also called the decision voltage) includes a read threshold for read operations and a write threshold for write operations.
[0003] The prior art uses some means to prevent or address the problem that the read data cannot correctly reflect the written data due to changes in factors such as the charge amount of the storage cell. For example, in U.S. Patent US9070454B1, the threshold voltage (the threshold voltage or judgment voltage used when reading data from or writing data to the storage cell) is calculated based on factors such as the number of erase and write times and the retention time of the storage cell, and the calculated threshold voltage is used to write data to the storage cell.
[0004] In a flash memory chip, the threshold voltage used in a read operation is selected by indicating parameters for the read operation. Through read operations with different threshold voltages, the data read from the storage unit will have different results. Some results have a lower bit error rate (Bit Error Ratio, the percentage of error bits to the total number of bits transmitted), while some results have a higher bit error rate. In combination with ECC (Error Correction Code) technology, the read results with a lower bit error rate have a higher probability of being corrected by ECC technology. Thus, by trying different parameters, errors encountered in the read operation can be dealt with. The parameters can be combined and provided to the flash memory chip in the read operation. Alternatively, the parameters for the read operation are set in the flash memory chip, and the set parameters are used when the flash memory chip processes the read operation.
[0005] Data on storage media is typically stored and read by page, while data is erased by block. Typically, a block contains multiple pages. A page on a storage medium (called a physical page) has a fixed size, such as 17,664 bytes, though physical pages can also have other sizes. When reading or writing data, the same threshold voltage is typically set for all memory cells in each page.
[0006] Figure 1 This paper presents the structure of a conventional flash memory storage medium. A flash memory block includes multiple word lines and bit lines. A word line couples multiple transistors for storing information, with each transistor providing a memory cell (Cn, Cn-1, ..., C1, C0). Each memory cell can store one or more bits of data. The multiple memory cells in each word line provide one or more physical pages. The bits that make up a physical page are stored in transistors coupled to the same word line.
[0007] A memory target (Target) is one or more logic units (LUNs) within a flash memory chip that share a chip enable (CE) signal. A flash memory chip may include one or more dies (Die). Typically, a logic unit corresponds to a single die. A logic unit may include multiple planes. Multiple planes within a logic unit can be accessed in parallel, and multiple logic units within a flash memory chip can execute commands and report status independently of each other. In the "Open NAND Flash Interface Specification" available at http: / / www.micron.com / ~ / media / Documents / Products / Other%20Documents / ONFI3_0Gold.ashx
[0008] (Revision 3.0)” provides the meanings of target, logical unit (LUN), and plane, which are part of the existing technology.
[0009] A read threshold tracking method and apparatus for a flash memory device is provided in Chinese patent application No. 2017100938716, the entire disclosure of which is incorporated herein by reference.
[0010] Kalman filtering is an algorithm that uses a linear system's state equation and observational data from the system's input and output to optimally estimate the system's state. Kalman filtering technology was first proposed in the 1950s and 1960s and has been widely used. Summary of the Invention
[0011] Traditional threshold voltage acquisition methods are insufficient for new memory cells that store multiple bits of information per cell, as well as for new 3D flash memory structures. The state of a memory cell changes with factors such as the number of erases and writes, the number of reads, time, and temperature. Consequently, using the same threshold voltage can produce different read results under these conditions. Tracking the changes in the threshold voltage of a memory cell is necessary to determine and use the optimal threshold voltage to read data from the cell.
[0012] The number of bits stored in each memory cell has continued to increase, with the emergence of TLC (Triple Level Cell, storing 3 bits of data per cell) and QLC (Quad Level Cell, storing 4 bits of data per cell). The state space representing the amount of charge stored in a memory cell has been further subdivided, requiring more accurate threshold voltages to distinguish between memory cell states.
[0013] According to the first aspect of the present application, a read threshold tracking method based on Kalman filtering is provided, comprising the following steps: according to the best threshold voltage estimation value V of the storage unit P at the current time t-1 t-1 , predict the optimal threshold voltage prediction value V at the next moment t t '.
[0014] According to the first read threshold tracking method of the first aspect of the present application, the initial optimal threshold estimation value V0 is provided by a supplier or is a specified default value.
[0015] According to the first or second read threshold tracking method of the first aspect of the present application, the optimal threshold voltage estimation value V at time t-1 is used. t-1 The optimal threshold voltage prediction value V at the next time t is predicted based on one or more parameters including the number of times the memory cell P is erased and written, the time when the data is recorded on the memory cell P, the number of times the memory cell P is read after the current data is written, and / or the ambient temperature of the memory cell P. t ', expressed using the following formula:
[0016] V t '=V t-1 +f(X);
[0017] Where X represents one or more of the above parameters, and the function f conforms to the normal distribution with mean μ f and variance σ f 2 .
[0018] According to the fourth read threshold tracking method of the first aspect of the present application, the ambient temperature of the storage unit P is obtained using a temperature sensor.
[0019] According to the fifth read threshold tracking method of the first aspect of the present application, the predicted optimal threshold voltage prediction value V at time t is t 'Conforms to normal distribution, recorded as N(μ0,σ t 2 ), whose mean is μ0 and variance is σ t 2 .
[0020] According to the sixth reading threshold tracking method of the first aspect of the present application, V t-1 For multiple, forming the matrix X t-1 ,
[0021] X t '=A*X t-1 +f(X)
[0022] where the matrix X t ' is the predicted value of multiple optimal threshold voltages at time t, A is 1 or the unit matrix, X represents one or more of the number of erase and write times of the memory cell P, the time when data is recorded on the memory cell P, the number of times the memory cell P is read after the current data is written to the memory cell P, and / or the ambient temperature of the memory cell P; the increment of the threshold voltage estimated by the function f conforms to the normal distribution with a mean μ f and variance σ f 2 .
[0023] According to the second aspect of the present application, a read threshold tracking method based on Kalman filtering is provided, comprising the following steps: reading data from a storage cell P using a plurality of different threshold voltages; obtaining an observed optimal threshold voltage Z of the storage cell P at time t according to the number of error bits in the read data; t .
[0024] According to the second read threshold tracking method of the second aspect of the present application, the formed function is solved using multiple points to obtain the bottom of the curve represented by the function, that is, the observed optimal threshold voltage Z of the memory cell P at time t t .
[0025] According to the third read threshold tracking method of the second aspect of the present application, the optimal threshold voltage Z is observed. t Use the following formula to obtain:
[0026] Z t =HV t +e t
[0027] Where H represents the transformation matrix, V t is the estimated value of the optimal threshold voltage of the memory cell P at time t, et To observe the optimal threshold voltage Z t With the best threshold voltage estimate V t The deviation, e t The measurement noise covariance is R t .
[0028] According to the fourth read threshold tracking method of the second aspect of the present application, the threshold voltage with the least number of error bits is selected as the observed optimal threshold voltage Z of the storage cell P at time t t .
[0029] According to a third aspect of the present application, a read threshold tracking method based on Kalman filtering according to the third aspect of the present application is provided, comprising the following steps: obtaining a predicted value V' of the optimal threshold voltage at time t for the memory cell P according to the steps of the first to sixth read threshold tracking methods of the first aspect of the present application; t According to the first to third read threshold tracking method of the second aspect of the present application, the observed optimal threshold voltage Z for the memory cell P is obtained. t ; According to the predicted value V' of the optimal threshold voltage at time t t and observe the optimal threshold voltage Z t Calculate the predicted optimal threshold voltage estimate of the memory cell P accessed at time t.
[0030] According to the first reading threshold tracking method of the third aspect of the present application, the method further includes the step of calculating the K gain of the Kalman filter, and calculating the K gain at time t using the following formula:
[0031]
[0032] Among them, p' t is the predicted value of the optimal threshold voltage at time t V t 'The degree of uncertainty, R t is the optimal threshold voltage Z t The measurement noise covariance of .
[0033] According to the second read threshold tracking method of the third aspect of the present application,
[0034] p t '=p t-1 +Q
[0035] p t-1 is the optimal threshold voltage estimate V at time t-1 t-1 The uncertainty degree of Q is a constant or a specified value. According to the third reading threshold tracking method of the third aspect of the present application,
[0036] p t '=A*p t-1 *AT +Q
[0037] p t ' is the predicted value of the optimal threshold voltage at time t V t 'The degree of uncertainty, A T is the transposed matrix of matrix A, p t-1 is the optimal threshold voltage estimate V at time t-1 t-1 The degree of uncertainty, Q is a constant or specified value.
[0038] The fourth reading threshold tracking method according to the third aspect of the present application further includes the steps of:
[0039] Calculate the K gain of the Kalman filter and use the following formula to calculate the K gain in matrix form at time t:
[0040]
[0041] Where H represents the conversion matrix, which is used to convert the threshold voltage of the memory cell P into the observed optimal threshold voltage Z t , p' t is the predicted value of the optimal threshold voltage V t ', R is the observed optimal threshold voltage Z in matrix form t The measurement noise covariance of .
[0042] The fifth read threshold tracking method according to the third aspect of the present application further includes the steps of:
[0043] Calculate the K gain of the Kalman filter and use the following formula to calculate the K gain in matrix form at time t:
[0044]
[0045] Where H represents the conversion matrix, which is used to convert the threshold voltage of the memory cell P into the observed optimal threshold voltage Represents the predicted value of the optimal threshold voltage V in matrix form t ', R represents the optimal threshold voltage Z in matrix form t The measurement noise covariance of .
[0046] The sixth read threshold tracking method according to the third aspect of the present application further includes calculating the optimal threshold voltage estimation value V of the physical page p at time t according to the K gain at time t. t ,for:
[0047] V t =V t '+K(t)(Z t -V t ')
[0048] Where K(t) is the K gain in matrix form at time t.
[0049] The seventh read threshold tracking method according to the third aspect of the present application further includes calculating the optimal threshold voltage estimation value X of the physical page p at time t according to the K gain at time t. t , matrix X t Represents the estimated values of multiple optimal threshold voltages at time t:
[0050] X t =X t '+K(t)(R t -H*X t ')
[0051] where the matrix X t ' represents the predicted value of multiple optimal threshold voltages, K(t) is the matrix form of K gain at time t, R t is the observed optimal threshold voltage Z in matrix form t is the measurement noise covariance, and H is the transformation matrix.
[0052] The eighth read threshold tracking method according to the third aspect of the present application further includes the steps of:
[0053] Update the error covariance P of the estimated value of the optimal threshold voltage t , use the following formula to update:
[0054] P t =P t '-K(t)*HP t '
[0055] Among them, P t ' is the predicted value of the optimal threshold voltage at time t V t ', K(t) is the K gain, and H represents the transformation matrix.
[0056] The ninth read threshold tracking method according to the third aspect of the present application further includes the steps of:
[0057] Update the error covariance P of the estimated value of the optimal threshold voltage t , use the following formula to update:
[0058]
[0059] in With H as the matrix, I as the identity matrix, and K(t) as the matrix gain of K at time t.
[0060] According to the tenth threshold tracking method of the third aspect of the present application, all the above threshold tracking methods are executed at predetermined intervals or in response to the occurrence of a predetermined event.
[0061] According to a fourth aspect of the present application, a stored computer program is provided for executing the method as described above.
[0062] According to a fifth aspect of the present application, a storage device according to the fifth aspect of the present application is provided, comprising a control component, wherein the control component executes the method as described above.
[0063] According to the first storage device of the fifth aspect of the present application, it includes a plurality of storage units. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The present application, together with the preferred mode of use and further objects and advantages thereof, will be best understood by reference to the following detailed description of illustrative embodiments when read in conjunction with the accompanying drawings, in which:
[0065] Figure 1 The structure of the flash memory storage medium of the prior art is shown;
[0066] Figure 2 is a read voltage distribution curve diagram of the memory cell;
[0067] Figure 3 A graph showing the relationship between threshold voltage and number of error bits is shown;
[0068] Figure 4 It is a system block diagram of the storage device;
[0069] Figure 5 is a flow chart for predicting the optimal threshold voltage at time t according to an embodiment of the present application;
[0070] Figure 6 is a flow chart of observing the optimal threshold voltage according to an embodiment of the present application;
[0071] Figure 7 This is a flowchart of applying Kalman filtering to track threshold voltage according to an embodiment of the present application. DETAILED DESCRIPTION
[0072] Figure 2 The following is a graph showing the distribution of readout voltages for memory cells. After a memory cell is programmed, a charge is stored in the memory cell according to the programmed value. When reading a memory cell, different readout voltages are obtained from memory cells that store different charges. Figure 2 , the bell line L0 is the distribution of memory cells with a read voltage corresponding to the "1" state, and the bell line L1 is the distribution of memory cells with a read voltage corresponding to the "0" state. t2 When the threshold voltage V t2 The memory cell with the "1" state on the right is misread and becomes an error bit. Similarly, when the threshold voltage Vt1 When the threshold voltage V t1 The memory cell with "0" state on the left is misread and becomes an error bit. Threshold voltage V t3 It is another optional threshold voltage for reading data from the memory cell.
[0073] By comparing the number of error bits corresponding to multiple threshold voltages, the threshold voltage with the smallest number of error bits is selected as the optimal threshold voltage. Alternatively, the optimal threshold voltage is determined from the read voltage distribution (for example, V t , so that the bell line L0 is at V t The area of the right part is the same as the bell-shaped line L1 at V t The sum of the areas of the left parts is the smallest).
[0074] Figure 3 The relationship between the threshold voltage (threshold value) and the bit error count (BEC) is shown.
[0075] When reading data from a physical page including a plurality of memory cells using different threshold voltages, a curve 300 shows how the number of error bits in the read data changes as the threshold voltage used changes. Figure 3 , the horizontal axis indicates the threshold voltage used to read the data, and the vertical axis indicates the number of error bits in the read data. It is understandable that reading the data may include reading data from one or more physical pages, reading data from multiple physical pages of multiple storage blocks, LUNs or NVM chips, reading data from part of multiple storage cells of a physical page, or reading data belonging to a specified physical page type (MSB page, CSB page or LSB page) from part of the storage cells of a physical page. Still understandable, although Figure 3 A single threshold voltage is shown in FIG. 1 , however, to read data from a memory cell, multiple threshold voltages may be used to distinguish between multiple states that may be stored in the memory cell.
[0076] Continue to read Figure 3 , the curve 300 includes points 310, 312, and 314. Among the three points 310, 312, and 314, point 314 has the lowest number of error bits, and thus, the threshold voltage corresponding to point 314 has a better threshold value. Figure 3 The number of error bits is a function of the threshold voltage. By searching for the threshold voltage with the lowest or lower number of error bits, the optimal or better threshold voltage value can be obtained. Furthermore, the search for the threshold voltage can be continuously performed during the use of the NVM chip to track changes in the optimal or better threshold voltage caused by the use of the NVM chip.
[0077] according to Figure 3As shown in the figure, the function of the number of error bits changing with the threshold voltage is close to the inverse function of the normal function, which is recorded as AN(μ,σ 2 ), where A is a constant, μ represents the mean of the normal function, and σ 2 is the variance of the normal function. Figure 3 At least two points on the middle curve 300 are used to determine the parameters μ and σ of the normal function.
[0078] Figure 4 is a block diagram of a storage device. According to the embodiment of the present application, Figure 4 implemented in the storage device shown.
[0079] Storage device 402 is coupled to a host to provide storage capabilities for the host. The host and storage device 402 can be coupled in various ways, including but not limited to connecting the host and storage device 402 via, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe), NVMe (NVM Express), Ethernet, Fibre Channel, wireless communication networks, and the like. The host can be an information processing device capable of communicating with a solid-state storage device via the aforementioned methods, such as a personal computer, tablet computer, server, portable computer, network switch, router, cellular phone, personal digital assistant, and the like. The storage device 402 includes an interface 403 , a control unit 404 , one or more NVM chips 405 , and a DRAM (Dynamic Random Access Memory) 410 .
[0080] NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), etc. are common NVMs.
[0081] The interface 403 may be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, or the like.
[0082] The control component 404 is used to control data transmission between the interface 403, the NVM chip 405, and the DRAM 410. It is also used for storage management, mapping host logical addresses to flash physical addresses, erase leveling, bad block management, etc. The control component 404 can be implemented in various ways such as software, hardware, firmware, or a combination thereof. For example, the control component 404 can be in the form of an FPGA (Field-Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or a combination thereof; the control component 404 can also include a processor or controller, in which software is executed to manipulate the hardware of the control component 404 to process IO (Input / Output) commands; the control component 404 can also be coupled to the DRAM 410 and can access data in the DRAM 410; the DRAM can store FTL tables and / or cached IO command data.
[0083] Control component 404 includes a flash memory interface controller (also known as a media interface controller or a flash memory lane controller). The flash memory interface controller is coupled to NVM chip 405 and issues commands to NVM chip 405 in accordance with the interface protocol of NVM chip 405 to operate NVM chip 405, and receives command execution results output from NVM chip 405. The interface protocol of NVM chip 405 includes well-known interface protocols or standards such as "Toggle" and "ONFI".
[0084] The storage device further includes one or more sensors 420. Since the threshold voltage of the NVM chip is temperature-dependent, according to an embodiment of the present application, the sensor 420 is disposed adjacent to the NVM chip 405. The control component 404 obtains the temperature information collected by the sensor 420.
[0085] Due to its physical size, sensor 420 cannot be placed at the same location on the die or memory cell of NVM chip 405. Alternatively or additionally, configuration information is provided to control component 404 so that control component 404 knows the distance or location of sensor 420 relative to a specific die or memory cell of NVM chip 405, thereby determining the temperature at the specific die or memory cell based on the reading of sensor 420.
[0086] Optionally, the control component 404 controls the selection of the threshold voltage based on certain circumstances. For example, the threshold voltage may be adjusted based on the ambient temperature of the memory cell to be accessed (the difference from the normal temperature). For another example, the threshold voltage may be adjusted based on factors such as the number of times the memory cell to be accessed has been written, the time at which data has been recorded on the memory cell, and / or the number of times the memory cell has been read after the current data has been written to it. In some examples, NVM chip suppliers provide recommended threshold voltages for various situations. Through laboratory testing of NVM chips and storage devices, recommended threshold voltages based on a single factor or a combination of multiple factors have also been obtained. Thus, the control component 404 is able to determine the recommended threshold voltage, or a variation of the recommended threshold voltage relative to the commonly used threshold voltage, based on the number of times the memory cell to be accessed has been written, the time at which data has been recorded on the memory cell, the number of times the memory cell has been read after the current data has been written to it, and / or the ambient temperature of the memory cell. In some other examples, the control component considers a single factor or a combination of multiple factors when reading data from the memory cell, and one or more factors when the data is written to the memory cell to determine the threshold voltage. For example, the recommended threshold voltage is determined based on both the temperature when the data is written to the memory cell and the temperature when the data is read from the memory cell.
[0087] This application adopts a Kalman filter method to obtain the optimal threshold voltage and makes multiple embodiments of this application. In addition, the proposed method for determining the optimal threshold voltage based on Kalman filter can be combined with existing methods for determining threshold voltage to achieve improved results.
[0088] The Kalman filter method uses a number of important parameters. According to the embodiment of the present application, the optimal threshold voltage estimate V at time t is t As the system state to be determined by the Kalman filter method, the optimal threshold voltage estimate V at time t is used. t The error covariance is denoted as p t , the K gain at time t is recorded as K t , the observed value of the optimal threshold voltage at time t is recorded as R t .
[0089] (1) Based on the optimal threshold voltage estimate V at time t-1 t-1 , estimate the optimal threshold voltage prediction value V at the next moment (time t) t '.
[0090] For a specified memory cell (e.g., physical page p), its optimal threshold voltage at time t-1 is V t-1(estimated value). The initial optimal threshold voltage estimate V0 is provided by the supplier or is a specified default value. In the previous round of calculation according to the method of the embodiment of the present application, the optimal threshold voltage estimate V at the previous moment is determined. t-1 .
[0091] In one example, it is estimated that the optimal threshold voltage at the next moment (time t) will not change significantly, that is, V t '=V t-1 In another example, the optimal threshold voltage at time t-1 is V t-1 The optimal threshold voltage at time t is estimated based on one or more factors such as the number of erase and write times of the memory cell to be accessed, the time when the data is recorded on the memory cell, the number of times the memory cell is read after the current data is written, and / or the ambient temperature of the memory cell. For example, V t '=V t-1 +f(T t-1 ,PEC t-1 ……), where T t-1 Represents the temperature of the storage unit to be accessed at time t-1, which is obtained by the control component through, for example, a temperature sensor. t-1 Represents the number of erase and write cycles experienced by the memory cell to be accessed. Function f is known and provided by the supplier of the NVM chip or obtained in the laboratory through experiments and analysis of experimental data. Usually, the increment of the threshold voltage estimated by function f also conforms to the normal distribution and has a mean μ f and variance σ f 2 Still as an example, the data collected from the temperature sensor also has errors and conforms to the normal distribution, the parameters of which can be obtained from the supplier or measured in the laboratory using a high-precision thermometer.
[0092] In addition, the covariance of the white noise present in the system is recorded as Q, which is a specified value or constant that can be measured or derived.
[0093] The estimated optimal threshold voltage prediction value V at time t is t 'Also conforms to the normal distribution, recorded as N(μ0,σ t 2 ), whose mean is μ0 and variance is σ t 2 .
[0094] And let p t '=p t-1 +Q, which represents the uncertainty of the estimated optimal threshold voltage at time t (estimated error covariance). t-1is the optimal threshold voltage estimated value V at time t-1 calculated in the previous round according to the calculation process of the embodiment of the present application t-1 The degree of uncertainty (error covariance) of Q, where Q is a constant or specified value.
[0095] In another embodiment, reading data from a memory cell p requires combining multiple threshold voltages. For example, to read TLC flash memory, 7 (2^3-1) threshold voltages are required; to read QLC flash memory, 15 (2^4-1) threshold voltages are required. t-1 Represents multiple optimal threshold voltages at time t-1, using matrix X t ' represents the estimated multiple optimal threshold voltages at time t-1, and its uncertainty is expressed as Indicates. X t '=A*X t-1 +U. A stands for the t-1 Estimated X t 'The prediction equation (X t '=A*X t-1 +U), in the above example, A is 1 or the identity matrix, U = f(T t-1 ,PEC t-1 ……). Thus X t The degree of uncertainty Among them, P t-1 It's X t-1 The error covariance matrix Q represents the predicted error, such as the covariance of white noise in the system.
[0096] Figure 5 A flow chart for predicting the optimal threshold voltage at time t according to an embodiment of the present application is shown.
[0097] Get the estimated value V of the optimal threshold voltage of the specified memory cell (e.g., physical page p) at the current time (t-1) that is already known t-1 The estimated value of the optimal threshold voltage at time t-1 also has an error covariance p t-1 , which represents the estimated value V t-1 As an example, according to the method of the embodiment of the present application, based on the estimated value V of the optimal threshold voltage at time t-2 t-2 , get the estimated value of the optimal threshold voltage V at time t-1 t-1 As yet another example, an initial estimate of the optimal threshold voltage V0 is obtained from the supplier or product manual of the NVM chip.
[0098] Get the current (at time t-1) erase count of physical page p (recorded as PEC t-1 ). The control unit of the storage device records the number of erase and write times of each physical block of the NVM chip.
[0099] The current ambient temperature of the physical page p (denoted as T t-1 ) is obtained. The control component of the storage device obtains the current ambient temperature (T t-1 ) of the physical page p through a temperature sensor arranged near the NVM chip. Optionally or further, the control component filters the temperature data collected from the temperature sensor and obtains the thermal resistance from the temperature sensor to the physical page p according to the relationship between the temperature sensor and the location of the physical page p, and corrects the temperature data collected from the temperature sensor by using the thermal resistance to obtain the current ambient temperature (T t-1 ).
[0100] The control component estimates the predicted value V t-1 ' of the optimal threshold voltage of the physical page p at the next time (t time) according to the estimated value V t-1 of the optimal threshold voltage of the physical page p at the t-1 time, the number of program-erase cycles (PEC t-1 ) and the ambient temperature (T t ). As an example, V t ' = V t-1 + f (T t-1 , PEC t-1 ), wherein the function f is provided by the NVM chip supplier or is statistically obtained in the laboratory by accumulating experimental data and is recorded in the memory of the control component in the form of a lookup table or an analytical expression. Optionally, the function f also depends on the specific storage device. For example, the temperature sensors used on different storage devices are not completely consistent, and the function f is obtained or updated through a calibration process when the storage device is manufactured. Thus, the control component obtains the result of f (T t-1 , PEC t-1 ) by providing the parameters T t-1 and PEC t-1 , and at the same time, the statistical mean (μ f ) and variance (σ f 2 ) of the function f are also obtained, wherein the mean (μ f ) and variance (σ f 2 ) are related to or independent of the number of program-erase cycles (PEC t-1 ) and the ambient temperature (T t-1 ) at the current time.
[0101] Thus, the mean of the predicted value V t' (denoted as μ0) is V t-1 + μ f .
[0102] Optionally, the variance of the temperature sensor (for example, the sensor 420 of the storage device 400) is used as the variance (σ Figure 4 ) of the function f.f 2 ).
[0103] p t '=p t-1 +Q, which represents the predicted value V of the optimal threshold voltage at time t t 'The degree of uncertainty. t-1 is the optimal threshold voltage estimate V at time t-1 t-1 The degree of uncertainty, Q is a constant or specified value.
[0104] (2) At time t, observe the optimal threshold voltage Z t .
[0105] In addition to the predicted value of the optimal threshold voltage V at time t t ', Kalman filtering also needs to obtain the observation value of the optimal threshold voltage at time t based on the measurement value (denoted as Z t ). Observe the optimal threshold voltage Z t With mean μ1 and observation value Z t The deviation from the true optimal threshold voltage is e t , and its measurement noise covariance is recorded as R t .
[0106] According to an embodiment of the present application, the optimal threshold voltage at time t (as the observed optimal threshold voltage Z) is observed by reading data from the physical page p using two or more threshold voltages at time t. t ).
[0107] See also Figure 3 At time t, the threshold voltage used in the read command for physical page p and the error bit count (BEC) of the read data from physical page p have Figure 3 The curve is similar to the inverse function of the normal function (denoted as AN(μ1,σ1 2 )). Thus, through two or more points on the curve, the parameters of the curve (mean μ1, variance ). For example, see also Figure 3 , the threshold voltages represented by the abscissas of points 310, 312, and 314 are used to read data from the physical page p, and the number of error bits (BEC) of the read data is used as the ordinate of each point, thereby solving the parameters of the curve (mean μ1, variance ), that is, the bottom of the curve (the lowest point, that is, the mean μ1) represents the optimal threshold voltage Z for accessing physical page p at time t t .
[0108] In Kalman filtering, the optimal threshold voltage Z is observed t is the actual state of the system (e.g. the best threshold voltage estimate Vt ) observation, the two may need to be obtained through transformation, for example, due to factors such as the accuracy of the register for setting the threshold voltage of the NVM chip or the existence of random noise in the NVM chip, the optimal threshold voltage Z is observed. t The same as the ideal optimal threshold voltage estimate V t There is a deviation (denoted as e t In another example, the observed value is a set of two-tuples (threshold voltage, number of error bits in read data). And the observation may have errors. Therefore, in general, let
[0109] Z t =HV t +e t
[0110] Where H represents the transformation matrix, which is used to transform the actual state V t Convert to observe the optimal threshold voltage Z t , observe the optimal threshold voltage Z t The deviation from the true optimal threshold voltage is e t , e t The measurement noise covariance is R t In one example, the minimum accuracy of the threshold voltage that can be set by the NVM chip is used to determine R t For example, if the range of the settable threshold voltage is 100mV and a 7-bit register is used to set the threshold voltage, then R t =100mV / (2^7) or R t =100mV / (2^8) (half of the minimum quantization value is taken as the quantization accuracy). In another example, Rt is also determined based on the random noise Ω when the NVM chip reads data (Rt=Ω+VF / (2^n)), where VF represents the settable threshold voltage range, and n represents the number of binary bits that quantize the threshold voltage range.
[0111] In yet another example, see also Figure 3 , the observed value of the optimal threshold voltage at time t (denoted as Z t ) is the threshold voltage corresponding to the point with the minimum BEC among points 310, 312 and 314, so that the threshold voltage corresponding to the read result with the minimum BEC in a few (two or three) read operations is used as the observed optimal threshold voltage Z t .exist Figure 3 In the example, the threshold voltage corresponding to point 314 is used as the observed optimal threshold voltage Z t . And also according to Figure 3 Points 310, 312 and 314 are used to obtain the parameters of curve 300 (mean μ1, variance ), taking the mean μ1 as the true value of the optimal threshold voltage at time t, and thus observing the optimal threshold voltage Z t The error e t =Z t -μ1. And the error e is determined by quantization error and / or random noise t The measurement noise covariance R t .
[0112] It is still understandable that in some cases, reading data from the memory cell p requires combining multiple threshold voltages, so the optimal threshold voltage estimation value V t and its observed optimal threshold voltage Z t Includes multiple threshold voltages used in combination.
[0113] Figure 6 A flow chart for observing the optimal threshold voltage according to an embodiment of the present application is shown.
[0114] To observe the optimal threshold voltage of a memory cell at time t, obtain the memory cell to be observed (physical page p). Use the first value of the threshold voltage to read data from the physical page p, and obtain the number of error bits (BEC) of the read data (620). For example, the first value of the threshold voltage is the optimal threshold voltage estimated value V estimated at time t-1. t-1 or V t '. For example, error correction is performed on the read data by the error correction unit to identify the number of error bits (BEC) therein. Data is read from the physical page p using the second value of the threshold voltage, and the number of error bits (BEC) of the read data is obtained (630). Data is read from the physical page p using the third value of the threshold voltage, and the number of error bits (BEC) of the read data is obtained (640). Optionally, the second value and the third value of the threshold voltage are respectively greater than or less than the first value of the threshold voltage.
[0115] By adopting a variety of ( Figure 6 In the example, three kinds of threshold voltages are used to calculate the number of error bits of data read from the physical page p, and a function of the relationship between the threshold voltage of the physical page p at time t and the number of error bits is established, and the threshold voltage Z that minimizes the number of error bits of the read data of the physical page p is obtained through the function. t As the optimal threshold voltage observed, the mean μ1 and variance of the function curve are also obtained
[0116] In an optional example, the possible value range of the threshold voltage of the physical page p is scanned, and the threshold voltage with the least bit error (BEC) is used as the observed optimal threshold voltage Z t .
[0117] Still optionally, the method provided in the Chinese patent application with application number 2017100938716 is used to obtain the observed optimal threshold voltage Z t . And calculate Z based on the data accumulated during the scanning process t The mean μ1 and variance The mean value μ1 is taken as the observed optimal threshold voltage Z of the physical page p t .
[0118] It is understandable that in some cases, reading data from the memory cell p requires combining multiple threshold voltages to observe the optimal threshold voltage Z t Includes multiple threshold voltages used in combination.
[0119] and determining the observed optimal threshold voltage Z using the quantization error of the threshold voltage of accessing the physical page p and / or the random noise of reading data from the physical page p. t The error e from the true value of the optimal threshold voltage t The measurement noise covariance R t .
[0120] (3) Calculate the K gain of the Kalman filter.
[0121] The predicted value V of the optimal threshold voltage of physical page p at time t has been obtained t ' and observed optimal threshold voltage Z t , calculate the K gain at time t using formula (1):
[0122]
[0123] Where p't is the predicted value of the optimal threshold voltage V obtained in (1) t 'The degree of uncertainty, and R t is the observed optimal threshold voltage Z obtained in (2) above t The measurement noise covariance of .
[0124] Optionally, the matrix gain K at time t is calculated using formula (2):
[0125]
[0126] Where H represents the transformation matrix, which is used to transform the actual state V t Convert to observe the optimal threshold voltage Z t , R represents the observed optimal threshold voltage Z in matrix form t The measurement noise covariance of .
[0127] Still optionally, the matrix form of K gain at time t is Represents the predicted value of the optimal threshold voltage V in matrix form t ', R represents the observed optimal threshold voltage Z in matrix form t The measurement noise covariance of .
[0128] (IV) Determine the estimated value of the optimal threshold voltage at time t
[0129] The estimated value of the optimal threshold voltage of physical page p at time t is V t =μ0+k t (Z t -μ0), where k t is the K gain obtained in (3) above, and μ0 represents the predicted value V of the optimal threshold voltage obtained in (1) t ', and Z t is the observed optimal threshold voltage obtained in (2) above.
[0130] Thus, the estimated value of the optimal threshold voltage V of the physical page p at time t is obtained. t , using this estimated value V t Access physical page p.
[0131] Optionally, use the matrix X t Represents multiple optimal threshold voltages at time t, X t =X t '+K(t)(R t -HX t ').
[0132] (V) Update the error covariance p of the estimated value of the optimal threshold voltage t .
[0133] Update the error covariance P of the estimated value of the optimal threshold voltage at time t t =pt'-K t *Hpt', where pt' is the predicted value of the optimal threshold voltage obtained in (1) V t The degree of uncertainty of ' (e.g., the error covariance of the prediction), k t is the K gain obtained in (III) above, and H represents the conversion matrix, which is used to convert the actual state V t Convert to observe the optimal threshold voltage Z t ,for Figure 6 For example, the matrix H is the identity matrix.
[0134] Alternatively, the error covariance of the estimated value of the optimal threshold voltage at time t is expressed in matrix form Where I is the identity matrix.
[0135] Thus, in one iteration according to the embodiment of the present application, the parameters of the Kalman filter are updated through the above (1) to (5), and the estimated value V of the optimal threshold voltage at time t obtained by (4) is t To access the physical page p. Before the next iteration of the embodiment of the present application, when the physical page p needs to be accessed, the estimated value of the optimal threshold voltage V is used. t Therefore, it is not necessary to apply the embodiment of the present application to update the threshold voltage to be used every time the physical page p is accessed.
[0136] Optionally, an iteration according to an embodiment of the present application is performed at a specified time. The specified time includes, for example, the passage of a specified time interval (e.g., 1 day, 1 week, or longer), the average erase and write count of a physical block of the storage device entering a specified range, or the occurrence of an uncorrectable error in read data. It is understood that the basis for initiating the next iteration does not necessarily depend on time.
[0137] Figure 7 A flowchart of applying Kalman filtering to track threshold voltage according to an embodiment of the present application is shown.
[0138] Get the memory cell (physical page p), and calculate the optimal threshold voltage estimate V of the physical page p at the current moment (t-1) obtained by the previous iteration. t-1 , predict the optimal threshold voltage prediction value V of the physical page at the next moment (time t) t ', which has mean μ0 and variance σ0 2 (710) The predicted value V of the optimal threshold voltage at time t t The uncertainty of 'p t '.
[0139] By accessing the physical page p using multiple different threshold voltages, reading data from the physical page p, obtaining the number of error bits of the read data, and obtaining the currently observed optimal threshold voltage Z t (720). It is understandable that the time when a physical page p is accessed using multiple different threshold voltages is necessarily different from the time when the physical page p is accessed using the optimal threshold voltage obtained according to the embodiment of the present application. However, these times can be collectively referred to as time t, and the actual time difference does not affect the application of the embodiment of the present application.
[0140] According to the uncertainty of the predicted optimal threshold voltage at time t pt' and the deviation R of the observed value of the optimal threshold voltage at time t t Calculate the k gain (k) of the Kalman filter at time t t )(730).
[0141] Calculate the optimal threshold voltage estimate V for accessing physical page p at time t t=μ0+k t (Z t -μ0)(740).
[0142] Optionally, the best threshold voltage estimate V is recorded in association with the physical page p. t , so that the optimal threshold voltage estimate V of the physical page p is obtained t Then, use the best threshold voltage estimate V t Access the physical page p one or more times until the best threshold voltage estimate V t Updated by the next iteration according to an embodiment of the present application (750).
[0143] The optimal threshold voltage estimate V for accessing physical page p at time t is also determined. t Deviation P t =pt'-K t *pt'(760).
[0144] To calculate the optimal threshold voltage estimate V at time t+1 t+1 In the next iteration, continue to execute steps 710 to 760. And use the best threshold voltage estimate V calculated in step 740 of the previous iteration t , as the optimal threshold voltage estimate V used in step 710 of the next iteration t-1 and the optimal threshold voltage estimate V calculated in step 760 of the previous iteration. t Deviation P t , combined with the deviation introduced by the prediction, calculate the optimal threshold voltage estimate V used in step 710 of the next iteration t-1 The degree of uncertainty p t-1 .
[0145] The threshold setting method according to an embodiment of the present invention can be applied to solid-state storage devices based on NVM chips, including but not limited to solid-state hard drives, USB flash drives, and SD cards. It can also be applied to portable electronic devices such as mobile phones and tablets, as well as various other electronic devices that need to store information using NVM chips (such as NAND flash memory, phase change memory, FeRAM, MRAM, etc. are common NVMs).
[0146] Although the present invention has been described with reference to examples, this is for purposes of illustration only and not limitation, and changes, additions and / or deletions to the embodiments may be made without departing from the scope of the present invention.
[0147] Those skilled in the art to which these embodiments relate and who have benefited from the teachings presented in the above description and the associated drawings will recognize many modifications and other embodiments of the inventions described herein. Therefore, it should be understood that the invention is not limited to the specific embodiments disclosed, and modifications and other embodiments are intended to be included within the scope of the appended claims. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.
Claims
1. A read threshold tracking method based on Kalman filtering, comprising the following steps: According to the optimal threshold voltage estimation value V of the memory cell P at the current time t-1 t-1 , predict the optimal threshold voltage prediction value V at the next moment t t ';Where V t-1 For multiple, forming the matrix X t-1 , X t '=A*X t-1 +f(X); where the matrix X t ' is the predicted value of multiple optimal threshold voltages at time t, A is 1 or the unit matrix, X represents one or more of the number of erase and write times of the memory cell P, the time when data is recorded on the memory cell P, the number of times the memory cell P is read after the current data is written to the memory cell P, and / or the ambient temperature of the memory cell P; the increment of the threshold voltage estimated by the function f conforms to the normal distribution with a mean μ f and variance σ f 2 ; in, X t The degree of uncertainty Among them A T is the transposed matrix of matrix A, P t-1 It's X t-1 The error covariance matrix of , Q represents the prediction error.
2. The read threshold tracking method according to claim 1, wherein the optimal threshold voltage estimation value V at time t-1 is t-1 The optimal threshold voltage prediction value V at the next time t is predicted based on one or more parameters including the number of times the memory cell P is erased and written, the time when the data is recorded on the memory cell P, the number of times the memory cell P is read after the current data is written, and / or the ambient temperature of the memory cell P. t ', expressed using the following formula: V t '=V t-1 +f(X); Where X represents one or more of the above parameters, and the function f conforms to the normal distribution with mean μ f and variance σ f 2 .
3. A read threshold tracking method based on Kalman filtering, comprising the following steps: Reading data from a memory cell P using a plurality of different threshold voltages; According to the number of error bits of the read data, the observed optimal threshold voltage Z of the memory cell P at time t is obtained. t , select the threshold voltage with the least number of error bits as the observed optimal threshold voltage Z of the storage cell P at time t t ; in, Observe the optimal threshold voltage Z t Use the following formula to obtain: Z t =HV t +e t Where H represents the transformation matrix, V t is the estimated value of the optimal threshold voltage of the memory cell P at time t, e t To observe the optimal threshold voltage Z t With the best threshold voltage estimate V t The deviation, e t The measurement noise covariance is R t ; in The function of the number of error bits as the threshold voltage changes is close to the inverse function of the normal function, which is recorded as AN(μ,σ 2 ), where A is a constant, μ represents the mean of the normal function, σ 2 is the variance of the normal function.
4. The read threshold tracking method according to claim 3, wherein the formed function is solved using multiple points to obtain the bottom of the curve represented by the function, that is, the observed optimal threshold voltage Z of the memory cell P at time t t .
5. A read threshold tracking method based on Kalman filtering, comprising the following steps: The step according to any one of claims 1 to 2 obtains a predicted value V' of the optimal threshold voltage at time t for the memory cell P. t ; The steps according to any one of claims 3-4 obtain the observed optimal threshold voltage Z for the memory cell P t ; Predict the optimal threshold voltage V at time t t The uncertainty of ' is the deviation R from the observed value of the optimal threshold voltage at time t t Calculate the K gain of the Kalman filter at time t; According to the predicted value V' of the optimal threshold voltage at time t t and observe the optimal threshold voltage Z t Calculate the predicted optimal threshold voltage estimate for accessing memory cell P at time t; The optimal threshold voltage estimation value calculated in the steps of the previous iteration is used as the optimal threshold voltage estimation value used in the steps of one of claims 1-2 in the next iteration.
6. The method of claim 5, further comprising the steps of: Calculate the K gain of the Kalman filter and use the following formula to calculate the K gain at time t: in, p t ' is the predicted value of the optimal threshold voltage at time t V t 'The degree of uncertainty, R t is the optimal threshold voltage Z t The measurement noise covariance of .
7. The method of claim 6, wherein: p t '=p t-1 +Q p t-1 is the optimal threshold voltage estimate V at time t-1 t-1 The degree of uncertainty, Q is a constant or specified value.
8. The method according to claim 7, further comprising the step of calculating a K gain of a Kalman filter, wherein the K gain in matrix form at time t is calculated using the following formula: Where H represents the conversion matrix, which is used to convert the threshold voltage of the memory cell P into the observed optimal threshold voltage Z t , p' t is the predicted value of the optimal threshold voltage V t ', R is the observed optimal threshold voltage Z in matrix form t The measurement noise covariance of .
9. The method of claim 8, further comprising the steps of: Calculate the K gain of the Kalman filter and use the following formula to calculate the K gain in matrix form at time t: Where H represents the conversion matrix, which is used to convert the threshold voltage of the memory cell P into the observed optimal threshold voltage Z t , Represents the predicted value of the optimal threshold voltage V in matrix form t ', R represents the observed optimal threshold voltage Z in matrix form t The measurement noise covariance of .
10. The method according to any one of claims 5-6, further comprising calculating the optimal threshold voltage estimation value V of the physical page p at time t according to the K gain at time t. t ,for: In t =V t '+K(t)(Z t -V t ') in, K(t) is the K gain in matrix form at time t.
11. The method according to claim 9, further comprising calculating the optimal threshold voltage estimation value X of the physical page p at time t according to the K gain at time t. t , matrix X t Represents the estimated values of multiple optimal threshold voltages at time t: X t =X t '+K(t)(R t -H*X t ') where the matrix X t ' represents the predicted value of multiple optimal threshold voltages, K(t) is the matrix form of K gain at time t, R t is the observed optimal threshold voltage Z in matrix form t is the measurement noise covariance, and H is the transformation matrix.
12. The method according to any one of claims 5-6, further comprising the steps of: Update the error covariance P of the estimated value of the optimal threshold voltage t , use the following formula to update: P t =P t '-K(t)*HP t ' Among them, P t ' is the predicted value of the optimal threshold voltage at time t V t ', K(t) is the K gain in matrix form at time t, and H represents the transformation matrix.
13. The method of claim 11, further comprising the steps of: Update the error covariance P of the estimated value of the optimal threshold voltage t , use the following formula to update: in With H as the matrix, I as the identity matrix, and K(t) as the matrix gain of K at time t.
14. A storage device comprising a control component, wherein the control component executes the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Flash memory
US9070454B1
Storage device and method for managing storage device
CN107818810A
Read threshold setting method and read threshold setting device
CN108257642A