# RL circuit.

Status
Not open for further replies.

#### alphacat

##### New Member
I read some different documents where RL circuit is used, and I saw that when the RL circuit is connected to a DC voltage source, the inductor's voltage grows exponentially at first, and then drops exponentially to zero.

When solving the equation for VL, it turns out that it immediately changes from 0V to Vsouce voltage the moment the circuit is switched on.

What was I disregarding in the equation for VL, that I didnt reach an exponential growth?

Thank you.

#### ccurtis

##### Well-Known Member
Your calculation is correct. I can't say as much for the documents you mentioned.

#### MikeMl

##### Well-Known Member
Inductor voltage decreases exponentially from applied voltage to zero.
Inductor current increases exponentially from zero to applied voltage divided by R. Time constant is RL.

#### Attachments

• 122.6 KB Views: 540

#### alphacat

##### New Member
Thank you.
What about when R->0?

I looked over this schematic in a power factor correction document I read:

As you can see, the third graph, which belongs to VL, shows that when the circuit gets close - GND-source-L-GND circuit - the inductor's voltage grows exponentially, and doesnt turn to Vin instantaneously.
Moreover, by theory, the current should have stayed 0A, since there shouldnt have been a change in voltage, execpt at t=0, but the current increases here.

It is also mentioned in the text:
"When the switch closes, the current (IL) gradually increases through it linearly.
Voltage (VL) across it increases exponentially until it stabilizes at VIN."

How do you explain please the two contradictions:
1. voltage doesnt instantaneously turn from 0V to VIN.
2. current doesnt stay 0A but increases.

#### Attachments

• 20.6 KB Views: 1,736
Last edited:

#### MikeMl

##### Well-Known Member
The author of the paper has it wrong after the switch opens. To simulate it, I had to add a second switch which connects the resistor while the depicited switch is closed. This second switch routes the inductor current into the resistor after the first switch opens.

#### Attachments

• 204.8 KB Views: 209

#### alphacat

##### New Member
Thank you very much for your great effort!

So you actually found two mistakes in the author's graphs.

1. The inductor's voltage changes instantaneously to VIN, and not exponentially.

2. After the second switch closes, the inductor's current decays exponentially and not linearly.

Is it correct?

Thank you again

Last edited:

#### MikeMl

##### Well-Known Member
...
So you actually found two mistakes in the author's graphs.

1. The inductor's voltage changes instantaneously to VIN, and not exponentially.
Yes, if there is no current in the inductor, and you apply a voltage, the voltage across the inductor is instantaneously created by the switch closure. The current right after the switch closes is zero, and then increases linearly.

2. After the second switch closes, the inductor's current decays exponentially and not linearly.
Actually its when the first switch opens that the current that was formerly flowing thought the inductor and switch is diverted through the resistor. The second switch was already closed, and remains closed until all the energy stored in the inductor is dissipated in the resistor, at which point, the second switch could open to restart the next cycle...

Last edited:

#### alphacat

##### New Member
Yes, if there is no current in the inductor, and you apply a voltage, the voltage across the inductor is instantaneously created by the switch closure. The current right after the switch closes is zero, and then increases linearly.

Actually its when the first switch opens that the current that was formerly flowing thought the inductor and switch is diverted through the resistor. The second switch was already closed, and remains closed until all the energy stored in the inductor is dissipated in the resistor, at which point, the second switch could open to restart the next cycle...

Lots of greetings and thanks

By the way, could you tell me plesae what is the simulator you used to simulate this circuit?
I usually use Pspice and there're many cases where Pspice's simulation doesnt represent reality.

Thank you again.

#### MikeMl

##### Well-Known Member
LtSpice, which is yet another variant of the Berkley Code. Simulation is only as good as the quality of the modelling. If you are getting disagreement between simulation and reality, it is because you didn't really model the reality.

##### Banned
alphacat, no simulator will always represent reality, this i why they're called simulators =) He's using LTSpice which has the same limitations PSpice does as far as I know. If you're acustomed to PSpice you may consider LTspice more user friendly, and free =)

#### alphacat

##### New Member
Thanks guys.
I'll give you an example.
Its not possible to simulate R=0,L DC circuit in Pspice.
Moreover, when I add serial resistance to circuit, a small resistance and a large inductor so its supposed to take pretty long time for the inductor to get fully charged, Pspice doesnt show this transition, the current increases instantaneously to its peak value.

Thank you for the LTSpice

Last edited:

#### MikeMl

##### Well-Known Member
Two things:

All Spice simulators have the restriction that R cannot be ZERO; however R can be 1nΩ, or 1uΩ or 1mΩ You can just leave out the resistor, or put it in your circuit (netlist) with a resistance so numerically close to zero that it doesn't effect the behavior of the circuit.

When you ask any Spice (PSpice and LtSpice included) to do a "transient analysis" (voltages and currents as a function of time), by default, it first does a "Initial solution" to establish all node voltages and branch currents. Unfortunately for your analysis of the inductor, Spice went ahead and computed the initial current that will flow in the inductor due to the applied voltage, which with R=0 should be infinite....

One way of many ways to suppress the default "Initial solution" is to explicitly tell Spice that the initial current in the inductor is zero, using the .IC I(Lx)=0 directive. See example:

Another way is to specify a voltage source that is zero while Spice does the "Initial solution", and then it switches to your desired applied voltage some time later. See example, where I have the voltage source turn on to 1V 1sec into the simulation.

So you see, Spice did exactly what you told it to do; you just didn't know how to tell it...

#### Attachments

• 181.1 KB Views: 102
Last edited:

##### Banned
For DC circuits I often simply use the startup directive on the .tran line, this starts the whole shebang off at 0 volts and raises the V sources to their set values in 20µs

#### alphacat

##### New Member
Man, that is very helpful information you just shared here!
Thank you very much!!
I'm very glad to know this.

Status
Not open for further replies.