sMath's competition

sMath's competition - sMath's place in the market - Messages

#21 Posted: 2/3/2019 1:05:57 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

The system isn't overdetermined, you just don't want to solve for all the unknowns.
In order to avoid the annoying task to type a list of all unknowns, you can use the function Unknowns().
Then, solving the system is trivial.

overdetermined%20simultaneous%20equations_Kr.png
overdetermined%20simultaneous%20equations_Kr.sm (11 KiB) downloaded 49 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#22 Posted: 2/3/2019 8:57:06 PM
Adriaan Knox

Adriaan Knox

0 likes in 25 posts.

Group: User

Wrote

...we solve a system of three linear equations.



Why does it break for me after I press "recalculate page"? It loads up fine upon first opening and the calculations are performed but when I press the green arrows I get a red box around "X0". I apologize because this is probably a stupid question but I tend to have the worst ability to interact with Smath successfully for some reason. Even when files or syntax are given as you can see

Also, did you have to declare the currents Isub1 to Isub5 twice? That second column with the five currents seems redundant. Are those necessary?

I appreciate your help...
#23 Posted: 2/3/2019 10:00:20 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I'm trying to find a software that will let me evaluate what I guess it thinks is an over-determined matrix. It seems most software interpret simultaneous equations as a matrix and they want the system to be square with an equal numbers of unknowns and equations.


What you plug in your Casio Smath solves "Algebraic Implicit"
done at the end of the attached.
Solving an mxn system ... m>n goes by advanced maths "SVD"
dn_LinAlgSVD(A) ... from f(x) menu by the click of the finger !

Cheers ... Jean

Maths SVD.sm (26 KiB) downloaded 48 time(s).
#24 Posted: 2/3/2019 10:01:05 PM
Adriaan Knox

Adriaan Knox

0 likes in 25 posts.

Group: User

Wrote

The system isn't overdetermined, you just don't want to solve for all the unknowns.
In order to avoid the annoying task to type a list of all unknowns, you can use the function Unknowns().
Then, solving the system is trivial.



I appreciate your guidance Sir. Yes the task of typing in all of the unknowns is rather annoying especially when solving with so many component equations as I'm developing a habit of doing. Some software makes it exceedingly cumbersome, Mathmatica comes to mind...I'm enamored with the "Unknowns" function! You guys are the best for that. This is quite a powerful approach for me and I appreciate you facilitating that. I especially like that all of my equations are together there in one column which adds much needed coherence for me personally.

I'm assuming that the "Solve" function maxes out at showing 14 results? When I hover over it the rest of the results are shown, for a while, before timing out and disappearing Maybe I can put in a feature request to extend the quantity of return values displayed? (Actually, I wanted to not solve for all of the unknowns going in, but its funny how things change around completely )...

Thanks for clarifying my misunderstanding regarding overdetermined systems. I figured that my resistor values here are "known" but are still equations, which then means that I have more equations than unknowns but I guess overdetermined is if a system has an equation which is not linearly independent...
#25 Posted: 2/4/2019 12:34:47 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thanks for clarifying my misunderstanding regarding overdetermined systems. I figured that my resistor values here are "known" but are still equations, which then means that I have more equations than unknowns but I guess overdetermined is if a system has an equation which is not linearly independent...


You can see as you describe, in short having an extra row that makes the system not
directly solvable by matrix rules. Thus, a singular matrix has singular solutions.
The Mathcad 11 coding is a bit different than Smath.
Square matrices don't necessarily have immediate solutions and they need more maths.
That stuff is pseudo-inverse, mostly encountered in chemical balance.
We have two examples solved in Smath.
The circuit diagram would be interesting, isn't ?


#26 Posted: 2/4/2019 5:04:15 AM
Adriaan Knox

Adriaan Knox

0 likes in 25 posts.

Group: User

Wrote

The circuit diagram would be interesting, isn't ?



