# circuit analysis of DC-source, inductance and modulated resistance

Here's an interesting problem. Consider a DC voltage source (for bias), an inductor (supply wires, for instance) and a resistor, which changes its resistance as a function of time: $R(t) = R_{offset}+R_{mod}\cos(\omega t)$, where $R_{offset} > R_{mod}$. The bias voltage across the photoresistor would cause an AC-current $i(t)$ to flow.

simulate this circuit – Schematic created using CircuitLab

Now, to find the unknown AC-current $i(t)$, I would solve the following ODE: $$V=L\frac{di}{dt}+i(t)R(t)$$ which can be rearranged to: $$\frac{di}{dt}+i(t)\frac{R(t)}{L}=\frac{V}{L}$$ which enables us to solve the DE using the integration factor method. $$i(t)=\frac{\int e^{\int p(t)dt}g(t)dt+c}{e^{\int p(t)dt}}$$ where $g(t)=\frac{V}{L}$ and $p(t)=\frac{R_{offset}}{L}+\frac{R_{mod}}{L}\cos(\omega t)$. We get:

$$i(t)=\frac{\frac{V}{L}\int e^{\big(\frac{R_{offset}}{L}t+\frac{R_{mod}}{\omega L}\sin(\omega t)\big)}dt + c}{e^{\big(\frac{R_{offset}}{L}t+\frac{R_{mod}}{\omega L}\sin(\omega t)\big)}}$$ which becomes: $$\require{cancel} i(t)=\frac{V}{\cancel{L}}\frac{\cancel{L}}{R_{offset}t + \frac{R_{mod}}{\omega}\sin(\omega t)} + \frac{c}{e^{\big(\frac{R_{offset}}{L}t+\frac{R_{mod}}{\omega L}\sin(\omega t)\big)}}\\ =\frac{V}{R_{offset}t + \frac{R_{mod}}{\omega}\sin(\omega t)} + \frac{c}{e^{\big(\frac{R_{offset}}{L}t+\frac{R_{mod}}{\omega L}\sin(\omega t)\big)}}\\$$ The first term goes to 0 after briefly going to $\infty$ when $R_{offset}t$ and $\frac{R_{mod}}{\omega L}\sin(\omega t)$ are equal (big L-'hard-start'?). The other term goes to 0 with $e^{-t}$ which looks kind of strange, as I would expect some sort of steady-state solution.

Am I asking the wrong kind of question, here? i.e., is the problem badly stated, or am I missing something else?

EDIT: After doing the write-up, I have a suspicion, that: $$\int e^{\big( \frac{R_{offset}}{L}t+\frac{R_{mod}}{\omega L}\sin(\omega t)\big)}dt \neq \frac{L}{R_{offset}t + \frac{R_{mod}}{\omega}\sin(\omega t)}e^{\big(\frac{R_{offset}}{L}t+\frac{R_{mod}}{\omega L}\sin(\omega t)\big)}$$ I will have another look, and correct if needed.

You won't (easily) get a closed form for $\int e^{p(t)}dt$.

The solution to the differential equation that you wrote is:

$$i(t)=\left(\frac{V}{L}\right)e^{\frac{-R_{mod}\sin(\omega t)}{L\omega}-\frac{R_{offset}t}{L}}\left(\int_0^t e^{\frac{R_{mod}\sin(\omega \tau)}{L\omega}+\frac{R_{offset}\tau}{L}} d\tau\right)+ Ce^{\frac{-R_{mod}\sin(\omega t)}{L\omega}-\frac{R_{offset}t}{L}}$$ where $C$ is an unknown determined by the initial condition. Obviously the term involving integration is the troublesome bit so lets focus on that piece.

The power series for $e^{x}$ converges uniformly on bounded sets so we can exchange the power series with the integral giving $$\int_0^t e^{\frac{R_{mod}\sin(\omega \tau)}{L\omega}+\frac{R_{offset}\tau}{L}} d\tau = \sum_{n=0}^{\infty}\frac{1}{n!}\int_0^t\left(\frac{R_{mod}\sin(\omega \tau)}{L \omega}+\frac{R_{offset} \tau}{L} \right)^n d\tau.$$

Integrating the inner terms involves integrating terms of the form $\tau^k\sin(\omega \tau)^{n-k}$ which have closed form solutions.

The real upshot is that if we only want approximate solutions we can bound the tail of this series by bounding the integrands and using that $$\sum_{n=N+1}^{\infty}\frac{1}{n!}x^n = e^x-\frac{e^x \Gamma(N+1,x)}{N!}.$$

Then we will have a closed formed approximate solution $\tilde{i}_N(t)$ which approximates $i(t)$ and we will know a bound for the error $|\tilde{i}_N(t) - i(t)|$.

• After going through integration tables and reading about non-elementary antiderivatives, this is what is dawning on me as well. – electroGeek Mar 2 '14 at 18:21
• One way could be to compute the integral numerically, using a Taylor series as this can always be integrated. On condition it doesn't diverge of course. I'll keep looking. – electroGeek Mar 2 '14 at 19:18
• @electroGeek What are you looking to do? Find even an approximate solution to this problem? Your original question was asking why your solution wasn't working. – SomeEE Mar 2 '14 at 20:02
• @MathEE: Fair enough, I'm trying to get an idea of the form of i, even with component values, although an analytical solution would be prefereable. However, having tried with the integration factor method, Fourier Transform and failed both, I'm starting to believe the question itself is wrong, and that I should just ignore L, and treat the source and photoresistor together as an AC-current source in parallel with a resistor with a value $R_{offset}$, which would probably be a meaningful approximation, as L is so large, there would be little interaction with the oscillation from R. – electroGeek Mar 2 '14 at 20:57
• @electroGeek Ok, I've added some details. – SomeEE Mar 3 '14 at 5:13