DC distribution line voltage drop model - Page 1
Forum section: electronics / general

author: mainakae
author_rank: Contributor
timestamp: May 29, 2013, 12:00:18 pm
content: There's not 2 without 3 (in spanish sounds better)This time I'm not only asking, but also offering some equations and scripts that I've designed to solve a problem that I've faced during the design of the power distribution on my Dromo project.The problem is to find the voltage drops along a dc power line, in which a number of devices are connected in series at different points in the line. All those devices are equipped with switching regulators, they can be feed at a quite range of voltages, and will consume different currents depending on the voltage at its input. Although it's not completely precise, I've modeled those devices as constant power devices, thus the current consumption will be a quotient between wats and volts. I've also considered a constant distance between devices, and the same power need for all of them. The line will be copper wire with a constant diameter all along.The simplified equation to find the voltage at the input of a device would be something like this:being X the device index, n the number of devices, Rl the resistance of the segment of line between this device and the previous one, and Id(j) the current consumption of the device indexed 'j'. As I told before, I've modelled the current consumption as a quotient of the constant wats the device consumes, and the voltage it sees at its input.After simplifying the equations I find that I'm not that good at maths. For n=1 I got two solutions (quite interesting and curiously valid). For n=2 I got 4 solutions,two of them are imaginary numbers (Even more interesting!) and so forth. I got tired of Dave's CAS, and tried an open CAS software: Maxima. I got solutions for systems of 15 equations in the blink of an eye (amazing stuff, really), but that was a complete mess. Then I found I could use the newton's method to iteratively solve the system given an initial solution, and here I give you what I came up with!:Code:kill(all)$load(mnewton)$h(n):=[makelist(V=V[i-1]-(17*(sum(1/V,j,i,n))*l*W)/(500*%pi*(dia/2)^2),i,1,n),makelist(V,i,1,n),makelist(V,n)]$consts:[n=8, l=10, dia=1, W=1.196, V=24]$params:subst(consts,h(ev(n,consts)))$volts:mnewton(params,params,params);relvolts:makelist('dV[i-1] = rhs(volts[i-1])-rhs(volts),i,2,length(volts))$watsseg:map(lambda(, lhs(x)=float(ev(rhs(x),consts))),makelist('W[i-1]=(rhs(volts[i-1])-rhs(volts))²/(l*0.068/(%pi*dia^2)),i,2,length(volts)))$waste:lsum(rhs(x),x,watsseg)$used:ev(W*n,consts)$print("total potential loss: ", dV:ev(V-rhs(volts),consts), "v, ", ev(dV*100/V,consts), "%")$print("total wasted wats:",waste)$print("used wats:",used)$print("efficiency:",used*100/(waste+used),"%")$To run it, copy that into Maxima, change the values of n, l, dia, W, V to your harts contempt, and press shift+return, et voila! (if it fails to come with a solution, it's because it's impossible to solve)If you have any fun reading this, or find that I'm a complete math disabled, please tell meAlso, if you have a better solution (or in case this is just b*****t, a working one) please share!

author: IanB
author_rank: Super Contributor
timestamp: May 29, 2013, 03:03:41 pm
content: Quote from: mainakae on May 29, 2013, 12:00:18 pmA schematic diagram of the system would help to understand what you are trying to do here. I can't immediately make sense of it, and a diagram helps to clarify the thoughts both of the writer and of the reader before attempting to put down equations.The most significant problem I have is that you describe "a number of devices connected in series", and yet you say "all these devices will consume different currents". This is, of course, impossible. If two or more devices are connected in series then all of them will be passing the same current, by definition. If you do not write equations that satisfy this constraint then your equations cannot be correct.If each of the devices has a different power consumption, then each will have a voltage drop proportional to the power consumed, whereVdrop= I x Preqin which Vdropis the voltage drop of the device, I is the current in the circuit and Preqis the power requirement of the device.For this to work, each of the devices will need to be designed as constant current, variable voltage input devices. I think in general this is quite a rare and unusual design. Most all electronic devices are designed as fixed voltage, variable current loads. Certainly any standard switching regulator is designed this way (with an expectation of varying current draw at a given supply voltage).So in summary, you cannot connect things in series like this. You need instead a two wire power feed (out and return), and you must connect your devices in parallel between the two wires. If you diagram this out, you will see the algebra for the voltage drop along the line becomes quite simple.

author: mainakae
author_rank: Contributor
timestamp: May 29, 2013, 07:36:45 pm
content: Sorry IanB, you are absolutely right, thanks for pointing that out. I wanted to say in parallel, but messed myself in the translation.I've tried to represent the problem with this schematic:

author: IanB
author_rank: Super Contributor
timestamp: May 29, 2013, 08:18:33 pm
content: Ah, in which case it becomes a fascinating problem.You can simplify the analysis by moving all the resistances to the V+ rail and considering V- as a common 0 V reference node. This means all your R values in the top rail will become 2R.You then will have a problem you can solve by nodal analysis by doing a current balance around each V+ node and using Ohm's law to define the voltage drop across each resistance.For the current in the loads you can do what you proposed and assume P = VI so that I = P/V.If you do this you should get a set of linear simultaneous equations to solve. If all the R and P values are equal then the solution may indeed simplify down to a simpler expression. I have not done the working to compare with your result, but now you have me intrigued, so I dare say I will work it out at some point.

author: croberts
author_rank: Regular Contributor
timestamp: May 29, 2013, 08:24:08 pm
content: I've always modeled my LED lights as constant power loads when designing the distribution of DC power from my battery bank. The LED drivers are designed to deliver a constant current of 1.1A over a DC input voltage range of 8V to 16V so for a given LED voltage drop of about 12V and a given driver efficiency the input power should be more or less constant. While the efficiency of the driver, temperature, etc. can all have an effect on the power demanded by the load, I think in cases like this the constant power load model is OK.

author: mainakae
author_rank: Contributor
timestamp: May 29, 2013, 08:34:29 pm
content: Yup, I started just like that, and one month later, my wife politely asked me not to bring the calculator to bed at night.The really fun bit of it is when you try to ¿isolate? (I don't know the term in eng to solve a var in an equation) the different values of V. It gets reaaaaally fun, and gets lots of solutionssome of them imaginary (which I certainly cannot interpret in reality) ((what does it mean an imaginary solution)) (((damn, my wife kills me this time)))Solving for [n=10, l=10, dia=1, W=1.2, V=24] here are the results:

author: Rufus
author_rank: Super Contributor
timestamp: May 29, 2013, 08:39:45 pm
content: Quote from: mainakae on May 29, 2013, 07:36:45 pmIf you had drawn it in spice you could just press the run button:---- Operating Point ---V(n001): 24 voltageV(n1): 23.3348 voltageV(n4): 0.665165 voltageV(n2): 23.2459 voltageV(n3): 0.754086 voltageI(B2): 0.0889212 device_currentI(B1): 0.0441118 device_currentI(R4): 0.0889212 device_currentI(R3): -0.0889212 device_currentI(R2): 0.133033 device_currentI(R1): -0.133033 device_currentI(V1): -0.133033 device_current

author: mainakae
author_rank: Contributor
timestamp: May 29, 2013, 08:44:36 pm
content: Rufus: That was obviously the sensible and wise way to go.hahahahaI spend most of my time in Linux, do you know something similar to spice working easy in ubuntu? (I tried several alternatives some time ago, but they involved plenty of command line execution and text file editing, which soon got me tired)

author: IanB
author_rank: Super Contributor
timestamp: May 29, 2013, 08:45:44 pm
content: Here's the basic problem statement in outline for the case of three loads:From here you can either solve the equations simultaneously using linear algebra, or you can back-substitute to eliminate variables.I don't have time to do it now, but I will probably have a look at it this evening. As I said, you have got me curious.It shouldn't be too hard to generalize it to N nodes.Edit: incorrect statements struck out. I missed the non-linearity of the system.

author: c4757p
author_rank: Super Contributor
timestamp: May 29, 2013, 08:46:23 pm
content: Quote from: mainakae on May 29, 2013, 08:44:36 pmLTspice in WINE. Works perfectly, as long as you don't press "print"...

author: Bored@Work
author_rank: Super Contributor
timestamp: May 30, 2013, 03:56:09 am
content: Quote from: c4757p on May 29, 2013, 08:46:23 pmAnd in recent versions as long as long as you don't press "Help".Support for using the Linux CHM help viewer was intentionally removed for no particular reason.

author: c4757p
author_rank: Super Contributor
timestamp: May 30, 2013, 04:13:44 am
content: I'm running the latest LTspice (4.19c) under the latest stable WINE (1.4.1) and that works fine for me. You're not using the devel version, are you?

author: IanB
author_rank: Super Contributor
timestamp: May 30, 2013, 05:37:33 am
content: Quote from: IanB on May 29, 2013, 08:45:44 pmWell, oops, I spoke too soonThe problem turns out to be non-linear, meaning that linear algebra will not be sufficient.I tried various approaches to substitute and eliminate variables and the result every time got ugly and messy.It absolutelyishard to generalize the solution to N nodes.I think a numerical solution approach like LTspice is going to be the best option.

author: Bored@Work
author_rank: Super Contributor
timestamp: May 30, 2013, 07:04:10 am
content: Quote from: c4757p on May 30, 2013, 04:13:44 amNo, latest version. It is even mentioned in the changelog that comes with LTSpice:Quote from: Changelog.txtBut I didn't investigate any further when I recognized Help didn't work any more and found the above in the changelog.

author: mainakae
author_rank: Contributor
timestamp: May 30, 2013, 08:23:34 am
content: I've just installed LTspice in Ubuntu with wine, and seemingly works perfectly!.QuoteDefinitely, the way to go is numerical approach. In this case, and after having written the program to generate the n equations to solve the n variables, I found that Maxima (and also my HP 49g) have means to numerically solve nonlinear systems, so I used them. With my script I find it really easy to get solutions fast, just byinputingsetting the values for n: the number of devices along the line, l: wire distance between devices, W: power consumption of each device, dia: diameter of the wire, V0: voltage of the power line at its initial point. The script generates n equations, solves them by means of Newton's method and finally gives the resulting efficiency of the power distribution line.In the very beginning I tried algebra, but results got more and more messy. If I recall correctly, they grew up exponentially for n<4, and after that, they somehow stabilized (they kept the same number of solutions for an increasing number of devices). I didn't study it in depth, as when I found imaginary results, I got completely puzzled. I could not interpret that solution. Any body knows what does it mean?, maths are maths, not being able to interpret a solution doesn't make it invalid

author: Bored@Work
author_rank: Super Contributor
timestamp: May 30, 2013, 09:32:51 am
content: Regarding the original questions, that thing is a textbook classic. When I studied it was one of the things to keep us students busy and to teach us there is a reason for other system models, e.g. two-port networks.Solution 1: IterativeYou can treat the circuit as a series of cascaded voltage dividers. Each divider is loaded by the following dividers. To build an equation iteratively, start at the end. The last two resistors and the last load are what loads the previous voltage divider.Zn_load = Zn + Rn_a + Rn_bAdd that load in parallel to the previous load. That gives you a new voltage divider which in turn loads its previous divider. Continue until you end up at the start.Zn-1_load = (Zn-1 || Zn_load) + Rn-1_a + Rn-1_bZn-2_load = (Zn-2 || Zn-1_load) + Rn-2_a + Rn-2_b...Z1_load = Ztotal = (Z1 || Z2_load) + R1_a + R1_bSolution 2: Two-port networksChop the circuit into a cascade of fundamental two-ports. If you are clever you do this to get as many identical fundamental two-ports as possible. Dig out the ABCD two-port parameters for the fundamental two-port you did chose. I.e. you need the a or b parameters. If you can't find them in your textbook, calculate them.Now, to calculating a cascade of two-ports is simply multiplying the a-parameter matrices (from start to end) or b-parameter matrices (in reverse order).Have fun actually calculating the resulting matrix.

author: mainakae
author_rank: Contributor
timestamp: May 30, 2013, 09:44:49 am
content: I never heard of two port networks before, THANKS!!!

author: Bored@Work
author_rank: Super Contributor
timestamp: May 30, 2013, 10:38:26 am
content: Quote from: mainakae on May 30, 2013, 09:44:49 amReally? Every time someone talks about the hfe of a transistor he is actually talking about one of the four parameters that form the hybrid (h for hybrid ...) matrix representation of a two-port. In this case the transistor, treated as a two-port.

author: Harvs
author_rank: Super Contributor
timestamp: May 30, 2013, 11:15:08 am
content: Yep, this is the DC version of "Power Flow, or "Load Flow" calculations in power transmission and distribution systems. Grab any power systems analysis text book and a good portion of it is devoted to solving these sort of non-linear problems through different iterative approaches. However, you'll find a large importance put on techniques that reduced the computational overhead, because AC lines and components aren't as simple, and there can be tens of thousands of buses in a network. Also you'll find the computational overhead is exponential with the number of buses to be analysed.