1. ## Transformer problem

Hi, everyone on MHF.

I did an experiment about current transformer and find that if I keep the current on primary coil constant, the current on secondary coil will decay and can fit by function
I = A1*exp(-t/t1) + A2*exp(-t/t2)
where A1,A2,t1 and t2 are constants.

My question is if I know the value of I, how can I solve for t?
I try all analytic way I know but failed.

ZartPARZ.

2. Originally Posted by ZartPARZ
Hi, everyone on MHF.

I did an experiment about current transformer and find that if I keep the current on primary coil constant, the current on secondary coil will decay and can fit by function
I = A1*exp(-t/t1) + A2*exp(-t/t2)
where A1,A2,t1 and t2 are constants.

My question is if I know the value of I, how can I solve for t?
I try all analytic way I know but failed.

ZartPARZ.
I don't know of any analytic method. There are a host of numerical methods you can use, the simplest being "guess and check."

Physically what are the origins of t1 and t2? I would have thought there would only be a single time constant for the decay and modelled the fit equation by
I(t) = A*exp(-t/tau)
where tau is your time constant.

-Dan

The decay I found cannot fit well with only one term, but very well fit with 2 terms.

The reason I can really think off is that there are 2 coiled on ferite core that made up transformer cause more than one decay term, possibly stray capacitance, howerver I'm not sure.

For numerical method, I don't know any efficient method. Because I need value of t to used in computational loop that already consume CPU time. So I don't want to add too many CPU load anymore, and simulate result directly should consume a lot.

If you have any idea about good numerical algorithm please let me know.

Thank again,

ZartPARZ.

4. Originally Posted by ZartPARZ

The decay I found cannot fit well with only one term, but very well fit with 2 terms.

The reason I can really think off is that there are 2 coiled on ferite core that made up transformer cause more than one decay term, possibly stray capacitance, howerver I'm not sure.

For numerical method, I don't know any efficient method. Because I need value of t to used in computational loop that already consume CPU time. So I don't want to add too many CPU load anymore, and simulate result directly should consume a lot.

If you have any idea about good numerical algorithm please let me know.

Thank again,

ZartPARZ.
I don't know many algorithms myself but what you are basically trying to do is invert the equation:
I(t) = [A]^t + [B]^t
which is a monotone function (assuming A and B are positive anyway). So a simple search algorithm would do:
Using a seed number for t calculate I(t) and if your calculated value is less than what your graph says then increment t and try again. (Call the set of t values {t_n} or something.) When you find a value of t_n that is too big, then try (t_n + t_{n-1})/2. etc. That will home in on the correct value for t. (And should do it tolerably quickly.)

Whether this is good enough for you depends on what kind of accuracy you need for your points and how many points you need to generate for your solution graph. Of course you can sketch this graph immediately simply by graphing your I(t) vs. t graph and reflecting it over the line I = t.

Another thought might be simply to fit the data to a t(I) graph instead of messing about with the I(t) fit. The trouble is that I don't know what form the equation might be. You could try a simple cubic polynomial fit and see how good/bad the correlation is. Or if you can figure out how to do the fit, possibly
t(I) = A*ln[B*ln(t) + C] + D
might be worth a try. (Though it would be extremely messy to try to derive the formulae for the fit parameters.)

Perhaps one of the gurus around here will have better ideas.

-Dan

5. Thanks, topsquark.

Now I'm trying to fit t(I) as you told.

Many functions I try failed, the best one is A*(ln(k1*x)+C1)*(ln(k2*x)+C2).
However it still diverge as x reach infinite.

Thanks again,
ZartPARZ.

6. Originally Posted by ZartPARZ
Hi, everyone on MHF.

I did an experiment about current transformer and find that if I keep the current on primary coil constant, the current on secondary coil will decay and can fit by function
I = A1*exp(-t/t1) + A2*exp(-t/t2)
where A1,A2,t1 and t2 are constants.

My question is if I know the value of I, how can I solve for t?
I try all analytic way I know but failed.

ZartPARZ.
As I(t) is a monotonicaly decreasing function of t if 0<I<A1+A2 there is a
unique solution.

I would set the problem up as: find the zero of g(t) where:

g(t) = I - A1*exp(-t/t1) - A2*exp(-t/t2)

Then use Newton-Raphson to find the root. This uses the itteration:

t_{n+1} = t_n - g(t_n)/g'(t_n)

which should converge if we set t_0=1.

Below is a demonstartion:

Code:
>t1=10;t2=3;
>I=0.7;
>A1=1;A2=0.3;
>
>function g(t)
$global t1,t2,A1,A2,I;$  rv=I-A1*exp(-t/t1)-A2*exp(-t/t2);
$return rv$endfunction
>
>function dg(t)
$global t1,t2,A1,A2;$  rv=A1/t1*exp(-t/t1)+A2/t2*exp(-t/t2);
$return rv$endfunction
>
>tn=1
1
>tnp1=tn - g(tn)/dg(tn)
3.58915
>tn=tnp1;tnp1=tn - g(tn)/dg(tn)
4.4797
>tn=tnp1;tnp1=tn - g(tn)/dg(tn)
4.55285
>tn=tnp1;tnp1=tn - g(tn)/dg(tn)
4.55329
>tn=tnp1;tnp1=tn - g(tn)/dg(tn)
4.55329
>tn=tnp1;tnp1=tn - g(tn)/dg(tn)
4.55329
>tn=tnp1;tnp1=tn - g(tn)/dg(tn)
4.55329
>
RonL

7. Thanks, CaptainBlack.