topbanner.gif
Login
Username

Password




Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

JackH
11-19-2018 12:58
welcome2 Heidi

allenb
11-15-2018 13:26
Cwilli62 Welcome

JackH
11-14-2018 10:26
Welcome joycan coffee drink

JackH
11-12-2018 08:50
welcome2 gtroaster15

JackH
11-09-2018 12:21
Welcome SPQR

Shoutbox Archive
Users Online
Guests Online: 3

Members Online: 0

Total Members: 5,574
Newest Member: sitanggang
Donations
Donations Bank

Latest Donations
PRABHATH COFFEE WORKS - 10.00
John Despres (Scene... - 25.00
snwcmpr - 10.00
Ozo - 20.00
Josh Woodrow - 10.00

View Thread

Homeroasters.org » ALL ABOUT ROASTERS » ROASTING SOFTWARE APPS
Who is here? 1 guest(s)
 Print Thread
Gene with Artisan and TC4
renatoa
This is the normal PID behaviour, if tuned using a canonic solution, tailored to provide response as fact as possible and minimal overshot.

To address this we should think outside the standard PID tuning manuals...
First, the low output start requires to have a P term small enough to provide the desired PWM for that SV level, and no more.
Let's assume you want 40% for the first minute, and desired SV at the end of first minute is 80C, starting from ambient 20C.
The P term will be (output = 40%) / (initial error 60 = 80-20 Celsius degrees)= 0.67.

While the temperature will start to increase, the error will decrease, and also the output. For example, after 10 seconds, assuming the temperature increased to 40C, the error is now 80-40 = 40, thus the output will be 40 * 0.67 = 27%
So we need to compensate the 13% difference with an appropriate I term contribution.
The value of I term value is not so simple to calculate as P, we need an integral of all errors values, but, with some simplifications I think we can work with a average rough estimate instead integral, and calculate a 0.043 value for I term.

Quite strange values compared with what we are familiar from the others setups, right?

The problem is that using these values you can't go much further, not enough power due to small P term, and unstable because majoritar PWM will be provided by I term when you go past 80 degrees.
That's because a single PID values set can't be used for the broad range of temperatures and continuous sliding setpoint we have in a coffee roasting process, thus compromises must be made, like a P big enough to drive the whole temperatures range, resulting too much heat in the charge.

Already rant about this in the recent past, with other examples and arguments, you can find my posts if interested.

A simple and almost immediate solution would be to change the TC4 PID code to newer PoM version of Brett, if you have programming skills. And no more use Artisan PID.
This way the P term will be proportional with input, not with error, changing the paradigm... a lot ! ;)

PS: the fact you are setting so small PID coefficients in Artisan and nothing change make me believe you are using TC4 PID, not Artisan PID... to address this, there is a checkbox in Device dialog.
Edited by renatoa on 08-04-2018 23:40
DIY: TO based IR to bean 800g
Moded commercial: Dieckmann RoestMeister, Nesco, popcorn.
PID/ramp/soak controllers, MS6514 USB/Artisan/Apps/popC/ESP32
Grinder: mod'ed Porlex to 47 conical burrs
 
Masterkey
Hello,

thank you for your detailed answer. Yeah, that's probably true. A PID controller is a universal controller and there are 1000 ways to set it. Depending on what you want.

But for now, I'm gonna use this one. But thanks for the tip for the version of Brett. I'll test that one day.

I use Artisan's PID and not TC4's. The low values for P-I-D work very well with my roaster. The problem is only the start with 100% at the beginning. But I don't always have that problem.

If I close Artisan before starting and open it again, the heating starts with 0% and slowly regulates upwards. Then the curve looks very good. But when I roast twice in a row the heating starts with 100% at the second roast.

If you look at the picture again: The SV value at the beginning is 56, The BT is 50, so the error is very small. The heating should therefore start with a low output.

Is there a problem that the PID values are not reset? If you then have small PID setting parameters and regulate very slowly, this has greater effects than if you have large values.
 
Want to Help?
By donating you can ensure that HR will continue to be open for years to come. Expenses are 100% transparent and can be viewed publicly at all times. You can find more information on donations and why we request them by reading up on the forum topic here. Thank you.

greencardigan
What version of Artisan are you using? I think there was an issue with background follow in version 1.1.
 
renatoa
Could be I term accumulated and not reset...

One more reason to use TC4 PID, you can program on Artisan Start button a PID;RESET command to be sent to TC4.
Also the loop is much faster, 300ms compared to 1-2 seconds for Artisan.
 
Masterkey
I am using Artisan 1.3.1

Ok, I will test PID on TC4. Do I have to change the settings in user.h for this or does the TC4 gets the PID settings from Artisan?

And I have to select the PID Firmware checkbox.
 
greencardigan
Here's a video where I explain how to use the Artisan PID and the TC4 PID. I show both background follow and ramp/soak profiles.

https://youtu.be/...
 
Masterkey
Thank you greencardigan! Very good video! Did my first roast yesterday with PID. I think next step should be to calibrate the thermocouples. I think they are showing too low temperatures.

@renatoa: you said something about a PoM version of Brett. Where can I find information about it?

Is there a documentation for Artisan? Where can I find information what serial commands I can use?
 
renatoa
PID commands summary:
https://github.co...mmands.txt