I think you are asking me for the corresponding circuit diagram Sir? Well, anyhow, I've attached a pdf printout of the Mathcad Prime file which was giving me trouble to begin with and why I reverted back to Smath and tried any other program I could get my hands on as well. "Werner_E" or "Wemer_E" I can't readily tell, in PTC community forum set me straight on what the difficulty was in this thread.
Werner_E or Wemer_e's answer

The circuit diagram is contained in the pdf attached here, section 5 was inexplicably not working for me. Along with toggling something the gentleman recommends alternative procedures, once of which I have experience with and is not to my fancy. Namely PTC's "solve block" which requires initial guesses and is more suited to differential equations in my estimation. I might give their "root" function an whirl but I really like what mkraska has kindly shown me here in Smath. If I put the "Unknowns" and "Solve" function in a collapsible section it will be damn near as clean as Casio's interface yet as demonstrated, more powerful yet. My Mathcad Prime file here is comparatively, as we say in the states, a "cluster fuck", with loose parts seemingly everywhere. I guess Casio has really spoiled me with their interface on this one but Smath is very much workable and I anticipate using it instead of Mathcad Prime or Casio for these basic circuit problems hence, with another donation forthcoming
~KCL (conservation of electric charge or mass)-2.pdf (115 KiB) downloaded 45 time(s).
#27 Posted: 2/4/2019 5:36:13 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote



I'm assuming that the "Solve" function maxes out at showing 14 results? When I hover over it the rest of the results are shown, for a while, before timing out and disappearing Maybe I can put in a feature request to extend the quantity of return values displayed? (Actually, I wanted to not solve for all of the unknowns going in, but its funny how things change around completely )...



As seen by the substitution using sol, the variable actually has all the results stored in it. There seems to be a bug in the display. Actually even the dynamic assistant's display is unreliable. Filed as Bug SS4581.

Thank you for pointing this out.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#28 Posted: 2/4/2019 10:52:36 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

as we say in the states, a "cluster fuck",


I like that one !!! You mean a piece of crap.
As you can see from the attached work sheet, I love "roots".
So, won't be deceived the day I will suck them ... no rush for that day.
Smath roots is a good companion. You can check your Casio accuracy.

Solve_roots.PNG

Solve Algebraic, NON-Algebraic.sm (40 KiB) downloaded 36 time(s).



#29 Posted: 2/4/2019 1:27:14 PM
Fridel Selitsky

Fridel Selitsky

520 likes in 451 posts.

Group: User

On the recommendation of Jean applied the roots function

Primer1.sm (9 KiB) downloaded 43 time(s).
#30 Posted: 2/4/2019 6:17:44 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

On the recommendation of Jean applied the roots function


Cicuit diagram added, sharpened at best [IrfanView]
Gorgeous Smath work, Thanks Ber7

Jean

Solve Algebraic, NON-Algebraic [Circuit].sm (137 KiB) downloaded 50 time(s).
#31 Posted: 2/4/2019 9:32:37 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. Solved with MNA method, numeric and symbilic.
Best regards.
Alvaro.

MNA resistive network.sm (174 KiB) downloaded 55 time(s).

Solutions are the variables in the x vector.
Voltage are node voltage to ref node.

Numeric
RNetworkNumeric.gif

Symbolic
RNetworkSymbolic.gif
2 users liked this post
Вячеслав Мезенцев 2/5/2019 6:48:00 AM, frapuano 2/5/2019 12:04:00 PM
#32 Posted: 2/4/2019 9:48:24 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Solutions are the variables in the x vector.
Voltage are node voltage to ref node.


Thanks Alvaro for more brain storming on this project.
Just too bad "Syntax is incorrect" SS 6179.
#33 Posted: 2/5/2019 11:29:49 AM
Adriaan Knox

Adriaan Knox

0 likes in 25 posts.

Group: User

Wrote

Hi. Solved with MNA method, numeric and symbilic. Best regards.



Holy smokes! Did you just do SPICE in Smath? That is amazing... I expanded the solver but can't begin to follow the implementation. Does your MNA solver do capacitors and inductors too? I don't know what else to say. I am awestruck actually.

