Resistive Switching by Voltage-Driven Ion Migration in Bipolar RRAM—Part II: Modeling