2

enter image description here

Suppose we have an RL circuit as given above. I would like to find \$i(t)\$ using the following method but I can't find my mistake. I know how to find \$i(t)\$ using different methods/ways, but I just want to know what is wrong with the way below.

For \$t \ge 0\$, the following equation should hold: $$i \cdot R + L \cdot \frac{\text{d}i(t)}{\text{d}t} = V_s$$

Solving for homogeneous equation (maybe here, the lower bound is my mistake, but that's just a guess; I think it might be related to evaluating the initial condition in a wrong place):

$$\int_{i(0)=-I_0}^{i_h(t)} \frac{1}{i} \text{d}i = -\int_0^t \frac{R}{L} \text{d}t$$ $$\ln{|i_h(t)|} - \ln{|-I_0|} = \ln{|\frac{i_h(t)}{-I_0}}| = -\frac{R}{L}\cdot t$$ $$i_h(t) = I_0\cdot e^{-\frac{R}{L}\cdot t}$$

Solving for particular solution:

$$i_p(t) = A \\ A \cdot R = V_s \implies i_p(t) = A = \frac{V_s}{R}$$

Complete solution: $$i(t) = i_h(t) + i_p(t) = \frac{V_s}{R} + I_0\cdot e^{-\frac{R}{L}\cdot t}$$

which I think is not correct. The correct answer is probably \$\frac{V_s}{R} - \left(I_0+\frac{V_s}{R}\right)\cdot e^{-\frac{R}{L}\cdot t}\$.

Could you please help me find my mistake?

Lars Smith
  • 123
  • 4

4 Answers4

4

Your initial equation is correct:

$$\begin{align*} R\,i+L\frac{\text{d}}{\text{d}t}i&=V_\text{S} \end{align*}$$

But to make it homogeneous is really easy:

$$\begin{align*} R\,i+L\frac{\text{d}}{\text{d}t}i&=V_\text{S}\\\\ \left(\frac{\text{d}}{\text{d}t}+\frac{R}{L}\right)i&=\frac{V_\text{S}}{L}\\\\ \left(\frac{\text{d}}{\text{d}t}\right)\left(\frac{\text{d}}{\text{d}t}+\frac{R}{L}\right)i&=\left(\frac{\text{d}}{\text{d}t}\right)\frac{V_\text{S}}{L}\\\\ \left(\frac{\text{d}}{\text{d}t}\right)\left(\frac{\text{d}}{\text{d}t}+\frac{R}{L}\right)i&=0 \end{align*}$$

And you know the solution to that one is just a pair of exponentials, except that the first one has a constant 0 as its parameter, so:

$$\begin{align*} i=A_1+A_2\cdot\exp\left(-\frac{R}{L}\,t\right) \end{align*}$$

At \$t=0\$ you have \$A_1+A_2=-i_0\$. At \$t=\infty\$ you have \$A_1=\frac{V_\text{S}}{R}\$. And I'm sure you can work out the rest.

periblepsis
  • 8,575
  • 1
  • 4
  • 18
  • Thank you for your answer. I understand all the things you've done but here you use the general solution technique for a homogeneous equation (I mean using $r$'s etc. without deriving them with integrals as I did). You use the initial value for the complete solution, and that makes sense but I don't understand what is wrong with the way I explained in the question. What should be corrected in that approach? In addition to that, I think setting the equation to be equal to $0$ also makes it homogeneous if I am not mistaken. – Lars Smith Mar 14 '24 at 22:43
  • 1
    @LarsSmith I didn't want to take your approach (would take more of time I don't have.) Rather, I chose to follow what's in Section 6.3, "Undetermined Coefficients and the Annihilator Method" from the 9th edition of "Fundamentals of Differential Equations" by Nagle, Saff, and Snider; Pearson, 2018. It's easier to just annihilate a constant to get a homogeneous equation. I could have separated general from the particular. If I feel like it later, I may add something. Not sure at this time, though. – periblepsis Mar 14 '24 at 23:49
3

The unknown constants present in the homogeneous solution must be determined when the initial conditions for \$t=0_+\$ are satisfied by the complete response \$i(t)=i_p(t)+i_h(t)\$.

Your particular solution \$i_p(t)=\frac{V_s}{R}\$ is correct (also called forced response). Note that, although there are numerous ways to find the homogeneous solution \$i_h(t)\$ (also called natural response or complementar one), it's still possible to modify your method, just leaving the calculation of unknow constant for later:

$$\int_{}{}\frac{di}{i} = -\int{}{}\frac{R}{L} dt$$

$$\ln(i_h) =-\frac{R}{L}t +\mathbb{C}$$

$$i_h(t)=e^{-\frac{R}{L}t+\mathbb{C}}$$

$$i_h(t)=e^{-\frac{R}{L}t}e^\mathbb{C}$$

Making \$K=e^\mathbb{C}\$:

$$i_h(t)=Ke^{-\frac{R}{L}t}$$

