Why would you model a system as 5th order when a 2nd order approximation is apparently close enough?

Andrew, I calculated PID gains for the second order model that you calculated. You can see that my PID gains work very well for your
second order model but fail miserably when applied to the actual 5 pole model. ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20t0p5%20PID%20ITAE%20Andrew.pdf
I have also calculated the PID gains for JCH's 5th order model. You can see they work. ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20t0p5%20PID%20ITAE.pdf
My conclusion is that it is best to have the best model possible.
I used the minimum ITAE ( integrated time absolute error ) method to calculate the PID gains. I am not a big fan of this method but it seemed a fair way to do the comparison.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Peter, I agree that the best model possible is great to have, but if I were given that set of data from a physical system, there is nothing there that would lead me to believe that I was dealing with a 5th order system. Do you think you would have known that you had a 5th order system if you hadn't been told?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I wasn't told until afterwards. Look at when I told JCH about the answer and that the 3rd order model was not the best. First I plotted the data. I could tell by the inflection of the response that there were many long time constants. The fifth order model had the lowest error. I could tell it was a type 0 system and that the offset was 0 or close to it. I tried a 6th order model too but the error increased. I was actually surprised at that. Usually as you add more parameters, more poles etc, you get a better fit but that is if the poles can be different. If you look at the pdf file with the solution, you can see I only had to change n and copy and past the response as a function of time into the function. This took less than a minute. It took only a few minutes to first try the third order model and then try the 4th 5th and 6th order model. Normally I must change the parameter lists too but JCH made it so there was only one parameter to optimize so this took little time.
First I look at graph of the data. I can tell a lot about the plant by looking. Then I try different models and look a the error to see how good the fit is.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 20 Nov 2007 07:56:00 -0800, pnachtwey wrote:

Ordinarily I'd abjure you to look at the system you're dealing with and reason out what's the likeliest 'best' order -- but you've given a good case for doing it blind, here.
--
Tim Wescott
Control systems and communications consulting
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I did look at JCH's data first.. I also had the benefit of knowing poles were repeated and therefore real. Although I can find the solutions relatively quickly with Mathcad it is not automatic. There was some cuttting and pasting involved so I wanted to try the most promising models first. The C program starts with the lower order models and proceeds to the higher order models. There is no attempt to be tricky. Brute force rules. I don't make assumptions where the poles are. I can use the estimated gain from the lower order model as the first guess for the higher order models. Notice also that as one tries more poles the poles become faster. The C program can do this in a few seconds or less.
Back to Andrew's question. What do you think happens if a second order observer is added to Andrew's PID controller? The second order observer would use Andrew's second order model so the PID gains optimizes for Andrew's model should work.. The second order observer would still use feedback from JCH's fifth order plant to correct the second order observer. If the observer gains are low enough the observer will not oscillate near as much as the 5 pole actual plant. This would make Andrew's second order model useful. I bet it would work very well if ramps are used to change the set point instead of steps.
Another thought. JCH's plant has 5 poles. A PID will add one more pole to a closed loop transfer function. This means that 6 gains must be used to place all the poles. What are the chances one can get a PID+2D+3D+4D controller to control JCH's 5 pole system? Just to make it challenging the resolution is 0.0001 and the sample time is 0.01
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

But could be approximated better. See the difference to 5th order http://home.arcor.de/janch/janch/_news/20071121-diff3rd5th5order /
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I have a comment about how you are determining the effectiveness of your PID gains. All you have is a set of data. You do not have the plant. If you assume the plant is a 5th order system, the PID gains you picked for a 5th order system will work best on a 5th order plant. And these gains will not necessarily work on a 2nd order system. The reverse is also true.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes, not only that, optimal 5th order PID gains will not generally work on a real 5th order system. It is hard enough to compute the derivative but the second, third and fourth derivative is even more challenging. The control output tends to be dominated by the higher order terms due to noise or quantizing. One must use an observer or some other kind of state estimator.
In general it takes one gain to place one pole so ideally the controller should have the same number of poles as the plant does. In reality I know a motor or hydraulic system has more poles than what can be effectively handled so I too use a second order model to approximate a 5 to 7 poles system. I can get by with estimating only two poles because they are two dominate poles and the rest can be ignored if not excited.
I can can control JCH's model using your model and the same PID gains optimized for your second order plant. It isn't very pretty when responding to a step but it is smooth and tracks well when responding to a ramp. When responding to a the un modeled poles get excited.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.