PID Controller problem, Please help!

Thats Great! and as usual thanks for your help!

So the right value for Kp and Kd is indeed 0.198 and 0.077. Atleast I feel happy that my values weren't wrong. So it's the PID block in the Matlab then ???

Why can't such a Technical software gaint like Matlab, do such a simple simulation?

So is there any way I can use that Kp and Kd value for my plant's SUB SYSTEM to simulate the step response and get the desired response?
 
Stay tuned

izzy prad said:
So the right value for Kp and Kd is indeed 0.198 and 0.077. Atleast I feel happy that my values weren't wrong. So it's the PID block in the Matlab then ???
I said you go the right answer before. I just don't like forcing the response to a first order response when the plant is a second order plant.

izzy prad said:
So is there any way I can use that Kp and Kd value for my plant's SUB SYSTEM to simulate the step response and get the desired response?
This is one for Pandiani. I don't know much about Matlab.
 
Because of the time difference I'm not up to date, but...
Well you tried changing solvers and nothing happened, so counclusion must be that this is not the iteration problem.

Problem is very subtle and it is because of derivative block from "continuous" Simulink library. Standard PID implementation use this derivative block.

Please have a look at the attached picture. Can you see the difference on the mux output? Does that tell you something?

Observe outputs of derivators. Since there is a step change of input, there is also a step change of derivator input at time instant t = 0. Now, real time derivator with divisor 100 (time constant 0.01). Key thing that derivative block doesn't behave good even if you enter linearization time constant. Try for example to record step response of derivative block with time constant (parameter) of 0.1 and 0.01. Compare with step response of real world derivator s/(0.01s+1). So since, real world derivator implemented as s/(0.01s+1) goes from 7.7 (not from zero as derivative block) of course overall response will be faster. That is why this whole thing happening.
Now you can implement your own PID block by using subsytem mask and using real world derivator.

I must admit I didn't quite uderstand what do you mean by big plant you need to place in subsystem. In order to be sure, please can you attach your model as zip file on this thread. I'm willing to examine it.

Best regards,
Asim V.

PID_izzy_derivator.jpg

Iz1.jpg

Iz2.jpg
 
Once again I want to thank you guys for spending time on this problem. I greatly appreciate your help!

I have attached my Matlab simulink file. It has the plant subsystem and just the single plant transfer function that was obtained by reducing that big plant with multiple block.

I am guess you already know this but incase if you don't - If you double click on that Sub System block it will show the actual plants block diagram with multiple transfer function.

Sorry about not explaing the about the "Big plant". Let me try again.
* If you double click on that subsystem block, there another window will appear where you will be able to see the actual plant. By saying actual plant, its the real plant with multiple blocks.

* since we didnt need to work with the whole plant, we reduced it to the sub system block so that it will only show input, feedback loop and output from the plant.

*Now by using an actual plant (with multiple blocks), we reduced the whole system to 1 single open loop transfer function using block reduction method, which is the one with = 173/(s^2+2.57s) in the transfer block. This is done to make it easier, but basically all system should have Almost same response.


Below I have posted pictures which I had posted couple days ago just to show the actual plant and the subsystem.
Here you can see the Actual plant(with multiple blocks) and Subsystem:
http://img266.imageshack.us/my.php?image=57978335pl0.jpg


And here you can see the same system which was obtained by simplifying block diagram to one single transfer function
http://img388.imageshack.us/my.php?...13240675eo5.jpg


Let me know if I am not explaining well.
 
I'm not convinced that the simplified block is equivalent to the 'big plant'. When I simulate them both they respond differently. The big plant indicates a second or higher order system while the simplified block is a first order system. You calculated your gains based on the simplified system so it doesn't seem strange to me that they won't work for the 'big plant'.

Keith

EDIT:
After looking at this closer it seems the biggest difference is the saturation limits in the 'big plant'. This is what seems to be preventing the big plant from responding like the simplified block. Once the limits are removed they seem to act similarly given a step input.
 
Last edited:
I am not convinced

