Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Yp = Kp*error;

Yi = Ki*error;

tnew = time - told; % to find sampling time for each intergral


x = tnew*Yi; % value X = sampling time*Ki*error
Yiout=z+x; %New value = old(Z) + current(X)
told = time;
z=Yiout; % current value store in Z(varible)
end

PIDout = Yp+Yiout;

You might also like