Compact Field Oriented Controller, ASI + Grin, limited run

MrDude_1 said:
im also in 1.5.4.0

connect to your device (or hit analyze and open a file)
click the data tab at the top, under the menu
just under that, 4th one over is system debug.
below that, on the left side of the screen, hit the Control Mode tab.

Hover over the description label to see the options.

Well, I don't see a System Debug tab in my installation, just "Peripheral Selection", "Peripheral Configuration", "Protection and Fault Thresholds", "Communications", and "Controller Debug". Under Controller Debug tab is a Control Loops & Tuning sub-tab that has "Speed regulator mode".

Current setting is "2" (torque mode with speed limiting). I set this to "0", and I still get only one "on" state with the throttle, but now it stays on, even with the throttle closed (voltage low), like a cruise control. RPM and power drawn are still low. I adjusted Speed regulator Ki, and at any setting other than zero we're off to the races: the motor initially spins up quickly to 6500 RPM then settles down again.

I uploaded my configuration XML file with some screenshots of my BACDoor session a few posts above.
 
mrbill said:
As I mentioned a few posts above, I was able to get the throttle to respond. But I still have a few problems for which I cannot yet find a solution.

1) The motor remains inactive until throttle voltage reaches about 2.7 volts. Then the motor suddenly spins up to one power level and then latches at that level no matter how high throttle voltage goes until throttle voltage drops below about 2.0 volts. I cannot vary torque (when wheel is under load), just one "on" state, and "off". When under load the motor draws 75 watts and no more. If I increase Kp I can get about 250 watts under load, but then the motor coughs a bit as the RPM deceases.

2) I have the throttle wired through the eBrake circuit (Pin 6) and have left Pin 7 floating as in Justin's photo of the large MX150 connector wiring. Do I need to wire the throttle in parallel to Pin 7 so that I the throttle parameters I have set are in effect?

3) At 50 volts I should be able to spin the motor up to almost 7000 RPM, but at no load I have not seen more than 2700 RPM, and this decreases when I place the motor under load. Why is RPM limited?

4) The controller appears to lock up the motor to prevent backward spinning. Since I'm starting out by installing this controller on a mid-drive, I'd like to disable this function so that I can roll the bike backwards. How can I do this?

I solved issue (3) and part of (1). I had my "Gear ratio" in Motor Nameplate Ratings set to 1:1. I changed it to 30:1, and in the Vehicle pane I set the wheel diameter to 650mm and the maximum speed to 99 km/hr, allowing the motor to spin as fast as it wants. I want the ASI controller to function just like a dumb Infineon (Grinfineon, Lyen, etc.) so I can continue to do all limiting from the CAV3.

I can now spin the motor up to 6500 RPM, which is the maximum given the half-charged voltage of my battery. I also confirmed that the motor can draw 2000 watts under load and runs smoothly at that power. So, I think the motor is tuned OK. "Maximum Field Weakening current" in the Advanced Motor tab, is 0%.

Although my Throttle sensor source is the eBrake circuit (Pin 6), I still cannot get the throttle to function as anything other than as binary on/off. Even at partial throttle, the motor spins up as if the throttle is pegged, and it does so when the eBrake signal crosses about 2.7 volts. Then it continues to spin until throttle voltage drops below 2.0 volts. My throttle voltage range as set in the Throttle pane is 1.15v to 3.5v.

I cannot find a setting in BACDoor that configures the throttle to function as a speed throttle instead of a torque throttle.

I also tested a couple of configuration changes (e.g. setting engine braking torque to 0%, disabling analog braking in the Features bitmap, and increasing "vehicle jog speed2" in the Anti-Theft tab--) so that I could roll the bike backwards. None of these changes worked, neither singly nor in combination. The motor appears to be locked when not driving.

So, I have two remaining issues before I can use this controller:

1) How do I get throttle function over the voltage range I set in BACDoor and not as an on/off switch?

I was about to try wiring Pin 6 (eBrake) in parallel with Pin 7 (throttle), something that is NOT shown in Justin's wiring photo, but before I try that I thought I'd ask if anyone else had found a software solution. As a bonus I'd like to find a way to configure the throttle as a speed throttle, but if I can get the throttle to adjust torque linearly I can probably manage with the latter as the throttle signal sent from the CAV3 is essentially managing torque by adjusting throttle to a set amount of power drawn from the battery.

2) How do I get the BAC2000 to release the motor and allow it to spin passively at low speed when the system is idle but powered so that I can walk the bike backward? (Since this is a mid-drive, the bike can be walked forward without any resistance due to the rear wheel freewheel mechanism.)

