# Kalman filter for estimation of braking resistor temperature

Let's say I have an inverter fed three phase induction motor drive where in the braking phase (when the motor operates in a generator mode) the generated electrical power is dissipated in the braking resistor controlled via simple chopper.Below is a record of the voltage and current during the braking chopper operation:

Due to the temperature protection implementation (in the control software of the drive) purposes I would need to know the temperature of the braking resistor ($$\T_R\$$). Unfortunately I have no temperature sensor installed in the braking resistor. So I need to estimate the temperature in different manner. What I can exploit is the measurement of the dc link voltage ($$\v_{dc}\$$) and the current through the braking resistor ($$\i_R\$$).

The idea which I have is to use the Kalman filter algorithm for the temperature estimation. To be able to do so I need to form a dynamic model for the estimation prediction. My idea was to exploit following differential equation

$$\begin{eqnarray} \frac{\mathrm{d}T_R}{\mathrm{d}t} &=& \frac{1}{C}\cdot(q_{in} - q_{out}) \\ &=& \frac{1}{C}\cdot[v_{dc}\cdot i_R - h\cdot A\cdot(T_R - T_a)], \end{eqnarray}$$ where $$\C\$$ is the thermal capacity of the resistor, $$\h\$$ is the heat transfer coefficient, $$\A\$$ is the area of the resistor surface.

As far as the estimation correction I would exploit the temperature dependency of resistance

$$R = R_0\cdot\left[1 + \alpha\cdot(T_R - T_0)\right],$$ where $$\R = \frac{v_{dc}}{i_R}\$$ and the $$\v_{dc}\$$ and $$\i_{R}\$$ are the measured dc link voltage and current through the braking resistor.

The problem which I have is how to resolve the fact that the ambient temperature ($$\T_a\$$) in the model is also unknown for me. The only one idea which I have is to set the $$\T_a\$$ to constant value (let's say an average temperature for a given place). This approach could be usable in case the drive would be placed in some room. The opposite is truth for me. My drive is placed on open air.

It means that there will be time instances when the average temperature will be very good estimate of the ambient temperature but in most cases there will be huge error. I am not sure whether in such a case I can still use the Kalman filter algorithm or whether the unknown ambient temperature rules out its usage. Thanks in advance for your opinion.

• Hi! I hope this gets a good answer here! I'd recommend waiting at least 24 h, but if after that you haven't gotten a good one, try asking this (with a reference to the question here) on signals.stackexchange.com . Mar 7 at 10:37
• Your filter can only get the resistance information to converge to a good estimate when the resistor is actually working, so I would expect it could be pretty inaccurate after a period of inactivity. Any solution would not depend on documented characteristics of the component (and a replacement might be different)- at least if I look at a typical datasheet I see no specs. Your transient and static thermal model is pretty simplified. I would suggest looking at adding a sensor to the braking resistor (or at least to measure Ta). Mar 8 at 6:49
• In my simple opinion you don't need to protect a brake that is switched off and during one pwm switching period (I assume, and judging from the picture you presented I guess it's true, that the switching period is much shorter than the thermal time constant of the resistor) the brake resistor won't heat up that much. In the first switching period (or few periods) after inactivity of the brake you can already measure the resistance aka sort of temperature. If for control system modeling purposes you need a guess for the resistance, try the simple heat flow model that you presented earlier. Mar 8 at 9:56
• I want to answer this question as stated, because it's a fun question. But it's just such an impractical way to solve your underlying problem that I can't bring myself to the fun part. If you use a Kalman filter at all, you'd want to use it to back up a rough estimation using $i_R / v_{dc}$. Just using $i_R / v_{dc}$ should be good enough, and if it isn't, you should consider a mechanical design with more margin for the resistor. Finally, an attempt at a Kalman is going to cost more than a sensor on the resistor unless your production volumes are huge, and may not work. Mar 8 at 15:51
• This may be relevant, if you are able to get hold of a copy: Resistances estimation with an extended Kalman filter in the objective of real-time thermal monitoring of the induction machine
– Bill
Mar 9 at 21:04

