PID continues to works great, efficiency measured

The PID control continues to work great, after 3 1/2 days the PID seems to be in good control. The graph shows a bit of variation but within 10 degrees which seems within bounds.

3 1/2 days of PID control

3 1/2 days of PID control

During this time period I used an average of 2.15 bags of pellets per day. At 40 lbs. per bag this is 86 lbs per day or 39.09 kg/day. At a cost of $216/ton. this is $9.28/day. I am hoping to reduce this to less than a dollar with chips but before I do, I intend to implement some more mechanisms to reduce fuel usage. More to come with the new year, Merry Christmas, Happy Holidays everyone.


PID works!

122012PID

After tweaking the Kp and making the Ki work in the software the graph speaks for itself. The software is controlling the temperature to the set point of 140°F within a fraction of a degree for the most part. This was the last difficult piece of puzzle. I did not use the PID function in the Arduino language, instead I wrote my own with a large part of the understanding of the code coming from the excellent description by Brett Bueargard who wrote the PID library, as well as assistance from a friend who helped me understand the problem better in a spreadsheet. I now have a burner that works dependably and is modular so that I can make changes and see if I can further improve the efficiency. I now have software which will hold the temperature without worry. I plan to add a proof of fire sensor next for the mechanical part of the project, and add the ability to set the Real Time clock in the software. Onward, ever onward, but for today I think I will have a beer!


Thinking about PID control

Proportional, Integrative, Differential control.  There is a function in Arduino that implements this and I started thinking about how I would do this and if it would be appropriate.  The function, really an algorithm is all based on error and time.  In this case the error is the difference between the set point and the actual tank temperature.

All three functions Proportional, Integrative and Differential have a factor, Kp, Ki and Kd.  For example let’s calculate each portion of the formula starting with the proportional contribution Kp, if the current temperature of the tank is 100°F and the set point is 140°F the error is 40.  The integrative portion of the formula adds the contribution of the error over time.  This would be the Ki factor multiplied by 40 and added to the previous Ki*error for every time period.  The differential portion is the Kd multiplied by the difference in the tank temperatures or in other words the tank temperature at the beginning of the time period  minus the tank temperature at the end of the time period.  Let’s take some of the data collected by the OpenLog microSD card and take a stab at this in Excel. We’ll assume Kp=6, Ki=.6 and Kd =.2. The time period is one minute.

Raw data imported into Excel with PID data calculated

Raw data imported into Excel with PID data calculated

Now in practical terms how is the the fire being controlled now?  The auger time is being controlled.  Of course practically the fire must not go out so there is a minimum time the auger must run, since in this program the auger is on a fixed time of 5 secs this really means that all of the control comes from varying the time the auger is not running.  But again the fire can’t go out so I figure the max amount of time between the fixed auger feeds of five seconds is forty seconds.  So that is the slowest the fire can go.  How fast can it go?  Well theoretically the feed could run continuously but again we are dealing with a chemical process that cannot simply absorb 100% fuel feed.  In this case the auger motor added a practical aspect by limiting the feed to a duty cycle of 50%, so the maximum time that the feed can be on is half the time.

Since the PID control is based on time periods and the data collection time period is one minute,lets choose a time of 1 minute for argument.  In one minute at max run the feed will be on 30 seconds and off 30 seconds.  In one minute at min run the feed will be on for 5 secs, off for 40 secs, on for 5 secs and then off for the remaining 10 seconds of the minute.  So again we don’t control the on time only the off time and the difference between the max on time (min off time) and min on time (max off time) is 30 secs on, 30 secs off for the max and 10 secs on and 50 secs off for the min.   So the only control between full bore and idle is the difference between 50secs and 30 secs or 20 secs per minute.
 
This explains some of the challenge,  the other challenge is the inertial effect of the combustion reaction especially if unburned fuel has built up.  So now that the PID output has been calculated I’m having a hard time wrapping my mind around how this would translate to control of the time, I know I could set up a simple proportion between the PID output and the 0-20 scale of  auger off time dwell.  However in this example the PID output  increases as the error decreases.  I guess that’s the beauty of a spreadsheet I will play around with Kp, Ki and Kd to see if I can get this to work a little better.


Software changes to control underdamped Setpoint control

