How to implement PID controller in Closed-loop system Identification?

I want to identify the performance of a closed-loop feedback control system in MatLab. So, in the end I want to have poles, zeros, bode etc. of the closed loop system:
yset ---(err)---[Gc]---(u)---[Gp]---y
|___________yfeedb____________|
What I have:
PID settings
Known structure Gp (1st/2nd order)
Closed-loop data (yset, yfeedb, y) (y == yfeedb)
What I did:
Set up Gp with unknown parameters Kp,tau,td
Write Gp to state-space form
What I want:
Use lsim to simulate y with certain parameters for Gp.
Obtain the right parameters for Gp by minimization ysim-y.
Finally: have the TF of the whole CL system.
Problem:
How to implement the PID controller?
I used the velocity form of PI in order to calculate u. With u and Gp in steady-state form, I am able to calculate y. However, how can I implement a PID controller in it?
Is there a velocity form for PID?
Or can I make a overall TF (OTF) with feedback(Gp*Gc,1) and use OTF and error to calculate y??

Answers (0)

Asked:

on 4 Aug 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!