I've been using Multisim student edition because it is one of the easier simulators to use and it has nice backgrounds for schematics which even incorporate the NI ELVIS II+ breadboard I use for experiments. I've been using LTSPICE for running netlists more readily than Multisim is able to do. I did just buy TINA student edition with 1200 examples however since it can solve for transfer functions given arbitrary points on a schematic which most softwares can not do, and it is much, much cheaper than Multisim...
exclusive TINA function


I had tried to use SCAM for Matlab some months ago but in my naivety couldn't get it going. Perhaps this Smath MNA solver would be a good compliment to TINA for cross-referencing transfer characteristics for me, but I see that Razonar's solver is still very new... Thanks for developing it Sir...
#34 Posted: 2/5/2019 12:05:01 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

Does your MNA solver do capacitors and inductors too?



One example from me.

[albumimg]71[/albumimg] [albumimg]72[/albumimg]
Russia ☭ forever, Viacheslav N. Mezentsev
#35 Posted: 2/5/2019 1:08:07 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

2019-02-05_21-06-27.png

operator_method.sm (17 KiB) downloaded 47 time(s).
operator_method.pdf (81 KiB) downloaded 51 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
#36 Posted: 2/5/2019 4:28:25 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. In the attached, a simplified version of MNA method, with some few examples with RLC and opamps.
Also, my attempt to solve uni' example, but can't get the same result.

mna_v2.sm (235 KiB) downloaded 51 time(s).
mna_v2.pdf (565 KiB) downloaded 51 time(s).

Best regards.
Alvaro.
#37 Posted: 2/5/2019 7:24:29 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

"Operator method"
Work opens fine, plot ... save in my 6179 ...
re-open from my 6179 => freak ! Observe the plotting argument(s)

MapleLaplace.PNG
#38 Posted: 2/5/2019 7:40:15 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

Also, my attempt to solve uni' example, but can't get the same result.


And what about L*ILo source?

1. Online circuit simulator
2. Circuit file: circuit-20190206-0607.circuitjs.txt (557 B) downloaded 35 time(s).

If you flip the capacitor, the voltage will be positive.

2019-02-06_04-10-10.png
Russia ☭ forever, Viacheslav N. Mezentsev
#39 Posted: 2/8/2019 3:56:09 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi uni.

Wrote


And what about L*ILo source?



The code for this mna implementation it's very short. You can see that RLC elements are introduced as it's Laplace transforms, as g = 1/R, g = 1/(sL) and g = s*C. As I say before: here we don't solve ode's itself, but ode's by Laplace transforms. Maybe a modification of those impedance's by the initial conditions (currents, in the case of L and C) with the laplace transform for constants it's the adequate form for introduce it's, but I don't try to do that yet.


Wrote



1. Online circuit simulator
2. Circuit file: circuit-20190206-0607.circuitjs.txt (557 B) downloaded 35 time(s).

If you flip the capacitor, the voltage will be positive.



mna_circuit_example.sm (94 KiB) downloaded 46 time(s).

In the attached your circuit solved. For the switch, you can define a new circuit, eliminating the resistor and the node 4. But again, it have an initial condition, the 21 volts, which I don't know which it's the "correct" way to implement that.

The target of the MNA function, as I see it, is given the spice netlist, obtain the matrix A = [B C D E] and vectors b, x for solve for the variables in x, which are node voltages and element currents (not node currents).

I don't have enough free time (and maybe nor enough programming skills) for implement the complete set, but the actual stage it's enough for show how to solve a big collection of simple linear circuits.

But, as an example about how many doubts I have: I can't understand very well why I divide V[2] by s, if it's supposed that in V[2] it's the capacitor node two voltage ...

Best regards.
Alvaro.
#40 Posted: 5/23/2019 3:12:34 PM
Adriaan Knox

Adriaan Knox

0 likes in 25 posts.

Group: User

Somehow a comment I made on an old PTC forum thread turned to sMath if you are at all interested. Anyway, I was wondering if any of you had experience with ever creating custom Mathcad functions and what you might have to say about it if you don't mind sharing.

link to an old PTC thread
  • New Posts New Posts
  • No New Posts No New Posts