I have attached my latest XML file.
 

Attachments

  • BMC600.M1.xml
    26.8 KB · Views: 169
You might try giving just enough throttle to make the motor go then put some load and see if it slows down, indicating the current mode throttle is working.

While a speed-command throttle would be great for bench testing, the torque-command mode is much nicer for actual riding IMO.
 
fechter said:
You might try giving just enough throttle to make the motor go then put some load and see if it slows down, indicating the current mode throttle is working.

While a speed-command throttle would be great for bench testing, the torque-command mode is much nicer for actual riding IMO.

Hi fechter:

Thanks for chiming in.

I tried what you suggest. While running the throttle in any part of its "on" range (throttle voltage > 2.7v) battery current is drawn according to the load I place on the wheel. Greater load causes greater current draw and only a slight reduction of RPM. In fact I was rather impressed with the regulation as the wheel didn't slow down much up to 2000 watts. I didn't load it higher than that, for now. It acts very much like a speed throttle pegged to the maximum when it's "on".

And, that doesn't explain why I get no motor response when throttle voltage is between 1.15v and 2.7v, then max throttle above 2.7v until throttle voltage falls below 2v. The mapping is binary and asymmetric, not linear and not according to the limits I set in BACDoor.

I agree about using torque or power throttle when riding, but so far I've only observed two states, full "off" and full "on". There is no in between.
 
Hey Bill and sorry to be late to chime in on this recent activity

mrbill said:
1) How do I get throttle function over the voltage range I set in BACDoor and not as an on/off switch?

In your case you should definitely just connect your throttle to the throttle input pin and not the brake input pin, since you are running a system that can't even do regen anyways. I found also after posting this that getting all the throttle mapping settings with the BAC2000's using throttle wired to the brake was not always straightforward, so if you did want to have combined throttle+regen with the same signal (say on a DD hub motor system) then you would be better to parallel connect the pins and still have the throttle in source in BACdoor set as the throttle pin, and the analog brake input set as the brake in.

2) How do I get the BAC2000 to release the motor and allow it to spin passively at low speed when the system is idle but powered so that I can walk the bike backward? (Since this is a mid-drive, the bike can be walked forward without any resistance due to the rear wheel freewheel mechanism.)

That's odd, with the throttle off the controllers don't allow any current flow through the phases windings whether you are spinning it forwards or backwards. You are saying that if you unplug the controller and roll backwards there is substantially less drag than when the controller is plugged into the motor?

Also earlier you had asked this:
mrbill said:
Can you confirm that Grin's Phaserunner software be used to tune a BAC2000?

Just to clarify, that is not and won't be the intention of the software, since we'll be developing the phaserunner program assuming a certain set of phaserunner specific hardware parameters (throttle + analog regen voltage mapping etc). So it will communicate and let you change parameters, but it's not really the right tool for the ASI's BAC2000 devices and will be increasingly less so as we further the development of it.

For what you are doing you definitely want to be using Bacdoor as you have been.

That said, have any others here with our pilot batch Phaserunner devices had a chance to try out this software and have any initial comments? Phaserunner software download and usage details are on this earlier post:
https://endless-sphere.com/forums/viewtopic.php?p=1133077#p1133077
 
justin_le said:
That said, have any others here with our pilot batch Phaserunner devices had a chance to try out this software and have any initial comments? Phaserunner software download and usage details are on this earlier post:
https://endless-sphere.com/forums/viewtopic.php?p=1133077#p1133077

I plan to give it a full review and comparison for my 80-100 motor... just as soon as I get my new motor shaft setup. My chain jumped, wrapped the sprocket mount bolts, and yanked on the shaft bending it nicely... up until that point the Phaserunner worked very well, except for occasionally cutting out under sudden load change with a full battery.
Even with that issue, Im very happy with it.
 
justin_le said:
Hey Bill and sorry to be late to chime in on this recent activity

No problem. I figured you guys were enjoying a holiday week.

justin_le said:
mrbill said:
1) How do I get throttle function over the voltage range I set in BACDoor and not as an on/off switch?

In your case you should definitely just connect your throttle to the throttle input pin and not the brake input pin, since you are running a system that can't even do regen anyways. I found also after posting this that getting all the throttle mapping settings with the BAC2000's using throttle wired to the brake was not always straightforward, so if you did want to have combined throttle+regen with the same signal (say on a DD hub motor system) then you would be better to parallel connect the pins and still have the throttle in source in BACdoor set as the throttle pin, and the analog brake input set as the brake in.

