gemellocattivo.com

Which means "Evil Twin". Lets see your projects where you change boring into fun or create the fun from scratch.
It is currently Thu Mar 28, 2024 12:48 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: Traction Control
PostPosted: Mon Dec 19, 2016 2:12 pm 
Offline

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
mk e wrote:
I think I have something that works pretty well on the rev limiter.


Working well except when the rpm is right at the trigger of the soft rev which is below the control point then the the rpm is ok but the system state is ocsillating and the throttle is bouncing around as a result.

I need to define the state better


Top
 Profile Send private message  
 
 Post subject: Re: Traction Control
PostPosted: Mon Dec 19, 2016 2:47 pm 
Offline

Joined: Sun Oct 11, 2015 2:07 pm
Posts: 134
I would keep soft-limit and hard-limit separate.

Soft limit would be the speed PID control which is technically always engaged (but when speed error is negative it increases max TPS to 100%).

Hard limit trips at an RPM above the limit RPM, and disengages at an RPM below the RPM it trips at, and doesn't affect the throttle control at all.


I would derive throttle control state from taking the min/max of the requestors, instead of using the state to calculate the request. I tried the other way (determining state, then determining request) and it would not have worked if I had more requestors and the requestors overlapped in RPM region. In my case, idle was ~500RPM below CVT engagement and over-rev was purely spark (but CVT would never let it get that high).

_________________
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

"Any sufficiently advanced technology is indistinguishable from magic" ~Arthur C. Clarke


Top
 Profile Send private message  
 
 Post subject: Re: Traction Control
PostPosted: Mon Dec 19, 2016 3:10 pm 
Offline

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
The way I have it configured the hard limit is not really used by the throttle with than to cvalculate a control tartget poin tbetween the hard and soft limits......but that is not the same as saying it doesn't affect the throttle position.

RPM crosses soft limit and throttlte rev controller becomes active......but if the throttle is open a lot then it will not be able to grab control before the hard stop is hit, and becasue the hard stop is hit the PID control reacts more slowly than it otherwise would, That is managable though.

The bigger problem is need a band to control within. I defined is between the soft and hard limits, Iput it 3/4 of the way to the hard limit. Without a range it is in/out of the rev control without ever gettting control. It can bounce on the bottom but that doesn't really matter becasue Iset the PID to start with a throttle position that is about what is needed for that lower point...so state can bounce, the controller will try to open the throttle to get to target, but that makes user position less than control position and kicks out of rev control....but its above the soft limit and as soon as it kicks out the control position resets making it below the user poition and around and around we go.

The problem is just when the user opens the throttle enough to get to get the engine to the soft limit but not above the control point. I think what I need to do is keep system out off soft limit when that happens.


Top
 Profile Send private message  
 
 Post subject: Re: Traction Control
PostPosted: Mon Dec 19, 2016 3:23 pm 
Offline

Joined: Sun Oct 11, 2015 2:07 pm
Posts: 134
I would leave the soft PID always 'enabled', and setting the max TPS (so the lower of overrev and driver is taken).

Then normally, the error will be negative, so the P term will calculate some really high TPS (way over 100%), I will be limited to 100%, and D will be all over the place. If you add them up you will get a number well over 100% and all will be good (no over-rev intervention in TPS command).

As you start to approach the rev limit rapidly, the P term will settle down to a low number, I will still be 100% and then the D will be very negative, so you end up with a max TPS which is less than 100% (depending on how far away you are, the P term, and how fast you're approaching it, the D term). This should slow it down as it approaches the limit, but only if you're approaching the limit rapidly. Think of the D term as calculating how long it will be before you reach the limit.

The P,D terms would not be limited at all, they could calculate big numbers. The I term would be limited to 0-100%, and the sum of the three would be limited to 0-100%. I term would be initialized to 100%.

I would probably add some additional calculation to guarantee that the over-rev target speed is at least ~500 RPM above the idle speed target. This prevents them from interacting in bad ways, e.g. if you start to slip at 2MPH and it calculates a 900RPM rev limit for traction control.

_________________
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

"Any sufficiently advanced technology is indistinguishable from magic" ~Arthur C. Clarke


Top
 Profile Send private message  
 
 Post subject: Re: Traction Control
PostPosted: Mon Dec 19, 2016 3:50 pm 
Offline

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
I thought about that but accelerating in first gear gets you to redline pretty fast and you don't want to be rolling out of the throttle as you approach the shift point.

Also it doesn't seem to be able to go from hitting the limits to grabing control anywhere near fast enough...even when you approach gently the controller is so far away it doesn't recover in time. This is what I was fixing with presetting the PID wiht an about right throttle posiotn as the rpm crossed into the control range.


Top
 Profile Send private message  
 
 Post subject: Re: Traction Control
PostPosted: Tue Dec 20, 2016 9:42 am 
Offline

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
apalrd wrote:

I would probably add some additional calculation to guarantee that the over-rev target speed is at least ~500 RPM above the idle speed target. This prevents them from interacting in bad ways, e.g. if you start to slip at 2MPH and it calculates a 900RPM rev limit for traction control.


Maybe.

The way its coded the idle stae conditions are checked before TC or Rev so is those conditions are met it really wouldn't matter what TC or Rev wanted to do...but stopping the user from entering BS numbers is never a bad idea.

I've been pondering in a bit more.....idle works cleanly becasue when it has control of the throttle it has control of the throttle and I think the only way to make the rev controller/state stable is to give the rev controller control and let it do as it pleases for at least short amount of time so it can overshoot the user position. I might play with that a bit.


Top
 Profile Send private message  
 
 Post subject: Re: Traction Control
PostPosted: Tue Dec 20, 2016 12:20 pm 
Offline

Joined: Thu Jan 01, 2015 6:47 pm
Posts: 4251
Ok, the throttle rev limiter is working pretty well, at least on the simulator.

I made the function a subtraction a subtraction only. Then it acts on the lower of a TPS preset or actual throttle position. The preset needs to be TPS high enough to get get the engine to redline in the current gear. It the preset is too high you can get a a little unsteadyness if the driver moves the pedal around in the dead band between where the controller wants it and the set point. If the set point it too low it will bounce off the soft limit setting.

So it's always safe, but works better when you tune it properly.

I guess theTPS preset should be tied to go up/down as a funtion of baro....or it will be mistuned if you drive up pikes peak.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group