I just did a re-test of the current TechWorks ECS M03 software in AutoMode and found out that the earlier numbers I quoted about it's performance were not correct... so just to be accurate here's the new numbers:
What I originally said:
--------------------
The TechWorks M03 controller can read the accelerometer every .0094 seconds- rounding up to 0.01 seconds , ie the controller can process about 100 new g force readings every second.
What the new tests show:
----------------------------
The TechWorks M03 controller can read the accelerometer & execute one pass thru the control loop every .0054 seconds (yup it's faster ), which means the controller can actually get 184 new g force readings every second.
Which means this for the summary now:
-------------------------------------------
Techworks controller takes 0.154 secs (not 0.2 secs as originally stated) to detect & complete the transition of struts in a braking situation
Mitsu controller takes 0.5 secs to detect & complete the transition of the struts in braking situation (according to mitsu specs)
Which means the Techworks controller is over 3 times more responsive than the Mitsu OEM ECS controller in AutoMode for a braking maneuver.
p.s.
I guess I did some loop optimizations in the production code l had forgotten about that weren't in the original test code. For you coding geeks out there - what I did to capture the control loop processing performance was to add somesimple timing & print code to the bottom of the control loop for the testing - it calculates the time in milliseconds to do 10,000 control loop executions:
p.s.s. -fyi when in manual mode & reading the accelerometer is not needed - the time for a single pass thru the main control loop only takes 0.0001 secs (0.1 msecs)
/////////////////////////////////////////////////////////////////////////////////////
//
// main loop
//
/////////////////////////////////////////////////////////////////////////////////////
void loop()
{//
// Check for updates to the state of the Controller Mode
//
myController.readSwitch();
switch(myController.mode()){
case(MANUAL):
if(logMode) doLogMode(LOG_ACCELEROMETER,0,0);
setManualStrutTargets();
setStruts();
break;
case(AUTO):
readAccelerometerValues();
setAccelerometerTargets();
setAutoStrutTargets();
setStruts();
break;
}
//
// display current state of Sport-Tour lights
//
setLoopTourSportLights();
//*************************
// Process loop Timing Calculation
//*************************
if (loopCount ==0 ){
loopStartTime = millis();
loopCount = 1;
}else if (loopCount >= 10000){
// Calculate the elapsed time
loopEndTime = millis();
loopElapsedTime = loopEndTime - loopStartTime;
// Print the Results
Serial.print(F("Elasped Time For 10000 loops= "));
Serial.println(loopElapsedTime);
// Reset the counter
loopCount = 0;
}else loopCount++;
}
Bookmarks