stancecoke said:
casainho said:
Ok, I will wait to see If I get that issue.
You wrote, that you already have that issue???
And now, even if I quickly stop pedaling doing no force, the signal don't go to minimal voltage...
And now, even if I quickly stop pedaling doing no force, the signal don't go to minimal voltage...
The issues of being communicating by writing messages and on a different language

I don't think I have the issue you had. I wanted to say that looking at that image, when I did very quickly stop to pedal, the signal never went to min value, probably because the capacitor got charged -- just to point out the effect of RC filter.
stancecoke said:
If you use a mean value or the difference of max and min value for calculating the current-target makes no difference I think. With averagaring you get less scatter of course.
I will skip that filter, because even if the throttle/torque sensor signals scatter, there are after other delays like the PWM duty_cycle ramps that I think act as another low pass filters on the system. But I will need more tests to understand the final result
stancecoke said:
casainho said:
There you use the sumtorque that is the filtered value a divide for PAS (cadence), to follow the mechanical power= torque * rpm??
You are right!

Remember that the PAS value in the code represents a time value and is reciprocal to the cadence.
My intuition says that the torque signal is already the mechanical power and so no need to calc mechanical power= torque * rpm.
Not that I am experienced but, on a climb when cyclists reduces gears and increase the cadence, they also reduce the instantaneous torque done on each stroke. So they reduce the instantaneous torque of each stroke but they increase the number of strokes, meaning the average value of the torque may keep constant (sure, depends if they want to keep the same torque or increase. I don't know why do this balance but maybe to have less torque ripple, as on a climb the wheel speed will be reduced and so the cadence also, which would result in less strokes but stronger, so more ripple).
So, back to mechanical power= torque * rpm, I think the torque sensor with the RC-filter, do filter the higher cadence and does the torque * rpm. It like if on an electric signal, let's say on our motor control we increase the PWM frequency (the cadence) but maintain the same energy 50% duty_cycle, an RC filter will filter and the increased frequency should not change the output signal.
What do you think?