PDA

View Full Version : ABS and EPS for Segway




yosgof
06-04-2005, 08:30 AM
This is a follow up on the Fall off thread (http://www.segwaychat.com/forum/topic.asp?TOPIC_ID=11112) where Will said that: quote:It's like riding a horse, you are not considered a real equestrian until you have fallen off of your steed 7 times.

If you extend this logic then you are not be considered a real driver until you've crashed your first (or seventh) car, you are not be considered a real captain until you sunk your first ship and you are not be considered a real pilot until you crashed your first airplane. Right?

Well, jokes aside I don't think it has to be like that.

I've carefully read the various falling testimonies in that thread and they all have a common theme. One moment you are riding happily the next something happens, you lose control and you are on the floor with various bruises. This all happens suddenly, unexpectedly, very fast and quite violently. When the well tempered steed is suddenly misbehaving the good riders are completely ill equipped to react properly.

But this is not the only common denominator. People also report that in these accidents they usually have hit an obstacle or have lost traction on one wheel, either hitting a curb at an angle or hitting a pot hole with one wheel or riding on a surface where there is a difference in road conditions between the two wheels.

We all know and have been told so at the demos and Segway instruction manuals, that the Segway is perfect in maintaining forward stability. We've also been told that maintaining lateral stability is entirely our responsibility (leaning into turns, compensating for height variations). This assumes that both axes are completely independent. But is it really the case?

Well the good people who have already crashed, have a sound advice: keep your eyes on the road. But sometimes you want to look around, and some times you really have to (crowded places for one) so is this the real solution?

The car industry has been dealing with an identical problem for ages. A car is basically designed to go in straight lines. It accommodates turns but not as well. On turns it might skid so the road has to be prepped (elevated at an angle) and the velocity reduced. But even when traveling in straight lines there might be trouble. When braking wheels might lock up creating a spin or the car might hit an oil spot with one wheel or the car might go of the paved road on one side. All of these might cause a spin which results in loss of control and a potential crash.

So the car industry came up with a solution – prevent the car from spinning and skidding. They've come up with ABS, a system that measures the angular velocity (rate of turn) of each wheel and during breaking compensates for velocity variations. They've also come up with ESP (various names by various car manufacturers), a system that measures both the angular velocity of the wheels and the lateral acceleration (skid rate) of the body of the car and redistributes the torque between various wheels to compensate.

The introduction of these systems in cars has significantly increased the safety of the cars however it came at a painfully slow rate. The ABS system (first introduced by Mercedes) is an adaptation of the anti skid system which was originally developed for jet fighters. It had been around for about 40 years however initially the costs of introducing this system and ESP were prohibitive. These systems call for an incorporation of additional sensors, a central computerized controller and a significant change in the breaking system (ABS) and running gear (ESP).

(continued in next posting...)




yosgof
06-04-2005, 08:32 AM
The Segway comes equipped with everything necessary!

The Segway is designed under the assumption that when moving forward, the angular velocity (turn rate) of both wheels is identical (very much like a car). In order to make a turn a difference in turn rate is commanded by the hand bar controller and is applied to both motors. Other than that both wheels run at the same speed. When this assumption no longer holds (surprise, surprise) the HT starts behaving in an unpredicted manner usually resulting in a wild spin and sudden and complete loss of control.

Now, the people at LLC stress the fact that they have gone a great deal to insure the safety of the HT users, hence the HT price. But have they done enough?

As I explained above, loss of control results from either of two conditions, different speed of wheels (pot hole, hitting a curb at an angle) or different required speed (different wheel traction).

IMHO the Segway is well equipped to measure and compensate for both. The first condition results in a spin around the Yaw axis and this can be measured by the gyroscope center. The second condition results in a variation of coil current between the motors. This can also be measured.

Once detected, the HT can provide one of two safety devices.

The first one, similar to ABS would be an application of breaks to prevent loss of control. In Segway terms this is simple a safety shut down. Or very simply, if you start spinning (more than the calculated spin which results from the turning command if applied), you immediately stop.

The second one, similar to ESP is an application of wheel turn rate compensation. For example, when you run into a pot hole the wheel in the hole needs to travel a slightly larger distance in the same amount of time, so has to turn slightly faster. Thus when spin is detected the HT should try to compensate and counter it, and if it is beyond its ability to compensate should resort to a safety shutdown.

As I said before, in cars the introduction of such devices called for a significant redesign, in Segway its just software, the rest is already there!!!

Please let me know what you think and whether I should write to Segway LLC with this.


- Yossi
http://gallery.photo.net/photo/3365119-lg.jpg

X-man
06-04-2005, 10:13 AM
In over two years I have only "fallen" once and that was because I had a curiousity about whether the machine would cross a snow bank. It didn't! I slipped during dismount and went down on one knee.
Caution is a word well deserved when gliding.

Bob.

Where goeth I, goeth my Segway.

terryp
06-04-2005, 11:01 AM
I wouldn't be surprised to find that those algorithms are already incorporated to some extent. But there's a limit to the on-board computing power, so they may not go as far as they could. The systems have been used in cars long enough to have become well understood and optimized. But the Segway is nothing like a car.

As the algorithms increase in complexity, the required testing does too. Take the reported stalling problem with the Prius as an example. It probably happens under a very rare set of conditions that just didn't happen to occur during testing.

And remember, when the machine realizes it's lost control due to a particular manuever, it's too late for a safety shutdown to keep you from getting hurt.

Segway - What's holding you up?

Dragan
06-04-2005, 11:22 AM
Yossi, what you said is accurate, however there is one significant issue that you missed; a car is statically stable, a Segway isn't. By that I mean that in automotive terms, the cars ABS/EBS systems are predicated on that fact..they measure roll and yaw, with very little consideration for pitch, since with 4 wheels pitch is unaffected to any significant degree other than through the application of raw horsepower or in heavy braking. The Segway has three axis to measure and compensate for, with pitch being the most signifcant in terms of control (remember, lean forward, go forward, etc). Hence, the "dynamic stability".

When you lose traction on one or both wheels, the system continues to measure all three axis, and react to changes in them at 100 times a second. Let's say you become airborne for what ever reason; the wheels are both off the ground,the system is still reacting to platform angle changes as they always do, 100 times a second. In the fractions of a second that you may be truly "flying" your own body is gyrating around, trying to shift it's balance back and forth to keep you upright, the Segway is doing the same thing (albeit with much higher levels of fine control)trying to keep the platform level underneath you.

You touch down and the pitch angle of the platform is slightly nose low. The machine senses that you are in forward motion, accelerates the wheels to compensate, and without the friction of the wheels on the pavement, spins up very quickly. What happens? You may experience a loss of control since the wheels rate of rotation is higher than it would be if friction were present, and the Segway shoots off down the road. Platform angle with rear edge low would result in a sudden stop, or reversal of direction to the rear, with the same result...a fall.

In reality, I think the Segway has one of the most advanced ABS systems around. I'll grant you it's not engineered in a conventional fashion, but the Seg doesn't ahve much about it that's conventional. It doesn't HAVE brakes at all, when you think about it.
Wayne

Segway of Alberta - Calgary
www.mysegway.ca

ginger-it
06-04-2005, 12:47 PM
Yossi,
it is is very likely that LLC has chosen the best compromise for the control algorithms they could find to date given the physical limitations and the degrees of freedom they could sense (only tilting information with the gyroscopes). To further refine the system they could probably add automotive grade x-y acceleration sensors (which are part of an automotive ESP-system) to gather additional information about the segway's dynamic condition (horizontal skidding in any direction).

However from a look at the distance I have my doubts if this would add much safety performance to the segway as long as they already can sense the yaw rate and compare it with the motor speeds to identify a lost raction situation or any other deviation from standard like a pothole (which I am not sure about).

The basic problem of the seway is, that the system is indeed more complex than an automoble which is hardly ever affected by severe pitching speeds, more seldom by severe roll speeds but however quite frequently by significant yaw speeds. This intrinsic system complexity calls for a compromise in the control design not allowing to cope which each and every situation. This is something not easily could be attacked with brute computing power and sophisticated sensor assemblies but with dynamic situation interpretation and classification which is quite a severe challenge to do it in real time having to life with certain electronic and mechanic latencies of the system components (sensors, signal path, micro, power electronics, motors, gearbox, wheel).

For those reasons shutdown procedures are of no help to prevent any mishappening in a critical dynamic situation.

Michael

reduce to the max

yosgof
06-04-2005, 07:04 PM
Wayne,

Thank you for your response. I have a Masters degree in Electrical Engineering with specialization in inertial navigation systems. With more than 20 years of experience in avionics, navigation and radar system design I sure hope I got the details right else I’d be out of work now :D

Since I am not privy to insider information like you are, and since I did not yet receive my I180 (2 weeks left) my assessment of the HT’s behavior and design comes from the many posting of the people on this forum as well as some gliding done during the purchase. Before starting posting here however, I’ve read everything publicly available about the HT. So I fully understand that the Segway controller runs at 100Hz. However I also fully understand (first hand experience) that the controller emulates human responses at about the same response rate. This is done in order to make the HT feel like an “extension” of one’s body. And this rate is responsible for the initial wobbling everybody experiences when getting on an HT for the first time. The controller, acting at a “human like” rate resonates with our natural responses, hence the wobbling. In fact after a while in the demo I was able to reproduce the wobbling at will so I am pretty sure that’s the way its calibrated.

The point I was trying to make is that when people do fall, this control proves to be inadequate.

I used the car only as an analogy and I think you took it too literally. I should have probably said ABS-like and ESP-like features for the Segway. I fully realize that cars are statically stable and therefore much easier to implement a control system. I also fully realize that an F-16 jet is fully statically (aerodynamically) unstable and is only made dynamically stable through its flight control system (very much like the HT). However, no mater what the pilot does he can not fly an F-16 out of its safety envelope. The plane just doesn’t let him. Same should be for the HT.

Take you “flying” example for instance. Yes, when a Segway becomes airborne the wheels would still be turning according to the pitch but… the current they would be drawing is significantly smaller (no resistance) as compared to their normal operation. Surely this can be monitored. When the HT “lands” current becomes higher hence the indication.

Wheel rate measurement and the difference between wheels is another indicator. Yaw rate is yet another. As you know when the HT performs a yow movement some angular momentum exist and thus, through precession, the axes are no longer separated so some of the pitch actually becomes roll or yow (depending on applied forces) and this can also be measured and compensated.

What I am trying to say is that while the HT is very safe, it can be and should be made safer just at the edge of its envelop where right now thing become rough and sudden.

- Yossi
http://gallery.photo.net/photo/3365119-lg.jpg

yosgof
06-04-2005, 07:19 PM
Michael,

I agree with you about the complexity of the task however I believe it is achievable. The initial control is not too complex. This guy (http://www.tlb.org/scooter.html) has actually put together a Segway-like device and has his code listed.

Not too complex.

I am sure the actual Segway code is more complicated but judging by everything I could read so far it dos not cater for the effects I described in my initial posting.

And while you are right about the absence of accelerometers, there are two tilt sensors (working very much like our ears) and since the main problem people describe usually has to do with either, sudden yow, sudden tilt, or variations in traction, IMHO all the sensors are there to make some assessment of the cause and the control loop is fast enough to compensate.

You also might be right that an emergency shut down is not always the right thing to do but I think it might be a better thing than just spinning out of control.

- Yossi
http://gallery.photo.net/photo/3365119-lg.jpg

citivolus
06-04-2005, 11:30 PM
quote:Originally posted by yosgof
You also might be right that an emergency shut down is not always the right thing to do but I think it might be a better thing than just spinning out of control.

I'd wager that in the end, it turns out to be easier to defend a decision to have the machine shut down than it would be if the machine makes a more dramatic effort to recover and causes damage as a result. When you have pocket hunters looking to get fat at every possible misstep you need to be extra cautious or hope they get distracted by an ambulanche.

--
swiftly flying

Dragan
06-04-2005, 11:32 PM
Yossi,
No slight intended. I've spent 30+ years in the aviation industry as well, and tend to think fairly clearly in the three dimensions that the Seg operates in as well. I agree that while the proprietory code Segway uses is not overly complex in todays world, I think they also reached a point during the engineering and development phases where they had to freeze the design, go into production and adjust the programming as further issues were identified through real world use. I think there are a couple of examples; the e stand, and the timeout on the power assist mode come to mind, also the recall which addressed pushing the power reserve beyond anticipated limits.

I'm sure you're aware of the incident logging protocol in the system; that captures key data for the engineering group to analyze and evaluate the issues as they arise. Dealers are encouraged to let Segway LLC know about any such incidents experienced by themselves or customers. If warranted, the incident log will be downloaded to allow them to more closely examine what happened, and ultimately fix any problem that may have surfaced.

I suspect we'll see the small, steady, important revisions to the software continue unabated. The folks at Segway absolutely amaze me with their evaluation processes, and I'm sure they have some neat tricks up their sleeves to address these sorts of things. One thing I do know is they won't rush something out that may create another problem while fixing the one they set out to fix. they'll sore thumb it to death first, to make sure the cure isn't worse than the disease.
Wayne

Segway of Alberta - Calgary
www.mysegway.ca

Neelix
06-05-2005, 12:09 AM
I think that ultimately everyone needs to remember this basic fact:

The Segway cannot balance without the ability to put torque against the ground. As soon as anything impairs this ability, the movement of the unit becomes unpredictable and the machine shuts down in order to prevent even more serious injury to the rider.

-------------------------
Fear not, for even though I come from the Forbidden City, I surely do not agree with the rules.
Chris Knight

KSagal
06-05-2005, 01:25 AM
Man-o-man. So many smarter people than I speaking...

A couple observations.

1. Yossi, you may or may not be aware that emergency shutdown will happen if the machine feels it can, but I believe if I understand it correctly, it attempts to prolong it's ultimate power-down till the rider detects are released. It does this to prevent a shutdown in the middle of an intersection. I have never tested it, but I do recall reading of that feature. Surely, anyone that has had an emergency shutdown would attest to the fact that it is a several second process, with display changes, stick shake, and noise. The events that have been discussed here are likely to have a duration of considerably less time.

I did have an event when my machine was new, where I was transitioning from a paved driveway to a hilled grassy slope (up) but the relative angles were quite complex, and one wheel got hung up on the edge. I danced on one wheel for what seemed several seconds, but I would be surprised if it was any longer than 2 seconds. Most of that time was the machine compensating for my body pitching around while I was trying to wrestle it back under control...

This brings up the next point. My understanding on the whole segway goes airborne situation, either with one wheel or both, is that the largest issue to be dealt with is the very natural reaction that the rider has.

While the seg is clearly at a greatly reduced capacity to mechanically get done what it's processors would like done, the rider almost always adds significanty more complexity...

Face it, if you are going to go airborne, you are gliding relativly fast. A person is not likely to actually react faster than the segway to the new situation (People don't move 100 times a second) it is not difficult for a rider to react before the seg has had opportunity to recover.

It is likely impossible for a rider, who must trust the seg, and is purposely leaning forward, to percieve that the seg has lost traction and not lean back. Now, while in a state of compromised traction, the rider has shifted weight. Even a tiny adjustment, then the rider fighting his own instinct and correcting that action, would have a significant impact on the segs actions...

Again, this happens at speed, because the faster the seg is moving (The further from platform level) the more aggressively it attempts the recovery.

I have had to cross wet slick ice with out my studded tires (thanks Zorba) and have had several instances where one tire spins. The seg hates it, and reacts to recover, but it is manageable because I creep accross at only a mile or two per hour. The effect is that the platform is nearly level at the onset of the loss of traction, and the reaction is measured enough for me to satisfy the seg with my body movements... If I were going fast, I am convinced that I would not be able to change the platform angle with enough accuracy or speed to satisfy the processor of my seg...

I do regularly tell people that my scooter is smarter than I. (Even the student gets over on the master, occationally.)

Just my humble observations...

Karl Ian Sagal

Each road you travel should be just a bit better for having had you pass.

yosgof
06-05-2005, 06:13 PM
Karl,

It is you who are the wisest of us all (or is it prettiest – I’ll just go and ask the mirror) :D.

You said it – speed (sometimes) = trouble. So if in trouble reduce speed. This is probably the way the Segway should react when it “senses” hazardous conditions, and that is my point exactly. But can it really sense “hazard”. At present I am not sure it is designed to do that.

Most of the people replying to this post took the “LLC knows best” approach. And my point is “Sure they do but sure they can do one better”.

As long as people do manage to fall off (at very rare and improbable and unlikely conditions, absolutely because it was their fault, entirely due to their own clumsiness and because they were not watching the road and because the almighty himself was intervening against them) the good people at Segway should try to do more to prevent this and reduce the probability of such an event ever taking place.

If you remember, abut two decades ago the cars were in a similar condition. They were not considered too safe and would crash or cause an accident from time to time, but hey the chances of that happening were slim and everything that may have been done had already been done, right (bloody difficult language this English is [:I])? Until advances in technology started making them just a bit safer.

Now, if everybody else feels satisfied that such an effort does indeed continuously take place at LLC, I humbly stand corrected and entirely satisfied.


- Yossi
http://gallery.photo.net/photo/3365119-lg.jpg

Stan671
06-05-2005, 09:32 PM
As for the controller response rates, here is a quite from Segway's web site:quote:Each board contains a digital signal processor, monitoring the entire Segway HT system and checking 100 times per second for any faults or conditions that might require immediate response. It reads the information from the balance sensor assembly (BSA) to determine if the rider is leaning forward or backward, and instantly uses this information to deliver power from the batteries to the motors through a set of 12 high-power, high-voltage field-effect transistors (FETs). These calculations take place 100 times a second, and the motors are adjusted at up to 1,000 times per second, responding far more quickly than the human body is capable of perceiving.

quote:Originally posted by yosgof

loss of control results from either of two conditions, different speed of wheels (pot hole, hitting a curb at an angle) or different required speed (different wheel traction). IMHO the Segway is well equipped to measure and compensate for both. The first condition results in a spin around the Yaw axis and this can be measured by the gyroscope center. The second condition results in a variation of coil current between the motors. This can also be measured.I don't think it is quite that simple. One wheel going into a hole is quite different from one wheel going over a bump. In the first, there is a speed-up of the wheel (lessening of the torque required to drive the wheel) as it goes into the hole and a slow down of the wheel as it hits the wall on the other side to climb out (an increase in torque required to maintain the RPM's). Hitting a bump will just look like the second event above. A loss of traction will generally appear as a speed up of the wheel, similar to the effect of dropping into a hole.

Doug Field has confirmed here on another topic that when the Segway senses a hole or a bump, that it compensates for it by making up for the additional wheel rotation used to transverse the object. In other words, the Segway tries to keep the machine pointing in the same direction it was before it hit the obstacle.

quote:The first one, similar to ABS would be an application of breaks to prevent loss of control. In Segway terms this is simple a safety shut down. Or very simply, if you start spinning (more than the calculated spin which results from the turning command if applied), you immediately stopWhat you propose here sounds less sophisticated than what the Segway already does. It first tries to compensate for the event, probably because it assumes that it is a short term, transitional event that can be corrected for and everything will be fine. And this holds true in all but the most extreme events. It is only when the correction does not succeed and conditions worsen that it initiates a safety shutdown. You seem to be suggesting that the HT stop (and fall over) if anything other than smooth and flat ground is encountered.

quote:The second one, similar to ESP is an application of wheel turn rate compensation. For example, when you run into a pot hole the wheel in the hole needs to travel a slightly larger distance in the same amount of time, so has to turn slightly faster. Thus when spin is detected the HT should try to compensate and counter it, and if it is beyond its ability to compensate should resort to a safety shutdown.As I described above, Doug has confirmed this to be the case already.

The bottom line is that once you have ridden the HT for a while and encountered all kinds of bumps and holes and inclines and angles, you will be amazed at all of the stuff that they have programmed in there.

Stan Dobrowski

KSagal
06-05-2005, 11:24 PM
quote:Originally posted by yosgof

Karl,

It is you who are the wisest of us all (or is it prettiest – I’ll just go and ask the mirror) :D.

You said it – speed (sometimes) = trouble. So if in trouble reduce speed. This is probably the way the Segway should react when it “senses” hazardous conditions, and that is my point exactly. But can it really sense “hazard”. At present I am not sure it is designed to do that.


- Yossi
http://gallery.photo.net/photo/3365119-lg.jpg


The second paragraph is germane. I just like the first so I left it in.

Political differences aside, Stan has some good points.

The first and formost is that as you get several dozen gliding events under your belt, you will have a better working knowledge of what the seg does and how it reacts.

Part of the issue here is just communications. You are using the seg terms that you know and many people are working too hard to react to your specific words than your points...

You used the term 'emergency shutdown' but there are other conditions that the seg is capible of that you may not be aware of. There is a diagnostic condition that the seg can percieve and go into that it does indeed slow down and reduce it's operating parameters...

This is a condition that you will see soon enough when you get your machine. It is best observed by an experienced rider as a feel of lessened performance, but the machine will also display a flat mouth on "Blinky" instead of his smile. This condition, while riding, is caused by many possible situations. Inapropriate amperage draw from the batteries or uneven draw from the motors in a manner that the processor is not expecting are just a couple of the many faults...

Many riders notice this when the batteries are cold on a cold day, as the available acceleration speed up a hill may not be there as a for-instance... After the batteries warm up, this problem goes away, if there was no real other issue...

The machine is also able to go into a further reduced mode which is signaled by blinky actually frowning... Speed is further reduced, performance is further limited till what ever set it off is corrected.

These events can happen so quickly, that they come and go before the rider is fully aware of their existance.

Yossi may be right. There is more software improvement available. I have seen at least two software upgrades, and both were at least in part for better dealing with safety issues...

The new machines are 14.0. Can any of us really feel that we will not see v15.0? He is posting what he would like to see.

If he finds that some of what he wants is already there, what is the harm. If he spurs on a lurking software developer to greater things, that is good also...

I am confident that as impressed as he was when he decided to buy, he will be more so after he learns just what that thing he bought and will get in the next few weeks is actually capible of...

Karl Ian Sagal

Each road you travel should be just a bit better for having had you pass.