I have been fooling around for a while with the notion that we could predict t_trip for a PTC and use it to smartly manage the motor commands to keep from tripping the PTC and yet allow maximum current to be sustained.

I have come up with a first order equation that models the PTC temperature as a function of current and can be used to predict t_trip to with in 7% for the standard spec conditions. This gives me some hope that we can use a t_trip model in the current management.

See post for complete details and derivation of model. Quite an interesting foray into physics and thermodynamics. Here is an excerpt of the introduction to see if you have any interest in reading the whole post. You will have to go to the post to see the links:

Estimating the PTC temperature using motor current (third try a charm)

- Introduction:

The PTC temperature T® is very nonlinear with resistance. The Steinhart-Hart equation is a widely used third-order approximation:

There is a critical temperature Tc above which the resistance increases dramatically and hence allows a PTC resistor to be used to limit current. If we can calculate T® we could predict the time to trip, t_trip, which is the time it takes the PTC to start from its present temperature T_init and reach Tc. Here, R would be high enough to shut down the circuit hence creating a thermal fuse. The specifications for PTCs have t_trip as a function of PTC current assuming you start at T_init = T_0 = 23 C where T_0 is the ambient temperature. This is easy to curve fit, but it doesn’t help us if the ambient temperature T_0 is different or we have previously heated up the PTC by running at high currents for a while and T_init > T_0. It is possible to model the thermal response of the PTC to take into account the variation in initial conditions and ambient temperature.

This figure shows a close model match to published t_trip for a Bourne (.9, 1.8) (I_hold, I_trip) PTC similar to the Vex PTC. This is calculated at the standard T_0 with T_init = T0.

http://vamfun.files.wordpress.com/2012/07/excel-ptc-model-vs-bourne-r090-t_trip-vs-current.jpg

So I have a technique to model PTC currents and t_trip . Given some more lab tests with actual PTC installations I am fairly certain a working RobotC model can be synthesized for management of current . Test data would be needed for the Cortex PTC which is the most likely fuse to trip when running 4 393 motors.

It is not clear exactly how we could use t_trip but it can be estimated in real-time by software with some TBD accuracy.

Software monitors could have the following functions:

i_amps =Compute motor current (Vb,speed,duty)

T = Compute PTC Temp (i_amps, T_0=ambient temperature)

t_trip = Compute time to trip(T, Tc = critical temperature)

duty_out = Current limiter( duty_in, i_amps, speed , t_trip)

The current limiter would look at t_trip… if it was shorter than say 4 seconds, it would reduce the command duty_in to a safe value of duty_out for the motors. When t_trip increased to say 10 seconds, the limit would be lifted. This creates a hysteresis to allow some cooling before max commands are allowed.

Note: the i_amps calculation assumes that PTC resistance is constant. As R rises with temperature, its effects should be included in i_amps. This can be done by having changing i_amps function to include a last temperature, T_last, input:

i_amps = Compute motor current (Vb,speed, duty, T_last=last PTC temperature )

The equation for PTC R can be included in the Hbridge formulas. It essentially has two effects: 1) decreases the voltage across the motor coil and also decreases the ON phase time constant speeding up the rise of current.

- Calculating T®

Before going on, you might want to review some tutorials on PTC:

Thermistors Wikipedia

Tyco (I got R vs Temperature from Fig 7)

Epcos (I got C_p from here)

In addition here are the spec sheets for the PTCs

393 PTC HuiRui HR30-090

Bourne (Example MF-R090 .9 amp hold, 1.8 amp, I took t_trip data from this to match)

A quick review of Wikipedia on Thermistors suggests that Newton’s law of cooling can be used to compute the power flowing out of a resistor. This power is proportional to the temperature difference between the ambient temperature T0 and the resistor temperature T®.

P_out = K*(T® - T0) where the temperatures are in degrees Rankine and K is the dissipation constant in watts per deg C.

The power coming into the PTC P_in = I_ptc*V_ptc where I_ptc is the current and V_ptc is the voltage drop across the PTC respectively. In general we do not have a measure of the voltage across the PTC but we can calculate the voltage using ohms law or V_ptc = I_ptc*R . So

PTC P_in = I_ptc^2*R

If we know the specific heat of the PTC at constant pressure ,C_p = delta Q/delta T , then the rate of change in temperature can be given by the equation

C_p*dT/dt = P_in - P_out

Here we have used the approximation that the heat absorbed = delta Q = dt*(P_in-P_out) and delta T = dT.

So

dT/dt = 1/C_p*(I_ptc^2*R - K*(T - T0)) .

This is a first-order non-linear differential equation because R changes with T. This can be solved with numerical integration but a closed form can be used if the equation is linearized. Normally, R = R_0*exp(beta*(T-T_ref). We can use a Taylor approximation to linearize this.

The remaining sections deal with linearizing the differential equation and coming up with formulas for t_trip and then estimating the PTC parameters needed to compute it Beware… lots of math.