Prev: Artesyn BAJA PPC 750
Next: FPGA Soft Core CPUs
From: RRogers on 11 Nov 2009 13:18 On Nov 10, 11:54 am, Tim Wescott <t...(a)seemywebsite.com> wrote: > On Tue, 10 Nov 2009 11:54:36 -0500, Datesfat Chicks wrote: > > "Frank W." <frankw_use...(a)mailinator.com> wrote in message > >news:7lggquF3dt584U1(a)mid.dfncis.de... > > >> Since all PID temperature controllers have Autotune, there must be a > >> solution for this problem. Any ideas? > > > As you probably know from control theory, the basic theory of a PID > > controller is that you have a system described by a set of linear > > differential equations that is inherently unstable or has some > > performance problems. As a result you strap a PID controller onto it > > (with said controller also described by its own linear differential > > equations), and the resulting system (now described by linear > > differential equations which are a mathematical mix of the underlying > > system and the PID controller) has better characteristics. > > > Did you notice that there is a word that appears many times in my > > description above? > > > Want to guess what the word is? > > > That word is "linear". > > > A system with a time delay is not described by linear differential > > equations. Strapping a PID controller onto it is bad math. > > > One of the more classic examples is a shower or an industrial process > > that mixes fluids of varying temperature and the sensor is located > > substantially downstream from the mixing value. This is a pure time > > delay. My shower at home is like that. I turn the water a little > > hotter. Nothing happens. I turn it a little more hotter. Nothing > > happens. Then I turn it a little more hotter. Then the wave of hot > > liquid hits me and I scream in agony. > > > Over time, I've adapted to my shower. I don't burn myself anymore. > > > I think the control algorithms you want to use for a system like yours > > fall outside the range of PID. I'm sure there is a body of theory that > > covers it, but I don't know what that is. > > > I would heat the system full bore for a fixed period of time, then stop > > and wait to see how the temperature catches up. And work from there. > > > The best control strategy for that system isn't going to be PID. That > > is a non-linear system. > > I've been resisting forking this over into the control newsgroup: now > it's compelling. > > Systems with delay can be perfectly linear, as well as time invariant -- > they just can't be described by ordinary differential equations with a > finite number of states. > > To be linear, a system only needs to satisfy the superposition property. > A delay element satisfies superposition just fine. > > And while a PID controller may not be the theoretically best controller > for a system with delay, in many cases it's not a bad choice at all. PID > controllers can and will give perfectly satisfactory service with plants > that have significant delay. The thousands, if not millions, of PID > controllers in mills and factories around the world that are controlling > plants whose responses are dominated by delay certainly belie any > declaration that the PID controller isn't a good choice to control a > plant with delay. > > None of the above is intended to minimize the difficulty in analyzing and > designing a truly optimal controller for a plant with pure delay -- > that's an exercise that can make your brain hurt, and fast. And nothing > of the above is intended to chase you away from taking plant delays more > directly into account if a discrete-state controller such as a PID won't > let you eke the performance that you need out of your plant. > > But in the absence of significant nonlinearities or time varying behavior > you can use all the analysis tools that are suitable for linear time > invariant systems on a system with delays just fine. You can do good > design work, without ever having to explicitly write out the differential > equations, much less solving them. > > So if you don't want to get lost in Mathemagic Land searching for > performance that isn't necessary for your product's success, a good ol' > PID controller may be exactly the optimal controller -- in terms of > adequate performance and reasonable engineering time -- even if it > doesn't satisfy any egghead academic measure of "optimal" for the > particular plant you're trying to control. > > --www.wescottdesign.com I have recently done a thermal MIMO PID controller that ended up preforming adequately despite using very simple controls. Some comments: Even the simplest differential description ends up with an infinite number of state/poles. Most real thermal systems have little tabs and things that foul up theoretical analysis. Therefore: you can start with simple mathematical models to estimate requirements but you always end up with approximations. Pole zero analysis in this case is almost worthless except to roughly get started. Bode and/or Nichol's chart analysis (I used both) works very well; but .. You have to get and use the experimental data. You can use that directly or find a sufficiently good model for the system. You should establish a "process" for the tuning and experiments; the system you take the data on will undoubtedly not be the one that ends up being manufactured. Gotcha's: Scilab's system identification processes are unstable dealing with this type of system. They can be used to attempt modelling but tread carefully and double check. When taking the data, the room/environmental temperature will do everything it can to confound the experiment. Don't worry about the lower frequencies, go to where the phase starts to shift significantly. For the Bode/Nichols derived compensation just redo the experiment (which you probably will) to clarify the standard compensation region round the Bode criterion; 180 degrees +- one or two decades. Try to give at least hints to how the tuning was done for the "outsourced" maintenance people who have to maintain the tuning after the mechanical assembly is altered; unless you want to come back and start over yourself in a year. Really, really examine the code to make sure you don't "windup". I was forced to rely on programmers in another group and I had study the experimental results for a while to realize that the anti-windup code just clipped the output not the integrator. Ray
From: Frank W. on 11 Nov 2009 19:16 "RockyG" <RobertGush(a)gmail.com> wrote: > Just for interest, is the boiler pressurised? I saw that the graph show > temepratures higher than 100 deg C The boiler of the Rancilio machine, which uses an internal, immersed heating element, is pressurized. But not all are. For example the boiler of a Gaggia Coffee, which uses external heating elements, possesses a steam exhaust tube for pressure relief which is closed (well, almost) by a ball floating before a hole during shots only.
From: pnachtwey on 12 Nov 2009 21:43 On Nov 11, 10:18 am, RRogers <rerog...(a)plaidheron.com> wrote: > On Nov 10, 11:54 am, Tim Wescott <t...(a)seemywebsite.com> wrote: > > > > > > > On Tue, 10 Nov 2009 11:54:36 -0500, Datesfat Chicks wrote: > > > "Frank W." <frankw_use...(a)mailinator.com> wrote in message > > >news:7lggquF3dt584U1(a)mid.dfncis.de... > > > >> Since all PID temperature controllers have Autotune, there must be a > > >> solution for this problem. Any ideas? > > > > As you probably know from control theory, the basic theory of a PID > > > controller is that you have a system described by a set of linear > > > differential equations that is inherently unstable or has some > > > performance problems. As a result you strap a PID controller onto it > > > (with said controller also described by its own linear differential > > > equations), and the resulting system (now described by linear > > > differential equations which are a mathematical mix of the underlying > > > system and the PID controller) has better characteristics. > > > > Did you notice that there is a word that appears many times in my > > > description above? > > > > Want to guess what the word is? > > > > That word is "linear". > > > > A system with a time delay is not described by linear differential > > > equations. Strapping a PID controller onto it is bad math. > > > > One of the more classic examples is a shower or an industrial process > > > that mixes fluids of varying temperature and the sensor is located > > > substantially downstream from the mixing value. This is a pure time > > > delay. My shower at home is like that. I turn the water a little > > > hotter. Nothing happens. I turn it a little more hotter. Nothing > > > happens. Then I turn it a little more hotter. Then the wave of hot > > > liquid hits me and I scream in agony. > > > > Over time, I've adapted to my shower. I don't burn myself anymore. > > > > I think the control algorithms you want to use for a system like yours > > > fall outside the range of PID. I'm sure there is a body of theory that > > > covers it, but I don't know what that is. > > > > I would heat the system full bore for a fixed period of time, then stop > > > and wait to see how the temperature catches up. And work from there. > > > > The best control strategy for that system isn't going to be PID. That > > > is a non-linear system. > > > I've been resisting forking this over into the control newsgroup: now > > it's compelling. > > > Systems with delay can be perfectly linear, as well as time invariant -- > > they just can't be described by ordinary differential equations with a > > finite number of states. > > > To be linear, a system only needs to satisfy the superposition property.. > > A delay element satisfies superposition just fine. > > > And while a PID controller may not be the theoretically best controller > > for a system with delay, in many cases it's not a bad choice at all. PID > > controllers can and will give perfectly satisfactory service with plants > > that have significant delay. The thousands, if not millions, of PID > > controllers in mills and factories around the world that are controlling > > plants whose responses are dominated by delay certainly belie any > > declaration that the PID controller isn't a good choice to control a > > plant with delay. > > > None of the above is intended to minimize the difficulty in analyzing and > > designing a truly optimal controller for a plant with pure delay -- > > that's an exercise that can make your brain hurt, and fast. And nothing > > of the above is intended to chase you away from taking plant delays more > > directly into account if a discrete-state controller such as a PID won't > > let you eke the performance that you need out of your plant. > > > But in the absence of significant nonlinearities or time varying behavior > > you can use all the analysis tools that are suitable for linear time > > invariant systems on a system with delays just fine. You can do good > > design work, without ever having to explicitly write out the differential > > equations, much less solving them. > > > So if you don't want to get lost in Mathemagic Land searching for > > performance that isn't necessary for your product's success, a good ol' > > PID controller may be exactly the optimal controller -- in terms of > > adequate performance and reasonable engineering time -- even if it > > doesn't satisfy any egghead academic measure of "optimal" for the > > particular plant you're trying to control. > > > --www.wescottdesign.com > > I have recently done a thermal MIMO PID controller that ended up > preforming adequately despite using very simple controls. > Some comments: > Even the simplest differential description ends up with an infinite > number of state/poles. > Most real thermal systems have little tabs and things that foul up > theoretical analysis. > Therefore: you can start with simple mathematical models to estimate > requirements but you always end up with approximations. > Pole zero analysis in this case is almost worthless except to roughly > get started. > Bode and/or Nichol's chart analysis (I used both) works very well; > but .. > You have to get and use the experimental data. You can use that > directly or find a sufficiently good model for the system. > You should establish a "process" for the tuning and experiments; the > system you take the data on will undoubtedly not be the one that ends > up being manufactured. > Gotcha's: Scilab's system identification processes are unstable > dealing with this type of system. They can be used to attempt > modelling but tread carefully and double check. > When taking the data, the room/environmental temperature will do > everything it can to confound the experiment. > Don't worry about the lower frequencies, go to where the phase starts > to shift significantly. > For the Bode/Nichols derived compensation just redo the experiment > (which you probably will) to clarify the standard compensation region > round the Bode criterion; 180 degrees +- one or two decades. > Try to give at least hints to how the tuning was done for the > "outsourced" maintenance people who have to maintain the tuning after > the mechanical assembly is altered; unless you want to come back and > start over yourself in a year. > > Really, really examine the code to make sure you don't "windup". I > was forced to rely on programmers in another group and I had study the > experimental results for a while to realize that the anti-windup code > just clipped the output not the integrator. > > Ray I agree with the last paragraph. However, I have had a lot of success with identifying systems poles and zero. I can then place both where I want with the controller gains. I didn't know Scilab has a system identification function, but I have used the lsqrsolve and optim successfully. Peter Nachtwey
From: RRogers on 13 Nov 2009 09:44 On Nov 12, 8:43 pm, pnachtwey <pnacht...(a)gmail.com> wrote: > On Nov 11, 10:18 am, RRogers <rerog...(a)plaidheron.com> wrote: > > > On Nov 10, 11:54 am, Tim Wescott <t...(a)seemywebsite.com> wrote: > > > > On Tue, 10 Nov 2009 11:54:36 -0500, Datesfat Chicks wrote: > > > > "Frank W." <frankw_use...(a)mailinator.com> wrote in message > > > >news:7lggquF3dt584U1(a)mid.dfncis.de... > > > > >> Since all PID temperature controllers have Autotune, there must be a > > > >> solution for this problem. Any ideas? > > > > > As you probably know from control theory, the basic theory of a PID > > > > controller is that you have a system described by a set of linear > > > > differential equations that is inherently unstable or has some > > > > performance problems. As a result you strap a PID controller onto it > > > > (with said controller also described by its own linear differential > > > > equations), and the resulting system (now described by linear > > > > differential equations which are a mathematical mix of the underlying > > > > system and the PID controller) has better characteristics. > > > > > Did you notice that there is a word that appears many times in my > > > > description above? > > > > > Want to guess what the word is? > > > > > That word is "linear". > > > > > A system with a time delay is not described by linear differential > > > > equations. Strapping a PID controller onto it is bad math. > > > > > One of the more classic examples is a shower or an industrial process > > > > that mixes fluids of varying temperature and the sensor is located > > > > substantially downstream from the mixing value. This is a pure time > > > > delay. My shower at home is like that. I turn the water a little > > > > hotter. Nothing happens. I turn it a little more hotter. Nothing > > > > happens. Then I turn it a little more hotter. Then the wave of hot > > > > liquid hits me and I scream in agony. > > > > > Over time, I've adapted to my shower. I don't burn myself anymore. > > > > > I think the control algorithms you want to use for a system like yours > > > > fall outside the range of PID. I'm sure there is a body of theory that > > > > covers it, but I don't know what that is. > > > > > I would heat the system full bore for a fixed period of time, then stop > > > > and wait to see how the temperature catches up. And work from there. > > > > > The best control strategy for that system isn't going to be PID. That > > > > is a non-linear system. > > > > I've been resisting forking this over into the control newsgroup: now > > > it's compelling. > > > > Systems with delay can be perfectly linear, as well as time invariant -- > > > they just can't be described by ordinary differential equations with a > > > finite number of states. > > > > To be linear, a system only needs to satisfy the superposition property. > > > A delay element satisfies superposition just fine. > > > > And while a PID controller may not be the theoretically best controller > > > for a system with delay, in many cases it's not a bad choice at all. PID > > > controllers can and will give perfectly satisfactory service with plants > > > that have significant delay. The thousands, if not millions, of PID > > > controllers in mills and factories around the world that are controlling > > > plants whose responses are dominated by delay certainly belie any > > > declaration that the PID controller isn't a good choice to control a > > > plant with delay. > > > > None of the above is intended to minimize the difficulty in analyzing and > > > designing a truly optimal controller for a plant with pure delay -- > > > that's an exercise that can make your brain hurt, and fast. And nothing > > > of the above is intended to chase you away from taking plant delays more > > > directly into account if a discrete-state controller such as a PID won't > > > let you eke the performance that you need out of your plant. > > > > But in the absence of significant nonlinearities or time varying behavior > > > you can use all the analysis tools that are suitable for linear time > > > invariant systems on a system with delays just fine. You can do good > > > design work, without ever having to explicitly write out the differential > > > equations, much less solving them. > > > > So if you don't want to get lost in Mathemagic Land searching for > > > performance that isn't necessary for your product's success, a good ol' > > > PID controller may be exactly the optimal controller -- in terms of > > > adequate performance and reasonable engineering time -- even if it > > > doesn't satisfy any egghead academic measure of "optimal" for the > > > particular plant you're trying to control. > > > > --www.wescottdesign.com > > > I have recently done a thermal MIMO PID controller that ended up > > preforming adequately despite using very simple controls. > > Some comments: > > Even the simplest differential description ends up with an infinite > > number of state/poles. > > Most real thermal systems have little tabs and things that foul up > > theoretical analysis. > > Therefore: you can start with simple mathematical models to estimate > > requirements but you always end up with approximations. > > Pole zero analysis in this case is almost worthless except to roughly > > get started. > > Bode and/or Nichol's chart analysis (I used both) works very well; > > but .. > > You have to get and use the experimental data. You can use that > > directly or find a sufficiently good model for the system. > > You should establish a "process" for the tuning and experiments; the > > system you take the data on will undoubtedly not be the one that ends > > up being manufactured. > > Gotcha's: Scilab's system identification processes are unstable > > dealing with this type of system. They can be used to attempt > > modelling but tread carefully and double check. > > When taking the data, the room/environmental temperature will do > > everything it can to confound the experiment. > > Don't worry about the lower frequencies, go to where the phase starts > > to shift significantly. > > For the Bode/Nichols derived compensation just redo the experiment > > (which you probably will) to clarify the standard compensation region > > round the Bode criterion; 180 degrees +- one or two decades. > > Try to give at least hints to how the tuning was done for the > > "outsourced" maintenance people who have to maintain the tuning after > > the mechanical assembly is altered; unless you want to come back and > > start over yourself in a year. > > > Really, really examine the code to make sure you don't "windup". I > > was forced to rely on programmers in another group and I had study the > > experimental results for a while to realize that the anti-windup code > > just clipped the output not the integrator. > > > Ray > > I agree with the last paragraph. > However, I have had a lot of success with identifying systems poles > and zero. I can then place both where I want with the controller > gains. > > I didn't know Scilab has a system identification function, but I have > used the lsqrsolve and optim successfully. > > Peter Nachtwey Interesting, I have thought about going that route but opted for a more conventional process; System Identification routines. But that wasn't very satisfactory. I have a problem in that I like to continue along routes until I really understand why they don't work. Sometimes I think that half my brain is autistic. Once I get my system identification code reorganized (with or without a gui) I plan to test it against my data and some available test cases from NICONET. Although they don't seem to be MIMO. In biological testing equipment you are forced into MIMO situations in order get the required temperature accuracy over large testing areas and environmental conditions. In addition mammalian reactions are tuned to constant temperature within a narrow band; 37degC in our case (presuming no aliens in the group). I was actually looking forward to doing that; I had never had use MIMO before. Wasn't so enthused after a while; the design process is a lot more complicated and the tools were not robust. Once I resolve (or at least identify) the problems perhaps I will compare the results with lsqrsolve. If your interested I will post a link here; but don't expect anything soon. I am just settling into Mexico, and am not as fast as I used to be. Ray
From: pnachtwey on 13 Nov 2009 12:45
On Nov 13, 6:44 am, RRogers <rerog...(a)plaidheron.com> wrote: > On Nov 12, 8:43 pm, pnachtwey <pnacht...(a)gmail.com> wrote: > > > > > > > On Nov 11, 10:18 am, RRogers <rerog...(a)plaidheron.com> wrote: > > > > On Nov 10, 11:54 am, Tim Wescott <t...(a)seemywebsite.com> wrote: > > > > > On Tue, 10 Nov 2009 11:54:36 -0500, Datesfat Chicks wrote: > > > > > "Frank W." <frankw_use...(a)mailinator.com> wrote in message > > > > >news:7lggquF3dt584U1(a)mid.dfncis.de... > > > > > >> Since all PID temperature controllers have Autotune, there must be a > > > > >> solution for this problem. Any ideas? > > > > > > As you probably know from control theory, the basic theory of a PID > > > > > controller is that you have a system described by a set of linear > > > > > differential equations that is inherently unstable or has some > > > > > performance problems. As a result you strap a PID controller onto it > > > > > (with said controller also described by its own linear differential > > > > > equations), and the resulting system (now described by linear > > > > > differential equations which are a mathematical mix of the underlying > > > > > system and the PID controller) has better characteristics. > > > > > > Did you notice that there is a word that appears many times in my > > > > > description above? > > > > > > Want to guess what the word is? > > > > > > That word is "linear". > > > > > > A system with a time delay is not described by linear differential > > > > > equations. Strapping a PID controller onto it is bad math. > > > > > > One of the more classic examples is a shower or an industrial process > > > > > that mixes fluids of varying temperature and the sensor is located > > > > > substantially downstream from the mixing value. This is a pure time > > > > > delay. My shower at home is like that. I turn the water a little > > > > > hotter. Nothing happens. I turn it a little more hotter. Nothing > > > > > happens. Then I turn it a little more hotter. Then the wave of hot > > > > > liquid hits me and I scream in agony. > > > > > > Over time, I've adapted to my shower. I don't burn myself anymore. > > > > > > I think the control algorithms you want to use for a system like yours > > > > > fall outside the range of PID. I'm sure there is a body of theory that > > > > > covers it, but I don't know what that is. > > > > > > I would heat the system full bore for a fixed period of time, then stop > > > > > and wait to see how the temperature catches up. And work from there. > > > > > > The best control strategy for that system isn't going to be PID. That > > > > > is a non-linear system. > > > > > I've been resisting forking this over into the control newsgroup: now > > > > it's compelling. > > > > > Systems with delay can be perfectly linear, as well as time invariant -- > > > > they just can't be described by ordinary differential equations with a > > > > finite number of states. > > > > > To be linear, a system only needs to satisfy the superposition property. > > > > A delay element satisfies superposition just fine. > > > > > And while a PID controller may not be the theoretically best controller > > > > for a system with delay, in many cases it's not a bad choice at all.. PID > > > > controllers can and will give perfectly satisfactory service with plants > > > > that have significant delay. The thousands, if not millions, of PID > > > > controllers in mills and factories around the world that are controlling > > > > plants whose responses are dominated by delay certainly belie any > > > > declaration that the PID controller isn't a good choice to control a > > > > plant with delay. > > > > > None of the above is intended to minimize the difficulty in analyzing and > > > > designing a truly optimal controller for a plant with pure delay -- > > > > that's an exercise that can make your brain hurt, and fast. And nothing > > > > of the above is intended to chase you away from taking plant delays more > > > > directly into account if a discrete-state controller such as a PID won't > > > > let you eke the performance that you need out of your plant. > > > > > But in the absence of significant nonlinearities or time varying behavior > > > > you can use all the analysis tools that are suitable for linear time > > > > invariant systems on a system with delays just fine. You can do good > > > > design work, without ever having to explicitly write out the differential > > > > equations, much less solving them. > > > > > So if you don't want to get lost in Mathemagic Land searching for > > > > performance that isn't necessary for your product's success, a good ol' > > > > PID controller may be exactly the optimal controller -- in terms of > > > > adequate performance and reasonable engineering time -- even if it > > > > doesn't satisfy any egghead academic measure of "optimal" for the > > > > particular plant you're trying to control. > > > > > --www.wescottdesign.com > > > > I have recently done a thermal MIMO PID controller that ended up > > > preforming adequately despite using very simple controls. > > > Some comments: > > > Even the simplest differential description ends up with an infinite > > > number of state/poles. > > > Most real thermal systems have little tabs and things that foul up > > > theoretical analysis. > > > Therefore: you can start with simple mathematical models to estimate > > > requirements but you always end up with approximations. > > > Pole zero analysis in this case is almost worthless except to roughly > > > get started. > > > Bode and/or Nichol's chart analysis (I used both) works very well; > > > but .. > > > You have to get and use the experimental data. You can use that > > > directly or find a sufficiently good model for the system. > > > You should establish a "process" for the tuning and experiments; the > > > system you take the data on will undoubtedly not be the one that ends > > > up being manufactured. > > > Gotcha's: Scilab's system identification processes are unstable > > > dealing with this type of system. They can be used to attempt > > > modelling but tread carefully and double check. > > > When taking the data, the room/environmental temperature will do > > > everything it can to confound the experiment. > > > Don't worry about the lower frequencies, go to where the phase starts > > > to shift significantly. > > > For the Bode/Nichols derived compensation just redo the experiment > > > (which you probably will) to clarify the standard compensation region > > > round the Bode criterion; 180 degrees +- one or two decades. > > > Try to give at least hints to how the tuning was done for the > > > "outsourced" maintenance people who have to maintain the tuning after > > > the mechanical assembly is altered; unless you want to come back and > > > start over yourself in a year. > > > > Really, really examine the code to make sure you don't "windup". I > > > was forced to rely on programmers in another group and I had study the > > > experimental results for a while to realize that the anti-windup code > > > just clipped the output not the integrator. > > > > Ray > > > I agree with the last paragraph. > > However, I have had a lot of success with identifying systems poles > > and zero. I can then place both where I want with the controller > > gains. > > > I didn't know Scilab has a system identification function, but I have > > used the lsqrsolve and optim successfully. > > > Peter Nachtwey > > Interesting, I have thought about going that route but opted for a > more conventional process; System Identification routines. But that > wasn't very satisfactory. I have a problem in that I like to continue > along routes until I really understand why they don't work. Sometimes > I think that half my brain is autistic. > Once I get my system identification code reorganized (with or without > a gui) I plan to test it against my data and some available test cases > from NICONET. Although they don't seem to be MIMO. In biological > testing equipment you are forced into MIMO situations in order get the > required temperature accuracy over large testing areas and > environmental conditions. In addition mammalian reactions are tuned > to constant temperature within a narrow band; 37degC in our case > (presuming no aliens in the group). I was actually looking forward > to doing that; I had never had use MIMO before. Wasn't so enthused > after a while; the design process is a lot more complicated and the > tools were not robust. > Once I resolve (or at least identify) the problems perhaps I will > compare the results with lsqrsolve. If your interested I will post a > link here; but don't expect anything soon. I am just settling into > Mexico, and am not as fast as I used to be. > > Ray When you have MIMO test data why don't you share it with us. I would like to have a crack at too. It would be helpful to know what I am fitting data too though so I can get the general form the equations right. I don't know anything about your field of study. The trick is how you use optim() and lsqrsolve(). The best system identification uses Runge-Kutta to integrate the model's system of differential equations. For MIMO systems you will need to use optim(). optim() can optimize a cost function. lsqrsolve() requires two arrays of data, the actual data and the estimated data. I don't know how you would do this if you have two sets of actual data and two sets of estimated data. Peter Nachtwey |