# RC Circuit Analysis with a Diode

#### jbullock

Joined May 27, 2018
2
I have a simple RC first order circuit. I am using the p-operator and MNA methods to derive a first order differential equation so I can plug the Eigenvalue coefficients into the solution (y(t)=(Vf-Vo)*e^-t/tau +Vf) and have an equation for the transient response as shown on pages 3-5. This works for when the capacitor is charging without the diode, but not so much when it's discharging as shown on page 7.

Does anyone know how to setup this problem in the Hp prime calculator to solve for the capacitor's final voltage and the time constant similar to how I did it when the capacitor was charging? Can we use the p-operator method with non-linear diodes?

Thank you for any help regarding this topic!

#### Attachments

• 752.6 KB Views: 19

#### crutschow

Joined Mar 14, 2008
30,102
Hp prime calculator
What is the Hp prime calculator?

It's not clear what the schematic for the circuit you are analyzing is.

#### MrAl

Joined Jun 17, 2014
9,157
I have a simple RC first order circuit. I am using the p-operator and MNA methods to derive a first order differential equation so I can plug the Eigenvalue coefficients into the solution (y(t)=(Vf-Vo)*e^-t/tau +Vf) and have an equation for the transient response as shown on pages 3-5. This works for when the capacitor is charging without the diode, but not so much when it's discharging as shown on page 7.

Does anyone know how to setup this problem in the Hp prime calculator to solve for the capacitor's final voltage and the time constant similar to how I did it when the capacitor was charging? Can we use the p-operator method with non-linear diodes?

Thank you for any help regarding this topic!
Hello,

A large part of this depends on how you are modeling the diode. It looks like you are using a constant voltage model (the blue LED i guess it is).
If that is true, then the problem for the discharge is the same as usual except you have to subtract the diode voltage from the capacitor voltage which means the transient response changes a little. I'll explain a little then you can try it out, and check with a simulator. I dont use the HP anymore.

A capacitor charging with a resistor and constant voltage source is:
Vc(t)=Vcc*(1-e^(-t/RC))
as i am sure you know, where Vcc is the constant charge voltage.
If you have an initial cap voltage though, you have to subtract that from Vcc to get the starting charge current. Once you subtract though, you lose that extra cap voltage so you have to add it back after you calculate the exponential part. So we end up with this:
Vc(t)=(Vcc-Vc0)*(1-e^(-t/RC))+Vc0

For discharging we would do the same thing with the discharge equation.
Vc(t)=Vc0*e^(-t/RC)
Vc(t)=(Vc0-Vd)*e^(-t/RC)+Vd
and there we had to subtract the diode voltage Vd then add it back later.

Since this circuit actually requires a two independent variable differential equation, we also have to solve for the time when the discharge stops. This is easy though if we can assume the diode draws zero current once the voltage reaches the nominal forward voltage. That means once Vc(t)=Vd the discharge ends.

If the diode is really nonlinear, then you have to use the diode equation as well as the capacitor equations. That means you have to include the diode equation in the expression for the discharge where 'Vd' is shown in the above. That also means that time becomes a variable to solve for.

Try that see what you can come up with. I think you will find it interesting.

#### jbullock

Joined May 27, 2018
2
Thank you for your reply! I will chew on this for a moment and let you know my results!

#### MrAl

Joined Jun 17, 2014
9,157
Thank you for your reply! I will chew on this for a moment and let you know my results!
Ok sure, would be interesting to see what you can do with this now.