AutoTurning PID source code is needed.

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AutoTurning PID source code is needed.

Has anybody stuff or links ?

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Google is your friend.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi c_mcu_faq , what type of process are you triyng to tune ?

Is it quick changing or very slow ?

Regards

Paul

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Hi c_mcu_faq , what type of process are you triyng to tune ?

Paul, I think he is trying to TURN smthing, not to TUNE... right?
BTW: what is that PID? [the only PID I can think of right now is the "process id"].

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.chem.mtu.edu/~tbco/cm...

is one topic google finds on the subject...

I think most autotuning PID regulators implements something similar..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks alot to all !

rev wrote:
Hi c_mcu_faq , what type of process are you triyng to tune ?

Is it quick changing or very slow ?

I have both of them. fast and slow - my system is complex anouf.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you mean PID controller for an automatic system? You could use simple equestion for PID regulator with deriverate, integrator and proporcional time constant.
K(1+Td*s+1/(Ti*s))

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Usually, the autotuning technics implied in PID controllers are the most important secrets that PID manufacturers have. There are many, and probably you will need many experience to develop a good one.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Usually, the autotuning technics implied in PID controllers are the most important secrets that PID manufacturers have. There are many, and probably you will need many experience to develop a good one.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guillem Planisi wrote:
Usually, the autotuning technics implied in PID controllers are the most important secrets that PID manufacturers have. There are many, and probably you will need many experience to develop a good one.

Yes but they all use some form of the Ziegler-Nichols method i. e put the process in a state of controlled oscillation and then calculate the parameters based on the frequency of oscillation and gain.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

groenhen wrote:
BTW: what is that PID? [the only PID I can think of right now is the "process id"].

Since everyone else seems to know and didn't bother replying:
PID stands for Proportional/Integral/Derivative control (loop). It's a slick way of saying that the output signal to a control loop is based on some combination of how big the error signal is right now (proportional), how much total error have we seen so far (integral) and how quickly the error signal is changing (derivative). Not all PID controllers use all three terms but often people still call them PID. The optimal parameters are hard enough to find usually, so autotuning is meant to let the computer try to find the best constants. I've never tried it myself but I can imagine programming that might be just as much fun. Next year is when I really delve into the AI side of programming, this year is all about circuit design and UI. :)
-Will

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you considered using a fuzzy logic control ? Probably more work to make a fuzzy control than a PID control but easier to do auto-tuning with it. Overall it will be less work as I estimate it.

But in this case also I don't have code for you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
PID stands for Proportional/Integral/Derivative control (loop).

Yeah, I know... The "AutoTurning" part has puzzled me...
Quote:
so autotuning is meant to let the computer try to find the best constants.

Ok, so it seems quite suitable for a neural-network with a self-learning algorithm.
Yet, a training set of input patterns must be used to "teach" the NN the basic rules (NN will configure then its internal logic).
I never tried this on AVRs, but I think it's possible to implement it on a generous mega.
I did it few yrs ago on PC, but unfortunately I lost that project archive... :-(

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ CountZero:

Also many standard systems had been using Ziegler-Nichols method, the new ones that appeared to the temperature control market suggested a different method, since there is no overshoot and no oscillation in the autotuning algorithm. Also some of the best PID controllers claim a 'continuous tune' procedure that is always readjusting the PID constants in order to have a good control even when some external parameters vary (like external temperature, internal load, etc). This look like more close to a robust control system based on diferent control rules than PID. PID is a robust control, thought, but only for a fixed conditions.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you explored many of the previous PID discussions such as
https://www.avrfreaks.net/index.p...

There has been much published (read: lots of people have gotten their advanced uni degrees) on PID over the years. In my expereicnes, successful auto-tune stuff is mostly closely guarded or pay-for. there are lots of very comprehensive books on the subject. Many are pricey in the US$100 range, but I picked some up for reasonable prices on half.com--which may not help OP in Russia much. Uni libraries may have a good selection. Previous discussions should have some good on-line links. Look for stuff by Karl Johan Åström

Quote:

Karl Johan Åström and Tore Hägglund: PID Controllers: Theory, Design, and Tuning.
Instrument Society of America, Research Triangle Park, NC, 2nd edition, 1995.
Karl Johan Åström and Björn Wittenmark: Computer Controlled System-Theory and
Design. Prentice-Hall, Englewood Cliffs, New Jersey, 2nd edition, 1990.

Go to amazon.com, search on PID, and see which books have gotten the best customer reviews.

In my experience: PID is PID, but one size does not fit all. Although the algorithm might be the same, working with a slow system (say, temperature control of a massive space/object) requires quite a different mindset than for fast-changing systems (say, pneumatic pressure control of a small volume).

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks !

I'm reading hard...