Skip to content
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

No additional power between levels #43

Open
IArchi opened this issue Nov 28, 2022 · 16 comments
Open

No additional power between levels #43

IArchi opened this issue Nov 28, 2022 · 16 comments

Comments

@IArchi
Copy link

IArchi commented Nov 28, 2022

Hello,

Thanks for the awesome work you made for us !

I have a TSDZ2 750W, a XH18 display and a 48V 10.5Ah battery.
I've successfully calibrated the torque sensor and got values very closed to the default ones (144 and 297 versus 150 and 300).

I've modified the assistance levels in that way:

Item Power assist mode Torque assist mode
ECO 60 40
TOUR 150 100
SPORT 300 150
TURBO 450 200

Of course, I've enabled Hybrid assist mode on startup.

When I switch the motor on using the display button, I have to wait a few seconds before pushing on the pedals. Otherwise the motor does not help. Weird behaviour but I assume this is the way it calibrates. Could you confirm ?

My main issue is when I change assistance levels on the display.
When I start the motor, I'm in level 1 (ECO), pushing on the pedals will provide a certain level of assistance.
Moving to level 2 or more, does not provide additional power.
When I climb a small hill for example, I don't have any difference between level 1 and 4, even if I'm only at 17km/h and I push really hard on the pedals.

I've set street power limit to 750W and battery power max to 650W. Could it be an issue with one of these parameters ?
Do I need to change the battery max current to 18A ?

Thanks for your time.

@IArchi
Copy link
Author

IArchi commented Nov 29, 2022

I've found out what the problem is. Same as issue #37.
Because of merge #33, the EEPROM is not correctly cleared.

Could you try to revert that or add a flag to reset EEPROM automatically ?

Thanks

@dzid26
Copy link

dzid26 commented Nov 29, 2022

When I switch the motor on using the display button, I have to wait a few seconds before pushing on the pedals. Otherwise the motor does not help. Weird behaviour but I assume this is the way it calibrates. Could you confirm ?
This is normal.

Because of merge #33, the EEPROM is not correctly cleared.
PR #33 was merged, but clearing of the EEPROM was left out, because of some other issue. This argument causes the clearing: -FileData=data_empty.ihx.

Ahh, but I see you are on linux and probably were using #33 directly which didn't clear the EEPROM.

Anyway, I don't see how is that related to your assist level issue. Assist levels are not written in the EEPROM.

I don't really know why you would not have power at higher levels. Maybe you should incrementally test new settings to narrow down the issue.

Let me review your PR #44 ...

@emmebrusa
Copy link
Owner

My main issue is when I change assistance levels on the display. When I start the motor, I'm in level 1 (ECO), pushing on the pedals will provide a certain level of assistance. Moving to level 2 or more, does not provide additional power. When I climb a small hill for example, I don't have any difference between level 1 and 4, even if I'm only at 17km/h and I push really hard on the pedals.

I've set street power limit to 750W and battery power max to 650W. Could it be an issue with one of these parameters ? Do I need to change the battery max current to 18A ?

The data in eeprom has no connection with the levels of assistance.
If at level 1 you have the same assistance as at level 4, it is because you have already reached the current or power limits set in the configurator (Battery current max, Battery power max or Street power limit).

You should check current and power with an external wattmeter, or on the display.

@IArchi
Copy link
Author

IArchi commented Nov 30, 2022

I've made a new test this morning. Levels 1 to 4 do work perfectly but the motor seems to reach the maximum power very quickly.
Isn't the maximum power or max current stored in EEPROM ?

@emmebrusa
Copy link
Owner

Battery power max and Street power limit, no.
Instead Battery current max, s is stored in eeprom.
There is no need, I left it as I found it.
Iif you have deleted the eeprom, it is rewritten with the configurator values.
You have to check if it reaches the maximum expected power.
Try temporarily setting:
Data 1 = 4 (motor power)
Time to displayed data 1 = 0 (continuous)
Number of data displayed at light on = 1
By turning on the lights, you will see the power of the motor.
Check the value at various levels.

