Hello
You can use this macro with transient analysis to achieve transient anaylsis
sum=0
errp=0
*do,t,2*dt,ts,dt
*get,e1,node,2,u,x
err=0-e1
sum=sum+err*dt
dif=(err-errp)/dt
f1=kp*err+ki*sum+kd*dif
f,1,fx,f1
errp=err
time,t
solve
*enddo
Also check the paper attached
(Analysis of active...