Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PID controller in space state form

Status
Not open for further replies.

lyraKenza

Electrical
Feb 15, 2017
3
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 ?
 
Replies continue below

Recommended for you

Thank you for your answer, I tried to understand what was done in the file your gave me the link, but I couldn't understand the formula is used to ged PID output.
Thank you
 
The PID itself is simple. Ackermann's method of computing gains is documented many places on the internet. Ackermann's method place poles in the z domain.
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
 
School problems are not permitted in this forum...

______________________________________________________________________________
This is normally the space where people post something insightful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor