-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iMagic + Zwift | Powercalibration and -curve #30
Comments
Please refer to Resistance mode and The FortiusANT's powercurve as well as the comment in usbTrainer.py from line 185 Getting a good algorithm for a trainer (see Grade2Resistance() ) is the trick of a good trainer. Of course we want to believe all that the iFlow, iMagic and Fortius miss is the ANT-interface but the software in the trainer and the trainer itself have evolved as well. The Fortius is able to work with a negative power (driving the wheel when going down); does the iMagic do that as well? |
The implementation of Resistance2Power() and Power2Resistance() has been done according the formula's as provided by GoldenCheetah and match the formula's used for Fortius. I have seen TotalReverse's formula's but have chosen the current implementation; you might experiment here and I am curious for your experiences. |
Perhaps it's an idea to use ZWIFT in Erg-mode (where the training demands x Watt and the required power is sent to FortiusANT). This uses the technical code ZWIFT -> FortiusANT -> iMagic and back but eliminates the Grade2Resistance() code, which may be argued. As soon as you are confident that the ERG-mode works, the basis is set and then the Grade-mode can be studied. I developed the software in this sequence (starting with Trainer Road and then ZWIFT) and also now it seems a good approach since the GradeMode uses the ERGmode. |
Note the conclusion on the powercurve page |
No imagic can do this. But the rolling resistance is reduced to a minimum, even much less than the value when the brake is not connected to 220V power. |
In addition to other recommendations, you can also use the manual mode (-m flag) so you can set the power yourself. |
I saw this in the totalreverse wiki a few days ago too. FortiusANT/pythoncode/usbTrainer.py Line 139 in 05e1f5b
This could explain why you always feel a resistance, even when going downhill. |
I have reviewed code again today, I'm pretty much convinced that the answer to the question must be found in Grade2Resistance() |
I read the messages above too quikly... |
A value of 0x00 is much easier than just power off. |
Zwift can be either; grade when riding a track and power when doing a structured training |
A suggestion for a test-case: modify usbTrainer.py
So the resistance that is set is always equal to the power required modify FortiusANT.py
So the required power is +/- 10 Watt (steps of 1 would be tedious to go from 0...250) Start FortiusANT with the -m flag, so you set the required power with the Up/Down buttons. Calibration
It will give insight in the behaviour of your equipment. Results |
Values at low speeds are large. error, it’s hard to provide such a low speed. |
When I write in the Wiki "0x80 is 'neutral' ", than I mean, that this is the default force of the eddy current brake in a static magnetic field. To reduce the the default ("neutral") resistance you have to actively compensate the static magnetic field with an electromagnetic field. I did not deeply analyzed the Flow/iMagic trainers, but typically an electromagnetic field is "amplified" with a metal core, which has a saturation. So it doesn't make sense to further increase the electromagnetic field, if your metal core has achieved its saturation. You may wanna have a look at this paper (page 59,60) |
@totalreverse : Thank you for the explanations. |
Please provide some more details on the test you performed. This may result that you ride at a certain Grade (uphill), Cadence and Power with a WheelSpeed of 30km/hr - but that is irrelevant. Zwift does not use your reported Speed but calculates the displayed speed using your Power (see here). |
I watched the speed in the program. |
Well... If ZWIFT or TrainerRoad required 100Watt and ANT-message is sent to FortiusANT, the resistance is set and the Power is returned.
In the examples above xxxx is a too High resistance because the resulting power is higher than the requested power; yyyy is too low and zzzz is exactly right. xxxx,yyyy,zzzz result from the formula's as described before For calibration, please create such a table And do the test for some sets of speed (10 kmh, 20 kmh, 30 kmh, 40 kmh). |
TargetPower - in Zwift or in Fortius Antifier? |
I would calibrate without Zwift, use the -m flag when starting FortiusANT so that you can set the TargetPower manually, using the headset. The TargetPower and calculated Resistance are displayed by FortiusANT. The CurrentPower and Speed are displayed by FortiusANT, resulting from your riding. Use your powermeter to measure the real power. This results in the table as suggested before
I assume that the power returned by iMagic and displayed by FortiusANT matches the target-power. That must be the case as soon as the formula's are right. |
I did just that and cited the results above. |
I'm confused :( |
I understand that. Where are you from? Like to know just for curiosity. Please describe some more:
Most likely the test you did is OK, please describe how the test was executed. I see your post (now above this one) and will write an instruction |
Start FortiusANT with command "FortiusAnt.py -g -a -m" Push the down button, TargetPower will go to 50 Watt Start cycling and maintain speed at 20km/hr Then push the UpButton to increment TargetPower to 100Watt and repeat If done, a table as following is expected
Succes! It's a pleasure doing the calibration with you :-) |
PS. I expect Resistance to be a value between 30...226 |
I'm from Ukraine.
I did this and can change the load multiple of 10
I also did this action |
Welcome Ukraine! Please "sign" the curiosity-page Yes, looks good. With this modification, the following table is expected
Succes! |
Thanks. Now in sufficient detail :)
I will give a report immediately when the system is used with your help. |
Top! |
Is speed 20 km / h important? |
If you take more measurements, it gives a better view Good work, keep going! |
Thanks a lot to you two for doing this calibration work! 😃 |
I go back to this post. It cannot be the Resistance set in the trainer, because the max value is 0xff (one byte) So please provide more details. |
This is the power in watts displayed in the Fortius Antifier. |
😀you wrote it😉 |
Don't worry, write a Test-description and a nice measurement table and then we go on. RIDE ON👍 |
1 column - resistance in the Fortius Antifier. |
Looking at the table the value is somewhere 40...220. |
I have seen the magnificent work you have performed yesterday and will study asap |
Thanks again for the test; please evaluate Power calibrated with power meter (iMagic) |
Great job. I am glad that you have calculated a function that satisfies all the data from the test. |
The inverse functioneren is also needs; will see to find some time for that |
P2R and R2P both implemented. I'm curioous whether it works. |
IMagic + Zwift PowerMeter + Garmin It is very similar, except for 300+ watts, there FortiusANT overstates by almost 100 watts. I replaced the Tacx training tire with a wider one for roads, maybe the resistance constant has changed. Cadence in zwift is invalid because i did not connect the sensor. I watched the brake: Slope -5% - resistance on break 100 (somewhere such a load was on the plain) |
Reaction 1; the powercurve Overall not bad for the first 1:1 comparison iMagic/FortiusANT versus POwermeter :-) |
Reaction 2; the powercurve. The powercurve is the headache for simple developers as we are (we are not trainer-builder-specialists). Clearly Antifier struggled with it and so we do. Looking at your tests, I assume yur ftp will be above the default of 200Watt; so specify -f 312 (of course using your real ftp). The applied force is relative to this ftp. The resistance uphill +20% is 150% of your ftp and the resistance downhill -20% is 100% of your ftp (at different cadences). And if you do not like the idea of the powercurve as implemented but prefer formula 1,2 or 4, adjust the code where option=3 is the default, but 1,2,4 are permitted. Option4 is the most scientifical approach. Succes! Now the real study begins: "How to build a realistic trainer for grade mode"! |
I can not understand the relationship between my ftp and break resistance at different slopes. In the Tacx Fortius program for each slope its own constant break resistance. |
You are absolutely right; there should be no relation. Note two elements: Therefore additional measures need to be taken so that the trainer remains operational and within your limits. Indeed; this causes the Fortius to behave somewhat like an ergo-trainer and I'm convinced that this kind of challenges have brough Tacx to develop the direct-drive trainers. To study this subject, modify FortiusANT as follows and add factor =1 before the code (Px = P * factor) so that the mathematic formula is unadjusted Please let me know how that goes for you. |
https://www.strava.com/activities/1420773244/analysis In any case, with a slope of 0%, the resistance should be much lower. |
May be, this is the advantage of open source: feel free to experiment. |
Thank you, I will experiment. |
Hi @yegorvin how are you? Curious to hear from you! |
@yegorvin traing and publishing on strava |
IMagic + Zwift
PowerMeter + Garmin
Сurrent issues:
From totalreverse wiki:
But the value 0x80 does not match the gradient 0%. This is approximately a slope of 3-4%.
0x25 .. 0x35 = 0%.
This is all according to my feelings.
Originally posted by @yegorvin in #11 (comment)
The text was updated successfully, but these errors were encountered: