An Empirical Model for RRAM Resistance in Low- and High-Resistance State