Author Topic: DC distribution line voltage drop model  (Read 7463 times)

0 Members and 1 Guest are viewing this topic.

Offline mainakae

  • Contributor
  • Posts: 17
DC distribution line voltage drop model
« on: May 29, 2013, 12:00:18 pm »
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: [Select]
kill(all)$
load(mnewton)$
h(n):=[makelist(V[i]=V[i-1]-(17*(sum(1/V[j],j,i,n))*l*W)/(500*%pi*(dia/2)^2),i,1,n),makelist(V[i],i,1,n),makelist(V[0],n)]$
consts:[n=8, l=10, dia=1, W=1.196, V[0]=24]$
params:subst(consts,h(ev(n,consts)))$
volts:mnewton(params[1],params[2],params[3])[1];
relvolts:makelist('dV[i-1] = rhs(volts[i-1])-rhs(volts[i]),i,2,length(volts))$
watsseg:map(lambda([x], lhs(x)=float(ev(rhs(x),consts))),makelist('W[i-1]=(rhs(volts[i-1])-rhs(volts[i]))┬▓/(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[0]-rhs(volts[n]),consts), "v, ", ev(dV*100/V[0],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[0] 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  :-DD )

If you have any fun reading this, or find that I'm a complete math disabled, please tell me :) Also, if you have a better solution (or in case this is just b*****t, a working one) please share!
« Last Edit: May 29, 2013, 12:02:42 pm by mainakae »
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10003
  • Country: us
Re: DC distribution line voltage drop model
« Reply #1 on: May 29, 2013, 03:03:41 pm »
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.

A 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, where

Vdrop = I x Preq

in which Vdrop is the voltage drop of the device, I is the current in the circuit and Preq is 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.

I'm a ChemE--I know all about the flow of fluids.
 

Offline mainakae

  • Contributor
  • Posts: 17
Re: DC distribution line voltage drop model
« Reply #2 on: May 29, 2013, 07:36:45 pm »
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:

 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10003
  • Country: us
Re: DC distribution line voltage drop model
« Reply #3 on: May 29, 2013, 08:18:33 pm »
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.
I'm a ChemE--I know all about the flow of fluids.
 

Offline croberts

  • Regular Contributor
  • *
  • Posts: 94
  • Country: us
Re: DC distribution line voltage drop model
« Reply #4 on: May 29, 2013, 08:24:08 pm »
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.
 

Offline mainakae

  • Contributor
  • Posts: 17
Re: DC distribution line voltage drop model
« Reply #5 on: May 29, 2013, 08:34:29 pm »
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 solutions :D some 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[0]=24] here are the results:

 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: DC distribution line voltage drop model
« Reply #6 on: May 29, 2013, 08:39:45 pm »
I've tried to represent the problem with this schematic:

If you had drawn it in spice you could just press the run button:-
       --- Operating Point ---

V(n001):    24    voltage
V(n1):    23.3348    voltage
V(n4):    0.665165    voltage
V(n2):    23.2459    voltage
V(n3):    0.754086    voltage
I(B2):    0.0889212    device_current
I(B1):    0.0441118    device_current
I(R4):    0.0889212    device_current
I(R3):    -0.0889212    device_current
I(R2):    0.133033    device_current
I(R1):    -0.133033    device_current
I(V1):    -0.133033    device_current
 

Offline mainakae

  • Contributor
  • Posts: 17
Re: DC distribution line voltage drop model
« Reply #7 on: May 29, 2013, 08:44:36 pm »
Rufus: That was obviously the sensible and wise way to go.  ;D hahahaha

I 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)
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10003
  • Country: us
Re: DC distribution line voltage drop model
« Reply #8 on: May 29, 2013, 08:45:44 pm »
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.
« Last Edit: May 30, 2013, 05:39:21 am by IanB »
I'm a ChemE--I know all about the flow of fluids.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7805
  • Country: us
  • adieu
Re: DC distribution line voltage drop model
« Reply #9 on: May 29, 2013, 08:46:23 pm »
I 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)

LTspice in WINE. Works perfectly, as long as you don't press "print"...
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3933
  • Country: 00
Re: DC distribution line voltage drop model
« Reply #10 on: May 30, 2013, 03:56:09 am »
I 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)

LTspice in WINE. Works perfectly, as long as you don't press "print"...

And 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.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7805
  • Country: us
  • adieu
Re: DC distribution line voltage drop model
« Reply #11 on: May 30, 2013, 04:13:44 am »
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?
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10003
  • Country: us
Re: DC distribution line voltage drop model
« Reply #12 on: May 30, 2013, 05:37:33 am »
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.

Well, oops, I spoke too soon  :-[

The 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 absolutely is hard to generalize the solution to N nodes.

I think a numerical solution approach like LTspice is going to be the best option.
« Last Edit: May 30, 2013, 05:40:05 am by IanB »
I'm a ChemE--I know all about the flow of fluids.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3933
  • Country: 00
Re: DC distribution line voltage drop model
« Reply #13 on: May 30, 2013, 07:04:10 am »
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?

No, latest version. It is even mentioned in the changelog that comes with LTSpice:
Quote from: Changelog.txt
04/05/12 xchm is no longer invoked to read the help file when running under Linux.

But I didn't investigate any further when I recognized Help didn't work any more and found the above in the changelog.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline mainakae

  • Contributor
  • Posts: 17
Re: DC distribution line voltage drop model
« Reply #14 on: May 30, 2013, 08:23:34 am »
I've just installed LTspice in Ubuntu with wine, and seemingly works perfectly!.

Quote
The 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 absolutely is hard to generalize the solution to N nodes.

I think a numerical solution approach like LTspice is going to be the best option.

Definitely, 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 by inputing setting 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  :-//
« Last Edit: May 30, 2013, 08:46:04 am by mainakae »
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3933
  • Country: 00
Re: DC distribution line voltage drop model
« Reply #15 on: May 30, 2013, 09:32:51 am »
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: Iterative

You 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_b

Add 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_b
Zn-2_load = (Zn-2 || Zn-1_load) + Rn-2_a + Rn-2_b
...
Z1_load = Ztotal = (Z1 || Z2_load) + R1_a + R1_b

Solution 2: Two-port networks

Chop 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.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline mainakae

  • Contributor
  • Posts: 17
Re: DC distribution line voltage drop model
« Reply #16 on: May 30, 2013, 09:44:49 am »
I never heard of two port networks before, THANKS!!! :-+ :-+ :-+
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3933
  • Country: 00
Re: DC distribution line voltage drop model
« Reply #17 on: May 30, 2013, 10:38:26 am »
I never heard of two port networks before, THANKS!!! :-+ :-+ :-+

Really? 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.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1200
  • Country: au
Re: DC distribution line voltage drop model
« Reply #18 on: May 30, 2013, 11:15:08 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf