No announcement yet.

Controller Questions from Nubie

  • Filter
  • Time
  • Show
Clear All
new posts

    Controller Questions from Nubie

    Relatively new to Bafang BBSxx motor on bike but many years of living with Ohm's Law. I find that when faced with multiple variables and inputs, a visual presentation is easier to understand than columns and rows of numbers. So my goal is to create an accurate map of the controllers output current using the same control variables as the Luna Bafang Programmer to get a visual overview. While most of the parameters are actual units of measure (Amps, Velocity, milliseconds, and %), there are a couple that use a 3 bit register (1-8) to effect rates of change that do not relate directly to a physical parameter. These are the root of my questions.
    1) Slow Start Mode (1-8) Does this change the duration of the start transition or is it defining the slope of the curve with fixed duration from the Start Current %? While I can feel the difference in settings, I can't quantify it on the map.
    2) Current Decay (1-8) Again this disconnects the cadence RPM from the 3 bit value. Does anyone know the range of cadence that it can effect? I know 8 is higher cadence than I want for normal riding.
    3) PAS Speed Limit% I understand that this governs the motor speed beginning at 44% of the speed limit% of the speed limit in effect, ending at the speed limit% and keep current% for each PAS level setting. Does that make the actual motor RPM a dynamic variable that the controller continuously calculates? If it's a continuous loop recalculation, it becomes a squishy fuzzy dynamic balance between Amps, Cadence, and Gearing. My initial assumption here is that the transition is linear, as is the Current Decay.
    4) Work Mode Not touching this at the moment as recommended, it does pique my curiosity. With a numeric range of 10-80 it has to influence something useful, but that's down the road.
    My first "back of the napkin" sketch doesn't violate any of the definitions or rules that I know of BUT Newbies are often oblivious to reality and require a "Fish Slapping Dance". (ref Monty Python)
    If I've made a drastic wrong turn somewhere, I'd appreciate a course correction early into the journey. Initial map will be 2D, output Amps as a function of speed in a fixed gear and cadence. When cadence influence gets included it will become a 3D surface map. If this logic is valid it will be useful, otherwise it will just generate refrigerator art.

    Created by a newbie in the process of learning, so if there's something here that's just flat out wrong, please be gentle. My four questions above still exist, but in an effort to generate a visual overview assumptions were made. Feedback welcomed as the mapping process is refined.

    Here's the first pass at the 2D map, using a spreadsheet to calculate and generate the graph. There's no cadence calculations included, consider the cadence as below the initial RPM controlled by the "Current Decay" setting takes effect. In the future cadence will be incorporated to create a 3D surface where X=speed, Y=cadence, and Z=Amps. Cadence will only reduce the output Amps, so this baseline speed to Amp should remain valid.

    The first graph shows the default BBS02 settings as received from Luna, it's the attached .el file "TrekBBS02Default.el".
    Click image for larger version

Name:	image.png
Views:	1
Size:	33.6 KB
ID:	63446

    The second map is my original tweak, where only the PAS 1-5 speed limit % was reduced. "Trek01.el"
    Click image for larger version

Name:	image.png
Views:	1
Size:	36.9 KB
ID:	63447

    Following is the "Kepler.el" map:
    Click image for larger version

Name:	image.png
Views:	1
Size:	34.3 KB
ID:	63448

    Following is the "Penoff.el" map.
    Click image for larger version

