Embedded Derivative Control for DC motor speed

Thread Starter

Carloco0306

Joined Nov 13, 2018
46
Hi all,

I am fairly new to embedded control systems, for which I am using a PSoC 5LP to implement closed-loop speed control. I am currently working out the code for the PID controller and this is the following code I have (in C):

P = Kp*error;
I +=ki*error;
D=Kd(error-last);
PID=P+I+D;

Now, I somewhat understand Z transforms from my previous classes, but I just wanted to know if whether the code above translates into the proper z-transform for the derivative and integral?
1580221479238.png
 
Top