OK. Thanks for confirming my suspicion. I was going to try this next even if I hadn't heard from you or someone who had already been down this path.

I may move this controller over to my bike that runs either a mid-drive or a DD hub motor, and it's nice to know I can use the same wiring harness where Pins 6 and 7 are connected. There should be no harm in having regen activated on the mid-drive as there is no physical connection between motor and wheel when the bike is moving forward. And, when walking the bike backward there should be no regen braking since the throttle signal is at 1.0v, higher than the 0.8v threshold where regen starts.

You may wish to update the BAC2000 Controller CA3 Schematic PDF document to show the wiring change and also to show TTL TX connected to Pin 3, not Pin 4.

justin_le said:
mrbill said:
2) How do I get the BAC2000 to release the motor and allow it to spin passively at low speed when the system is idle but powered so that I can walk the bike backward? (Since this is a mid-drive, the bike can be walked forward without any resistance due to the rear wheel freewheel mechanism.)

That's odd, with the throttle off the controllers don't allow any current flow through the phases windings whether you are spinning it forwards or backwards. You are saying that if you unplug the controller and roll backwards there is substantially less drag than when the controller is plugged into the motor?

False alarm. I hate to admit it, but the resistance was due to the bungee cord I had preventing my crank from rotating forward or backward while testing. Doh!

justin_le said:
For what you are doing [tuning the BAC2000] you definitely want to be using Bacdoor as you have been.

OK.
 
OK, this is weird. I'm trying a new battery in my system - I've been using my PhaseRunner-9c with 12s LiPo or 16s LiFePO4, so 45-50 V, and now I have a 20s Li-ion pack. I figured, just change the "Rated System Voltage" parameter to something like 75 V instead of 50 V, and things would work, at least as a starting point to tune some other parameters.

However, when I do this, I get no throttle response at all. The throttle voltage reads correctly, and there are no faults indicated, but there's no torque or rotation. When I switch back to my LiFePO4 and reset the Rated System Voltage to 50 V, everything works fine.

Two really weird things: first, regen still seems to work; it's just forward throttle that gets no response. That is, when I propel myself with some combination of gravity and quads, I can brake to a stop with regen as expected. (I've separated the PhaseRunner's throttle and regen leads and connected a separate thumb throttle for variable regen.)

Second, motor discovery works fine. Rs and Ls measure the same as before, and the wheel spins up as it's supposed to and the hall sectors measure correctly.

I've also tried changing a couple other parameters (rated power, rated RPM) to scale them appropriately for the increase in voltage, but it doesn't make any difference.

I did this with a fully charged battery, so actual voltage is 82-83 V.

Any guesses about what could be going on here? I'm attaching my "working" XML file for the 50 V system.
 
Any guesses about what could be going on here? I'm attaching my "working" XML file for the 50 V system.

Hey Cyborg, I took your XML file and loaded it on my bench setup, then reverted things to match my hardware (sensorless, analog brake tied to throttle line, motor rated RPM, Rs, and Ls), and it still wouldn't run because the throttle off voltage was set to 0.7998, while my CA3 defaults to 1.000 volts so it effectively thinks that the device was powered on with the throttle signal voltage high and is waiting for that to drop below 0.7998 before it works. When I changed the throttle off voltage to 1.1V (higher than the CA3's min throttle out voltage), it then worked fine.

After that I changed the system voltage to 75V and it still worked fine and responded to the throttle as expected. So perhaps this has to do with your throttle off voltage settings being just on the hairline?
 
Thanks for running those tests, Justin. I tried changing some of these settings and no luck.

Thinking it's related to battery voltage, I cobbled together a variable supply by putting a 50 V 5 A Kingpan charger in series with my 50 V 20 A adjustable lab supply. Sure enough, the throttle response disappears above 60 V. No faults, no rebooting, or anything like that, just turn the voltage knob past the threshold and the response comes and goes.

So here's what I'm thinking - my unit was one of the first to ship, and it had the old BAC 500 firmware that had to be patched later. I applied the patch, but I'm wondering if there was a battery voltage limit that didn't get patched along with the scaling factors. I'm able to set the system voltage to whatever, and I don't get any faults related to this, but the battery voltage is definitely the deciding factor here.

Justin, is there a way for you to check this?

Other early adopters - have you used your (patched) early units with 60-plus V batteries?

Actually, input from anyone running a higher-voltage system would be welcome in helping to narrow down what's going on here.