Name:	image.png
Views:	1
Size:	52.5 KB
ID:	63450
    Attached Files


      Kool work! Good on ya...

      I didn't find the .el's attached - sure would like to see the first two in particular.

      Very interesting stuff and I'm certain JPLabs will be interested too ;-}

      If you end up doing more, please post as many as you like.

      I'd love to see some experimenting with things (changing only one variable) like "keep current" and "work mode", etc.


        Oh yeah they are not the variables.
        The forum won't let me attach an ".el" file, so they've been converted to a .txt.
        As received (1st graph) TrekBBS02Default.el.txt
        1st modification (2nd graph)Trek01.el.txt


          I have had my BBS02 for a couple of weeks and am also trying to get a more detailed understanding of the operation. Last week I attached a Watt meter and a Speedometer to my crank as a Cadence meter.
          It can be a little tricky watching a Watt meter mounted below my seat at the same time as keeping an eye on the Speedo/Cadence meter all without veering off the road!

          I would like to share my findings on two of the settings so far:

          Current Decay value shifts the Cadence Range at which the Current starts to drop from the PAS Current Limit value down to the Keep Current value.

          Current Decay 8. The current starts to drop at a cadence of 50 RPM and by approx 70RPM the current had reached my Keep Current value of 50%.
          Current Decay 1. The current starts to drop at a cadence of 30 RPM and by approx 60RPM the current had reached my Keep Current value of 50%.

          The higher the Keep Current is set, the quicker the Keep Current is reached. However the reduction in current still appears to happen at the same RPM (50RPM for CD 8) So a KC of 80% is reached between 50 and 60RPM.

          Keep Current is the % of PAS Current Limit that will be maintained at cadences higher than 60-70RPM. The exact RPM at which the Keep Current is reached depends on the Current Decay value as explained above.

          The Keep Current is maintained (kept steady) and does not continue to taper down to zero with normal pedaling Cadences - I guess that is why it is called a Keep Current!
          There are some exceptions:
          1) Once the PAS Speed Limit is reached the current is reduced to prevent going over that limit. eg) PAS speed limit of 50% on BBS02 will reduce current at 50%x120 = 60RPM AND/OR 50% of the Road Speed Limit set eg) 50% x 60km/h = 30km/h. The current will obviously fluctuate up and down to try and best maintain the speed limit.
          2) If PAS Speed Limit is set to 100% then the max road speed limit value or 120rpm for BBS02 is the point at which current will drop to prevent overshoot.

          I usually pedal at cadences between 70 and 95 with an average cruise cadence of around 85. To achieve this I use my gears 52T front and 11-34T rear.
          My tests show that above 70-75 RPM current is already reduced to Keep Current and so by maintaining RPMs above 70 the whole Keep Current setting is of little use. Cadence needs to drop a long way down to below 50RPM (lower still if CD is set less than 8) before the full current kicks in. This happens only when I am first starting off from a stand still or when I forget to change gears for an incline.or head wind.

          Hope this helps.
          Last edited by McBafang; 05-21-2018, 03:40 AM. Reason: Removed reference to No Load RPM as I now think the internal motor is likely governed to 120rpm max rather than reaching No Load RPM?


            "3) PAS Speed Limit% I understand that this governs the motor speed beginning at 44% of the speed limit% of the speed limit in effect, ending at the speed limit% and keep current% for each PAS level setting."

            I'm not sure that this is correct. Do you have a reference to this 44% value? I see the PAS Speed Limit only coming in to effect at the actual Speed Limit value and not a progressive tapering down from 44%.

            This was fairly easy to test. First set Keep Current to 100% to eliminate the effect that that setting has. Set PAS 1 at CL of 20% and SL of 50%. Pedal in first gear from stand still and you will see the Current sit at 20% until you reach a cadence of 60RPM at which power will be governed to prevent going over this speed. If you pedal harder above you speed limit then current will drop to very low levels.

            At the same time you also test and see that the road speed is also limited with the same PAS Speed Limit value (so this value is dual function).
            Pick a higher gear that will take you over 50% of your ROAD speed limit but with a cadence of under the 50%/60RPM motor limit - in my case this was 30km/h - once you reach this road speed then you will see the current drop away even though cadence is still under 60rpm limit.


              Reference to 44% is in KarlsGuide.pdf packaged with the Luna Configuration Tool (bottom pg 7, "Assto Limit Spd(%)".

              Your challenge and supplied data has me in agreement with you. When I generated the first set of 2D data points I used the wheel rpm value instead of the crank rpm. Ooops!

              This new information is a contradiction to the logic sequence used to generate data points. I now need to resolve that logic with your data and integrate into a new solution. It will alter the visual surface. This will also generate new questions, like how to assess the "lower current gently to maintain motor rpm when 44%" term. Not sure how to model a gently curve just yet. I was using a linear slope down to the Keep Current, but I now agree that it's tied to the crank speed not ground speed. Thanks for the numeric cadence values they'll be of use in the next iteration. Using the 120 rpm limit results in 44% = 52.8 rpm, which is consistent with your experimentation. Do you have the crank rpm for any other Current Decay set points? Raw data is fine, more data points the better, as I want to curve fit the effect.

              Need to ruminate on this, modify spreadsheet, and re-post.


                Originally posted by IsquaredR View Post
                Reference to 44% is in KarlsGuide.pdf packaged with the Luna Configuration Tool (bottom pg 7, "Assto Limit Spd(%)".
                "lower current gently to maintain motor rpm when 44%"
                OK after reading Karls Guide and based on the way the PAS settings work I am pretty confident that this statement is a typo when describing the PAS 0 Limit Speed operation. This seems likely when you read on and see that the values used for PAS1 Limit speed are mostly 44%. Coincidence? No I think the 44% figure stated above was intended to describe the impact that a figure of 44% set for PAS 1 Limit Speed would have and maybe Karl or the editor of the guide may have pasted it on to the PAS 0 section by mistake?

                The gently reduce current to maintain RPM happens when the Speed Limit is reached for EITHER Cadence or Wheel Speed. The way it reduces will depend on the conditions being encountered by the bike. eg) If the bike is accelerating down hill or with a tail wind the current drop off will be sharp and rapid, but would be more gentle if the bike is only slowly accelerating when it reaches the limit. Your Graphs could simply show the current dropping from the Keep Current vertically to zero at the speed limit as this is what the controller will do to attempt to prevent speed going above this limit.