XR-like SURGE Benefits/Discussion/Feature Request

Hey I want to bring up something that I miss from FM boards that I feel really give a degree of confidence/safety/and consistency to a ride. (Lots of text coming!)

Problem description

Ashton: Everyone is familiar with XR’s surge, and if you really push your board you know what riding surge is. Now surge imo was put in the programming as a “oh shit the nose is dipping give it all the beans so the rider doesnt eat shit, and keep giving the beans until the setpoint is reached again” but even though that may have been its main purpose, its secondary purpose to me evolved into a way to see “how much power do I have available right now?” If you are crusing at 18mph and you push the nose down on the XR, you will go into surge, and the amount of that surge feeling is a very good indication of how much more you can push the board beyond what you are doing right now. FO example, at 12 mph if you push into surge you get a pretty hefty nose up lift meaning you can push that same amount back and still be safe, if you do the same at 20mph the surge is there but much less forceful, meaning you are approaching the limit of your torque and you can only push it a little bit more. I use this technique on FM boards all the time to gauge how much more I can push it and it works really well. Also, while riding in surge you can be gauranteed that the power output wont change, the board is giving everythign its got during surge and it will not suddenly reduce or increase power output. thats there the “consistency” part comes into play.

How does VESC balance behavior work?

Ashton: The power output is mostly linearly proportional to the angle of the board. you can make this less linear by using booster but the booster response is also linear its just at a steeper angle.

Dado: Power output is highly non-linear due to the integral component. It may only feel near-linear at low speeds for the first second or so. And let’s keep booster out of this, booster is practically irrelevant at high speeds

Ashton: What this results in ride wise is no way to really know how much bpower the board has available unless you actually stuff the nose into the ground, for me this means I have a feeling of less confidence because im never easily able to be aware of the power reserves of the board, and also the nose always feels dippy all the time reducing confidence and consistency in the boards ride.

When you combine that linear response with the heavily filtered imu, I even suspect that the vesc sometimes will reduce power on you while fang/nose dragging due to pitch measurement errors. I have felt this before while fang dragging and having the board decelerate under you while you are requesting max power is def not confidence inspiring.

Ashton: So i think FM really got it right with SURGE.
Dado: it’s easy af to nosedive with an XR, almost impossible on a VESC… just saying… I would actually argue that at higher speeds FM’s last-ditch attempt at giving you surge could even be the cause of nosedives? But I’m just speculating…

Requested Feature

Ashton: What I would love to see is a surge setting, with options for the nose angle at which to apply it, and it would boost power output to the max setting you have input, and hold that power output until the board is nearly level again, or setpoint is reached (not sure which would be preferable).
Dado: Several problems with the request as you formulated it. #1 this isn’t at all how surge works on the XR, #2 This feature you request is basically already available - set booster to 10 degrees, ramp 3-4 and 100A and you will never be able to do a nosedrag again… but who would want that?

Ashton: Here are some graphs showing the power flow between the two boards. Black is as the nose is dipping, and red is as you are returning to level.

Dado: I believe these graphs are oversimplified and therefore misleading for this discussion. When I get a chance I will try to produce better graphs, but maybe it’s better to just ignore them for now…

2 Likes

In short, I do like the idea and benefits of the surge behavior in the FM boards. However, this a very complex topic - I wish you had separated the problem description from your interpretation of how the board works because there are several flaws in it.

In order to have a proper discussion we need to separate facts from assumptions. I agree with your description of how the FM boards feel. But there’s a lot more nuance to how this is achieved internally and also the graphs are very misleading imho.

I’m gonna try and update the post accordingly (will turn it into a wiki to allow anyone to edit)

1 Like

Ok awesome! I did indeed make many assumptions. The graphs I know are not going to be precise, but mainly wanted to illustrate in an obvious way how surge feels vs nose angle on XR vs the vesc. I did ignore the I term because I didn’t feel like it factors into the surge discussion, and my graphs have no defined time axis anyway.

Again my main want out of this surge is to provide an area in the power curve that is consistent and reliable in its power delivery. Instead of power changing with pitch through the entire range, There would be a certain pitch that after you cross, you get full power, which makes that pitch “territory” so to say very predictable. You always know you will get full power and nothing less once you hit that angle. With predictability comes trust and confidence. That’s what I’m after, not as an anti nosedive feature, or something like that.

In fact, I do have booster set precisely as you state, but the booster stops boosting when you get back to its start setpoint, unlike surge which keeps going until you get level again. and booster doesn’t give you the full board power, its just a steeper power/pitch curve so as you come back up in pitch the power output is dropping. (afaik anyway)

my main question is what problem you are trying to solve. Are you trying to figure out the VESC limits at high speeds? Or are you talking also about low speeds? I’ve personally only experienced surge on the XR at low speeds going uphill. Never at higher speeds so I cannot speak to its benefits there.

but personally I feel zero need for VESCs to tell you where the limits are on uphills. VESC uphill behavior is so much superior to FM uphill behavior that it’s not even funny. I have little interest in coming up with a feature for that scenario

VESC behavior at speed however, I’d be game to come up with better ways of telling you how close you are to the limit.

1 Like

I’ve learned to be able to trust that the XR board is going to give me full power all the time after a certain nose down attitude. For me it breeds confidence the board wont reduce power while I’m asking for full power which I have experienced during vesc fang/nose drags.

Basically I still find the vesc a bit inconsistent (nose changing angles, power output dropping) in its behavior at the extremes of acceleration where surge would come into play on an XR. Having a consistent full power output after a certain point I believe will provide more consistent behavior at the limits, and increase confidence in the boards capability at that limit.

This is definitely a specific use case for surge, and may be hard to understand the benefits in the feel of it if you don’t typically ride surge or fang drag at speeds on an XR. I only realized its benefits after doing so for such a long time on the XR then switching to vesc and noticed the benefits of the surge from this point of view once I didn’t have it anymore.

I don’t feel like you responded at all to my question.

If you feel that the VESC nose response is inconsistent then this is THE ONLY problem we should be discussing.

A new behavior (surging) would definitely not fix this, just make inconsistent behavior even more unpredictable

Im running out of ways to explain. When I fang drag on a vesc I can feel power inconsistencies probably due to pitch measurement errors. Surging would mask those inconsistencies by delivering full power after a certain pitch, and not relenting until the board was level again. This would provide a constant power during maneuvers like a fang drag and riding surge. providing more consistency and the board wouldn’t feel like its reducing power when I’m demanding full power out of it.

Another way to put it: When do you ever get full power of out of a vesc? is it at 10 deg pitch? 15? 20? variable based on tune? Or does it constantly give more power the lower the nose goes? Having a pitch limit set for surge to happen would give you a known pitch that full power is applied and you could trust full power would stay applied until you got level again. So pitch variations while fang dragging would have no effect on the power output, again, providing ride consistency. Nothing is sketchier to me than the board speeding up or slowing down under me when a pitch change hasn’t specifically commanded it. Surging would take the control of power delivery away from the pitch input once you pass that pitch threshold.

A possible way to implement this would be a modified booster that applies the full booster amps (no more and no less, so booster amps becomes the total amps) at the start angle, and that boost wouldn’t turn off until level or setpoint is reached again. (possibly a stop angle that must be shallower than the start angle)

Lol, I could say the same :slight_smile:

I totally understand what you’re saying, but I’m pretty sure that most of your assumptions here are wrong which makes this discussion very difficult and frustrating. What you perceive as constant power is probably not constant at all. With constant power balancing would be completely impossible. Balancing requires rapid changes in power all the time.

Nosedrags are a fringe corner case that cannot be used to draw conclusions on how the board should behave when balancing

isn’t that what booster does? or has my understanding of this been incorrect for the past year?

