Whats the right way to enter bv and bi sources in LTSpice ? - Page 1
Forum section: electronics / beginners

author: MathWizard
author_rank: Super Contributor
timestamp: August 05, 2021, 08:25:19 pm
content: I was learning Thevenin's theorem for when dependent sources are involved and I get the answer the book has, but I can't find the way to get LTSpice to do it, and haven't found the answer on the web yet.B1 voltage =2*voltage across R3 (top to bottom)B2 current =4*current through R1 (left to right)The current through R5 should be exactly 5.76A, and the voltage would be 34.56V, but I've tried a few ways to enter the eqn's for the sources, but like the picture, its not right.

author: TimFox
author_rank: Super Contributor
timestamp: August 05, 2021, 08:32:19 pm
content: I use “regular Spice”. It has “voltage-controlled voltage source” E and “current-controlled current source” H (along with the other two variants of this format. Check the reference material or help file. I believe LTSpice has the same features—read the instructions to learn the syntax for each.

author: magic
author_rank: Super Contributor
timestamp: August 05, 2021, 08:36:46 pm
content: E is simple to use in LTspice, just put in somewhere and connect the four terminals. The only gotcha is that you need to set the first attribute (gain) or the sim won't run.H is trickier. One attribute is the gain, the other is some voltage source (it can be zero volts) whose current will be mirrored.Don't use those auto-generated net numbers because they change all the time; press F4 and put a label. That being said, you don't need any of that if you use E.Are there other solutions...

author: TimFox
author_rank: Super Contributor
timestamp: August 05, 2021, 08:48:52 pm
content: Also, when reading the manual, pay attention to the conventions for current polarity.

author: MathWizard
author_rank: Super Contributor
timestamp: August 05, 2021, 09:11:43 pm
content: I rotated R1 such that it's polarity should be correct, and ltspice has it's current source arrow the opposite to conventional current. So what syntax rule am I not getting right ?B1 seems to work, but still the syntax there is not what my 1st try was either, looking at the wiki I don't know computer code well enough to take it all in. Flipping the cccs doesn't work eitherhttp://ltwiki.org/LTspiceHelp/LTspiceHelp/B_Arbitrary_behavioral_voltage_or_current_sources_.htm

author: Ian.M
author_rank: Super Contributor
timestamp: August 06, 2021, 12:22:08 am
content: I strongly suspect the book is wrong*and has taught you an incorrect method leading to an incorrect manually calculated result, with the error present in the book's solution.Its not a case of multiple stable solutions as forcing that node to 34.56V (by adding a capacitor and a .IC command, which should let it drop into a local solution if any such solution exists) does not result in a transient analysis solution that converges to the desired result.By rearranging and simplifying the circuit (to a succession of equivalent ones), it becomes patently obvious that the node voltage in question can never be greater than the voltage of the fixed source. See attached sim for my reasoning.The alternative is: The book is right, but your LTspice sim is *NOT* the circuit in the book!Post a photo of the page with the circuit so we can check . . .

author: MathWizard
author_rank: Super Contributor
timestamp: August 06, 2021, 01:24:27 am
content: The textbook is "Circuit Analysis" by Allan D. Kraus, 1991, for post-secondary schools like universities. The circuit I described is what's in the book. As for the the dependent sources, I'm assuming their power is unlimited, and not coming from the independent source.If the next step is this, again I had 45V for Vthev, like the book, using mesh currents.But alright I'll try it with the E and H

author: MathWizard
author_rank: Super Contributor
timestamp: August 06, 2021, 02:54:05 am
content: Ok thanks guys I got it working w/ E and HI get the calculated Vth=45V

author: Ian.M
author_rank: Super Contributor
timestamp: August 06, 2021, 03:26:57 am
content: That's not what LTspice makes of it after the Norton to Thevenin transformation. The attached sim is still consistent with the original, and with my previous transformations of it. I think you are still far up the garden path with your (and the book's) solution. Check the sign of the current through R2 is correct after the Norton to Thevenin transformation of B2.Again, I ask: post the page from the book!Small excerpts for the purpose of academic discussion are generally acceptable as 'fair use' under copyright lawN.B. In LTspice, if you want left to right current flow through a horizontally oriented resistor to be positive, rotate it 90 deg clockwise once then flip it horizontally before placing it. Unfortunately the alternative of rotating it three times leaves the symbol indistinguishable from one that has only been rotated once for which left to right current is negative!