@IArchi
Copy link
Author

IArchi commented Nov 30, 2022

I've flash the motor once again (from Windows this time).
Power is really weird.
If I start in level 4 (TURBO), it goes up to 500W+ during a few seconds then the power is reduced to 60-90W. Pushing hardly on the pedals does not help.

My ini file:

false
true
true
35
false
20
36
297
250
2
30
20
25
15
700
500
13
35
39
100
90
4.35
4.10
4.10
3.85
3.60
3.35
3.94
3.76
3.60
3.44
3.26
3.10
1985
25
false
false
false
true
false
false
false
false
false
false
false
0
false
false
false
false
1
9
10
false
750
25
false
false
47
176
65
85
false
false
false
true
true
false
true
50
false
30
true
false
0
50
50
50
50
50
4
3
10
1
8
0
60
120
200
300
40
80
120
160
80
100
130
160
2
5
8
12
30
35
40
45
60
false
60
15
18
21
24
false
10
144
1
true
false
0
255
true
true
true
false
false
false
20
20
20
34
true
false
false
true
true
false
false
false

@emmebrusa
Copy link
Owner

In the attached ini file there are several values that are wrong, are they copy/paste errors or are they entered at random?
In order:
You write that you have 48V motor and battery but they are set to 36V.
You have enabled Street mode enable on startup with Street power limit at 250W.
There are unlikely values in the torque calibration parameters and others as well.

If the motor and battery are actually 48V, delete everything and start from the Default_Settings_48V.ini file, then edit:
Wheel circumference = 1985 (verify)
Torque sensor adv. = enabled
Calibrate = enabled
Pedal torque adc offset (no weight) = 144 (verify)
Pedal torque adc max (max weight) = 297 (verify)
Street power limit (W) = 500

Then try...

@IArchi
Copy link
Author

IArchi commented Nov 30, 2022

Very weird, if I load the INI file into the configurator, it says 48V.
image
I'm going to try that.

Confirmed by config.h:

/*
 * config.h
 *
 *  Automatically created by TSDS2 Parameter Configurator
 *  Author: stancecoke
 */

#ifndef CONFIG_H_
#define CONFIG_H_

