Skip to main content
SCrum.1
Associate II
February 16, 2022
Question

Can someone tell me what T-noise and T-rise are in the Current Sensing block of the Motor Control Workbench?

  • February 16, 2022
  • 14 replies
  • 5563 views

I am using the IHM17M1 power board which is not supported out of the box. I have it working quite well by configuring it as a custom board.

However I don't know how to set the t-rise and t-noise values. I can't find any reference to them in the documentation.

I also note the current sensing seems a little noisier that I think it should be, so wondered if these settings could have an effect.

Thanks.

This topic has been closed for replies.

14 replies

GMA
Technical Moderator
March 16, 2022

I agree with you, the line 'LL_TIM_OC_SetCompareCH4 ( TIMx, (uint32_t)hCCR4Reg );' is missing from __weak uint16_t R3_1_WriteTIMRegisters(PWMC_Handle_t *pHdl, uint16_t hCCR4Reg).

Unfortunately, it is not the case on all plateforms (e.g the ones I tested).

A ticket will be entered. Thank you for your investigation.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
THA.1
Associate III
July 27, 2022

Hi SCrum.1,

Could you share the result after fixing the above code defect(missing LL_TIM_OC_SetCompareCH4())?

After fixing it, the problem(current measurement) disappeared, or still some amount of noise appears compared to sampling at the middle of PWM period?

SCrum.1
SCrum.1Author
Associate II
August 3, 2022

Hi,

I think there is always some difference in the current reading when switching between the different current sampling zones. If you examine the the current waveform with a scope you can check the timing of the t-rise and t-noise and the deadtime. But you can also see that the voltage level at the different sampling zones is different, so even when you have the software configured correctly such that it is not sampling some of the real electrical noise, the signal is different in the different zones. You have to remember that the current isn't constant through the PWM cycle. What we really want is the average current over the PWM cycle, but as we are only taking one sample, we try and sample at a point where it should be close to the average.

However note that the noise I had when configured correctly was about 20% of that when it was sampling some of the electrical noise. I think the resulting noise is also affected by the motor inductance. ie. lower inductance means the current rises and falls faster over the PWM cycle & therefore there is a greater difference between the different sampling positions. I am using very low inductance motors.

So if you want a nice clean current waveform, you can throttle the modulation index back so it only samples at the mid point, or if you want to get the most power out, then you have to accept some level of current sampling noise.

Some other points I noted were that

  1. The condition for setting the case1 position in SetADCSamplePointSecX makes the assumption that the duration of the switching and settling time (Deadtime + MAX (T-Rise, T-Noise)) is greater than the sampling time. Whilst this is true for most ST devices, this is not the case for STSPIN233. So I had to rewrite this logic.
  2. The amplifier gain on the NUCLEO-IHM17M1 is 1.53 which gives a current sampling range of approx 10 Amps. Given the motors I was using were drawing up to 0.5A this gives a low signal to noise ratio, so I tweaked the op amp gain up to 8. This also reduced the noise on the current waveform quite a bit. I'm not sure why ST have set this gain so low given the device can only handle 1.3A rms.
THA.1
Associate III
August 8, 2022

Thank you for your reply,

I agree with your above opinion.

ST(MCSDK, evaluation boards) looks like providing a reference-level one which mainly focuses on ST mcu & peripheral utilization(this is a good starting point), while leaving advanced or high-performance implementations to each user.