cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Diode Circuit Lambert function

BillDumke
1-Newbie

Diode Circuit Lambert function

I was trying to determine the current flowing through a simple diode circuit, but I must have done something wrong. Neither the Lambert part of the current relation nor the current change any with VS and R. Anyone have any ideas?

BTW I used the soon to be extinct "Mathcad Collaboratory" to find Stuart's LambertW function. (I wish the Collaboratory would remain up as it is, even if we can't post anything. The files there do not exist in the Community.)

See attached Mathcad 11 file.

Bill

1 ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:BillDumke)

I was trying to determine the current flowing through a simple diode circuit, but I must have done something wrong. Neither the Lambert part of the current relation nor the current change any with VS and R. Anyone have any ideas?

You overwrote the internal definition of "e".

I wish the Collaboratory would remain up as it is, even if we can't post anything. The files there do not exist in the Community.

I agree 100%. But I think they are going to wipe it out regardless of how much it upsets their users. I don't understand why, but they seem determined to do it.

View solution in original post

10 REPLIES 10
MikeArmstrong
5-Regular Member
(To:BillDumke)

I know absolutely nothing about the functions you are using but the section below seems to be causing the problem. Should it be zero?

Clipboard01.jpg

This is making your Lambert function zero, thus making the equation none dependant on VS and R.

Mike

Thanks, Mike. I don't either. The LambertW function popped up when I did the symbolic solution for the current "I". Then I found Stuart's LambertW function and decided to try it.

Thanks for finding the location of the problem. Maybe I copied something wrong, or did something else stupid. I will check everything over in detail. I think it should work.

Bill

RichardJ
19-Tanzanite
(To:BillDumke)

I was trying to determine the current flowing through a simple diode circuit, but I must have done something wrong. Neither the Lambert part of the current relation nor the current change any with VS and R. Anyone have any ideas?

You overwrote the internal definition of "e".

I wish the Collaboratory would remain up as it is, even if we can't post anything. The files there do not exist in the Community.

I agree 100%. But I think they are going to wipe it out regardless of how much it upsets their users. I don't understand why, but they seem determined to do it.

Thanks, Richard. That fixed it!

(I was getting buried in the differences in the way Mathcad 11 and 15 were doing the symbolics, but I hadn't thought about that at all.)

On the Collaboratory, I guess we are supposed to reinvent the wheel a few hundred thousand times.

MikeArmstrong
5-Regular Member
(To:RichardJ)

I was trying to determine the current flowing through a simple diode circuit, but I must have done something wrong. Neither the Lambert part of the current relation nor the current change any with VS and R. Anyone have any ideas?

You overwrote the internal definition of "e".

Good spot Richard, I always seem to miss those.

Is it prudent to not use any built in variables with hold units when using symbolic's then?

Mike

Is it prudent to not use any built in variables with hold units when using symbolic's then?

It's prudent not to use built in varables or units at all.

Why is the maximum VS voltage less (before "LambertW Cannot Converge" error) for vectorized values than single VS values?

See attached Mathcad 11 worksheet.

nas0k
7-Bedrock
(To:BillDumke)

It appears that the vectorized "VS" is never defined to 1.47 (the single value shown); only to i/100, where i = 0,1..122. You'll get to a "VS" value of 1.22.

Norm

RichardJ
19-Tanzanite
(To:BillDumke)

It won't converge for 1.23, even as a scalar value. I think it's a numerical computing problem, because during the iteration we get 16.0746318281344 - -1.27606529934758e^-15 = 16.0746318281344. In other words, a number minus a small number is equal to itself . In the Lambert function, change tol to 2*10^-15, and the problem goes away.

That worked. Thanks, Richard.

Bill

Top Tags