yes, booster can indeed be configured to do almost exactly what Ashton is asking for right there. However, I’m pretty sure that his requested feature isn’t going to fix the underlying problem he is trying to solve…

1 Like

I love this post so much. Thanks for posting @atlowshop, this is what this forum is all about for me. When the XR surge was introduced (early in the XR lifecycle), a bunch of people regularly complained on the fb groups that it was dangerous, scary and made them feel unsafe compared the plus or the earliest versions of XR firmware. But my experience was that it saved me numerous times when I was pushing a little too hard and let the nose get a bit too low as I tried to accelerate at top speeds, tech or uphill. While everyone else seemed to hate the surge at the time, I absolutely loved it and was grateful that it would help save me from a nosedive (always on trail, never on street or trying to nosedrag) when I pushed a little too hard. At that time the surge was new and novel to everyone. I felt it was misunderstood and was genuinely very concerned they would try to remove this new feature that I loved from the firmware because so many people were complaining about it and saying it was unsafe.

Fast forward a year or two later, and riders like Neil and Austen emerged, and made it their mission to get really proficient at finding and riding the absolute limit of the XR. Neil and Austen would always talk about riding the surge and ‘living life on the surge’. They were the first people I rode with that were constantly seeking to ‘ride the surge’. They weren’t doing it because they liked the feel of the surge itself, but rather because it let them physically feel the top end limits of the board (mostly the top end speeds on flats, I was used to riding more technical stuff than where they rode). And over time they got better at ‘riding the surge’ than anyone else and became two of the fastest riders because of it.

I think what Ashton is getting at here is a great point. The XR surge and even pushback at any speed are not just a feature of the board’s measurable performance, they are a way for the board to communicate with the rider. These subtle features in the firmware provide the rider with better real time feel of where we are on the powercurve, particularly as you near the limits. So @surfdado there is no specific problem being solved here, I think just a desire to implement better board feel for the rider. I know this can be done with heads up display, audio, or other things to tell you exactly what speed or duty cycle you are at, but that seems like a lot to manage mentally when also trying to navigate obstacles and changes in terrain at top speeds, as well as constantly evaluating the line where you should just bail and focus on how to minimize impact/injury as you come off. There is something to be said for the ability to physically feel the limits of the board with your feet and body. And as a software developer, the idea that board was communicating with me in real time using pushback and later with surge, and that I was able to receive that information without words and learn to use it, was absolutely fascinating to me. I’ve never talked about it much with anyone but the two way communication between the board and rider without any text, images or audio was one of the most interesting things about the onewheel to me as I learned to ride it.

On the GT, the limits are higher and I have not pushed it to the limit as much as I have the XR, but I will say I have found the feel on the GT shaping to be different than the XR surge. I pushed it the hardest I have so far on some of the hole shots in practice at RFTR this year and I found that when I got close to pushing to a nosedive, instead of the XR like surge, it seemed to kind of lock the nose in at a new setpoint (very close to the ground, but not touching, also was a slight downslope) for around 3-5 seconds. I became balanced at that nose way down setpoint (not trying to push the nose down more, but not really trying to let off either) for what seemed like a long time. The nose seemed locked in that position, hovering just about the ground and accelerating as fast as it could. It felt good because it held that position and accelerated very quickly, and eventually I was able to ease the tail back down. But it definitely felt like I had less control than with the XR surge. For a few seconds I felt like I could not lower the tail if I wanted to (I think I definitely did at first haha) and it felt very stiff and locked into that position. That is not something I want to test regularly and will probably not feel that again until race time, but that feeling of riding the limit of the GT (without nosedragging) was very unique and has stuck out in my mind ever since.

