output scheduling resolution

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14761
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: output scheduling resolution

Post by AndreyB »

Finally the single-timer "hybrid" scheduler is ready: http://rusefi.com/articles/pwm_performance/hybrid.logicdata

Not sure how to apply proper statistics to this logic analyzer report, but worst jitter I see in the log is 5us.

Image
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3779
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: output scheduling resolution

Post by kb1gtt »

I think we should discuss how we want to measure this timing accuracy. For example 1mS is probably reasonably close to the min pulse you would want for many applications so this would be 1mS +/- 5uS? Also if we look for .1 degree accuracy the max rpm with a 5uS tick would be 3.3krpm. I get that like this. tick/5x10^-6s x 1rotation/3600deg x 60s/min = 3.3tick-krpm or if we aim for .2deg that changes to 6.6krpm. As well we should include some margin for xtal ppm variations.

Does it make sense to measure timed signals based on a 1mS and rotation based signals on max rpm?
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14761
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: output scheduling resolution

Post by AndreyB »

By the way, in the beta version of their software Saleae has added CSV data export - here is the same report as CSV http://rusefi.com/articles/pwm_performance/2014may13.csv

That should allow some processing in Excel or above. StdDev? Average? Not sure. Good question. I guess we really need to know our constraints in order to answer the measurement methodology question.

Can we afford a single instance of 1 degree jitter per minute @ 6K? I guess it's all about knock.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
UnaClocker
Posts: 46
Joined: Tue May 13, 2014 12:14 am
Location: Tacoma, WA

Re: output scheduling resolution

Post by UnaClocker »

1 degree isn't a big deal, besides the fact that you should be tuned more than 1 degree away from knock, knock at 6k isn't going to damage anything. It's lower RPM knock that has the time to do damage. What kind of injector resolution are you looking at? I believe the original MS1 had a really grainy 100µsec on it's batch fire injection. Which was good enough. I think their current setup is doing 1µsec per sequential injector. Have you guys got sequential yet?
Brian from Tacoma, WA
84 Dodge Rampage
01 PT Cruiser
User avatar
AndreyB
Site Admin
Posts: 14761
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: output scheduling resolution

Post by AndreyB »

So far I was under an impression that ignition timing is way more important than fuel injection duration or timing precision, but that's the same scheduler anyway for both. Same ~1uS precision for injector/coil on event and ~1uS precision for injector/coil off event. With up to ~5uS jitter, at least with the current testing methodology.

So unless anyone objects let's declare that we are in a good enough place right now?

We have sequential already, that's one of the few things we have from day 1.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
UnaClocker
Posts: 46
Joined: Tue May 13, 2014 12:14 am
Location: Tacoma, WA

Re: output scheduling resolution

Post by UnaClocker »

heh, fuel is way more important than spark advance. You can be way off on spark advance and never notice, whereas if you're running crazy large injectors, at idle, you need every bit of resolution you can get to keep it from oscillating. But yeah, sounds like you've got this.
Brian from Tacoma, WA
84 Dodge Rampage
01 PT Cruiser
User avatar
kb1gtt
contributor
contributor
Posts: 3779
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: output scheduling resolution

Post by kb1gtt »

am I correct in saying there are three specs we want for comparison. Time around 1mS +/- blah and best crank angle resolution at 6krpm also at 1krpm. Many engines only rev to 6km so why not use that as the baseline. As well idle is often around 1krpm perhaps down to 500 rpm but basically most engines can do 1krpm. So why not use that as the baseline. Other rpm's can be my noted but let's establish a baseline for consistency sake.

That said what are acceptable limits for those three specs? Would 1mS +/- .1mS be good enough? What range would be ok, then good and what is the max that would be useful? Then at 6krpm what degree accuracy is ok, good, best? Then again for 1krpm ok, good, best?

As it stands now we are 1mS +/- .or .005mS 6krpm, .182 deg and 1krpm is .030 deg. There will be some more induced error based on xtal ppm but not much.

6krpm is 2.7778x10^-5 sec/deg. So 5x10^-6 sec is .182 deg per tick.
1krpm is 1.6668x10^-4 sec/deg. So 5x10^-6 sec is .030 deg per tick.

Are these specs ok, good or best categories?
Welcome to the friendlier side of internet crazy :)
User avatar
kb1gtt
contributor
contributor
Posts: 3779
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: output scheduling resolution

Post by kb1gtt »

Hmmm, we should probably also add a graph or something like that that shows the crank angle accuracy vs RPM. Basically any time you are above that .2 degree accuracy, you may want to know it such that you can compensate for it in tuning. As it stands now, the accuracy up to 6k is below .2 degree so it's not really important for people to think about. However if you rev to 9kRPM, you might want to pay attention to the detonation barrier and might want to retard the timing a pinch more to compensate for the tolerance.
Welcome to the friendlier side of internet crazy :)
User avatar
mobyfab
Posts: 141
Joined: Tue Oct 29, 2013 10:09 am
Location: Le Mans, France

Re: output scheduling resolution

Post by mobyfab »

RPM vs tick rate, giving the precision:

https://jsfiddle.net/X64Rb/8

It's in JS so feel free to modify calculations or add more values.

You can also export to images.
Last edited by mobyfab on Sun Feb 19, 2017 8:01 pm, edited 1 time in total.
User avatar
AndreyB
Site Admin
Posts: 14761
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: output scheduling resolution

Post by AndreyB »

Thank you for the script and the great link!
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Nobody
Posts: 98
Joined: Wed May 28, 2014 9:12 pm

Re: output scheduling resolution

Post by Nobody »

UnaClocker wrote:heh, fuel is way more important than spark advance. You can be way off on spark advance and never notice, whereas if you're running crazy large injectors, at idle, you need every bit of resolution you can get to keep it from oscillating. But yeah, sounds like you've got this.
Both are important... On my car 2* of advance is the difference between knock/detonation and fine, fuel as long as your not ragged lean it will be a little more tolerant. Fuel quality of course throws both statements out the window if bad.

As far as really large injectors it's the characterization that's critical:
* injector offset vs. voltage (offset is delta between open and close time)
* injector flow vs. pressure (you flow more when under high vacuum).
* short pulse adder - this is adder to calculated open pulse width, in which you compensate for non-linear region.

There is more with injectors but I'll leave it at this.

As far as timing, any timing vs. IAT and ECT?
Post Reply