Then, the complete solution is:

$$i(t)=i_p(t)+i_h(t)$$

Or:

$$i(t) = \frac{V_s}{R} + Ke^{^-\frac{R}{L}t}$$

As I mentioned earlier, the constant \$K\$ is determined when the initial conditions (\$t=0_+\$) are satisfied by the complete solution:

$$i(0_+)=\frac{V_s}{R} + K=-I_0$$

$$K=-\frac{V_s}{R}-I_0$$

Finally:

$$i(t)=\frac{V_s}{R} - \left( \frac{V_s}{R}+I_0 \right) e^{-\frac{R}{L}t}$$

Valid for \$ 0 \lt t \leqslant \infty \$.

----------- Detailed explanation --------------

There are several ways to express the complete response of a system, typically given by the sum of two separate responses. The best known are:

(1) Natural (homogeneous) solution + Forced (particular) Solution.

(2) Zero-State Response + Zero-Input Response.

(3) Transient Response + Steady-State Response.

For a more detailed discussion, see my other answer (related with the subject) here: https://electronics.stackexchange.com/a/695628/22676

Your intention was to use the form (1), which is more used by math people, but it is not widely used in modern electrical engineering, as it is based on initial conditions \$t=0_+\$. Currently, form (2), which is based on initial conditions \$t=0_-\$, is preferred, since it conforms to the solution given by the unilateral Laplace Transform (with initial conditions \$t=0_-\$). Also note that, for \$t=0_-\$, the input did not yet exist. Even so, I tried to give an answer that adapted your solution.

In order to get the complete solution it's enough to use the method of separation of variables:

$$L\frac{di}{dt}+Ri=V_s$$

$$\frac{diL}{V_s-Ri}=dt$$

I'm going to use initial conditions in \$t=0_-\$. Notice that, in this case, \$i(0_-)=i(0_+)=-I_0\$:

$$L\int_{i(0_-)}^{i}\frac{d \varsigma}{V_s-R \varsigma}=\int_{0}^{t}d \tau$$

$$-\frac{L}{R} \left [ \ln \left ( \left | V_s-R \varsigma \right| \right ) \right ]^{i}_{i(0_-)}= t$$

$$-\frac{L}{R} \left [ \ln (V_s-Ri) - \ln(V_s-Ri(0_-)) \right ]= t$$

$$\ln(\frac{V_s-Ri}{V_s-Ri(0_-)})=-\frac{R}{L}t$$

So, when replacing \$i(0_-)=-I_0\$, we can get the form (1) as shown below. Remember that, the natural solution (or homogeneous one) brings together the characteristic modes (system poles).

$$i(t)=\underbrace{\frac{V_s}{R}}_{Forced \space solution} - \underbrace{\left( \frac{V_s}{R}+I_0 \right) e^{-\frac{R}{L}t}}_{Natural \space solution}$$

Valid for \$ 0 \lt t \leqslant \infty \$.

Through a simple algebric handling, we can get the form (2):

$$i(t)=\underbrace{\frac{V_s}{R}\left ( 1-e^{-\frac{R}{L}t} \right)}_{Zero-State \space resp.} - \underbrace{I_0 e^{-\frac{R}{L}t}}_{Zero-Input \space resp.}$$

Valid for \$ 0 \lt t \leqslant \infty \$.

In summary: You ended up mixing the two types of solutions. In fact, your original method

$$\int_{i(0)}^{i_h} \frac{di}{i} = -\int_{0}^{t} \frac{R}{L} dt$$

is related to get the Zero-Input Response, rather than the homogeneous solution (remember the difference between initial conditions \$t=0_-\$ and \$t=0_+\$). Is similar to separation of variables solution which I've presented above - just making \$V_s=0\$.

------ RESPONSE TO LAST QUESTIONS IN COMMENTS (Figure) -------

1. With no use of Laplace transform, is preferable to get the complete response (which can be separated in a sum of different responses later) through the Method of Separation of variables according my answer (for systems with order higher than one, that is not applicable). Of course, there are other methods presented in literature as choosing a linear combination of exponentials from a predefined table along unknown constants.

2. Yes, you can still use your method to find the Zero-Input response. In this case, is more convenient to choose the lower limit of integral as a generic \$i(0_-)\$, instead of \$-I_0\$ and only replace it later (with the negative value). In this manner, you won't have problems with signs. I think the reason lies in the absolute value involved with the \$ln\$ (natural log) function which results from integrating the \$1/i\$ (hyperbola function) from a higher value in magnitude to a lower in magnitude. See the figure. The integration "does not know" the difference (if the initial current and the final one are both \$> 0\$ or \$< 0\$). Notice that both areas are equal in magnitude and also negative in sign.

enter image description here

Otherwise, if you still to want use the \$-I_0\$ from the beginning of integration, you should fix the sign at the end for yourself. Example:

$$\int_{-I_0}^{i}\frac{d \varsigma}{\varsigma}=-\frac{R}{L}\int_{0}^{t}d \tau$$