So in summary, I think a surge like feature enabling more physical board feel for the rider (specifically to be able to feel something as you approach duty cycle limits), is worthwhile. Some or most riders may not want it, which is the beauty of VESC. But I do think some trail riders will definitely appreciate something like this and use it to ride near the limits of the board (regardless of how fast that is) more confidently and safely. In theory it could also save a rider that may be slightly off balance and accidentally too nose heavy with that extra punch to bring the nose up earlier than on a more linear curve. It did for me in the early days of XR. I get it would make nosedrags nearly impossible and maybe you have different modes for that. Also maybe heads up or audio alerts are just as good, I have never tried using either.

Riley Johnson and @NicoAleman might be good to talk to about this and potentially test it. Austen and Neil could also provide some valuable input on how this might best be implemented, but neither really ride VESC yet. I will talk to them about it.

1 Like

If you see my very first reply - I’m all on board with adding surge-like behavior. I think I already understand the intent and the benefits but would like to learn more…

However, I am pretty sure it will not help Ashton with his issue judging by how he describes his VESC board behavior.

To make this discussion as productive as possible, the info that helps the most is if you provide as much detail as you can about how FM surge behavior is perceived by the rider and how it helps in different situations.
But let’s stay away from discussions about how FM may be achieving this or suggestions for how to implement this on a VESC - that’s not helping very much.

Now even once we have a clear agreement of how it appears to behave on FM boards we should take one step back and ask ourselves exactly which part of that behavior we want in our VESCs and more importantly, why we want it. Some of the benefits of surge may be achievable by other means, but we will never know that if we keep insisting on implementing surge rather than just describing what the ultimate objective is.

Yes, we can add surge to VESC and we possibly will - but the beauty of what we have with VESC is that we can probably also do better than surge, whatever that may be, as long as we approach the problem with an open mind.

2 Likes

Understood. Definitely have an open mind to what might be better and need to try heads up and audio alerts. Love this discussion, and will dive deeper. I think a surge similar to the graph in the op makes sense and in theory would be a nice feature for trail riding.

What a neat conversation. I wonder if there are benefits to initiating the boost current based on an additional input. Surge on the XR could be connected to the motor performance so that the motor surges only when you are pushing a certain torque/current threshold. I think this would give you more of a feel for the limits of the motor than the booster as is.

I also wonder if booster can be initiated based on the rate of nose dip instead of just angle. So if you are riding with the motor above the torque threshold, you would only have to dip the nose quick and short to get a bit of boost.

Or perhaps there is a curve for initiation angle compared to torque threshold. At lower torque you require more nose angle to boost. At high torque you can boost with less angle.

This makes me really excited because this is one of the things I love about ATR. It gives me a better sense of the motor torque; how hard the motor is pushing; what roll resistance is my tire is receiving from the terrain.

1 Like

It’s definitely more-so related to the board’s performance / limits than just nose angle like the graph implies. I want to take more time to think about the best way to even try implementing something like this before just tossing in whatever idea first comes to mind, especially with the difficulty of properly testing something like this.

But in general, I’d expect you would want it to kick in specifically when your battery or motor current spikes above a certain threshold relative to their max values, or duty cycle surpasses a certain mark. And at that point basically kick in an extremely aggressive booster (max motor current?) until the nose kicks up closer to setpoint. Hard to say how that kind of approach would work / feel until actually trying it. I’m very comfortable and familiar with FM surge myself, so I look forward to experimenting with it and plan to.

But like Dado said, it’s also important to go into things with a bigger picture mindset, think of how surge benefits us, and think if there’s any potential better way to achieve that result. For this case, maybe surge as-is IS the best tool for the job. I personally can’t think of a better way to handle it currently. But still good to practice approaching things with that mindset nonetheless.

1 Like

Here is a more formalized request. I would test this myself but I am still trying to get qt creator working. I set up using windows though so I will try ubuntu next.

Request: Provide a strong acceleration when pushing the board beyond a certain angle only when the motor is at high torque/current (>50-80%?).

Reason: Currently, there is little feedback when the board is nearing its torque limit without add-ons like a buzzer or metr pro. It is up to the rider to have the right feel for the motor by noticing lack of acceleration. If boost were to only engage when the motor is at high current this would give the rider readily available feedback by quickly dipping the nose to see if it surges. An adjustable torque limit can be used to preserve the boost as it exist now.

