You are here

Filtering of motor temperature readings

9 posts / 0 new
Last post
Pedrodemio
Offline
Last seen: 2 years 8 months ago
VESC Original
Joined: 2017-08-02 00:38
Posts: 11
Filtering of motor temperature readings

Hi Benjamin, a request that should make the VESC smooth at setups, mainly single drive, that operates the motor at or near the temperature limits for a considerable amount of time

 

Problem: At high temperatures the phase currents induce a lot of noise in the motor thermistor readings, so when near that the current limitation kicks in and out all the time causing a lot of stuter that can be dangerous 

Solution: Some sort of filter that would smooth out these induced spikes, considering that shouldn't be physically possible the motor get that hot for few milliseconds and them "cool" again

Logs: They show how noisy the temperature measurement is, this is the same route, the first with a dual drive so that the current in each motor is lower, and second a single drive with a higher current in that one motor (even in the dual setup

Dual motorhttps://metr.at/r/wUFFn

Single motor: https://metr.at/r/5U2GG

Another Log at single motor reaching high temperature: https://metr.at/r/Oszfi?zoom_start=0&zoom_end=2084

 

Orange is motor temperature

 

Thanks

bobfrank
Offline
Last seen: 4 years 11 months ago
Joined: 2019-04-23 09:43
Posts: 6

A simple ((last motor temp)*7)+current motor temp)/8 should smooth things out quite a bit

benjamin
Offline
Last seen: 1 week 5 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

Are you sure that temperature measurement noise is causing that? There is both a hardware and a software filter, and I haven't experienced any noise on the temperature. Do you know what the sample rate of that log is? I haven't used the metr app. You could try the built in logging to CSV in the latest VESC Tool, which has the same sample rate as the RT data.

Pedrodemio
Offline
Last seen: 2 years 8 months ago
VESC Original
Joined: 2017-08-02 00:38
Posts: 11

Thanks Benjamin

The sample rate is only about 3 Hz since I'm using the older Metr module (HM-10)

I will try that, but the thing is, the stutter when reaching the temperature cut off is easily felt when ridding, I didn't even look at the logs at first

When the motor is near the cutoff, if you keep a really low throttle at an incline to make the motor heat up more, it works as intended, smoothly reduces the motor current, but if you full, or near full current these spikes makes it increase and decrease the current a few times per second without changing the throttle input

benjamin
Offline
Last seen: 1 week 5 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

I will look into it, but it would help with some logs of exactly when it happens. For me the cutoff has been working smoothly so far. Have you checked if there are any loose connections?

Pedrodemio
Offline
Last seen: 2 years 8 months ago
VESC Original
Joined: 2017-08-02 00:38
Posts: 11

Sure, I will test it, switch to the seconds motor and VESC and see if still happens

Pedrodemio
Offline
Last seen: 2 years 8 months ago
VESC Original
Joined: 2017-08-02 00:38
Posts: 11

Hey Benjamin, after some more testing and checking I ruled out any other problem that could be causing this, connectors and wires are good, the problem only happens when the motor is hot but not at the limit temperature and you push high current through the phase wires so that there is a lot of noise on the temperature readings

RyuX
Offline
Last seen: 4 years 5 months ago
Joined: 2019-06-21 16:31
Posts: 1

Hey Guys I have the same problem.

The temperature jumps fro 91°C to 104°C within a seconds as you can see in the pic.

I would love if the temp sensor reading could be smoothed out a bit as well.

fessyfoo
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2018-12-05 06:44
Posts: 5

I just experienced a motor temperature fault, where the fault reported the temperature as 74.4c but my settings l_temp_motor_end were 100c
which if i'm understanding things right shouldn't be possible? but could be related to errant short lived . jumps in temp readings... ? I didn't have a logger unfortunately. motor didn't seem hot. didn't get any throttling. just a sudden cut out with the fault.

reported it here first. https://forum.esk8.news/t/help-with-fault-code-over-temp-motor/17224/6

Fault            : FAULT_CODE_OVER_TEMP_MOTOR
Current          : 26.0
Current filtered : 26.1
Voltage          : 34.27
Duty             : 0.950
RPM              : 36460.8
Tacho            : 3554304
Cycles running   : 360106
TIM duty         : 7980
TIM val samp     : 2
TIM current samp : 4200
TIM top          : 8400
Comm step        : 0
Temperature      : 74.14
l_temp_motor_start: 80
l_temp_motor_end: 100
Firmware: 3.65   
Hardware: 410