The latest Brett PID library features PoM (V1.2) is already in the Arduino libraries manager. Just install and replace it in TC4 folder. Not so easy to do the same for Artisan, unfortunately...
Detailed reasoning behind PoM can be read here:
http://brettbeaur...asurement/

Please be aware that P and I terms have significantly different values when using PoM, and I don't know any autotune routine to compute them in this scenario, so manual tuning ... may the force... Grin
Edited by renatoa on 08-07-2018 09:59
 
greencardigan

The latest Brett PID library features PoM (V1.2) is already in the Arduino libraries manager. Just install and replace it in TC4 folder. Not so easy to do the same for Artisan, unfortunately...
Detailed reasoning behind PoM can be read here:
http://brettbeaur...asurement/

Thanks for this. I may try to include and test this in the aArtisanQ_PID sketch.
 
renatoa
There is an immediate replacement, and better, the old mode is preserved.

Please include the flag for the two modes in User.h, and don't forget to comment with the biggest caps you find :) that P/I values from PoE(rror) are not working for PoM(eas).

Unfortunately, the calls from Artisan should be done with PoE compatibility mode set.
 
MaKoMo
@greencardigan: shouldn't be there a TC4 PID command to switch the PID lib between those two modes from within Artisan? Could you add one? I plan to also add PoM mode to the Artisan Software PID and thus add such corresponding configuration to its GUI to toggle between the PoE and PoM modes. Thus if Artisan is configured to use the external TC PID, that user setting could just be send along a corresponding serial command.
 
renatoa
Please warn the user that P/I values of a mode aren't appropriate for the other.

Will try this weekend to code a quick and dirty conversion tool for P/I values between the two modes.
Edited by renatoa on 08-09-2018 03:46
 
renatoa
@MaKoMo & @greencardigan: if you have this opportunity to make a protocol change, please don't miss the great chance to add also a PID;LIMITS command, to pass the limits from Artisan Control dialog to the TC4 PID, and TC4 PID using them.

Was the most frustrating missing command for a long time... a permanent, 40% for example, minimum limit of power, would make my life a lot easier in my attempts to "perfect" rost profile.
Edited by renatoa on 08-12-2018 01:43
DIY: TO based IR to bean 800g
Moded commercial: Dieckmann RoestMeister, Nesco, popcorn.
PID/ramp/soak controllers, MS6514 USB/Artisan/Apps/popC/ESP32
Grinder: mod'ed Porlex to 47 conical burrs
 
MaKoMo
Masterkey wrote:
I use Artisan's PID and not TC4's. The low values for P-I-D work very well with my roaster. The problem is only the start with 100% at the beginning. But I don't always have that problem.

If I close Artisan before starting and open it again, the heating starts with 0% and slowly regulates upwards. Then the curve looks very good. But when I roast twice in a row the heating starts with 100% at the second roast.


Just discovered that I introduced a bug in the PID code of Artisan v1.3.1 that would lead to a high D-Term after switching off the PID and turning it on again. Fixed now in source together with some other PID issues that I discovered.

Artisan v1.4 beta builds that include this fix are now on bintray: https://bintray.com/artisan/artisan-artifacts/artisan/master#files
 
MaKoMo
renatoa wrote:

@MaKoMo & @greencardigan: if you have this opportunity to make a protocol change, please don't miss the great chance to add also a PID;LIMITS command, to pass the limits from Artisan Control dialog to the TC4 PID, and TC4 PID using them.

Was the most frustrating missing command for a long time... a permanent, 40% for example, minimum limit of power, would make my life a lot easier in my attempts to "perfect" rost profile.


I am awaiting directions from @greencardigan on how he plans to change the TC4 serial protocol. Any news?
 
greencardigan
I haven't had a chance to look at this yet. Sorry.
 
MaKoMo
greencardigan wrote:

I haven't had a chance to look at this yet. Sorry.


Maybe one should just add one extra serial command to allow Artisan to set PonM. Something like

PID,PONM,b

with b=0 for classical P-on-Error mode and b=1 for P-on-Measurement mode.

I implemented PonM by now for the Artisan software PID and could simply issue this or any other command to configure the TC4 PID accordingly if that is in use.
 
renatoa
Because it's me the guilty, if allowed I can contribute with code for both parts, your task being only to check and approve and integrate my work.
Private messages here don't allow PM to multiple recipients, so if agree we should switch to e-mail.

Please, don't forget also to add a LIMITS command, to pass the Artisan PID limits to TC4.
 
greencardigan
PID code changes and discussion continued here https://forum.hom...post_66601
 
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
What a Gene should dream ... Building a Coffee Roaster 1 11-12-2018 08:32
Thanks Brad, Jim, and Artisan Team Dataloggers/Controllers/Rate of Rise Meters 7 10-25-2018 01:22
Artisan and Mastech 6514 Dataloggers/Controllers/Rate of Rise Meters 8 10-24-2018 22:26
Artisan keeps dropping automatically Dataloggers/Controllers/Rate of Rise Meters 3 10-15-2018 01:33
First Artisan Roast Roasting Profiles 4 08-09-2018 11:01
Homeroasters Association Logo, and all Content, Images, and Icons © 2005-2016 Homeroasters Association - Logos are the property of their respective owners.
Powered by PHP-Fusion Copyright © 2018 PHP-Fusion Inc
Released as free software without warranties under GNU Affero GPL v3
Designed with by NetriX