How to solve it? - Сообщения
WroteDetermination 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.
WroteWroteDetermination 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
Added PDF file.
PrimerAlgib.pdf (187 КиБ) скачан 44 раз(а).
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.
Please find the attached corrected file of your attempt. LM-corr.sm (66 КиБ) скачан 26 раз(а). . 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
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
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
WroteThe 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.
It looks interesting the algorithm proposed by Ber7 in post # 80, but it looks like the version I installed has something wrong.
Цитата... 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.
WroteHello.
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.
Wrote
Цитата... 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.
Wrote... 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.
WroteNow 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.
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
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
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.
WroteI 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 (19 КиБ) скачан 44 раз(а).
Vectorize Examples_00.sm (17 КиБ) скачан 37 раз(а).
Vectorize Examples_1.sm (161 КиБ) скачан 43 раз(а).
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 (12 КиБ) скачан 37 раз(а).
LM-corr [Prepare].sm (74 КиБ) скачан 40 раз(а).

PrimerAlgib1.sm (77 КиБ) скачан 47 раз(а).
PrimerAlgib1.pdf (288 КиБ) скачан 39 раз(а).
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 (",") while in my version the separator is a semicolon (";"). 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
-
Новые сообщения
-
Нет новых сообщений