Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline mkraska  
#21 Posted : 03 February 2019 19:05:57(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,449
Germany

Was thanked: 763 time(s) in 490 post(s)
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 (12kb) downloaded 10 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline 007.000  
#22 Posted : 04 February 2019 02:57:06(UTC)
007.000


Rank: Member

Groups: Registered
Joined: 22/05/2018(UTC)
Posts: 23
Man
United States
Location: California

Originally Posted by: Ber7 Go to Quoted Post
...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 Good

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...

Edited by user 04 February 2019 02:58:44(UTC)  | Reason: Not specified

Offline Jean Giraud  
#23 Posted : 04 February 2019 04:00:20(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,314
Canada

Was thanked: 648 time(s) in 503 post(s)
Originally Posted by: 007.000 Go to Quoted Post
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 (27kb) downloaded 7 time(s).
Offline 007.000  
#24 Posted : 04 February 2019 04:01:05(UTC)
007.000


Rank: Member

Groups: Registered
Joined: 22/05/2018(UTC)
Posts: 23
Man
United States
Location: California

Originally Posted by: mkraska Go to Quoted Post
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 Sad 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 Confusion )...

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...

Edited by user 04 February 2019 04:04:47(UTC)  | Reason: Not specified

Offline Jean Giraud  
#25 Posted : 04 February 2019 06:34:47(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,314
Canada

Was thanked: 648 time(s) in 503 post(s)
Originally Posted by: 007.000 Go to Quoted Post
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 ?


Offline 007.000  
#26 Posted : 04 February 2019 11:04:15(UTC)
007.000


Rank: Member

Groups: Registered
Joined: 22/05/2018(UTC)
Posts: 23
Man
United States
Location: California

Originally Posted by: Jean Giraud Go to Quoted Post
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 Good
~KCL (conservation of electric charge or mass)-2.pdf (116kb) downloaded 5 time(s).

Edited by user 04 February 2019 11:06:36(UTC)  | Reason: Not specified

Offline mkraska  
#27 Posted : 04 February 2019 11:36:13(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,449
Germany

Was thanked: 763 time(s) in 490 post(s)
Originally Posted by: 007.000 Go to Quoted Post


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 Sad 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 Confusion )...


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/wi...th%20with%20Plugins.ashx
Offline Jean Giraud  
#28 Posted : 04 February 2019 16:52:36(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,314
Canada

Was thanked: 648 time(s) in 503 post(s)
Originally Posted by: 007.000 Go to Quoted Post
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 (41kb) downloaded 3 time(s).



Offline Ber7  
#29 Posted : 04 February 2019 19:27:14(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 315
Man
Israel
Location: Beer-Sheva

Was thanked: 401 time(s) in 222 post(s)
On the recommendation of Jean applied the roots function

Primer1.sm (10kb) downloaded 5 time(s).
Offline Jean Giraud  
#30 Posted : 05 February 2019 00:17:44(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,314
Canada

Was thanked: 648 time(s) in 503 post(s)
Originally Posted by: Ber7 Go to Quoted Post
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 (138kb) downloaded 10 time(s).
Online Razonar  
#31 Posted : 05 February 2019 03:32:37(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 281
Uruguay

Was thanked: 121 time(s) in 77 post(s)
Hi. Solved with MNA method, numeric and symbilic.
Best regards.
Alvaro.

MNA resistive network.sm (175kb) downloaded 12 time(s).

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

Numeric
RNetworkNumeric.gif

Symbolic
RNetworkSymbolic.gif

Edited by user 05 February 2019 03:34:32(UTC)  | Reason: Not specified

thanks 2 users thanked Razonar for this useful post.
on 05/02/2019(UTC),  on 05/02/2019(UTC)
Offline Jean Giraud  
#32 Posted : 05 February 2019 03:48:24(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,314
Canada

Was thanked: 648 time(s) in 503 post(s)
Originally Posted by: Razonar Go to Quoted Post
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.
Offline 007.000  
#33 Posted : 05 February 2019 17:29:49(UTC)
007.000


Rank: Member

Groups: Registered
Joined: 22/05/2018(UTC)
Posts: 23
Man
United States
Location: California

Originally Posted by: Razonar Go to Quoted Post
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...

Edited by user 05 February 2019 17:36:12(UTC)  | Reason: Not specified

Offline uni  
#34 Posted : 05 February 2019 18:05:01(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 886
Man
Russian Federation

Was thanked: 789 time(s) in 453 post(s)
Originally Posted by: 007.000 Go to Quoted Post
Does your MNA solver do capacitors and inductors too?


One example from me.

Edited by user 05 February 2019 18:18:41(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
💰 You can support me for plugins development: https://paypal.me/viacheslavmezentsev
Offline uni  
#35 Posted : 05 February 2019 19:08:07(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 886
Man
Russian Federation

Was thanked: 789 time(s) in 453 post(s)
2019-02-05_21-06-27.png

operator_method.sm (18kb) downloaded 8 time(s).
operator_method.pdf (82kb) downloaded 5 time(s).
Russia forever!
Viacheslav N. Mezentsev
💰 You can support me for plugins development: https://paypal.me/viacheslavmezentsev
Online Razonar  
#36 Posted : 05 February 2019 22:28:25(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 281
Uruguay

Was thanked: 121 time(s) in 77 post(s)
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 (236kb) downloaded 9 time(s).
mna_v2.pdf (566kb) downloaded 10 time(s).

Best regards.
Alvaro.
Offline Jean Giraud  
#37 Posted : 06 February 2019 01:24:29(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,314
Canada

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

MapleLaplace.PNG
Offline uni  
#38 Posted : 06 February 2019 01:40:15(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 886
Man
Russian Federation

Was thanked: 789 time(s) in 453 post(s)
Originally Posted by: Razonar Go to Quoted Post
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 (1kb) downloaded 4 time(s).

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

2019-02-06_04-10-10.png

Edited by user 06 February 2019 04:09:30(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
💰 You can support me for plugins development: https://paypal.me/viacheslavmezentsev
Online Razonar  
#39 Posted : 08 February 2019 09:56:09(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 281
Uruguay

Was thanked: 121 time(s) in 77 post(s)
Hi uni.

Originally Posted by: uni Go to Quoted Post

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.


Originally Posted by: uni Go to Quoted Post


1. Online circuit simulator
2. Circuit file: circuit-20190206-0607.circuitjs.txt (1kb) downloaded 4 time(s).

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


mna_circuit_example.sm (95kb) downloaded 8 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.
Users browsing this topic
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.