Timeline for LTSpice: How to vary resistances in a simulation depending on the value of a voltage?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 30, 2017 at 0:36 | comment | added | jonk | @IanMathWiz I don't want to do your work for you, as you know it a lot better than I do. Besides, I don't feel like working on generating functions to solve recurrences right now. But I can say that state variables are traditionally captured in Spice as either capacitor (voltage) or inductor (current) energy. | |
Jun 29, 2017 at 23:33 | comment | added | Ian MathWiz | @jonk This looks like it might be almost exactly what I need, thanks. I've edited the OP to list the schematic and equations I need to implement in the simulation, but to summarize, the only thing missing from this answer is that I need to store the values of some state variables at any given time in the simulation (namely n, m, and h). Would creating some disconnected resistors, and storing the state variables in the resistances, do the job? | |
Jun 27, 2017 at 22:18 | comment | added | jonk | @laptop2d I know. I thought about adding a discussion on that point, as well. But I realized that it is a LOT BETTER to just use an "X" subcircuit, instead. Now you have access to its own terminals, no matter how they are placed on a schematic. So I squandered my time on that, instead. | |
Jun 27, 2017 at 20:54 | comment | added | Voltage Spike♦ | You can name nodes with the f4 key, I'm sure you know this but it wasn't written in your post | |
Jun 27, 2017 at 20:19 | comment | added | compumike | Your point about making sure the value is always positive or zero is excellent and deserves great emphasis! It is very easy to get into solver stability issues with behavioral sources if you're not careful. | |
Jun 27, 2017 at 19:58 | history | edited | jonk | CC BY-SA 3.0 |
added 68 characters in body
|
Jun 27, 2017 at 19:16 | history | edited | jonk | CC BY-SA 3.0 |
added 18 characters in body
|
Jun 27, 2017 at 19:07 | history | answered | jonk | CC BY-SA 3.0 |