Thanks!
 
cycborg said:
Other early adopters - have you used your (patched) early units with 60-plus V batteries?

Define early? I'm running 16S LiPo (67v HOTC). I've had mine since August 2015 and not done any firmware updates. It was still marked as an Experimental Product at the time, but from the length of the thread, I don't think it was all that early.


On a completely unrelated note, does "Positive Motoring Torque Ramp" do what it sound like? It sounds to me as if slowly and gradually increases the torque over the time you specify. I've set mine to 1000ms to reduce the sudden change in force to the clutch on my motor in hopes to extend its life. Will it do what I think it does?
 
Sunder said:
On a completely unrelated note, does "Positive Motoring Torque Ramp" do what it sound like? It sounds to me as if slowly and gradually increases the torque over the time you specify. I've set mine to 1000ms to reduce the sudden change in force to the clutch on my motor in hopes to extend its life. Will it do what I think it does?

Yes, that's exactly what it does, 1000mS means it will take 1 second to go from zero phase current to maximum phase current. However, if you are using a CA3, rather than connecting the throttle directly to the controller, it's much better to do this on the CA3's throttle output ramp rate. So if you wanted 1 second for zero to full torque, then leave the Phaserunner setting at a fast level (like 100-200mS) and set the CA3s output rate to 3 V/sec, which corresponds to 1 second to get from 1V to 4V, which is identical to going from 0 torque to max torque as the phaserunner takes the throttle signal voltage as a torque command.

If instead you have the ramping limit internal to the controller and not on the CA, then there will always be overshoot/undershoot oscillations when you use any of the CA3's speed/current/power limiting features, since the CA will be attempting to regulate the throttle output signal faster than the controller is responding to it.

Cyborg: Send me an email, I think your suspicions are quite plausible that somewhere internally the controller has the remnant of a 60V ceiling consistent with it having parameters for the bac500 hardware.
 
Sunder said:
cycborg said:
Other early adopters - have you used your (patched) early units with 60-plus V batteries?

Define early? I'm running 16S LiPo (67v HOTC). I've had mine since August 2015 and not done any firmware updates. It was still marked as an Experimental Product at the time, but from the length of the thread, I don't think it was all that early.

Sunder - thanks for chiming in. You probably have the correct firmware. Only units shipped between 23 July and 8 August needed the patch. Does your battery voltage measure correctly in BacDoor? If so, yours shipped with the correct firmware. Good to know that you're not having this problem at higher voltage - this means it's likely it's only that early batch, if I'm correct about the problem.

Justin - thanks for following up. E-mail sent.
 
justin_le said:
Yes, that's exactly what it does, 1000mS means it will take 1 second to go from zero phase current to maximum phase current. However, if you are using a CA3, rather than connecting the throttle directly to the controller, it's much better to do this on the CA3's throttle output ramp rate.

Thanks Justin. I don't have a CA3, but it sounds like I should.

cycborg said:
Sunder - thanks for chiming in. You probably have the correct firmware. Only units shipped between 23 July and 8 August needed the patch. Does your battery voltage measure correctly in BacDoor? If so, yours shipped with the correct firmware. Good to know that you're not having this problem at higher voltage - this means it's likely it's only that early batch, if I'm correct about the problem.

Ah, I got mine end of August, so missed it by a hair. Lady luck is on my side :)
 
justin_le said:
mrbill said:
1) How do I get throttle function over the voltage range I set in BACDoor and not as an on/off switch?

In your case you should definitely just connect your throttle to the throttle input pin and not the brake input pin, since you are running a system that can't even do regen anyways. I found also after posting this that getting all the throttle mapping settings with the BAC2000's using throttle wired to the brake was not always straightforward, so if you did want to have combined throttle+regen with the same signal (say on a DD hub motor system) then you would be better to parallel connect the pins and still have the throttle in source in BACdoor set as the throttle pin, and the analog brake input set as the brake in.

After running the throttle signal into both pins 6 and 7 (ebrake and throttle input) and setting Throttle sensor source to "0" instead of "1", the only change is that when I poll the throttle voltage, I see the actual throttle voltage from my Hall throttle displayed in the Throttle tab's Display pane next to "throttle voltage" (the same as "brake 1 voltage" observed in the Brake tab's Display pane), and I notice that torque is limited to a motor current of about 35A, which is lower than I observed earlier.

Controller behavior is otherwise unchanged: motor goes full RPM/full torque when advancing throttle voltage past 2.7v and remains pegged until throttle voltage decreases through 2.0v. There is no linearity, just full on and full off.

