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

Notification

Icon
Error

7 Pages«<34567>
Options
Go to last post Go to first unread
Offline ola_nicolas  
#81 Posted : 10 July 2018 09:41:22(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Ber7 Go to Quoted Post
Determination of the coordinates of the links of spatial mechanisms by the Alglib solver...


Hello.

What type of SMath do you have? To me the file does not work.
Offline Ber7  
#82 Posted : 10 July 2018 10:10:22(UTC)
Ber7


Rank: Advanced Member

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

Was thanked: 386 time(s) in 215 post(s)
Originally Posted by: ola_nicolas Go to Quoted Post
Originally Posted by: Ber7 Go to Quoted Post
Determination of the coordinates of the links of spatial mechanisms by the Alglib solver...


Hello.

What type of SMath do you have? To me the file does not work.

SMath Studio 0.99.6671
Offline ola_nicolas  
#83 Posted : 10 July 2018 10:22:30(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
I have the same. Do any plugins need to be activated?
Offline Ber7  
#84 Posted : 10 July 2018 10:42:08(UTC)
Ber7


Rank: Advanced Member

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

Was thanked: 386 time(s) in 215 post(s)
I installed 0.99.6671 in April. After that I did not update the plugins.
Added PDF file.
PrimerAlgib.pdf (188kb) downloaded 19 time(s).

Edited by user 10 July 2018 10:50:35(UTC)  | Reason: Not specified

Offline ola_nicolas  
#85 Posted : 10 July 2018 10:50:41(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
I installed it yesterday. No pdf file required, look ...

PrimerAlgib.PNG

Edited by user 10 July 2018 11:00:55(UTC)  | Reason: Not specified

Offline ola_nicolas  
#86 Posted : 10 July 2018 11:51:46(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Hello.

I will try in the meantime to draw some conclusions about the results obtained using the FindRoot algorithm (3). By testing the accuracy value, I have managed to get results even closer to those obtained in MathCAD. The problem is that the approximation vector contains values very close to what should be obtained. As soon as I have introduced different values, I have not gotten anything. To get an idea, in MathCAD I got the solution using the approximation in the image. Try with the same approximation to get a solution in SMath. I did not make it. At the same time, it is amazing how with a vectorized function, which has basically introduced a system with a few hundred equations (except for the constraint that I have not used in SMath) the GivenMinerr algorithm in MathCAD has managed to solve the problem with great elegance.

xmcd solution.PNG

Edited by user 10 July 2018 12:02:54(UTC)  | Reason: Not specified

Offline omorr  
#87 Posted : 10 July 2018 15:18:41(UTC)
omorr


Rank: Administration

Groups: Registered, Administrators, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,660
Man
Serbia

Was thanked: 286 time(s) in 245 post(s)
Hello ola_nicolas,

Please find the attached corrected file of your attempt. LM-corr.sm (67kb) downloaded 12 time(s). . This is also my attempt as well which is not solved like many of my problems similar to this one.

I did some corrections because you had some errors. Your f - "Solver function" was problematic and quite wrong. The vectorization did not work as you expected. Therefore I used for loop to overcome the problems - defined iaa() instead of ia() function (see for yourself, please). However, you will have rather huge number of equations to be minimized in order to find those seven variables. Mathcad will solve those things easely. Nevertheless, I mentioned many times that this kind of minimization problems (least squares for example) when you have rather complicates analytical expression is almost impossible to solve in SMath. Just for example, see the changed f - "Solver function". I made your problem with ten equations which have to be minimized. You can also made just one (by adding them, for example). But all these things will not be on any help. SMath is relaying on its symbolical symbolic engine - not numerical (I mentioned this many times).

This is an example where symbolical engine will fail, and there might be no help for that. If you put the optimization of f to be symbolical, this will happen

sym.png

Symbolic engine failed and there is a great chance that you have to give up with this problem. If you get another optimization (Numerical, None) you will get some values

Num.png
None.png

but this will not help either. The problem is just to complicated analytically, and there is a need for strictly numerical solvers, but there are not present in SMath yet and I am not sure if there would ever be any.

Regards,
Radovan