$$\left [ \ln{ \left | \varsigma \right | } \right ]_{-I_0}^{i}= -\frac{R}{L}t$$

$$\ln(|i|) - \ln(|-I_0|) =-\frac{R}{L}t$$

$$\ln \left ( \frac{|i|}{|-I_0|} \right ) = -\frac{R}{L}t$$

$$ |i(t)|=|-I_0|e^{-\frac{R}{L}t} $$

Obviously, if you choose

$$ i(t)=I_0e^{-\frac{R}{L}t} $$

this expression does not correspond to your circuit. But, you know that the Zero-Input Response \$i(t)\$ is negative for any value of \$ t \ge 0\$. Then:

$$ i(t)=-I_0e^{-\frac{R}{L}t} $$

enter image description here

Dirceu Rodrigues Jr
  • 3,210
  • 12
  • 17
  • Ty, this means my guess (evaluating the initial condition in a wrong place) is correct. I knew the last section of your answer. However, I am still not sure about the first part. I mean, I do see that's how it should be done but why can't we just plug in limits to the integral for the homogeneous solution? It confuses me because for homogeneous equation (I think) we just think of a circuit with a resistor and the inductor (since $V_s = 0$) and the initial value of $i(t)$ for that equation must be $-I_0$. Why isn't this the case? What is the physical or mathematical intuition behind it? – Lars Smith Mar 15 '24 at 23:55
  • Ohhh, I think I got it! I think It is because of that subtle difference between $t=0$ and $t=0^+$. (I don't really know why it should be $t=0^+$ but) if it is $t=0^+$, then we should have $-I_0-\frac{V_s}{R}$ to compensate for the term that comes with the $V_s$, which is $+\frac{V_s}{R}$. I still need your validation and would like to hear your comment and explanation, please. Thank you. Edit: Well, that's not very clear in my mind but it might be something like this. – Lars Smith Mar 16 '24 at 00:07
  • 1
    Ok. I'm preparing a detailed explanation. – Dirceu Rodrigues Jr Mar 16 '24 at 00:11
  • 1
    I've rewritten my answer with additional points. – Dirceu Rodrigues Jr Mar 16 '24 at 02:08
  • I can't explain how grateful I am, sir. Thank you so much for these great explanations. I really thought that I was doing a zero-input + zero-state solution. I tried to solve the problem again using a similar attempt and this time I am closer to the solution :) I have written my questions in red. I will be even more grateful if you please answer them, thank you. https://i.imgur.com/A6rKyct.png – Lars Smith Mar 16 '24 at 15:03
  • Thank you, too. I'll be back soon. – Dirceu Rodrigues Jr Mar 16 '24 at 15:23
  • 1
    Oh, I thought similar things but now all of them makes sense with the graph. Since it is zero-input response, $i(t) < 0$ and so $|i(t)| = -i(t)$. I did think about such things with absolute value etc. but none made sense to me until I saw that graph. Thank you so much sir! – Lars Smith Mar 18 '24 at 00:14
2

The mistake that I see is setting: $$ i_p(t)=\frac{V_S}{R} $$ Actually: $$ i_p(t\rightarrow \infty)=\frac{V_S}{R} $$ is the steady state solution

Your particular DE should then be: $$ \left(i-\frac{V_s}{R}\right) + \frac{L}{R}\frac{\text{d}i(t)}{\text{d}t} = 0 $$

A change of variable \$z=\left(i-\frac{V_s}{R}\right)\$ implies that \$ \frac{\text{d}i(t)}{\text{d}t}=\frac{\text{d}z(t)}{\text{d}t}\$

This can now be integrated with the appropriate limits.

RussellH
  • 15,016
  • 2
  • 10
  • 38
  • Thank you for your answer. I understand everything in your answer but can't see what is wrong with my way. You say that setting $i_p(t) = \frac{V_s}{R}$ is the mistake but as far as I know this is how you get the particular solution (https://tutorial.math.lamar.edu/classes/de/undeterminedcoefficients.aspx). – Lars Smith Mar 15 '24 at 11:58
  • The capacitor has to charge to reach Vs/R. It can’t jump to that value instantly. The particular solution must be a charge curve. You may trying to use two methods at the same time. – RussellH Mar 15 '24 at 13:57
1

Your solution attempt tries to follow a math theory of the subject. It's so complex that I cannot see where it goes offroad.

With no calculations, only by sight reading the schematic, the solution seems to be

i = -Io(exp(-t/(L/R))+(Vs/R)(1-exp(-t/(L/R))

The initial current -Io decays off and the current from the voltage source grows gradually from zero to the steady state value. Both components have the same time constant L/R.

Not asked, but having a 1 to 2 switch which moves the endpoint of an inductor from one place to another without breaking the current of the inductor isn't practical. The working of the current source Io can meet some logical difficulties after the switch has been turned.

arnold8a
  • 141
  • 4