Are there any errors remaining in my XML file (attached below)?
 

Attachments

  • BMC600.M1.xml
    26.8 KB · Views: 165
mrbill said:
There is no linearity, just full on and full off.

Hey Bill, I'll have a look at the xml parameter file when I'm in the shop again tomorrow. But remember that if you are running the motor unloaded then it will always appear to be full on/off when you have a torque throttle, since it takes almost no torque to make the motor spin at full speed when there isn't a load. You only notice proportionality when you have a load on the motor and are propelling the bike. Also, when I said connect the to the BAC2000's throttle pin, I mean leave the ebrake input completely unplugged and only connect the throttle signal to throttle in line, don't short the two together, and then it is much more straightforward to map the throttle voltage ranges.

-Justin
 
justin_le said:
mrbill said:
There is no linearity, just full on and full off.

Hey Bill, I'll have a look at the xml parameter file when I'm in the shop again tomorrow. But remember that if you are running the motor unloaded then it will always appear to be full on/off when you have a torque throttle, since it takes almost no torque to make the motor spin at full speed when there isn't a load. You only notice proportionality when you have a load on the motor and are propelling the bike. Also, when I said connect the to the BAC2000's throttle pin, I mean leave the ebrake input completely unplugged and only connect the throttle signal to throttle in line, don't short the two together, and then it is much more straightforward to map the throttle voltage ranges.

-Justin

Hi Justin:

Thanks for taking a look.

Questions/comments:

1) If I remove the throttle signal from the e-brake input (pin 6) and leave it connected to the throttle input (pin 7), will I be able to transfer this wiring harness to a BAC2000 installation involving a DD hub motor and variable regen? Will I need to set the e-brake signal at pin 6 high or low with a separate switch to activate regen, or will my throttle input signal falling between 0.2v and 0.8v be sufficient?

2) I understand that the throttle functions in torque mode. But, currently it operates at only one torque corresponding to approximately 1300 watts drawn from the battery unless max motor RPM is reached. I can place a variable load on the motor, and when the motor spins up it draws about 100 watts, no load, at 6500 RPM, which is the expected max RPM for given system voltage. As I increase load on the motor the RPM remains remarkably stable until the load reaches 1300 watts, at which point the RPM declines quickly as load is increased further. This suggests one throttle setting.

3) I was able to draw 2000 watts earlier, yet now the system self-limits at 1300 watts. I did not intentionally set or reduce this limit, and I don't believe other user-entered limits and fault conditions were altered since then. Neither are the status code bitmaps helpful.

4) Why the latching behavior of the binary throttle, requiring passing above 2.7v to spin the motor and falling below 2.0v to stop the motor? Once the motor spins (with throttle voltage >2.7), motor behavior is as described in (2) regardless of throttle voltage. Changing throttle voltage does not change the final max. load on the motor. Will removing throttle signal from the e-brake input (pin 6) solve this problem?

5) BACDoor refers to "cutoff brake sensor source" and "regen brake sensor source" in the Brake tab under Peripheral Configuration. How shall I set these if I desire a regen brake?

6) BACDoor includes settings for "Engine brake", "Regen brake", and "Analogue brake". Are these referring to the same function?

Thanks.
 
I've been able to answer some of these questions myself. But, I need some help with the others.

mrbill said:
1) If I remove the throttle signal from the e-brake input (pin 6) and leave it connected to the throttle input (pin 7), will I be able to transfer this wiring harness to a BAC2000 installation involving a DD hub motor and variable regen? Will I need to set the e-brake signal at pin 6 high or low with a separate switch to activate regen, or will my throttle input signal falling between 0.2v and 0.8v be sufficient?

Apparently not.

I removed the throttle signal from pin 6, and now I get expected throttle behavior for forward power. But, I cannot get any regen, variable or not. Both eBrake signals under the "Brakes" tab ("Regen brake source" and "Cutoff brake source") have to be set to "eBrake 2", not "eBrake1" for throttle signal to spin the motor forward. Any other setting prevents motor from spinning forward.

One thing I haven't yet tried is to force eBrake input (pin 6, that is "brake 1 voltage") high to see if that turns on regen. I can attach a momentary SPST switch to this line, connecting pin 6 intermittently to a high voltage (5v), or to the throttle signal so brake 1 voltage can be adjusted downward through the programmed 0.8 to 0.1 volts with the throttle signal from the CAV3.

