Measuring and control the hysteresis loop by using analog and digital integrators