PID controller in space state form
PID controller in space state form
(OP)
Hello,
I have a process which has Hsys= k/s(1+Ts)
I designed a Pid controller for this process. I have to used space state representation of my system for simulation.
xdot=(I+ Te*A)*xk+ Te*B*uk
yk=C*xk // yk=Ysys
I want to proceed in the same way for pid controller to be able to see, at each time, the output of my pid; ypid= u_sys=uk
I don't know where I have a mistake, cause in the simulation I get wrong things...
x1= integral(e)
x2=e = x1dot
x3= edot= x2dot
e= r-Ysys
e= r- k*u/s(1+Ts)
It will give me: edot*(1+T*s)=-k*u
edot + T*edot.dot = -k*u
edot.dot=-k*u/T - edot/T
edot.dot=-k*u/T - x3/T
I will then have: matrix A for pid system:
Apid=([0 1 0],[0 0 1 ],[0 0 -1/T])
Bpid= ([0 0 -k/T].transpose()
Cpid=([Ki, Kp, Kd)])
Anyone know what I did wrong ? or if there a simple way to do ?
I have a process which has Hsys= k/s(1+Ts)
I designed a Pid controller for this process. I have to used space state representation of my system for simulation.
xdot=(I+ Te*A)*xk+ Te*B*uk
yk=C*xk // yk=Ysys
I want to proceed in the same way for pid controller to be able to see, at each time, the output of my pid; ypid= u_sys=uk
I don't know where I have a mistake, cause in the simulation I get wrong things...
x1= integral(e)
x2=e = x1dot
x3= edot= x2dot
e= r-Ysys
e= r- k*u/s(1+Ts)
It will give me: edot*(1+T*s)=-k*u
edot + T*edot.dot = -k*u
edot.dot=-k*u/T - edot/T
edot.dot=-k*u/T - x3/T
I will then have: matrix A for pid system:
Apid=([0 1 0],[0 0 1 ],[0 0 -1/T])
Bpid= ([0 0 -k/T].transpose()
Cpid=([Ki, Kp, Kd)])
Anyone know what I did wrong ? or if there a simple way to do ?
RE: PID controller in space state form
http://deltamotion.com/peter/Mathcad/Mathcad%20-%2...
I will let you figure out what you did wrong because I don't see all your work.
Peter Nachtwey
Delta Computer Systems
http://www.deltamotion.com
http://forum.deltamotion.com/
RE: PID controller in space state form
Thank you
RE: PID controller in space state form
One thing you may not understand is the you provided the continuous time matrices but the matrices must be converted to discrete time matrices for calculations. Matlab has and expm() or c2d() function that will do this for you so page 2 can be ignored.
Peter Nachtwey
Delta Computer Systems
http://www.deltamotion.com
http://forum.deltamotion.com/
RE: PID controller in space state form
______________________________________________________________________________
This is normally the space where people post something insightful.