2) I understand that the throttle functions in torque mode. But, currently it operates at only one torque corresponding to approximately 1300 watts drawn from the battery unless max motor RPM is reached. I can place a variable load on the motor, and when the motor spins up it draws about 100 watts, no load, at 6500 RPM, which is the expected max RPM for given system voltage. As I increase load on the motor the RPM remains remarkably stable until the load reaches 1300 watts, at which point the RPM declines quickly as load is increased further. This suggests one throttle setting.

Removing throttle signal from pin 6 solved this problem. I now get normal torque throttle for forward power with the throttle signal on the throttle input (pin 7).

3) I was able to draw 2000 watts earlier, yet now the system self-limits at 1300 watts. I did not intentionally set or reduce this limit, and I don't believe other user-entered limits and fault conditions were altered since then. Neither are the status code bitmaps helpful.

This one is solved. Since removing the throttle signal from pin 6 and sending it only to pin 7 I can now get full power from the controller.

4) Why the latching behavior of the binary throttle, requiring passing above 2.7v to spin the motor and falling below 2.0v to stop the motor? Once the motor spins (with throttle voltage >2.7), motor behavior is as described in (2) regardless of throttle voltage. Changing throttle voltage does not change the final max. load on the motor. Will removing throttle signal from the e-brake input (pin 6) solve this problem?

This problem was solved by removing the throttle signal from pin 6 (eBrake) and sending it only to pin 7 (throttle).

5) BACDoor refers to "cutoff brake sensor source" and "regen brake sensor source" in the Brake tab under Peripheral Configuration. How shall I set these if I desire a regen brake?

Still an open question. With the throttle signal only at pin 7, both of these need to be set for "eBrake 2" for normal forward throttle to function.

Moreover, BACDoor refers to "eBrake 1" and "eBrake 2". eBrake 1 appears to be "brake 1" at pin 6, but which pin for eBrake 2? There are only two analog signal inputs listed in the wiring document, pin 6 for brake, pin 7 for throttle.

6) BACDoor includes settings for "Engine brake", "Regen brake", and "Analogue brake". Are these referring to the same function?

Still not sure if these terms refer to the same function, or if they are different functions.

One additional observation: When spinning up any motor (BMC600 or Nine Continents M3006RC), the motor makes as much noise as when spun by my Infineon-style controller. In particular, the M3006RC buzzes, growls, hums, and whirrs (depending on speed and load) with the same quality sound as with my Infineon controller. I thought these controllers were sine wave controllers that produced less motor noise. Is there a setting in BACDoor that sets the wave form for quiet motor running?

I have attached my XML file for my M3006RC motor.

Thanks.
 
mrbill said:
One additional observation: When spinning up any motor (BMC600 or Nine Continents M3006RC), the motor makes as much noise as when spun by my Infineon-style controller. In particular, the M3006RC buzzes, growls, hums, and whirrs (depending on speed and load) with the same quality sound as with my Infineon controller. I thought these controllers were sine wave controllers that produced less motor noise. Is there a setting in BACDoor that sets the wave form for quiet motor running.

They should run nice and smooth by default provided there are sane values for all the main parameters.

Did you ever get proper speed control going after sorting out throttle and ebrake signal wiring?
 
district9prawn said:
mrbill said:
One additional observation: When spinning up any motor (BMC600 or Nine Continents M3006RC), the motor makes as much noise as when spun by my Infineon-style controller. In particular, the M3006RC buzzes, growls, hums, and whirrs (depending on speed and load) with the same quality sound as with my Infineon controller. I thought these controllers were sine wave controllers that produced less motor noise. Is there a setting in BACDoor that sets the wave form for quiet motor running.

They should run nice and smooth by default provided there are sane values for all the main parameters.

Did you ever get proper speed control going after sorting out throttle and ebrake signal wiring?

Hi district9prawn:

The M3006RC (direct drive) motor runs on the ASI BAC2000 controller as smoothly with about the same amount of noise as on the Infineon, which makes me think it is producing a sharper waveform than sine wave. I expected less noise. Of course, before making this assessment I went through the autotune process, so I think the motor is running as smoothly as it is going to run, unless there is some hidden feature that allows one to adjust the harmonics of the waveform. I've set mine up with Hall start and sensor-less run.

I was not able to find a way to set the throttle mode to speed mode. Only torque mode appears to be available. But, after sorting out the throttle and e-brake signal wiring, the throttle does appear to adjust the maximum torque to be produced. I no longer get the "binary throttle" that I complained about earlier.

