Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
This a solver for electrical circuits with the MNA method, here implemented as "stamps" for each linear circuit element. That's meaning that it's modular: can be extended adding more circuit elements stamps. To do: add nullors, diodes, transistors and describe how to handle subciruits. mna_stamps.sm (406kb) downloaded 159 time(s).Best regards. Alvaro.
|
4 users thanked Razonar for this useful post.
|
on 18/02/2019(UTC), on 18/02/2019(UTC), on 19/02/2019(UTC), on 19/02/2019(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 277 Was thanked: 91 time(s) in 57 post(s)
|
Alvaro, Awesome work! I'm excited to start using this. I see a lot of potential uses. I did have a question regarding your algorithm. In the attached segment, what is the purpose of repeating the for-loop inside the if/else condition on the right? I get the purpose of the for-loop to select the correct Stamp prefix, but do not see the benefit of added if/else on right side. Thanks, alyles |
|
1 user thanked alyles for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 248 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
Originally Posted by: Razonar This a solver for electrical circuits with the MNA method, here implemented as "stamps" for each linear circuit element. That's meaning that it's modular: can be extended adding more circuit elements stamps. To do: add nullors, diodes, transistors and describe how to handle subciruits. mna_stamps.sm (406kb) downloaded 159 time(s).Best regards. Alvaro. Nice work! and thanks for the use of one of my very old posts!!
|
1 user thanked oscampo for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: alyles Alvaro,
Awesome work! I'm excited to start using this. I see a lot of potential uses. I did have a question regarding your algorithm. In the attached segment, what is the purpose of repeating the for-loop inside the if/else condition on the right? I get the purpose of the for-loop to select the correct Stamp prefix, but do not see the benefit of added if/else on right side.
Thanks, alyles Hi alyles. Thanks for your words. As you say, the first loop it's for choose the correct Stamp with the first circuit element letter. The if ensure that if the string is largest than one, then can take a substring largest, but there are a bug there: must to be substr(str#, 1, 2), for make avaible the use of two letters too as stamp identifier. Best regards. Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. In the attached, bug about selecting stamps pointing by alyles not "corrected" but just eliminate the second loop. Also shows how to work with a pulse train, choosing a true periodic laplace transform from the input signal, not only the transform that figures on the books. opamp integrator.sm (317kb) downloaded 56 time(s). opamp integrator.pdf (465kb) downloaded 55 time(s).Best regards. Alvaro.
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. In the attached, bug for selecting stamps corrected. Also frequency domain analysis tools for use with MNA analysis: BodeMag, BodePhase, ZP Plot, Nyquist and Nichols charts. mna_RLC_freq_domain.pdf (309kb) downloaded 63 time(s). mna_RLC_freq_domain.sm (188kb) downloaded 51 time(s).Best regards. Alvaro.
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 29/11/2017(UTC) Posts: 82 Location: Midwest Was thanked: 9 time(s) in 7 post(s)
|
Hello Alvaro, nice work! I was planning to convert the attached (copy of) MathCad worksheet, but it seemed difficult for me. Would some of the routines, or stamps work in place of the solve block? I welcome your review and look forward to your reply. Sincerely, Norm RLC step response - MC.pdf (696kb) downloaded 60 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi Norm. Thanks. This is what think that you can do with the MNA method. RLC Norma.sm (195kb) downloaded 52 time(s). RLC Norma.pdf (176kb) downloaded 55 time(s).Best regards. Alvaro.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: nasch I was planning to convert the attached (copy of) MathCad worksheet, but it seemed difficult for me. If you can setup in form of DE [Differential Equation] It will surely have a Laplace solution easy to extract.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 29/11/2017(UTC) Posts: 82 Location: Midwest Was thanked: 9 time(s) in 7 post(s)
|
Many thanks Alvaro!
The "Thanks" icon presented an error.
Norm
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: nasch The "Thanks" icon presented an error. This is a long lasting/reported bug.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 29/11/2017(UTC) Posts: 82 Location: Midwest Was thanked: 9 time(s) in 7 post(s)
|
If you can setup in form of DE [Differential Equation] It will surely have a Laplace solution easy to extract.
Thanks Jean, I'll try that as well... if I do it correctly.
Norm
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: nasch Ifyou can setup in form of DE [Differential Equation] It will surely have a Laplace solution easy to extract.
Thanks Jean, I'll try that as well... if I do it correctly. The technical approach is simply write the Laplace algebra of the circuit ... maple, bingo/done. Literature call it H(s) ... I call it L(s). You can find some examples browsing the web. Those operational [symbol triangle] supplier should give the L(s). Here is an old example. Jean Maths Laplace Circuit Algebra.sm (39kb) downloaded 53 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 29/11/2017(UTC) Posts: 82 Location: Midwest Was thanked: 9 time(s) in 7 post(s)
|
Hello Alvaro, I hope you are well in this challenging time. The MNA worksheet throws an error when I updated to version 0.99(build: 7610). It worked fine before then. Here's the sheet: RLC Norma.sm (195kb) downloaded 19 time(s).The error: Error.pdf (9kb) downloaded 11 time(s).I welcome your review and recommendation(s) to repair the issue. Stay safe and take care. Sincerely, Norm
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi Norm. Thanks for the good wishes. I hope you are well too. First issue is that new versions can't get the number of rows in the stamps matrix. So, change rows(E#) by it's value, 12. That make almost all other calculus ok. But there are also a bug in SMath when when you invert matrices with units. For some reason, you must to change A#^-1 by maple(invert(A#)) for calculate the voltage in the first calculus with units (in this case for the current SMath can invert the matrix) Now there are only one last red in a plot, but can't remember why is it. RLC Norma.pdf (147kb) downloaded 27 time(s). RLC Norma.sm (195kb) downloaded 40 time(s).Finally, in the meantime I improve the Peaks function MPeaks.sm (17kb) downloaded 32 time(s).Best regards. Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 29/11/2017(UTC) Posts: 82 Location: Midwest Was thanked: 9 time(s) in 7 post(s)
|
Many thanks, for your prompt reply and fixes!
Sincerely,
Norm
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 06/01/2022(UTC) Posts: 5 Location: grenoble Was thanked: 1 time(s) in 1 post(s)
|
Really good job! I have to try it !!
|
1 user thanked babElec for this useful post.
|
|
|
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.