Dynamic control of the entanglement in the presence of the time-varying field