I still have questions about how to get variable regen braking to operate along with my other questions about inconsistent nomenclature in BACDoor and a mysterious "eBrake 2" line that has no input pin on the MX150 connector.
 
After experimenting more on my own yesterday I was able to get this controller running properly in torque throttle mode and confirmed for myself that variable regen was functioning as expected.

For starters, I returned the throttle signal to Pin 6 (eBrake 1 input) and removed the throttle signal from Pin 7 (throttle input). I'm not quite sure why I was unable to get proper operation earlier when I had the wiring thus, but I suspect that I had toggled one or more critical parameters in BACDoor since then.

In particular, I found that the following input selections must be set:

Throttle sensor source: 1 (brake1)
Regen brake source: 0 (brake 2) <-- if you are not using variable regen braking
Regen brake source: 1 (brake 1) <-- if you are using variable regen braking
Cutoff brake sensor source: 1 (brake2)

With the throttle signal coming from the brake 1 input (pin 6) you won't see the throttle voltage on the Throttle tab (Display Only pane, when polling), but you will see the throttle voltage on the Brakes tab (Display Only pane, when polling) under "brake 1 voltage".

Experimenters using the documentation provided by Justin would do well to use the information in this posting:

https://endless-sphere.com/forums/viewtopic.php?f=31&t=65031&start=375#p1079272

As I prefer building from a schematic rather than from a photo, I used the document Justin included in a later posting:

https://endless-sphere.com/forums/viewtopic.php?f=31&t=65031&start=425#p1087082

that had a couple of errors:

1) TTL TX is shown connected to Pin 4; should be connected to Pin 3.
2) 80k pull-up resistor is shown connected to Pin 5; should be connected to Pin 4.

I have multiple BMC600 motors,

http://mrbill.homeip.net/albums/mac_bmc_600w_motor/index.html

each with the Halls tuned for the Infineon family of controllers. I found that the BAC2000 could be tuned for one motor but be unable to run another, even though each motor ran fine on a given Infineon controller. I had to tune each motor individually for the BAC2000.

At the end of this posting I have attached XML files for a BMC600 and a Nine Continents NC-M3006RC that someone might find handy to use as a starting point. I recommend tuning your controller with your particular motor.

I've driven all of my motors on the workbench under load up to 2000+ watts (1200 watts for the NC), and the controller runs them without cutting out or otherwise showing any sign of distress or fault. I have also set the maximum current to 80 Amps to get an idea how the motor would run with the smaller Phaserunner controller. I'll have to do some on-the-road testing to confirm my suspicion that I could have used the Phaserunner to run my motors without any significant loss of performance.

Open questions:

1) On-road testing.

2) On which pin of the MX150 connector is "eBrake 2" or "brake 2"?

3) Are the terms "analogue brake", "regen brake", and "engine brake" as used in BACDoor interchangeable?

4) Motor noise. With either the BMC600 or NC-M3006RC, I hear motor noise. It may be quieter than when driven by the Infineon, but it is not silent. In particular the direct-drive NC-M3006RC growls in a similar fashion when driven by the Infineon at lower RPM when loaded. I'll have to assess this further when I do my on-road testing.

5) Can Grin or others give any advice/guidance with the setting of parameters under "Advanced Motor" (field weakening), such as when to use, how much, and the trade-offs?

Thanks.
 

Attachments

  • BMC600.M1.xml
    26.8 KB · Views: 96
  • M3006RC.xml
    26.8 KB · Views: 177
justin_le said:
With the torque throttle, no matter how fast you are going, the useful throttle range is still from 1V up to 4V, so all the CA's ramp and gain settings would need to be about 6X larger than you'd use with a standard infineon device in order to have the same effect.

Hi Justin:

Can you confirm that ALL gain settings (IntSGain, PSGain, DSGain, WGain, AGain, LoVGain) should be increased by a factor of six?

Do throttle out ramp settings need to be steepened similarly?

How did you arrive at the factor of six?

Thanks.
 
mrbill said:
Can you confirm that ALL gain settings (IntSGain, PSGain, DSGain, WGain, AGain, LoVGain) should be increased by a factor of six?

Ha, that's a great question. Proper answer is no, you should tweak these individually to give the desired performance with your setup, and in so doing you'll find that they are likely a fair bit higher than when you had a controller with a voltage/pwm throttle.

Do throttle out ramp settings need to be steepened similarly?
The fast ramp rate serves no purpose when you already have a torque throttle, since there is no longer any "dead zone" of throttle signal voltage that you need to sweep through before the throttle has an effect. But yes your other ramp rates will likely need to be a lot faster, like ~10 V/sec, which is equivalent to a ~300mS ramping rate from zero to max torque.

How did you arrive at the factor of six?

That was a little handwavy. I reasoned that for a motor with a pretty low winding resistance, the span of "active throttle" is only about 0.5V. So if you are crsuising at half of your unloaded motor speed, then the throttle has no effect until you reach ~2.5V. Then any throttle motion past this rapidly increases the motor power, and once the throttle signal is at 3.0V then the controller is at it's full battery current limit, so increasing further to 4.0V doesn't change anything. All of the CA's activity to regulate your speed/amps/watts etc. is confined to this 0.5V signal span.

Have a look at this image here when I tested the output of an our Grinfineon controller vs. throttle voltage to see what I mean.
20a_output_vs_throttle.gif


With a torque throttle like you have with the Phaserunner or BAC2000, it doesn't matter how fast you are going, the output throttle modulates the controller power over the full 1-4V range. So the CA's output needs to move by a full 3V in order to go from zero to max power, rather than the ~0.5V of a normal controller, ie a 6 fold increase.
 
Hi Justin:

Thanks for the explanation.

I'm using a throttle voltage range of 1.0 to 3.5 volts, a span of 2.5 volts.

After much trial and error I found the following:

fastRampThr => 0.0 Amps (to effectively disable it)
Ramp Up Rate => 5v/sec (a 5x increase from Infineon controller)
PSGain => 5v/mph (a 5x increase)
IntSGain => 400 (a 2x increase)
DSGain => 400 (a 2x increase)

The other gain parameters I left as they were, although I might tighten them a bit if I observe the controller hunts around the limit too long. I don't often hit max current, max watts, or minimum voltage.

But, I am left with a remaining problem:

The BAC2000 throttle sets motor torque, and the controller attempts to maintain that torque into the load. That's all well and fine. But, I'm running a crank-drive motor that feeds through the bike chain, a rather long chain connecting two ends of a bike frame that has some "spring", and the rear wheel cluster, the shifts presenting a changing load. The torque is constantly varying on this drivetrain.

Every time I shift to a higher gear, the drivetrain presents the motor with an instantly greater torque. The controller apparently senses this and dials back the power, but overshoots, then reapplies power, overshooting, but not as much. The cycle repeats two or three times over one or two seconds before it settles down, leading to much extra clunking and clanking in the motor to crank part of the drivetrain every time I shift gears on the rear cluster. Occasionally the torque feedback sets up an alarming resonance with my frame and does not settle down unless I interrupt it with the eBrake or by killing the power. I suspect the torque is going to zero momentarily as the controller tries to adapt to the changing load.

Even when cruising in one gear with my power set to a modest level of, say, 150 watts, if I ride over a bumpy section of road, my frame flexes just enough to cause the chain tension to vary. I can hear the motor/gearbox tone fluttering sourly at these times as it tries to compensate multiple times per second to maintain constant tension in the chain. The sound is disconcerting and irritating. (It took me a while to realize this was not a problem with the CA3's DSGain being too high nor BACDoor's Speed regulator Kp being too high.)

Have you or anyone else reading this thread used an ASI controller with torque throttle on a crank- or mid-drive installation that also goes through a rear wheel cluster (not a single-gear mid-drive), and if so, can you share how you overcame this problem?

I see two possible solutions:

1) Dial back the controller's torque or current feedback parameters until these variations are so slow and gradual that the spurious drivetrain noise is damped out. Does BACDoor allow the user to do this, and if so, what are the parameters to adjust?

2) Switch to PWM/voltage throttle mode and use the Infineon gain and ramp parameters.

On the latter option, I found under

Controller Debug -> Control Loops & Tuning tab

an entry for "Speed regulator mode". Setting it to "0" sets it to "speed" mode, although it appears to limit the throttle to a switch with two settings, "off" and "full speed", probably since I set other parameters in BACDoor (motor gear ratio and Vehicle speed limits) so that the controller is never constrained by any vehicle speed limits. I manage these with the CA3.

Nevertheless I pressed on testing with the full speed setting, and I can confirm that the motor runs much more smoothly through my drivetrain, albeit at higher power. There is much less clunking and clanking, even at higher power, because the controller isn't trying to adapt to a changing drivetrain load. I believe this will do what I expect but for the binary throttle behavior of this mode.

Is there a way to set an Infineon-style linear PWM/Voltage throttle mode using BACDoor?

Thanks.
 
Back
Top