Monday, March 18, 2013

300mS eliminated the hunting issue!

I upped the PWM sampling and adjustment period to 300mS, and that eliminated all hunting during the Acceptance phase:




Do note the spike around 11.5 minutes into the run, here something turned on (my guess is the freezer or refrigerator  looks like what ever it is had a surge current to start and a 8-10A DC steady state draw.  Sounds like the Refrigeration to me).

Because I was dumping debug data at every PWM adjustment period I could see exactingly how the system responded.  Here is a snip:

Time mS PWM Vbat AmpsWatts RPMs:Ve
11.2 718233 70 14.79 42 621 1834 0
11.3 718575 70 14.78 41 605 1842 0
11.3 718919 70 14.77 40 590 1834 0
11.3 719249 70 14.77 41 605 1827 0
11.3 719592 70 14.77 40 590 1842 0
11.3 719940 70 14.77 40 590 1842 0
11.3 720275 70 14.76 40 590 1834 0
11.3 720619 70 14.76 40 590 1827 0
11.3 720966 70 14.76 38 560 1842 0
11.3 721299 70 14.76 38 560 1834 0
11.3 721643 70 14.75 40 590 1834 0
11.3 721991 70 14.73 41 604 1842 2
11.3 722326 72 14.73 43 633 1834 2
11.3 722669 74 14.76 44 649 1849 0
11.3 723016 74 14.77 44 649 1820 0
11.3 723368 74 14.78 42 620 1820 0
11.3 723713 74 14.26 43 613 1834 16    VBat declining, looks like a load was placed on.
11.3 724057 76 13.94 45 627 1827 27    System responds by increasing PWM  (PWMs are capped max 2 going UP)
11.3 724384 78 13.95 44 613 1834 27    Still needs more PWM, but at least we have stopped the decline in VBat now.
11.4 724728 80 14.24 48 683 1827 17    Voltage is starting to rise.
11.4 725072 82 14.28 52 742 1834 16    However because we are still under the target voltage . . 
11.4 725400 84 14.32 52 744 1812 14     . . simple algorithm continued to increase PWM
11.4 725744 86 14.36 56 803 1820 13
11.4 726094 88 14.41 56 807 1820 11    Still increasing, voltage is raising faster now.
11.4 726438 90 14.46 58 838 1820 10
11.4 726780 92 14.51 58 841 1805 8
11.4 727124 94 14.58 62 903 1812 6
11.4 727453 96 14.66 65 952 1790 3
11.4 727796 98 14.74 67 987 1790 2
11.4 728144 100 14.82 68 1008 1782 -1    Oh Oh, now we are over volts!  Need to bring down the PWM.
11.4 728488 99 14.91 68 1013 1775 -4    But we had wound it up so much on the way up it takes time to reduce.
11.4 728833 95 14.95 65 971 1790 -6        Notice on the way down no limit how much  we can change PWM in one step..
11.4 729177 89 14.96 60 897 1782 -6
11.4 729504 83 14.93 56 836 1797 -5
11.4 729846 78 14.88 51 758 1805 -3
11.4 730196 75 14.82 47 696 1827 -1
11.5 730531 74 14.76 45 664 1827 0
11.5 730874 74 14.72 45 662 1834 2    Only a little undershoot
11.5 731224 76 14.7 46 676 1827 2
11.5 731578 78 14.72 48 706 1842 2
11.5 731922 80 14.72 51 750 1827 2
11.5 732266 82 14.74 53 781 1820 0    Finally, back to stable VBat.  Amp draw is about 8-10A higher then before. 
11.5 732621 82 14.76 49 723 1812 0
11.5 732965 82 14.76 52 767 1827 0
11.5 733318 82 14.78 50 739 1820 0




When I look at this, again I clearly see how adding in consideration for Trending will help.  And I am likely going to make that change over the summer.  But for now, I think this will work OK.  I am going to try lower the cap to a max change of 1 to try and reduce overshoot.  And I worry about the systems ability to respond to over-voltage, so am going to try and reduce the sampling time to 200mS and see if that still mitigates the hunting conditions.  I might even be able to get away with 150mS, when combined with reducing the CAP from 2 to 1.




No comments:

Post a Comment