Replies: 1 comment
-
Hi Mitch! I really need to get that documentation going for the powertables. Here's the current state of power tables. The basics first - It's a lookup table that's generated while you're riding in order to decrease seek times during large ERG target changes. After the change happens, a PID loop takes over. So, the manage powertable option first. Save and load saves and loads them to/from your phone. So if you swapped bikes, or used powermeter pedals you can save the different powertables. Mostly this is currently for testing. Export and import options are similar, but for transporting them in/out of the SmartSpin2k ecosystem. They are created as a .ptab extension, but really they're just .csv's . My end goal here is to be able to use a (static)powertable, coupled with a homed SmartSpin2k and a cadence sensor (only) and provide power output via table lookup and interpolation and extrapolation. Under the cover, 10,000' view. The powerTable is a matrix with 10 rows and 40 colums. Rows start at 60 Cadence and increment by 5rpm. Columns Start at 0 Watts and Increment by 30 watts. Anytime cadence is above 50rpm, if you get 3 consecutive power readings that are within a certain tolerance, the cadence, watts, and stepper motor position are averaged, the closest slot to that watt/cadence position is found, and the StepperPosition/100 is recorded in that slot (as well as the number of readings, which we use for a quality test). However before it's inserted into the table, a quality test is run to make sure the value aligns with it's neighbors. For instance, a value in the same cadence line to the left of where we're inserting (less watts, same cadence) should be lower than the reading we just took. If it's not, we downvote the quality of the neighbor that didn't test. A reading with a quality of zero gets removed from the table. Once we have a few readings with quality numbers over 3, we then attempt to load the saved powertable (if there's one saved in memory). We use the 3 positions to calculate an offset from the saved table(because previous to homing we didn't know exactly where the SmartSpin2k knob position was when it was turned on). Also, once we have more than 3 saved positions, we attempt to basically play sudoku and fill in the rest of the table using some logic. Interpolate between known numbers, extrapolate past known numbers, all the while testing neighbors to make sure the interpolation and extrapolation is somewhat sane. I'd absolutely love any contributions you would like to provide to this - I've been through a couple different iterations of power (lookup) tables now, and while this one is functional and works better better than the previous torque table, it still has it's flaws. Primarily in sampling I believe, although there needs to be work on interpolation and extrapolation. The code all currently lives in https://github.com/doudar/SmartSpin2k/blob/develop/src/ERG_Mode.cpp |
Beta Was this translation helpful? Give feedback.
-
I'm a recent - and very happy - owner of a SmartSpin2k! I'm trying to better understand how power tables work, hoping to improve the seek time in ERG (similar to #554). I guess my main question is that I don't see any description or docs on https://docs.smartspin2k.com/, so I am feeling a bit lost...
I have the latest companion app (Android 1.0.7) and firmware (24.12.8-develop). When I go to the Power Table page in the app while pedaling, I see seemingly random dots appear/disappear, and I'm struggling to understand it. It looks nothing like the nice power table screenshot here. In the app, I also don't understand the Manage Power Table options, including what save/load/export/import means, and if I save it, what should I name it?
Really excited about the feature development! 🙌 Thank you!
Beta Was this translation helpful? Give feedback.
All reactions