Possible Implementation:

		// Current Limiting!
		float current_limit;
		if (d->braking) {
			current_limit = d->mc_current_min * (1 + 0.6 * fabsf(d->torqueresponse_interpolated / 10));
		}
		else {
			current_limit = d->mc_current_max * (1 + 0.6 * fabsf(d->torqueresponse_interpolated / 10));
		}
	if (d->abs_proportional > booster_angle) && (d->atr_filtered_current > (current_limit * 0.7) {	
			if (d->abs_proportional - booster_angle < booster_ramp) {
					booster_current *= SIGN(true_proportional) *
							((d->abs_proportional - booster_angle) / booster_ramp);
				} else {
					booster_current *= SIGN(true_proportional);
				}
			}
			else {
				booster_current = 0;
			}

Yeah the more I think about it the FM surge is most likely duty cycle based. The FM version is most noticeable on uphills and when accelerating hard on flats. It does not seem to be based on dip/pitch decline. Would you agree @NicoAleman ?

I’m also trying to think about this in a way where the goal is not to just replicate what FM did. I spoke with @surfdado on the phone for awhile about this and he mentioned that he thought that if a surge feature were to be implemented, it should not apply to uphill climbing. I think I agree. So first qualifying threshold to enter surge state should be that the nose is below level? Actually maybe 3-5 degrees below level, as you would not want the board to ever surge when you are going fast near level/setpoint?

I originally was thinking this should be triggered by dip/pitch decline rate, as @izzy said, over the last X ms. If the dip rate (decline/time) exceeds a threshold, enter surge state until the dip rate is reversed or at least slowed, or a timeout is exceeded. I don’t think a surge needs to be much more than 1 second? Or maybe just stop evaluating dip rate and surge for the same interval every time? I would think that would be easier.

But yeah the more I think about the FM surge behavior, I would have to guess it is duty cycle based. It can be controllably triggered and tested by accelerating to near nosedive, I think above 5mph or so. It is easier to feel it going up a significant hill. Nosedrags are a great way to feel and test the surge as well :slight_smile: Just based on memory, it definitely feels duty cycle based and not based on dip/pitch change rate.

So please pardon my ignorance with regard to how the firmware and existing ATR features work and are structured. I have yet to dive into the code. In theory a surge could just be triggered by nose down pitch and a duty cycle spike to a predetermined threshold, say 85-90%? I also like the idea of a curve based on duty cycle and pitch. The lower the nose, the lower duty cycle threshold required to trigger the surge/boost. That makes sense to me. If you are nosedragging, you will be in almost constant surge state, which seems to be close to how the FM surge works.

I also don’t know anything about the booster feature. How does that work?

@surfdado also suggested a completely different method of alerting the rider, such as a vibration of the motor, as they are nearing the limits of the board. This is interesting because he said that could be more efficient and essentially current/amp neutral, so you could do this without using and requiring more power. So the rider will feel a vibration instead of an acceleration surge as they approach duty cycle limits. This is interesting and would be cool to test, but I think part of the utility of the surge is also to help the rider rebalance before they get to nosedive conditions. Especially when the nose is way down. I know the FM surge has helped me rebalance when I am too nose heavy and Austen and Neil say that it has saved them countless times. The vibration could be a really nice feature at top speeds when the board is near level and you are approaching duty cycle limits. And the surge would not apply in those conditions.

Best to wait till you can build your own code. Just install a virtual machine and it’ll compile super easily. Your change is flawed for multiple reasons so it really is best if you can do trial and error yourself without having us in the loop…

I have 2 6s LiPo packs coming in today to create a low-voltage testboard for this. Should be testing my surge behavior this weekend… (at 24Volts instead of 60V+ so should be right around 10mph when I hit 90%+)

3 Likes