--- Log opened Tue Feb 05 00:00:51 2008 |
00:01 | <@ToxicFrog> | So far I've gotten two values for V2, and both of them are wrong. |
00:03 | <@gnolam> | What exactly are you doing? |
00:05 | <@ToxicFrog> | I have a circuit consisting of four resistors, one voltage source of known potential (12V) and one variable voltage source tied to the current through R4. |
00:06 | <@ToxicFrog> | I have to solve the circuit, ie, determine the voltage WRT ground at each node and the current through each component. |
00:06 | <@ToxicFrog> | I also have a simulator with which to check my results. |
00:06 | | * gnolam can't for the life of him remember how one should deal with variable sources. |
00:06 | <@ToxicFrog> | Express them in terms of the stuff that controls them. |
00:07 | <@ToxicFrog> | In this case, Vv = 2(i4) = 2(V3/4) = V3/2 |
00:07 | <@gnolam> | Ah. The rest should be simple nodal analysis then, or am I missing something? |
00:07 | <@ToxicFrog> | It should be. |
00:07 | <@ToxicFrog> | But I must be doing something wrong. |
00:08 | <@ToxicFrog> | For example, according to the simulator, V2 is +4.5V |
00:08 | <@ToxicFrog> | According to my nodal analysis, it's -24V |
00:09 | <@gnolam> | And you've eliminated independent voltage sources and all that? |
00:09 | <@ToxicFrog> | I...think so? |
00:13 | <@ToxicFrog> | AIUI, I treat each source as a supernode, express its input and output currents in terms of each other, re-express in terms of node voltages and then do KVL. |
00:14 | <@ToxicFrog> | At which point everything should Just Work, as I can solve for some variable and then it just cascades. |
00:14 | <@ToxicFrog> | In practice this doesn't happen. |
00:26 | <@ToxicFrog> | Dammit. I hate it when after going through five rounds of simplification you end up with 1=1 |
00:26 | < C_tiger> | Yeah. |
00:30 | < C_tiger> | TF, ok, correct me if I'm wrong but a nodal analysis should only work if the whole system stabilizes, right? |
00:31 | < C_tiger> | And because you have a variable source, there's nothing saying that it can't be bistable or even chaotic. |
00:31 | <@ToxicFrog> | In theory, yes. |
00:31 | <@ToxicFrog> | In practice, the prof guarantees that this system is stable. |
00:31 | <@ToxicFrog> | And the simulator agrees. |
00:31 | < C_tiger> | Oh. |
00:32 | < C_tiger> | I was trying to lend you credence :P |
00:32 | <@ToxicFrog> | Whyyyyy |
00:32 | <@ToxicFrog> | Applying KVL to the second supernode loop gets me: |
00:32 | < C_tiger> | Why was I trying to lend you credence? |
00:33 | <@ToxicFrog> | 0=(0-V1)+(V1-V2)+(V2-0) |
00:33 | <@ToxicFrog> | Oh, waot |
00:33 | <@ToxicFrog> | I'm doing it wrong |
00:55 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Blargh.] |
01:03 | <@ToxicFrog> | aAaagh, why, why why why why why why why |
01:03 | < C_tiger> | ? |
01:03 | < C_tiger> | What's the circuit? |
01:04 | <@ToxicFrog> | Catch. |
01:05 | < C_tiger> | I can't accept DCCs with trillian. |
01:05 | < C_tiger> | I don't know why. |
01:06 | < Serah> | Because trillian is knitted from wool. |
01:06 | < C_tiger> | Or maybe it's this firewall. |
01:06 | <@ToxicFrog> | http://www.funkyhorror.net/toxicfrog/shinies/analog_hate.PNG |
01:06 | <@ToxicFrog> | Unless your firewall blocks outgoing connections, it's not the firewall. |
01:07 | <@McMartin> | My firewall doesn't and *I* can't accept or send DCC. |
01:07 | <@ToxicFrog> | Odd. |
01:07 | <@ToxicFrog> | Try catching that? |
01:08 | <@McMartin> | Hm. |
01:08 | <@McMartin> | Looks like it worked. |
01:08 | <@ToxicFrog> | Indeed. |
01:08 | <@McMartin> | But! |
01:08 | <@McMartin> | I'll check my firewall when I get home. |
01:08 | | * McMartin may have "forward 1023-65534 to IRC client machine" active. |
01:09 | <@ToxicFrog> | You don't need inbound to accept DCC. |
01:09 | <@ToxicFrog> | You do, however, need in order to send it. |
01:12 | <@ToxicFrog> | C_tiger: anyways. That's the circuit I need to analyze. |
01:12 | < C_tiger> | Hmm. |
01:13 | < C_tiger> | yeah, it's all linear equations so it should be one solution or no solutions or infinite solutions. |
01:15 | <@ToxicFrog> | And the sim and the prof both say one solution. |
01:15 | <@ToxicFrog> | But bugger me if I can find it. |
01:16 | <@ToxicFrog> | Or, rather |
01:16 | <@ToxicFrog> | I have the solution, since the sim gave it to me. |
01:16 | <@ToxicFrog> | However, I can't seem to get the intermediate steps that lead to it. |
01:16 | < C_tiger> | Ok, 10 equations, 9 unknowns. |
01:17 | < C_tiger> | That sucks, I have to find the one that's redundant. |
01:21 | <@ToxicFrog> | How did you get those 10 equations, and what are they? |
01:21 | <@ToxicFrog> | Oh hey. |
01:22 | | * ToxicFrog has an epiphany |
01:22 | < C_tiger> | Each node has a conservation of charge. |
01:22 | < C_tiger> | each "line" has a voltage relation. |
01:22 | <@ToxicFrog> | Yes, but two of the lines you can't express except in terms of the others. |
01:22 | < C_tiger> | So? |
01:23 | <@ToxicFrog> | I mean, ok, I have the KCL equations: i2+i4 = i1, i1 = i5+i6, i6 = i2+i3, i5+i3 = i4 |
01:24 | | UndeadAnno [AnnoDomini@83.21.65.ns-3214] has quit [Ping Timeout] |
01:24 | < C_tiger> | Ack your numbering doesn't agree with mine :( |
01:24 | <@ToxicFrog> | And the supernodes: i1+i3 = i6+i4, i1 = i2+i3+i5 |
01:25 | <@ToxicFrog> | And equations for i1 through i4 in terms of the node voltages, and Hv in terms of i4. |
01:25 | | Derakon[AFK] is now known as Derakon |
01:25 | | * ToxicFrog tries to express V2 in terms of V1 only |
01:26 | < C_tiger> | Yeah, I actually tend to take a voltage-based approach. |
01:26 | < C_tiger> | So I plug everything until I have no more i's. |
01:29 | <@ToxicFrog> | Even with voltage sources involved? |
01:30 | < C_tiger> | I'm solving now, I found my redundant equation, so I've knocked one out. |
01:32 | <@ToxicFrog> | Please show me! |
01:32 | <@ToxicFrog> | I have the numbers, it's the process I need! |
01:33 | < C_tiger> | sorry, let me see if this works first. |
01:38 | < C_tiger> | I get V2 = 4.5 |
01:38 | < C_tiger> | v3 = -15, v1 = -3 |
01:39 | < C_tiger> | the rest will be trivial to solve for so I'm leaving it as an exercise to the reader as it will. |
01:39 | < C_tiger> | As for how to solve, here's my working. You'll have to use my numbers, though. |
01:39 | < C_tiger> | erm notation. |
01:40 | <@ToxicFrog> | Ok. |
01:40 | <@ToxicFrog> | (and those voltages are correct) |
01:40 | < C_tiger> | One sec, drawing my notation out so it's easy to explain. |
01:46 | < C_tiger> | Ok, so my variables are named A,B,C for the voltages and my currents are i1-i6. |
01:46 | < C_tiger> | With everything pointed "down" and from A->C |
01:46 | < C_tiger> | Here's my process: Take node A: |
01:47 | < C_tiger> | A = C + 12 (from "line" 6) |
01:47 | < C_tiger> | A = B + 2 i4 |
01:47 | < C_tiger> | A = 4 i3 |
01:47 | < C_tiger> | Take B: B = i1 |
01:47 | < C_tiger> | C = B + 2 i2 |
01:48 | < C_tiger> | C = 4 i4 |
01:48 | < C_tiger> | Then KCL: |
01:48 | < C_tiger> | A: 0 = i6+i5+i3 |
01:49 | < C_tiger> | B: i1 = i5+i2 |
01:49 | < C_tiger> | C: i6 = i2+i4 |
01:49 | < C_tiger> | Bottom: 0 = i4+i1+i3 |
01:50 | < C_tiger> | Number equations 1-10 |
01:51 | < C_tiger> | cross out equations 8, 9 replace each instance of i1 and i6 with equivalents. |
01:52 | < C_tiger> | eq 10 and eq 7 become redundant, so cross one out. |
01:53 | < C_tiger> | From eq3: i3 = A/4, so replace through. |
01:54 | < C_tiger> | From eq4: i1 = B so replace through, from eq6: i4=C/4 ditto. |
01:57 | <@ToxicFrog> | Ok, I'm having current direction problems. |
01:57 | <@ToxicFrog> | Is i5 from A to B or B to A? |
01:58 | < C_tiger> | A->B |
01:59 | < C_tiger> | Sorry, I forgot I had rice on the stove... |
01:59 | < C_tiger> | now charcoal. |
01:59 | <@McMartin> | D'oh |
01:59 | <@ToxicFrog> | Been there. |
01:59 | < C_tiger> | Yeah. |
02:01 | <@ToxicFrog> | Ok. This means that i1, i3 and i4 all flow to ground, i6 flows from A to C, i2 from C to B? |
02:01 | < C_tiger> | yep |
02:01 | < C_tiger> | current flows "down" |
02:01 | <@ToxicFrog> | (this is, I note, the precise inverse of how the simulator says the current flows) |
02:01 | < C_tiger> | yes. |
02:01 | <@ToxicFrog> | (but the signs all cancel in the end, so) |
02:02 | < C_tiger> | So I'm pretty sure all my i's will be negative. |
02:02 | < C_tiger> | But I like having a consistent "rule" like that so everything looks good. |
02:03 | <@ToxicFrog> | Ok. Let's try reapplying this to my own layout to see if I can replicate it. |
02:03 | | Vornicus is now known as Vornicus-Latens |
02:03 | < C_tiger> | anyhow, you can cancel all the i's or at least enough to get three equations with only A/B/C |
02:03 | < C_tiger> | which is then solvable. |
02:04 | < C_tiger> | The trick is to cross out an equation once you've used it so you don't hit any redundancies |
02:05 | | * Derakon draws dots on the anchor points for his modules, discovers that his FK solutions are hideously inaccurate. |
02:05 | <@Derakon> | Which is to say, I already knew that, but man, they aren't accurate at any angle. |
02:06 | <@Derakon> | Enh, okay, I guess they're accurate when everything has a rotation of 0°. |
02:12 | < C_tiger> | How are you doing the FK? |
02:12 | <@Derakon> | I have point <a, b> on the parent, point <c, d> on the child, and a rotation of theta. |
02:13 | <@Derakon> | I center the child on the origin, rotate it by theta, find out where <c, d> ended up, and move the child so that a == c and b == d. |
02:14 | < C_tiger> | Hmmm... that feels really cumbersome. |
02:15 | < C_tiger> | Can't you just apply the same transformation to the parent and the child? |
02:15 | < C_tiger> | Then they'd always align. |
02:15 | <@Derakon> | The child needs to have its own rotation relative to the parent, though. |
02:15 | <@Derakon> | Otherwise you just have a static object. |
02:15 | <@McMartin> | So, you need a "rotate around point X" primitive. |
02:15 | < C_tiger> | Ok, can you rewrite your transformation around your anchor point? |
02:15 | <@Derakon> | With the caveat that X will change as the parent rotates, yes. |
02:16 | <@McMartin> | And it will, but that's fine. |
02:16 | <@McMartin> | If you rotate the parent and the children around the same point, they should stay aligned as an aggregate, yes? |
02:16 | <@Derakon> | And what do you mean by "primitive"? |
02:16 | <@Derakon> | They should, yes. |
02:16 | <@Derakon> | C: I'm not certain what you mean. |
02:16 | <@McMartin> | "As a function in its own right that you can just ask to do" |
02:17 | < C_tiger> | well, the easy way would be to instead of recentering your object to be rotated around the center, move it so the anchor point is the origin. |
02:17 | <@Derakon> | Well, I've stuck the IK solving into its own Lua function...putting it into C++ doesn't really seem necessary or even helpful. |
02:17 | < C_tiger> | So just move it by <-a,-b>, rotate, move by <a,b> |
02:18 | <@Derakon> | Hrm...that seems plausible...but all it gains me is a couple of additions/subtractions. |
02:19 | <@McMartin> | Well, it should also gain you right answers. |
02:19 | <@Derakon> | Heh. |
02:19 | < C_tiger> | I think it'll fix this problem since your anchor point is guaranteed not to move. |
02:19 | < C_tiger> | And you don't have to find "where c,d ended up" which will introduce rounding errors. |
02:20 | <@Derakon> | Not really..."where <c, d> ended up" is basically the rotation. |
02:20 | < C_tiger> | right, but my gut says if your code does what it says then your offsets are due to rounding. |
02:21 | <@Derakon> | That doesn't strike me as plausible. I have double-level precision and I'm off by at least ten pixels. |
02:21 | <@Derakon> | And I'm only doing, max, a dozen operations. |
02:21 | <@Derakon> | (And positions are stable. Wrong, but stable) |
02:21 | <@McMartin> | Then your attempt to find it is incorrect somehow, and removing the need for it should solve the problem entirely. |
02:21 | <@McMartin> | Every step is an opportunity for a bug. |
02:21 | <@Derakon> | I'm not arguing that the code is flawed. :) |
02:21 | <@Derakon> | Er, isn't. |
02:22 | <@Derakon> | I'm just picking nits over potential problems. I'll try rotating about <a, b>. |
02:22 | < C_tiger> | regardless, it shouldn't add operations because you add/subtract when you center about the origin and add/subtract again when you move to match. |
02:25 | <@ToxicFrog> | Hmm. I chose unwisely when making eliminations. |
02:25 | < C_tiger> | TF, works now? |
02:25 | <@ToxicFrog> | I now have math that claims the current through the voltage source is 5.86A, but I'm pretty sure this is a typo. |
02:25 | <@ToxicFrog> | Since the equations got very, very ugly towards the end. |
02:26 | < C_tiger> | Ugh. |
02:26 | < C_tiger> | That's why I solve for volts first. |
02:26 | <@ToxicFrog> | Yeah. |
02:26 | <@ToxicFrog> | I lost track of that somewhere and ended up solving for i6. |
02:26 | <@ToxicFrog> | It ended badly. |
02:26 | < C_tiger> | ick. |
02:28 | <@ToxicFrog> | Let's try this again... |
02:43 | <@ToxicFrog> | Son of a bitch |
02:43 | <@ToxicFrog> | -3 does not equal 54 |
02:47 | <@Derakon> | Not in most base systems, no. |
02:47 | | * ToxicFrog fires up postscript and starts verifying every single equation |
02:54 | <@ToxicFrog> | GS> V1 V2 2 V2 * + V3 - 2 i5 * + eq == |
02:54 | <@ToxicFrog> | false |
02:54 | <@ToxicFrog> | Aha! |
02:59 | <@ToxicFrog> | ...now I have V1 == -2V1 |
03:04 | <@ToxicFrog> | Found it. |
03:05 | <@ToxicFrog> | I dropped a power of 2 in equation 1 while expanding i5 into (V1-2V2+V3)/2 |
03:09 | <@ToxicFrog> | finally |
03:09 | <@ToxicFrog> | V2 = +4.5V |
03:10 | <@ToxicFrog> | Which trivially gets me V1 and V3, and from there, the rest of the circuit. |
03:10 | <@ToxicFrog> | That took way longer than it should have and I made way more mistakes than is reasonable. |
03:10 | <@ToxicFrog> | I wonder if my algebra gland has atrophied or something. |
03:13 | <@ToxicFrog> | Thank you, C_tiger. |
03:20 | <@Derakon> | Okay, I must be misunderstanding C's rotation idea. Let's try an example with numbers. |
03:21 | <@Derakon> | Say I have a point <1, -1> that's my anchor point (<a, b> earlier) and I want to attach a point at <2, 0> to it, but that point needs to be rotated 45° first. |
03:21 | <@Derakon> | So I move the whole shebang so that the anchor point is at <0, 0>, putting my target point at <1, 1>. |
03:22 | <@Derakon> | Then I rotate the target point 45°, putting it at <0, 1.414> or thereabouts. |
03:22 | <@Derakon> | Then I move it by <1, -1>, putting it at <1, .414>. |
03:22 | <@Derakon> | What have I gained here? |
04:05 | < C_tiger> | Hmmm...? |
04:06 | < C_tiger> | I don't understand the question? |
04:07 | <@Derakon> | If I understand your suggestion, it was to take <c, d>, subtract <a, b> from it, rotate, and then add <a, b> again. But from doodling on my scratch paper, that algorithm doesn't work. |
04:07 | <@Derakon> | So I must have misunderstood. |
04:07 | < C_tiger> | No. |
04:07 | < C_tiger> | My suggestion is to take your object, subtract <a,b>, rotate, add <a,b> |
04:08 | < C_tiger> | Then <c,d> which started at <a,b> will end at <a,b> |
04:08 | <@Derakon> | Ah. |
04:08 | <@Derakon> | The key is that <c, d> is <a, b> before you start. |
04:09 | < C_tiger> | Right. |
04:09 | < C_tiger> | You'd have to do that for your algorithm anyway. |
04:09 | < C_tiger> | I think. |
04:09 | < C_tiger> | I'm not entirely sure what <c,d> is. |
04:09 | <@Derakon> | <c, d> is a point somewhere on the child object in its unrotated state. |
04:10 | < C_tiger> | Right, but what is it's significance? |
04:10 | < C_tiger> | its. |
04:10 | < C_tiger> | blargh. |
04:10 | <@Derakon> | It's the point that connects the child to the parent. |
04:10 | <@Derakon> | Like the upper bicep being the point on the upper arm connecting to the shoulder, say. |
04:10 | < C_tiger> | Ok, so it should always start at <a,b> right? |
04:10 | <@Derakon> | Mm. Yes. |
04:10 | < C_tiger> | Right. |
04:11 | < C_tiger> | Actually, rather than thinking in separate coordinates, you'd probably do better thinking in a single system. |
04:11 | <@Derakon> | Yeah, okay, quick doodles indicate that should work. |
04:12 | < C_tiger> | For example, take the trivial case of an arm attached to a shoulder with a forearm attached at the other end. |
04:13 | < C_tiger> | If you're rotating about the shoulder, you rotate both the arm and the forearm around a single point. |
04:13 | <@Derakon> | So cascade the rotation down the chain? |
04:13 | < C_tiger> | No, it takes care of itself. |
04:14 | < C_tiger> | Do you have a drawing program like photoshop? |
04:14 | <@Derakon> | Yes. |
04:14 | < C_tiger> | Ok, Make two lines on two layers. |
04:15 | < C_tiger> | so that they're "connected" at one point. |
04:15 | < C_tiger> | Each represents an object. |
04:15 | <@Derakon> | Yeah, sure. |
04:16 | < C_tiger> | Now if you rotate the "forearm" one by the current "elbow" point (drag the little crosshair, usually at the center) you'll just bend the arm. |
04:16 | < C_tiger> | Now try this: rotate the forearm by the "shoulder" point. So drag the crosshair to the shoulder point and rotate by ... 30-degrees, say. |
04:17 | < C_tiger> | then do the same with the upper arm part. |
04:17 | <@Derakon> | I seem to be unable to grab the crosshair. >.< |
04:18 | < C_tiger> | ? |
04:18 | < C_tiger> | what program. |
04:18 | < C_tiger> | ? |
04:18 | <@Derakon> | Photoshop. |
04:18 | <@Derakon> | Edit->Transform Path->Rotate |
04:18 | < C_tiger> | Don't use paths. |
04:18 | < C_tiger> | just brush it. |
04:18 | <@Derakon> | When I drag the crosshairs, the entire object moves. |
04:18 | <@Derakon> | Ah. |
04:19 | < C_tiger> | two separate layers. |
04:20 | <@Derakon> | Argh, dammit. Worked for the first arm, not the second. But anyway, I see what you mean. |
04:20 | < C_tiger> | Right, you can rotate about any point. |
04:20 | < C_tiger> | it doesn't have to be on the object itself. |
04:20 | <@Derakon> | Basically, so long as you have the points in common, applying a constant rotation to them will keep them in the same positions relative to each other. |
04:21 | < C_tiger> | Right. |
04:21 | < C_tiger> | As long as your centers of rotation are constant, things will move in unison. |
04:21 | < C_tiger> | and if you want "flapping", just put the center of rotation at the pivot point. |
04:22 | < C_tiger> | So then you just need an algorithm to rotate an object about a given center of rotation, which is what I gave earlier. |
04:22 | < C_tiger> | Subtract, rotate, add. |
04:25 | < C_tiger> | which in vector terms is a single line: x' = A(x-a)+a |
04:25 | <@Derakon> | A being your transformation matrix, I assume. |
04:25 | < C_tiger> | right. |
04:25 | < C_tiger> | A is your rotation. |
04:26 | < C_tiger> | Hmmm... I wonder if it commutes, one sec. |
04:26 | < C_tiger> | erm, distributes. |
04:26 | < C_tiger> | I'm pretty sure that Ax - Aa + a also works. |
04:28 | < C_tiger> | So to minimize calculation for each data point in your object, just calculate -Aa+a once and you do one set of rotations and one set of additions. |
04:28 | <@Derakon> | Heh. |
04:29 | <@Derakon> | For the time being, I'm going to assume that every joint may end up rotating, and thus I'm not going to complexify the routines. I obviously have enough trouble understanding this as it is. |
04:29 | < C_tiger> | Right, this is why McM said to make a primary. |
04:29 | <@Derakon> | I doubt this will be a performance problem, so I'd rather keep it as simple as possible. |
04:29 | <@McMartin> | You're likely to be inlining it a hojillion times, though. |
04:29 | <@McMartin> | Hence why it should be a function. |
04:30 | <@Derakon> | Oh, I'm making it a function, never fear. |
04:30 | <@Derakon> | The code may not be efficient, but it'll be well-factored. |
04:30 | < C_tiger> | so write a subroutine: rotate([x,y], [a,b], theta) |
04:30 | <@Derakon> | You mean Module:FK(angle, anchorX, anchorY, targetX, targetY)? |
04:30 | < C_tiger> | Ok, that order works, too. But yes. |
04:31 | <@Derakon> | This is the function I've been debugging. |
04:31 | <@Derakon> | You people have no faith in my programming skills. ;p |
04:31 | < C_tiger> | And that returns two values, right? |
04:31 | < C_tiger> | :P |
04:31 | <@Derakon> | Ah, you mean getRotatedCoordinates, which is a routine that FK calls. FK actually modifies the sprite object. |
04:32 | <@Derakon> | Anyway. Lemme write this code. |
04:32 | < C_tiger> | Then you don't need targetX, targetY. |
04:32 | < C_tiger> | If you're rotating a sprite, you just need an anchor and an angle. |
04:33 | <@Derakon> | The assumption is that I do not currently have a guarantee that the sprite is in the right place. |
04:33 | < C_tiger> | Ah. |
04:34 | < C_tiger> | TF: how did you get powers of two? |
04:34 | < C_tiger> | (do you mean a coefficient?) |
04:35 | <@ToxicFrog> | I accidentally dropped a coefficient from 4 to 2. |
04:35 | < C_tiger> | Ah. Ok. |
04:36 | < C_tiger> | Just checking. Because for a second, I wasn't sure if we were solving the same set of equations. |
04:54 | < C_tiger> | Derakon, I just realized something that may have been what's confusing you: rotation not-about-the-origin is not a matrix transformation. If you develop your matrix by seeing what happens to a pair of reference points (the old eigenvector trick), you can't then apply this matrix to other points. |
04:54 | < C_tiger> | s/realized/remembered/ |
04:54 | <@Derakon> | Yeah, I don't think I had that particular problem... |
04:55 | < C_tiger> | Ok. |
06:46 | | Derakon is now known as Derakon[AFK] |
07:06 | | UndeadAnno [AnnoDomini@83.21.65.ns-3214] has joined #Code |
08:05 | | Syloq [Coder@NetAdmin.Nightstar.Net] has joined #code |
08:07 | | Syloq is now known as Syloqs-AFH |
08:40 | | You're now known as TheWatcher |
09:02 | | totikalos [~totikalos@86.123.171.ns-21777] has joined #Code |
09:03 | | totikalos [~totikalos@86.123.171.ns-21777] has left #Code [] |
09:43 | <@Vornicus-Latens> | Note that if you're using the w-coordinate thing, translation (and thus rotation about something other than the origin) is in fact a matrix transformation. |
10:52 | <@Vornicus-Latens> | Using w coordinate, you need three points' transformations to get the whole matrix in 2d, and four points in 3d. |
10:53 | | C_tiger [~c_wyz@96.232.26.ns-4600] has quit [Ping Timeout] |
11:00 | | C_tiger [~c_wyz@Nightstar-16845.nycmny.east.verizon.net] has joined #code |
11:41 | | Attilla [~The.Attil@194.72.70.ns-11849] has quit [Quit: <Insert Humorous and/or serious exit message here>] |
11:48 | | Attilla [~The.Attil@194.72.70.ns-11849] has joined #code |
12:01 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code |
12:02 | | mode/#code [+o gnolam] by ChanServ |
13:53 | | Serah [~Z@87.72.35.ns-26506] has quit [Ping Timeout] |
14:10 | | Serah [~Z@87.72.35.ns-26506] has joined #Code |
15:09 | | C_tiger [~c_wyz@Nightstar-16845.nycmny.east.verizon.net] has quit [Ping Timeout] |
15:15 | | C_tiger [~c_wyz@96.232.26.ns-11798] has joined #code |
15:26 | | Syloqs-AFH [Coder@NetAdmin.Nightstar.Net] has quit [Ping Timeout] |
16:44 | | Xiphias [~Ameroth@Nightstar-13011.wlms-broadband.com] has joined #code |
16:53 | | Xiphias [~Ameroth@Nightstar-13011.wlms-broadband.com] has quit [Quit: I was never gone] |
16:56 | <@ToxicFrog> | Gnar. |
16:56 | <@ToxicFrog> | 7 equations, 8 unknowns. |
17:09 | <@gnolam> | One man. One desire. |
17:13 | | You're now known as TheWatcher[afk] |
17:21 | | Chalcedon [~Chalcedon@Nightstar-2443.ue.woosh.co.nz] has joined #code |
17:22 | | mode/#code [+o Chalcedon] by ChanServ |
17:52 | < C_tiger> | TF? |
18:13 | < MyCatVerbs> | ToxicFrog: heehee, "Down and Out in the Linear Kingdom." |
18:25 | | You're now known as TheWatcher |
18:42 | | Pi [~sysop@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout] |
18:42 | | UndeadAnno [AnnoDomini@83.21.65.ns-3214] has quit [Ping Timeout] |
18:46 | | UndeadAnno [AnnoDomini@83.21.65.ns-3214] has joined #Code |
20:37 | <@ToxicFrog> | C_tiger: the sequel to yesterday's problem. |
20:37 | <@ToxicFrog> | Five resistors (all 1ohm each, to make things easy); one 8V voltage source; two unknown voltage sources V1 and V2. |
20:37 | <@ToxicFrog> | Find values for V1 and V2 that satisfy the constraint Va = 0 |
20:39 | <@ToxicFrog> | Which I did, but that got me an internally consistent circuit which the simulator says cannot actually exist. |
20:40 | | Pi-2 [~sysop@24.19.152.ns-3536] has joined #code |
20:41 | <@ToxicFrog> | I think what I need to do is express V1 and V2 and Va in terms of each other, then solve the function that gets me (V1,V2) pairs such that Va is 0. |
20:41 | <@ToxicFrog> | In practice this is proving problematic. |
21:49 | | Thaqui [~Thaqui@222.154.186.ns-24386] has joined #code |
21:49 | | mode/#code [+o Thaqui] by ChanServ |
22:01 | | UndeadAnno [AnnoDomini@83.21.65.ns-3214] has quit [Ping Timeout] |
22:09 | | UndeadAnno [AnnoDomini@83.21.72.ns-3674] has joined #Code |
22:44 | < C_tiger> | Va = ? |
22:45 | < C_tiger> | Sorry, TF, just got back. |
22:45 | <@ToxicFrog> | One of the node voltages. |
22:46 | < C_tiger> | Ok. |
22:46 | < C_tiger> | Then just treat it like that's ground. |
22:46 | <@ToxicFrog> | Well, I also have ground. |
22:46 | <@ToxicFrog> | Which is what lets me determine i2 as 0 and i3 as 8. |
22:46 | < C_tiger> | But Va = 0 means that that's also ground. |
22:47 | <@ToxicFrog> | Yes. |
22:47 | <@ToxicFrog> | ...actually, no. |
22:47 | <@ToxicFrog> | It means it's at 0 potential WRT ground. |
22:47 | <@ToxicFrog> | It's not necessarily topologically equivalent. |
22:48 | < C_tiger> | Um... I'm not sure what the difference is. |
22:48 | < C_tiger> | If you ground that node, it's Voltage becomes 0, right? |
22:49 | <@ToxicFrog> | "ground" to me implies that it's part of the ground node. |
22:49 | < C_tiger> | Right but for all the purposes as far as the math goes, you can treat Va = 0 |
22:49 | <@ToxicFrog> | Whereas if I have a circuit that's, say - ground; 4V source; 1ohm resistor; point Va; 4V source; 1ohm resistor; |
22:49 | <@ToxicFrog> | And 4A around the circuit |
22:49 | <@ToxicFrog> | Va is at 0V relative to ground, but is not ground. |
22:50 | <@ToxicFrog> | Yes. |
22:50 | <@ToxicFrog> | Indeed, I have to. |
22:50 | < C_tiger> | But you can ground that node and no harm is done. |
22:50 | <@ToxicFrog> | That's part of the constraints. |
22:50 | <@ToxicFrog> | But Va = 0 is the not the same as "Va is GND" |
22:51 | < C_tiger> | I was just making the point for math's sake but Ok. |
22:53 | < C_tiger> | Ok, can you explain what it is you're doing? |
22:53 | < C_tiger> | You have two voltage sources, a bunch of resistors and a ground node and a 0 node. |
22:54 | < C_tiger> | And you find that the system isn't sufficiently constrained? |
22:57 | <@ToxicFrog> | I have -three- voltage sources. |
22:57 | <@ToxicFrog> | One of which is known. |
22:57 | <@ToxicFrog> | I need to find any two values for the other two within (-20,+20) that satisfies the constraint Va = 0 |
22:57 | <@ToxicFrog> | Having done that, I then need to take it one step further and find the values that minimize power dissipation across the circuit. |
22:57 | <@ToxicFrog> | But I'm allowed to use the simulator for that part. |
22:58 | < C_tiger> | Ok, so the system isn't sufficiently constrained. |
22:59 | < C_tiger> | Send me a circuit diagram? |
23:00 | < C_tiger> | So you're going to probably get one as a linear relation of the other. |
23:00 | <@ToxicFrog> | Yeah. That's what I'm trying to get. |
23:00 | < C_tiger> | Ah. |
23:00 | < C_tiger> | Ok. |
23:00 | <@ToxicFrog> | The lab manual even says "hint: find the relationship between V1 and V2 first, then choose a value for one and solve" |
23:01 | < C_tiger> | There's the easy way and the hard way. |
23:01 | < C_tiger> | The hard way is to do the algebra. |
23:02 | <@ToxicFrog> | As for circuit diagram, behold the power of pspice: http://www.funkyhorror.net/toxicfrog/shinies/analog_hate_2.png |
23:02 | <@ToxicFrog> | That's with the v-nodes and currents labeled, and simulated currents and voltages when V1=V2=0 |
23:03 | < C_tiger> | Ok. |
23:03 | <@ToxicFrog> | In practice I know that if Va is 0, then V1 = i1, Vb = 8, and i3 = 8. |
23:03 | < C_tiger> | So the easy way: set v1 = 0, solve for v2. then set v1 = 1, solve for v2. |
23:03 | < C_tiger> | Use those to derive a linear relationship. |
23:04 | <@ToxicFrog> | Ok, let's see here... |
23:05 | < C_tiger> | PS, I think life would probably get a lot easier if you introduce a node between V1 and R1. |
23:05 | <@ToxicFrog> | All that gets me is i1 = i1', and V1 = i1 |
23:05 | < C_tiger> | Hmm... true. |
23:06 | <@ToxicFrog> | The former of which introduces a new variable that isn't used anywhere else, and the latter of which I already have. |
23:07 | < C_tiger> | Ok, let me see what I can work up doing the pure algebra. But the fallback is to solve it twice. |
23:07 | <@ToxicFrog> | The problem I ran into last time I tried this is that I ended up with a circuit that was completely internally consistent, but which the simulator said didn't work - plugging in the values for V1 and V2 resulted in totally different (but still consistent) values for the currents and node voltages. |
23:08 | | You're now known as TheWatcher[T-2] |
23:08 | < C_tiger> | This is the problem with underconstrained systems. |
23:10 | <@ToxicFrog> | (the issue, on closer examination, turned out to be that I had equally resistant edges in places with all the current magically flowing down one and ignoring the other) |
23:11 | < C_tiger> | That probably doesn't help. |
23:14 | | You're now known as TheWatcher[zZzZ] |
23:14 | | * ToxicFrog gets i6 = i6 |
23:15 | <@ToxicFrog> | Ok, I've made a mistake somewhere. |
23:16 | <@ToxicFrog> | Ok. If we assume V1=0, this also resolves i1 and i7 |
23:16 | <@ToxicFrog> | Leaving just V2, Vc, i3, i4, i5, and i6. |
23:18 | <@ToxicFrog> | Wait, no |
23:18 | <@ToxicFrog> | I know Vb, so I know i3 as well |
23:20 | | Forj [~Forj@Nightstar-2443.ue.woosh.co.nz] has joined #code |
23:20 | | mode/#code [+o Forj] by ChanServ |
23:27 | <@ToxicFrog> | HAH |
23:27 | <@ToxicFrog> | VICTORY IS MINE |
23:27 | < UndeadAnno> | A winner is you. |
23:27 | <@ToxicFrog> | Setting V1=0 implies V2=-16 |
23:27 | < C_tiger> | interestingly this does not agree with your diagram whatsoever. |
23:28 | < C_tiger> | Also, when I solve, I still have one constraint free. |
23:28 | <@ToxicFrog> | It doesn't? |
23:28 | <@ToxicFrog> | When I plug in those values it simulates perfectly. |
23:29 | < C_tiger> | I mean the numbers on your diagram |
23:29 | <@ToxicFrog> | How do you mean? |
23:30 | < C_tiger> | On the diagram, you have V1 = 0, v2 = 4 |
23:31 | < C_tiger> | I mean v1=0, v2 = 0 |
23:31 | <@ToxicFrog> | ...no, I have V1=0, V2=0 |
23:31 | < C_tiger> | sorry. |
23:31 | < C_tiger> | yeah. |
23:31 | <@ToxicFrog> | like I said, the diagram I uploaded is with both sources set to 0 |
23:31 | < C_tiger> | Oh, I totally forgot that you said Va = 0 |
23:31 | <@ToxicFrog> | Since at the time I didn't have values for them that satisfied the constraints |
23:31 | <@ToxicFrog> | So Va is wrong, etc |
23:32 | < C_tiger> | Right. |
23:32 | < C_tiger> | I get v1 = 16-v2 |
23:32 | < C_tiger> | (or more accurately, v1 = 4va-v2+16 |
23:35 | <@ToxicFrog> | Yep, I get the same |
23:35 | <@ToxicFrog> | Since at V1=1, V2=-15 |
23:36 | <@ToxicFrog> | I take it you got that by constructing the usual system of KCL and node-voltage equations and then boiling down until everything was in terms of Va, V1 and V2? |
23:36 | < C_tiger> | Yeah. |
23:37 | < C_tiger> | But if I'd remembered that Va = 0, it'd have been a lot easier. |
23:37 | | Forj [~Forj@Nightstar-2443.ue.woosh.co.nz] has quit [Quit: Gone] |
23:41 | < C_tiger> | You know that V1 = i1, Va = 0 = i2, Vb = 8 = i3, Vc = 8 - i4 = i5 = V2, i1 = i2 (0) + i3 (8) +i5 (V2) + i6, i6 = i4 (8-V2) - i5 (V2) = 8 - 2V2. |
23:42 | < C_tiger> | So V1 = i1 = 0 + 8 + V2 + 8 - 2V2. |
23:42 | < C_tiger> | = 16 - V2. |
23:59 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?] |
--- Log closed Wed Feb 06 00:00:57 2008 |