Pages: [1]   Go Down
Author Topic: PID tuning - what fun!  (Read 1021 times)
0 Members and 1 Guest are viewing this topic.
Leighton Buzzard, UK
Online Online
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

some of you may have seen the reflow oven I'm working on
it's ok but not great
I'm trying to get to grips with PID tuning

there are basically 4 temperature ramps
each has different target temperatures (clearly)

I'm tinkering with the PID settings for each ramp
then had a thought (it happens once in a while)

as well as setting new Kp, Ki and Kd, should I also initialise the PID software
something like setting pidIterm to zero?
or will it all come out in the wash after a while?

cheers
Mike
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would be surprised that you need different PID tuning requirements for each of the target temperatures. The tuning is usually just to get a stable response for the system as a whole (heating element power, system heat loss, system heat dissipation rate when turned off, etc. One set of tuning rates is probably the best route to go and then issue setpoint changes gradually if you want to slow down the ramping rate from one value to the next. So setpoint change managment might be a better way to go then trying to build in the ramping timing rate for each 'step' via PID tuning values?

Lefty
Logged

Leighton Buzzard, UK
Online Online
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ah fair cop guv
gave that a try finished up with this profile
doesn't look too shabby

opinions?

cheers
Mike


* profile8.jpg (1014.53 KB, 595x581 - viewed 35 times.)
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27088
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks pretty good.
How do the hold times compare? They are a little hard to read on my laptop.


* Altera an353.pdf (258.37 KB - downloaded 10 times.)
« Last Edit: February 17, 2013, 05:40:56 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 207
Posts: 12911
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Is Ki zero?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 207
Posts: 12911
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Is the green line output?
Logged

Phillipsburg, NJ
Offline Offline
Full Member
***
Karma: 6
Posts: 184
Author: Matrix Keypad Library
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

gave that a try finished up with this profile
doesn't look too shabby

opinions?
Very nice profile control!  It's matches my default profile that I set up at work for un-profiled boards.  Works great for all but two of our boards.  One is very thin and the other is a 16 layer board with mulitple ground planes.  They require special profiles.

How do you profile your boards if you need to?
Logged

Leighton Buzzard, UK
Online Online
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks pretty good.
How do the hold times compare? They are a little hard to read on my laptop.
time above solder melt point is about 60 seconds; target is 60-150 seconds
I'd like to improve preheat ramp time as it takes 80 seconds to get to 150 degrees
the target was 30 seconds!

Is Ki zero?
Ki is 0.1; do you think I should increase it further?

Is the green line output?
yup!

...
Very nice profile control!  It's matches my default profile that I set up at work for un-profiled boards.  Works great for all but two of our boards.  One is very thin and the other is a 16 layer board with mulitple ground planes.  They require special profiles.

How do you profile your boards if you need to?

er - haven't hit that problem yet!
most of my boards are pretty small 1" by 1" up to 2" by 2"
I guess I would do a dry run with a spare board

what do you do?

cheers
Mike
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1389
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like you have too much thermal mass for your size of heater since there is substantial lag even with the heater fully on..  And you need a method of cooling that mass when ramping down - say a fan blowing ambient air.
Logged

Leighton Buzzard, UK
Online Online
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like you have too much thermal mass for your size of heater since there is substantial lag even with the heater fully on..  And you need a method of cooling that mass when ramping down - say a fan blowing ambient air.

guilty as charged!
fan for the cooling stage is next on the list
insulating the oven may help too

oven is 1kW, 9 litres
but I have blanked off the lower 2/3 so effective heated volume is around 3 litres
I also moved all the heating elements to the top as well

Logged

there are only 10 types of people
them that understands binary
and them that doesn't

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1389
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You also need a bit more integral action as evident by the "controlled" deviation at the high temperature.  Integral action is designed to reduce off-set error based upon how long the error exists.  It is evident that you are still applying heat even with the deviation existing.
Logged

Leighton Buzzard, UK
Online Online
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Altera an353.pdf

just noticed the attachment in your post
thanks for that smiley

You also need a bit more integral action as evident by the "controlled" deviation at the high temperature.  Integral action is designed to reduce off-set error based upon how long the error exists.  It is evident that you are still applying heat even with the deviation existing.
yup I have upped the Ki value and it has improved
also using the same values thoughout now
simplifies the code - always a bonus

more pretty curves later
cheers
Mike
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

Pages: [1]   Go Up
Jump to: