Intermittent speed flag on Cycle Analyst

rickT

1 mW
Joined
Jul 15, 2018
Messages
12
I have a V3 Cycle Analyst with V4 Baserunner_Z9 running an SX1 front hub motor, 48 V battery. 12 pole PAS only, no throttle. The Baserunner settings are the default just downloaded again from Grin. It all works fine except that riding uphill at 10 to 12 mph with 500 to 700 W power the motor surges. On the diagnostic screen I see that the S (speed) flag is flashing on with the surges, every few seconds. I do not see this happening at lower speeds (6-8 mph on the same hill at same power), nor at high speed (20-25 mph on flatter roads). Grin recommended checking the max speed setting at the Baserunner (it is set at 99), and to check the speed settings and gains on the CA, which are listed below:

Max speed = 28 mph
Start speed = 0
Max no pedal = 99
Regen disabled
PSGain = 2.01 V/mph
IntSGain = 100
DSGain = 600

The max speed should be OK, and I tried upping it to 500 with no change. Can anyone please advise if the other settings look right, and recommend any tweaks?
 
rickT said:
I have a V3 Cycle Analyst with V4 Baserunner_Z9 running an SX1 front hub motor, 48 V battery. 12 pole PAS only, no throttle. The Baserunner settings are the default just downloaded again from Grin. It all works fine except that riding uphill at 10 to 12 mph with 500 to 700 W power the motor surges. On the diagnostic screen I see that the S (speed) flag is flashing on with the surges, every few seconds. I do not see this happening at lower speeds (6-8 mph on the same hill at same power), nor at high speed (20-25 mph on flatter roads). Grin recommended checking the max speed setting at the Baserunner (it is set at 99), and to check the speed settings and gains on the CA, which are listed below:

Max speed = 28 mph
Start speed = 0
Max no pedal = 99
Regen disabled
PSGain = 2.01 V/mph
IntSGain = 100
DSGain = 600

The max speed should be OK, and I tried upping it to 500 with no change. Can anyone please advise if the other settings look right, and recommend any tweaks?

I think the first step is to try increasing DSGain to see if it smooths out. If not, put it back and try decreasing PSGain. You may need to try a combo of DSGain and PSGain adjustments to get rid of the surging.
 
E-HP said:
I think the first step is to try increasing DSGain to see if it smooths out. If not, put it back and try decreasing PSGain. You may need to try a combo of DSGain and PSGain adjustments to get rid of the surging.

I tried increasing DSGain, up to 1500 by steps, no change. Then tried decreasing PSGain, down to 1 by steps, also no change. Maybe these are not the problem?

Rolling along at the same sort of speed, 10 to 12 mph, on flat ground I am not seeing the problem. It is only when powered up going uphill that the S flag flashes. Could it be something in the motor that faults when loaded? I have tried watching the speed reading also, but that does not seem to flicker. I assume the display reading is smoothed.
 
Is the speed sensor one of the motor halls?

If it is, then uphill it takes more motor current, which can cause more noise induced from phase wires into hall wires. This can show up as noise in the speed signal, which can be picked up by the CA as spurious speed bursts, as it counts more pulses than are actually there. (it can also happen to controllers and cause incorrect motor drive timing).

You can disconnect the speed sensor wire from the CA temporarily to test if it is indeed something in the speed signal that is causing the S flag to set (that's normally the only thing that could).

If this is happening, the best fix is to use a separate frame-mounted speed sensor with a magnet on the spokes/etc., but if that's not desirable or doable, you can try adding a small capacitor (perhaps 0.1uF or less) at the speed sensor connector on the CA end of the cable to try to absorb the noise (but this will also affect the controller's hall signal and may cause undesired motor operation). It would be better to try isolating the hall signal wires from the phases by moving them to a separate cable, and/or adding a shield around them and grounding that (only at the controller end).

If you're already using that method, then the above doesn't apply, and I don't know why it would be happening (unless the speed sensor cable is paralleled with the phase wire cable and having the same noise induction problem).
 
amberwolf said:
Is the speed sensor one of the motor halls?

If it is, then uphill it takes more motor current, which can cause more noise induced from phase wires into hall wires. This can show up as noise in the speed signal, which can be picked up by the CA as spurious speed bursts, as it counts more pulses than are actually there. (it can also happen to controllers and cause incorrect motor drive timing).

You can disconnect the speed sensor wire from the CA temporarily to test if it is indeed something in the speed signal that is causing the S flag to set (that's normally the only thing that could).

If this is happening, the best fix is to use a separate frame-mounted speed sensor with a magnet on the spokes/etc., but if that's not desirable or doable, you can try adding a small capacitor (perhaps 0.1uF or less) at the speed sensor connector on the CA end of the cable to try to absorb the noise (but this will also affect the controller's hall signal and may cause undesired motor operation). It would be better to try isolating the hall signal wires from the phases by moving them to a separate cable, and/or adding a shield around them and grounding that (only at the controller end).

If you're already using that method, then the above doesn't apply, and I don't know why it would be happening (unless the speed sensor cable is paralleled with the phase wire cable and having the same noise induction problem).
Thank you. The motor is a Shengyi SX1 from Grin. I do not know if the speed sensor is one of the halls. Per Grin:
"Combined Speed and Temperature Sensor: These motors were custom made with a combined speed + thermistor signal on the white wire of the Z910 motor cable. When paired with our Baserunner_Z9 controllers and a CA3-WP device this gives both bicycle speed readings and motor temperature readout with no extra wiring. The built-in temperature sensing means you never have to worry about overheating the motor on long hill climbs, it can automatically rollback power to stay in a safe zone."
Could this combined function be the cause?
All the parts for this setup are from Grin, as one of their kits. I purchased the motor first to have it built into a wheel, then the rest of the kit parts came in another order. Due to this separate ordering my Baserunner was not preloaded with the motor parameters, but I loaded them via the programming cable and the motor is working fine in other respects. All cabling is also standard Grin parts. I am a noob at this, and was expecting the kit level to be a safe way to go.
 
rickT said:
Thank you. The motor is a Shengyi SX1 from Grin. I do not know if the speed sensor is one of the halls.
I think that one has a separate speed sensor that uses separate magnets on the inside of the motor shell near the axle...but it still runs parallel to the phase wires inside the same cable, so if this wire and it's ground is not shielded it could be vulnerable to induced noise under high enough phase currents. If the motor is using the Grin-specific cabling that has a shield around all the non-phase wires, then it is probably not induced noise.

Just for curiosity...does the problem change if phase currents are lower / higher? (lower should reduce the problem, higher should increase it) Meaning, higher motor loading vs lower motor loading? (problem should be worse the lower the motor speed with the higher the load is).


Could this combined function be the cause?
I don't know, but I doubt it. AFAICR, it works by changing the amplitude of the speed signal with the temperature sensor...I am unable just now to envision a way that could cause excess pulses in the speed signal (I can see how it could cause lost pulses under certain conditions, but that would not trigger the speed flag). But if the multiplexed signal is more vulnerable to noise induced in it, it could be related.

IIRC, for this wiring scenario, the BR actually gets the multiplexed signal, then sends on just the demultiplexed / repeated speed signal to the CA. If the BR is doing filtering on the signal or is actually generating it's own copy of the signal to send to the CA, then it shouldn't get any induced phase noise sent to the CA, unless that noise is really bad to start with.
 
amberwolf said:
Just for curiosity...does the problem change if phase currents are lower / higher? (lower should reduce the problem, higher should increase it) Meaning, higher motor loading vs lower motor loading? (problem should be worse the lower the motor speed with the higher the load is).
It is very consistent at this mid speed around 10 to 12 mph. I have not seen it happen going up the same hill at slower speed of 6-8 mph at the same 600 W power (I pedal easier). Very odd.
 
Hayley at Grin tech support sent the fix. I changed the DS Gain to zero and the S flag has stopped turning on, except at the max limit where it is supposed to. I think this is because the signal is noisy as amberwolf says. Noise looks like a high rate of speed change, and sets off the differential limit. With DSGain = 0, only proportional and integral feedback is being used. The bike rides fine now. Thanks all for the help.
 
I was having this same problem with a generic 'ol direct drive (46 magnet, 23 polepair) motor where I had tied the white wire into the blue wire (hall sensor) to get speed pulses. I was definitely getting that same "S" limit error on the CA causing power fluctuations. I made the same edit on the CA to put dsgain down to zero and I no longer get the power flailing near the top end of the speed.

However, the speedo *does* get a bit wonky still. The PR shows a proper 83km/h reading from its stats/diagnostics page, but once I hit about 70kmph the cycleanalyst gets confused and starts blinking the kmph letters and starts showing something closer to around 40kmph, which is very much wrong.

I suspect, as amberwolf pointed out, that the wiring is unshielded and getting interference. I was considering rewiring this with a proper L10 connector anyway, so I'll likely just chase that down.
 
Last edited:
I think that one has a separate speed sensor that uses separate magnets on the inside of the motor shell near the axle...but it still runs parallel to the phase wires inside the same cable, so if this wire and it's ground is not shielded it could be vulnerable to induced noise under high enough phase currents. If the motor is using the Grin-specific cabling that has a shield around all the non-phase wires, then it is probably not induced noise.

thats very interesting to consider, I have bought an L1019 cable from grin which has shielding around the smaller wires, and I remember thinking what is that about??

Then the L10 connectors ive got on Ali Express that are more generic, don't have the shielding.
 
Back
Top