I'm not an expert on electrical drives/resistors but your proposal to use a Kalman Filter to estimate the unmeasured temperature is not a bad idea, practicality and cost considerations aside.

The reason I think this might be the case is that the temperature response of the braking resistor may be slower than the dynamic variations in the load on the system.

As another user pointed out, you could just use a static predictive model to shutdown the device as soon as the instantaneous heating rate reaches the maximum continuous rate. This is probably safer but quite conservative since the true resistor temperature may be well below the critical temperature during transient (i.e. not steady-state) behaviour, which could be often in your application.

Obviously, the best thing to do is to put a temperature sensor on the critical component, so this should be your first priority but I will assume this is not possible for some reason.

Your concern about the unknown ambient temperature may be valid but what temperature does your braking resistor get up to? If it is very high, then differences between winter and summer ambient conditions may not be as big an error as you might think (depending on the local climate). At high temperatures, you may have to include radiative heat loss in the model.

A Kalman filter also relies on an accurate model when predicting an unmeasured input, so you will need to get that model right. Ideally, you would estimate the dynamic model from experiments where you actually have resistor temperature measurements.

At the end of the day, the benefits of the Kalman Filter are going to be:

• a dynamic estimate of the unknown state (resistor temperature) which might be better than an estimate based on a steady-state model
• smoothing of the estimate to reduce it's sensitivity to random measurement noise

However, without an accurate model or ability to identify one using real measurements of the true resistor temperature, the Kalman Filter will be at least as risky as any other method.

To evaluate whether these benefits justify the additional complexity of a Kalman Filter, I recommend constructing a simple simulation model of the system and running simulations with typical load cycles/variations, realistic measurement noises, and model errors. Simulate a Kalman Filter estimate compared to a simpler solution and see what the benefits are and how robust it is to errors in the model parameters.

Your approach seems overly complicated. A more typical approach is not to measure anything. All you need is a simple model with two parameters:

• thermal time constant of the resistor, and
• maximum continuous duty cycle.

Feed the chopper PWM through a PT1 lowpass with the appropriate time constant. If the output of the PT1, a value between zero and one, exceeds the maximum allowed continuous duty cycle, throw an error and shut down the device. The two parameters can be determined in advance and entered in the motor controller's configuration interface.

Maximum continuous power can be taken from the resistor's datasheet, perhaps with some additional calculation to account for a radiator performance (°C/W) and ambient temperature. Calculate maximum continuous duty cycle from instantaneous power (V²/R) and maximum continuous power. Thermal time constant can be measured or guessed. It's not too critical, just be in the right ballpark.

If your device is subject to variable ambient temperatures it will affect the maximum continuous duty cycle the resistor can dissipate. You would typically take the worst-case value here, which corresponds to the highest ambient temperature for which your device is rated.

• Thank you for your answer. I have attempted to experiment with the approach you have suggested. I have started from the differential equation for the temperature difference in respect to the ambient temperature $\Delta T$ and I have got following transfer function $\frac{\Delta T(s)}{\Delta P(s)} = \frac{\frac{1}{C}}{s + \frac{1}{\tau}}$. This form seems to me to be a little different from what you have described by the PT1 lowpass. Mar 13 at 11:52
• @Steve - Isn't this a PT1 lowpass? $$\frac{\frac{1}{C}}{s+\frac{1}{\tau}} = \frac{\frac{\tau}{C}}{1 +\tau s} = \frac{K}{1 + \tau s}$$ where the gain K is your temperature-to-duty-cycle conversion factor and part of the maximum continuous duty cycle. Mar 13 at 14:34
• Of course, it is. I have had doubts regarding the dc gain. Thank you for clarification. Do you think it is also a valid approach to use the $q_{in} = v_{dc}\cdot i_R$ instead of the duty cycle? Mar 13 at 19:58
• @Steve - You have four factors: instantaneous power, allowed temperature rise, thermal time constant, and thermal capacity. In the end, it boils down to a unity-gain PT1 with time constant τ whose output we compare against threshold 1/K or alternatively a PT1 with time constant τ and gain K whose output we compare against unity. K is a dimensionless constant, but you can of course scale both sides of the comparison to give them useful physical units, such as temperature or power. Mar 13 at 21:34