maha.eg
Newbie level 6
please, I try to implement a PI digital controller in VHDL but my circuit does not work where PI code isn't correct. can anyone help me with a PI code by VHDL? Note, the equation that i use it in vhdl is : u(k)=u(k-1)+e(k)*(kp + ki*Ts/2) + e(k-1)* (ki*Ts/2 - kp) where: u : output signal o controller e : error signal and it is equal to (Iref-Igrid). kp, ki : constant of the controller. Ts : sampling time. please again, i need to your helps. thanks