function I = Iin(t)
global A T phi I_0
I = A*sin(2*pi*t./T+phi)+I_0;