#define MOTOR_TYPE 0
#define TORQUE_SENSOR_CALIBRATED 1
#define MOTOR_ACCELERATION  35
#define MOTOR_ASSISTANCE_WITHOUT_PEDAL_ROTATION 0
#define ASSISTANCE_WITHOUT_PEDAL_ROTATION_THRESHOLD 20
#define PEDAL_TORQUE_PER_10_BIT_ADC_STEP_X100 36
#define PEDAL_TORQUE_ADC_MAX 297
#define STARTUP_BOOST_TORQUE_FACTOR 250
#define MOTOR_BLOCKED_COUNTER_THRESHOLD 2
#define MOTOR_BLOCKED_BATTERY_CURRENT_THRESHOLD_X10 30
#define MOTOR_BLOCKED_ERPS_THRESHOLD 20
#define STARTUP_BOOST_CADENCE_STEP 25
#define BATTERY_CURRENT_MAX 15
#define TARGET_MAX_BATTERY_POWER 700
#define TARGET_MAX_BATTERY_CAPACITY 500
#define BATTERY_CELLS_NUMBER 13
#define MOTOR_DECELERATION 35
#define BATTERY_LOW_VOLTAGE_CUT_OFF 39
#define ACTUAL_BATTERY_VOLTAGE_PERCENT 100
#define ACTUAL_BATTERY_CAPACITY_PERCENT 90
#define LI_ION_CELL_OVERVOLT 4.35
#define LI_ION_CELL_RESET_SOC_PERCENT 4.10
#define LI_ION_CELL_VOLTS_FULL 4.10
#define LI_ION_CELL_VOLTS_3_OF_4 3.85
#define LI_ION_CELL_VOLTS_2_OF_4 3.60
#define LI_ION_CELL_VOLTS_1_OF_4 3.35
#define LI_ION_CELL_VOLTS_5_OF_6 3.94
#define LI_ION_CELL_VOLTS_4_OF_6 3.76
#define LI_ION_CELL_VOLTS_3_OF_6 3.60
#define LI_ION_CELL_VOLTS_2_OF_6 3.44
#define LI_ION_CELL_VOLTS_1_OF_6 3.26
#define LI_ION_CELL_VOLTS_EMPTY 3.10
#define WHEEL_PERIMETER 1985
#define WHEEL_MAX_SPEED 25
#define ENABLE_LIGHTS 0
#define ENABLE_WALK_ASSIST 0
#define ENABLE_BRAKE_SENSOR 0
#define ENABLE_THROTTLE 0
#define ENABLE_TEMPERATURE_LIMIT 0
#define ENABLE_STREET_MODE_ON_STARTUP 0
#define ENABLE_SET_PARAMETER_ON_STARTUP 0
#define ENABLE_ODOMETER_COMPENSATION 0
#define STARTUP_BOOST_ON_STARTUP 0
#define TORQUE_SENSOR_ADV_ON_STARTUP 0
#define LIGHTS_CONFIGURATION_ON_STARTUP 0
#define LIGHTS_CONFIGURATION_1 1
#define LIGHTS_CONFIGURATION_2 9
#define LIGHTS_CONFIGURATION_3 10
#define STREET_MODE_POWER_LIMIT_ENABLED 0
#define STREET_MODE_POWER_LIMIT 750
#define STREET_MODE_SPEED_LIMIT 25
#define STREET_MODE_THROTTLE_ENABLED 0
#define STREET_MODE_CRUISE_ENABLED 0
#define ADC_THROTTLE_MIN_VALUE 47
#define ADC_THROTTLE_MAX_VALUE 176
#define MOTOR_TEMPERATURE_MIN_VALUE_LIMIT 65
#define MOTOR_TEMPERATURE_MAX_VALUE_LIMIT 85
#define ENABLE_TEMPERATURE_ERROR_MIN_LIMIT 0
#define ENABLE_VLCD6 0
#define ENABLE_VLCD5 0
#define ENABLE_XH18 1
#define ENABLE_DISPLAY_WORKING_FLAG 1
#define ENABLE_DISPLAY_ALWAYS_ON 0
#define ENABLE_WHEEL_MAX_SPEED_FROM_DISPLAY 1
#define DELAY_MENU_ON 50
#define COASTER_BRAKE_ENABLED 0
#define COASTER_BRAKE_TORQUE_THRESHOLD 30
#define ENABLE_AUTO_DATA_DISPLAY 1
#define STARTUP_ASSIST_ENABLED 0
#define DELAY_DISPLAY_DATA_1 0
#define DELAY_DISPLAY_DATA_2 50
#define DELAY_DISPLAY_DATA_3 50
#define DELAY_DISPLAY_DATA_4 50
#define DELAY_DISPLAY_DATA_5 50
#define DELAY_DISPLAY_DATA_6 50
#define DISPLAY_DATA_1 4
#define DISPLAY_DATA_2 3
#define DISPLAY_DATA_3 10
#define DISPLAY_DATA_4 1
#define DISPLAY_DATA_5 8
#define DISPLAY_DATA_6 0
#define POWER_ASSIST_LEVEL_1 60
#define POWER_ASSIST_LEVEL_2 120
#define POWER_ASSIST_LEVEL_3 200
#define POWER_ASSIST_LEVEL_4 300
#define TORQUE_ASSIST_LEVEL_1 40
#define TORQUE_ASSIST_LEVEL_2 80
#define TORQUE_ASSIST_LEVEL_3 120
#define TORQUE_ASSIST_LEVEL_4 160
#define CADENCE_ASSIST_LEVEL_1 80
#define CADENCE_ASSIST_LEVEL_2 100
#define CADENCE_ASSIST_LEVEL_3 130
#define CADENCE_ASSIST_LEVEL_4 160
#define EMTB_ASSIST_LEVEL_1 2
#define EMTB_ASSIST_LEVEL_2 5
#define EMTB_ASSIST_LEVEL_3 8
#define EMTB_ASSIST_LEVEL_4 12
#define WALK_ASSIST_LEVEL_1 30
#define WALK_ASSIST_LEVEL_2 35
#define WALK_ASSIST_LEVEL_3 40
#define WALK_ASSIST_LEVEL_4 45
#define WALK_ASSIST_THRESHOLD_SPEED 60
#define WALK_ASSIST_DEBOUNCE_ENABLED 0
#define WALK_ASSIST_DEBOUNCE_TIME 60
#define CRUISE_TARGET_SPEED_LEVEL_1 15
#define CRUISE_TARGET_SPEED_LEVEL_2 18
#define CRUISE_TARGET_SPEED_LEVEL_3 21
#define CRUISE_TARGET_SPEED_LEVEL_4 24
#define CRUISE_MODE_WALK_ENABLED 0
#define CRUISE_THRESHOLD_SPEED 10
#define PEDAL_TORQUE_ADC_OFFSET 144
#define AUTO_DATA_NUMBER_DISPLAY 1
#define UNITS_TYPE 0
#define ASSIST_THROTTLE_MIN_VALUE 0
#define ASSIST_THROTTLE_MAX_VALUE 255
#define STREET_MODE_WALK_ENABLED 1
#define RIDING_MODE_ON_STARTUP 5
#define DATA_DISPLAY_ON_STARTUP 0
#define FIELD_WEAKENING_ENABLED 0
#define PEDAL_TORQUE_ADC_OFFSET_ADJ 20
#define PEDAL_TORQUE_ADC_RANGE_ADJ 20
#define PEDAL_TORQUE_ADC_ANGLE_ADJ 36
#define PEDAL_TORQUE_PER_10_BIT_ADC_STEP_ADV_X100 34
#define SOC_PERCENT_CALC 0
#define STARTUP_BOOST_AT_ZERO 0
#define ENABLE_850C 0
#define STREET_MODE_THROTTLE_LEGAL 0

