Advanced modeling and characterization techniques for innovative memory devices: The RRAM case