Edited by user 10 July 2018 15:21:11(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#88 Posted : 10 July 2018 16:24:10(UTC)
Jean Giraud


Rank: Advanced Member

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

Was thanked: 608 time(s) in 471 post(s)
Originally Posted by: omorr Go to Quoted Post
The problem is just to complicated analytically, and there is a need for strictly numerical solvers, but there are not present in SMath yet and I am not sure if there would ever be any.


The project is ill-posed in several counts:

1. That's going back to Tesla project, done ad nauseum.
2. As it looked, data were digitized from French curve drawing [1959]
... thus data are NOT true [end of argument no matter how perfect digitizer may be]
3. The so many parameters model function is over killed.
4. You have so many data sets, you will have to run so many fit.
... assuming the same model will fit all data of same experimental characteristics.


Offline ola_nicolas  
#89 Posted : 10 July 2018 18:50:08(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Hello.

It looks interesting the algorithm proposed by Ber7 in post # 80, but it looks like the version I installed has something wrong.

Quote:
... The vectorization did not work as you expected ...

I think you mean that there is another vectorization process in SMath vs MatCAD. I saw that too.

Nicolas.

Edited by user 10 July 2018 20:29:23(UTC)  | Reason: Not specified

Offline omorr  
#90 Posted : 10 July 2018 20:35:21(UTC)
omorr


Rank: Administration

Groups: Registered, Administrators, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,660
Man
Serbia

Was thanked: 286 time(s) in 245 post(s)
Originally Posted by: ola_nicolas Go to Quoted Post
Hello.

It looks interesting the algorithm proposed by Ber7 in post # 80, but it looks like the version I installed has something wrong.


There is no use of that function for your problem (I wish I was wrong). It needs Jacobian, and your system is to complicated with quite many equations. This is an optimization problem and not the root finding problem.

Originally Posted by: ola_nicolas Go to Quoted Post

Quote:
... The vectorization did not work as you expected ...

I think you mean that there is another vectoring process in SMath. I saw that too.

Nicolas.


I wanted to say that your f variable was wrong. SMath did not accepted your vectorization. At least, it did not work for me.

vectorize.PNG
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline ola_nicolas  
#91 Posted : 10 July 2018 20:50:38(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: omorr Go to Quoted Post
... I wanted to say that your f function was wrong. SMath did not accepted your vectorization. ...


Now I know that. When I wrote that file I knew little about SMath. It's not like I know too much now. I also think I have a lot to learn from now on. Thanks for the vectorization indications. I think they will use me.

Edited by user 10 July 2018 20:55:26(UTC)  | Reason: Not specified

Offline Jean Giraud  
#92 Posted : 11 July 2018 05:59:23(UTC)
Jean Giraud


Rank: Advanced Member

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

Was thanked: 608 time(s) in 471 post(s)
Originally Posted by: ola_nicolas Go to Quoted Post
Now I know that. When I wrote that file I knew little about SMath. It's not like I know too much now


Nicolas,

Your never explained what you intended to do with all those data sets.
Carlos and myself have fitted those crappy data. I hope you don't
intend to fit by whatsoever invention to fit all crappy data points.
If you would wish so, fit via a polynomials of order one less oder
than there are data points ...
Polynomials are just to prove that they are useless with data sets.

Offline ola_nicolas  
#93 Posted : 11 July 2018 20:41:39(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Bonjour Jean Giraud.

I said what I intend to do, but maybe you forgot or did not believe me. I'm sorry I did not install Multisim at this time, so I could exemplify with a picture or msm file more recently. I now have just an older image (I think from 2008, or 2009) of a sub-circuit I made in Multisim in a less elaborate version. At that time I did not know much about MathCAD. In this case, for example, I have determined the set of unknown u, v, w, x, y, z and have simplified numerically the function we have studied together. An expression like the one in the image was written, for example, in Word, or in any other text editing program. Size I represents the anode current of one of the two identical sections of the ECC 83 double triode over a limited range (eg 0 ... 5 mA) for any negative voltage of the control grid (v (2,4) in the expression in image) of the continuous range of real numbers -5 ... 0 V and for any anode voltage (v (1,4) in the expression in the picture) of the continuous range of real numbers 0 ... 375 V. Introduced in Multisim and associated with the PSpice model of a triode, expression allows me to simulate any electronic scheme in which I use this tube. Also, as in the picture, a msm sub-circuit can also be created using the programmable nonlinear sources available in the program library. That's what it is in a few words. If you take a Multisim program and search a bit, it will be seen that it contains only a very small number of PSpice models of electronic tubes in the data library (diodes, triodes and pentodes) all of which are of American origin. A large mass of mature people (like me or older than me), but especially a lot of young people have started to worry about this so-called "vintage" fashion in electronics. They do not have PSpice models for European or Russian electronics tubes. This is all. The story is much longer and is fascinating for the passionate, but it's not the place to discuss it in detail. In Ukraine, I know that such models develop Eugene Karpov, which I have mentioned before, and in Romania I know Olimpiu Lazarescu. The second I met on an electronic forum from us, while karpov I know him only through the prism of what he published in various places on the internet. They have been collaborating for a long time. Otherwise good luck.

Nicolas

Scheme.PNG

Edited by user 11 July 2018 20:43:19(UTC)  | Reason: Not specified

Offline Jean Giraud  
#94 Posted : 12 July 2018 05:11:28(UTC)
Jean Giraud


Rank: Advanced Member

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

Was thanked: 608 time(s) in 471 post(s)
Let reconciliate this thread in two steps:

1. The triode crappy digitized curves were done ... end of it, no more of these data.
2. Your image shows an invented function, apparently representing a black box doing unknown.
Unknown: if something comes in/out, you must have the 'in' as independent variable and
the 'out' as the dependent variable. From there, the project starts by trying to fit a model
to the data set where 'in' is the column X and 'out' is the col Y.

If you have no data set: you have no project.

From a data set, a fitting session rescues itself to 3 classes of methods:
1. Rational fraction.
2. Model function [Quasi-Newton, Conjugate Gradient, Levenberg-Marquardt].
3. Linear solve.

As it looks, your invented function is [2] Model, but w/o data.
So, your next Smath work sheet will be as short as a 'data set'.

See you soon ... Jean

Offline ola_nicolas  
#95 Posted : 12 July 2018 08:29:34(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Hello.

The function (as a model) has done and still does its job. On the basis of it, studies have been carried out and practical assemblies have been made. All I wanted was to try a solution in SMath.

@Radovan: It seems to me more useful to define that in Mathcad the vectorization process of a function because the result retains its function character as in the example in the picture, while in SMath it is expected that all the variables involved are provided as vectors.

Otherwise, I agree that this topic has been exhausted

See you.

A.PNG

Edited by user 12 July 2018 09:32:35(UTC)  | Reason: Not specified

Offline Jean Giraud  
#96 Posted : 12 July 2018 15:40:16(UTC)
Jean Giraud


Rank: Advanced Member

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

Was thanked: 608 time(s) in 471 post(s)
Originally Posted by: omorr Go to Quoted Post
I think you mean that there is another vectoring process in SMath. I saw that too.


The way Radovan has doctored over a parameters system is another case of exception
Smath does not vectorize Mathcad style. There are other cases, mostly:
1. Smath vectorizes over scalar fnct ... linterp, cinterp, ainterp are not scalar
functions, thus need the vectorize algo.
2. Supersonic(x) solves over the canvas but is not a scalar fnct.
It needs the eval(,)

Vectorize Examples_000.sm (20kb) downloaded 12 time(s).
Vectorize Examples_00.sm (18kb) downloaded 9 time(s).
Vectorize Examples_1.sm (162kb) downloaded 12 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 12/07/2018(UTC)
Offline Jean Giraud  
#97 Posted : 12 July 2018 19:04:14(UTC)
Jean Giraud


Rank: Advanced Member

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

Was thanked: 608 time(s) in 471 post(s)
... this project is left unsolved,
Grands Doctors ! welcome for this hard patient.
The prepare sheet is just for reference
The document to be solved is [Solve].

LM-corr [Solve].sm (13kb) downloaded 14 time(s).
LM-corr [Prepare].sm (75kb) downloaded 14 time(s).
Offline Ber7  
#98 Posted : 12 July 2018 19:16:20(UTC)
Ber7


Rank: Advanced Member

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

Was thanked: 386 time(s) in 215 post(s)
Alglib solver.An attempt to automate the finding of roots

PrimerAlgib1.sm (78kb) downloaded 25 time(s).
PrimerAlgib1.pdf (289kb) downloaded 18 time(s).
thanks 3 users thanked Ber7 for this useful post.
on 12/07/2018(UTC),  on 12/07/2018(UTC),  on 14/07/2018(UTC)
Offline ola_nicolas  
#99 Posted : 13 July 2018 17:04:35(UTC)
ola_nicolas


Rank: Advanced Member

Groups: Registered
Joined: 21/11/2017(UTC)
Posts: 100
Romania
Location: Olt county

Was thanked: 1 time(s) in 1 post(s)
Hello

I think my version of SMath 0.99.6671 differs by something from your version. I installed it very recently - a few days ago. As a first observation, in your version the variable separator within a function is a comma (","Wink while in my version the separator is a semicolon (";"Wink. I do not know what the other differences are, but loaded in my version, the file "PrimerAlgib1.sm" shows that in the picture next. Results for result and f (result) are not available. I have added all the plugins available at this time, and the result is the one you see. I would be interested in doing some tests on this method. Unfortunately, I do not know how to do this.

Nicolas

PrimerAlgib1.PNG

Edited by user 13 July 2018 17:06:46(UTC)  | Reason: Not specified

Offline uni  
#100 Posted : 13 July 2018 17:13:06(UTC)
uni


Rank: Advanced Member

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

Was thanked: 701 time(s) in 416 post(s)
Probably, this is because of the new version of the alglib. I'll try to see what's wrong.
Russia forever!
Viacheslav N. Mezentsev
💰 You can support me for plugins development: https://paypal.me/viacheslavmezentsev
Users browsing this topic
Guest
7 Pages«<34567>
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.