Replies: 2 comments 4 replies
-
Sorry if this is a dumb suggestion, but can you just provide a better value for the resistances? My inclination would be to take the initial value for the potentiometers (as it will be when simulation begins), and use that to provide the 3 actual values (the wiper variable, and the two resistances corresponding to that wiper value). If for some reason that is tricky, an easier thing to do might be to simply assume the potentiometers/variable resistors are split in half (so just take the total resistance and divide it by two for the two resistances). For most realistic circuits, I think it probably doesn't matter what the potentiometers are set to for solving for initial conditions (but I could be wrong). |
Beta Was this translation helpful? Give feedback.
-
Sure, but currently solver is not aware of the fact that those are some special unknowns, and I would like to keep it this way, as they might change or we might add other ones and I don't want to have a "dependency" on the solver 😉 My question is, mostly if it's somehow possible to both solve and back substitute just the linear variables in one step without creating another system of equation to perform back substitution, as I have done it. BTW, I've tested a case when I use those calculated conditions as pivot conditions for solving the system later, and it seems to produce a stable result every time (I'm testing random component permutations). Sadly, stable doesn't mean best performing 😒 And it still sometimes produces huge solutions that take ages to compile. Now I need to dig deeper into how |
Beta Was this translation helpful? Give feedback.
-
So, during the work on dynamic parameters, I've noticed that initial condition solver stopped working. In my current solution I'm adding an unknown for both mapped value of the potentiometer (with taper function applied), top resistance and bottom resistance, as I've noticed that it helps with not getting insanely large solutions, as now all the resistance calculation ends up in the linear part of the solution. This unfortunately broke the steady state solver because it sets initial state of the unknowns to zero:
this is fine for voltages, but not for resistances 😁 So, I tried to solve the linear part first, but I've noticed that for some circuits back substitution takes very long time and produces huge expressions, and I don't need to back substitute the whole system except the linear part. I'm aware that I can provide a list of unknowns to
BackSubstitute
method, but this is sort of a chicken-egg problem, because I don't know the solvable unknowns upfront. So I came up with this ugly thing, that does only a row reduction and creates a new system just for linear variables:Is there any better way of solving this? It works for most circuits, but I've found one that produces a singular system, not sure why, because it performs fine, event without initial conditions solved 🤔 @dsharlet any ideas?
Beta Was this translation helpful? Give feedback.
All reactions