Studying behavior of memristor