#endif /* CONFIG_H_ */

@emmebrusa
Copy link
Owner

It's true sorry, the copy/paste went wrong for me.
I reviewed your file, you need to enable "Torque sensor adv."
"Battery power max" 700 W is too much for a 504 Wh battery.
I don't see any other problems.

@IArchi
Copy link
Author

IArchi commented Dec 1, 2022

I've tried to display torque sensor value during a ride.
It starts at 149 and I can reach 299 pushing on the pedals.
I'm still in hybrid mode and the behavior of the motor seems to be like that:

Speed Flat Hill climbing
OFF 0 0
1 25km/h barely 10km/h
2 25km/h barely 15km/h
3 25km/h barely 15km/h
4 25km/h barely 15km/h

The motor does not provide additional power when I need it.

@emmebrusa Could you reopen this issue please ?

@emmebrusa
Copy link
Owner

Speed is not a benchmark for levels.
You need to check the power of the motor.
Did you try what I suggested?

Try temporarily setting:
Data 1 = 4 (motor power)
Time to displayed data 1 = 0 (continuous)
Number of data displayed at light on = 1
By turning on the lights, you will see the power of the motor.
Check the value at various levels.
Besides: Auto dispay data at lights on = enabled

If you reach max power at level 2, at level 3 and 4 nothing changes.
Remember that the maximum power is not the one set!
You have set 700W, but to get there you need a high capacity battery with cells with high discharge current.
Also the motor would heat up a lot.
Consider for a 48V motor, a maximum continuous power of 400W.