After running for a few days I have been happy with the amount of holes in the bottom of the burner, the ash level when running does not get higher or lower.  However the fuel usage is a little higher than I thought it would be and the program does not hold the set point temperature as well as I would like.  The graph shows the interaction of the excess fuel usage and the set point.  At times the boiler should be idling along with very little fuel feed, the program should be able to determine the fuel usage needed to control the temperature to the set point.

Under damped control

Under damped control

You can see the 140°F horizontal grid line, the set point is currently 140°F. The integral of the area over that line is excessive fuel usage. However that’s not the only issue, the second issue is the amplitude seems to grow larger until approx. 121 minutes.  At that point I shut down and started a new software change.    You can see the slow recovery as I had to relight the fire and then the software starting correcting earlier, so in short more software changes are in order.    The challenge is to build self correcting software since the whole goal of this project is to burn chips and that will require the software to deal with different energy densities.  I’ll make a few more software changes and post another graph soon.


Continuous run, working fine, future improvments

At this point the boiler has been working for a day and based on last years experience I see no reason why I would need to shut down for a week.  Yesterday we brought two tons of pellets into the shop knowing snow and rain mix was in the forecast.  Yesterday was a pleasant 40°F day with full sunshine a great day to move a little fuel.  I believe we are on a two bag a day pace so with luck I won’t have to worry about moving pellets again until nearly February.  We have chairs set up by the boiler and it is a pleasant place to sit and talk in lieu of sitting in front of a woodstove.

So..what’s next on the list.  1) Software improvements, to be able to adapt to pellets or chips will take a more dynamic software approach.  The software should be able to adapt automatically to varying energy densities.  2) Faster and easier maintenance.  More over center latches to be able to easily take apart the chimney for cleaning and a removable top to the boiler to easily clean the tank tubes.  3) Testing with various materials, chips being at the top of the list.  4) Building a chip dryer.  5) Adding more sensors, I am definitely going to add a fire eye to confirm fire.   I would like to monitor the temperature of the feed motor and the fan motor.   It would be helpful to add a relay for the fan motor so that is controlled by the Arduino.   6) I have tried the self start but it is not in the software yet, that would be a great leap forward especially for March and April when daytime heat is often not required but nighttime heat and hot water are needed.  Automatic starting would be great and would save a lot of fuel.  7) Improving the CNC Plasma cutter, there is still some chatter in the  Y axis and if I can fix that, it would be great and would probably speed the CNC up significantly cutting down on the dross or slag produced when it is cutting.  Cutting down on the slag is a major priority since it is time consuming to grind this off and I am sure part of the development will include trying different burner designs.  8)  Taking a Design of Experiments statistical approach to the burner design to optimize for efficiency.  I gave myself a pretty good list back in September and I have whittled it down to completion so I know it is all possible and fun, I just need to get started.  Tomorrow probably, today I am just going to sit by the fire and enjoy a Sunday.


12/14/12 data, more testing, draft improvements

I  added  gasket rope which I bought at a local hardware store, which is made to replace the gasket material which comes in a wood stove door between the burn plate and the boiler.  This gasket changed the Magnehelic vacuum reading from .1″H2O to .4″H2O.  That I thought would make the flame a bit more vigorous.  I also made the holes in the bottom of the burner larger to allow the ash to fall through.  Lastly I made minor changes by tacking some material across some holes and making more air holes in the ramp plate which the pellets fall down.

Temperature vs. Minutes 12/14/12 data

Temperature vs. Minutes 12/14/12 data

The main differences in this graph and the previous day’s graphs are at approximately minute 273  pellets were added and the sawdust which had been running finally ran out.   As you can see it had enough energy density to overcome the demands of the circulator circuit.  The biggest problem after that came at about 341 when the program allowed the temperature to go past the set point of 140°F  The only explanation I could come up with is the division by different types of declared variables was not allowed and yielded a result of zero.  I was dividing an unsigned long which is an integer by .8 to increase the Auger Off time by 20%.  Since you will not get an integer when you do this the program may not have liked this result.  The Arduino language is a slight variant of C++ .  I have since made all the variables doubles we’ll see if that works.  Today’s burn will be a better test of the burner floors ability to let ash fall through.  Sawdust is very difficult to burn.  It’s also difficult to get the ash to fall through the burner floor.   I think this is because the air cannot get around the sawdust sufficiently to burn it completely and hence it smolders in clumps instead of falling through the grate.    The burner when I pulled it out to inspect it was definitely not clean of ash but did appear better than yesterday.


More Testing, another day, another graph

I rebuilt the burner yesterday added more air holes in selected areas and tried to stop up the misc air leaks to see if that

Tank Temperature vs. Time in minutes

Tank Temperature vs. Time in minutes

would add more power.  I’ll let the graph speak for itself.   Note the issue at 45 or so minutes in where the temperature started to drop.  At this point the sawdust bridged so badly it wasn’t feeding any fuel.  After I poked the sawdust in the hopper, the temperature continued to rise.  I had to continue to poke the pile to get the feed rate to be somewhat normal.  Looks a lot like yesterday’s graph, so I am thinking about adding some additional air through a forced draft fan on the front end of the process.   Once again the burner did do the job but slowly and until approx. 379 minutes or a little more than 6 hours into the test did the temperature rise past the point where the circulator turned on.  I measured the chamber pressure, in this case vacuum and it measured .1″ H2O so additionally I am wondering if I need a larger exhaust fan as well.


Testing with feedback, Step 9 of a DIY record

If last years burner was a vehicle it would have been a freight train, powerful and hard to throttle back.  This new burner is a Jeep, dependable and at at this point slightly underpowered.   The burner design will no doubt need to be tweaked but it was a great first day.  As you can see the burner was having a hard time getting well lit.  Those of you with a wood stove I am sure can relate.    At about 118 minutes in the flames finally took over and the slope looks good.
The saw tooth effect you see up top is the result of the circulator pump turning on and off.  I turned up the thermostat on the shop floor which has radiant tubes so this was a big load and it did not have the power to overcome the load.  Although from the frequency change at the end you can see it was starting to catch up.    But I am going to redesign the burner to direct the air flow a little better.

Chart of Temperature vs. Minutes

Chart of Temperature vs. Minutes


Work out the software bugs to test burn, Step 8 of a DIY Record

Over the summer and fall I have written and tested a number of programs to have the building blocks of a working program.  I knew the key this year would be the ability to log data.  Of course to log data and have it mean something you have to have good data.  So I spent several days working the bugs out of OpenLog, which works but I would not recommend.  I also spent some time figuring out a combination of moving averages which resultx in stable data.

Of course the integration process was a train wreck.  The arrays used for moving average data smoothing were declared wrong so that bug had to be found and fixed.  The Serial LCD needed to be replaced, and my soldering iron wouldn’t work.    A few of the functions are timed and there were some issues with those functions.  The code for Open Log was not robust enough, once I worked out all those issues, which took most of the weekend, it is finally ready to test.

I had a plow in the shop for repair and soaked up the spilled hydraulic fluid off the floor with some sawdust, actually pellets that got wet.  So the hydraulic oil soaked sawdust is in the hopper to be burned.  It’s burning now, so tomorrow I should have some excel data which will help me make decisions to improve the software.  At this point I am not sure it will be valid however, it is really taking a long time to come up to temperature with the sawdust.   Another data point.

Boiler hooked up and burning for the first time

Boiler hooked up and burning for the first time


Electrical box and paint, Step 7 of a DIY record

It took me longer than I would like, but the hopper/auger assembly is now painted and the electrical box is mounted and the wiring is functional.  I have mounted the Arduino and LCD display.  That box also contains the board that accommodates the thermistor electronics, which are the sensors that read various temperatures.

The main electrical box is a stainless steel box  I picked up used from a scrap yard, putting the frugal in frugaltinker.com.  That’s the reason that there are so many holes in the box,  however it was such a good deal I thought it was worth it, despite the cosmetics.  The cover was just too ugly to leave be, so I attempted to skin the cover with a plate which I plasma cut in “Frugaltinker.com”.  This doesn’t show up too well, I probably should paint a background behind it to make it stand out better. Painting a background seems low on the to do list right now, so I think I will skip that task and focus on the burner.

The CNC was invaluable in the production of the electrical mounting plate, mounted inside the electrical box.  It was great to not have to drill any holes to mount anything.   All the holes were cut with the CNC and fit just fine.

So the final task is complete before the burner is welded up and tested.

This slideshow requires JavaScript.