I have separated the simple plant from the PD controller. I don't get the same response. I can't see why it would be so much different. I am still looking for errors but I don't see any Look at the response of the separate PD and plant. You can see that there is the characteristic second order response because there is an inflection point close to the beginning of the response. The second pole should be canceled. I plotted the poles. You can see the PD gains should cancel the pole but if both the pole and the zero are implement separately it doesn't look like it does. This makes sense since I still think it can take an infinite amount of energy to cancel a pole.
 
kamenges said:
I'm not convinced that the simplified block is equivalent to the 'big plant'. When I simulate them both they respond differently. The big plant indicates a second or higher order system while the simplified block is a first order system. You calculated your gains based on the simplified system so it doesn't seem strange to me that they won't work for the 'big plant'.

Keith



Sorry I forgot to mention that the first order transfer function
that we are using i.e. 173/(s^2+2.57s) was obtained by discarding the non dominant pole.

The actual simplified transfer function obtained by block reduction of the 'big plant' was

137500/(s^2 + 800s + 2048.95)

Which will give us:

137500/((s+797.4) (s+2.57))

So by ignoring the non dominant pole at -797.4 we got,
173/(s^2+2.57s)

We were told to ignore the non dominant pole. Shouldn't they give ALMOST the same response as the actual transfer function of the plant.


I am still trying to find out other things, in the mean time keep the suggestion comming.

Thanks in advance.
 
izzy-

I suspect you are right about being able to ignore the non-dominant pole. When I ran my simulation (using SimApp, not Matlab) I found the 'big plant' gave me near identical closed loop response using the same controller structure IF I eliminate the two saturation blocks in the big plant. While the simplified block is linear it will also allow some unrealistic outputs.

I'm kind of weak on block reduction so this may be reasonable. But I don't quite understand how you go from a Type 0 system to a Type 1 system just by eliminating the non-dominant pole.

Keith
 
Izzy,

you also asked why you get different responses of "big plant" and reduced model. This is just because of sturation blocks you used.
When you remove saturation blocks in your subsystem (when big plant is hidden) you'll get same responses. Just look at the first attached picture. Don't forget, you have step change in input 0 to 12, an yet you have also saturation block of +- 8.... I simply removce all saturation block because only that way we have fair comparision with reduced model.

Now, look at the second picture. You notice that I used "ideal" PID block from the library and PID with real world derivator in reduced model simulation. You can notice the difference, abd cause is behavior of derivative block which I explained in previous post.
Can you understand this now?

Hope this helps

Izzy_ab.jpg

Izzy_bc.jpg
 
Mine looks like the yellow line. It it more realistic. One of the complaints I have with control instructors is that they like to implement the CLTF as one function instead of separating the control from the plant. The control output should have limits or saturation blocks. That is reality.
 
Peter Nachtwey said:
The control output should have limits or saturation blocks. That is reality.

Of course, but if you want to compare original and reduced model, you need to compare under same conditions. If you're original plant model has sturation blocks you cannot igonre them when using block reduction.
Second picture gives difference between using approx. derivative PID and "ideal" PID that uses derivative block from the libraray. They have difference which I explained earlier. One can considere this as Matlab bug and won't be mistaken in my opinion.
 
Darnet! so it was that SATURATION block!

holy cow, I spent so much time just trying to figure out what did I do wrong! Finally removing that saturation block solved my problem.

THANKS A LOT GUYS! I deeply appreciate all you help!

You guys are the best!
 

Similar Topics

How can I get the curret "t" in SCL dt=tnow-tprevious I dont know how to get "tnow". I am not sure should it be in s(seconds) or miliseconds. I...
Replies
4
Views
2,103
hi all friends I have problem with "S7-300 cpu315-2DP PID controller".I want make PID control and HAET system.But I am not working. Please...
Replies
1
Views
2,816
I have an old Chinese Temperature PID controller XMT 8038c2kp that am able to send and receive requests via Modbus poll test center in this format...
Replies
0
Views
446
I have a question regarding the features of the so called incremental (velocity) form of the PID controller. As far as I understand this form in...
Replies
14
Views
2,537
Hi - I have an application where there is an option to use a PID loop embedded in the Transmitter to directly control (via 4-20mA output from the...
Replies
4
Views
1,072
Back
Top Bottom