@emmebrusa emmebrusa reopened this Dec 1, 2022
@dzid26
Copy link

dzid26 commented Dec 1, 2022

Speed is not a benchmark for levels. You need to check the power of the motor. Did you try what I suggested?

Try temporarily setting:
Data 1 = 4 (motor power)
Time to displayed data 1 = 0 (continuous)
Number of data displayed at light on = 1
By turning on the lights, you will see the power of the motor.
Check the value at various levels.
Besides: Auto dispay data at lights on = enabled

If you reach max power at level 2, at level 3 and 4 nothing changes. Remember that the maximum power is not the one set! You have set 700W, but to get there you need a high capacity battery with cells with high discharge current. Also the motor would heat up a lot. Consider for a 48V motor, a maximum continuous power of 400W.

Cool tips, I've never tried displaying the power.
Here is my experience for comparison.
I have "48V" motor and "52V" battery. It is 14s3p, but it is very Chinese and so I think it has only about 250Wh (15km range).
Recently I increased the motor power to 600W from 500W because days are cooler now. On Turbo level (4) the data was showing 59 value.
The battery is cool slightly warm to the touch, and I think there is a bit of voltage drop when SOC is low because I think I hit the undervoltage shutdown earlier now.
I am planning to increase power to 700W once I increase motor cooling, though I would say 600W is quite sufficient already.

@dzid26
Copy link

dzid26 commented Dec 2, 2022

I played today a bit more with power display. It is much easier to achieve 600W motor output in torque mode or ebike mode. In power mode it is almost impossible (with default settings). Hybrid is a bit easier than power mode.
This is simply because human power is the largest at high cadence when motor power tapers off due to BEMF. Note, in power mode, the motor multiples human power.

So as a tip, I would be testing higher motor powers in torque mode, just to be sure it can be reached. Just don't burn your motor. :)

@IArchi
Copy link
Author

IArchi commented Dec 6, 2022

The motor easily reaches the max power but when I pedal at around 80rpm, it drops to 60W or around. Even in steep hill, the power is stuck to 150-200W at 80rpm. If I pedal slower, the power increases.
I'm in Hybrid mode but I got the same behaviour in eMTB.

@dzid26
Copy link

dzid26 commented Dec 6, 2022

The motor easily reaches the max power but when I pedal at around 80rpm, it drops to 60W or around. Even in steep hill, the power is stuck to 150-200W at 80rpm. If I pedal slower, the power increases. I'm in Hybrid mode but I got the same behaviour in eMTB.

This is normal for tsdz2. It's due to BEMF. You would need either higher voltage battery (e.g. 52V is slightly better) or lower inductance motor ("36V" motor, but it will produce less torque for the same current).
There is a lot of posts scattered on endless sphere about people experiences.

Personally I've got used to it. And I utilize that as a feature - when the torque tapers off at high gears I push harder with my legs for few more seconds (increasing RPMs even higher) and then I can do fast, low load shift by quickly reducing legs force. If controller was normally more responsive to torque changes, this wouldn't be needed, but it isn't, so that is a hack for doing fast, low load shifting.

You can also enable field weakening in Java Configurator, but I disabled it nowadays, because what I described above. And field weakening is not very efficient nor strong.

@emmebrusa
Copy link
Owner

emmebrusa commented Dec 6, 2022

The motor easily reaches the max power but when I pedal at around 80rpm, it drops to 60W or around. Even in steep hill, the power is stuck to 150-200W at 80rpm. If I pedal slower, the power increases. I'm in Hybrid mode but I got the same behaviour in eMTB.

It is typical of the assistance mode based on torque., torque mode and eMTB mode.
As the cadence increases, the torque decreases.
Even with hybrid mode, if the torque and power parameters are not well balanced.
Try power assist, the motor power is proportional to the power applied to the pedals. It's better, I just use that.
If you feel the need to increase power at low cadence use startup boost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants