Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello,
I need some help in recalling and learning skills in order to do some research in material science.
This implies using Mathcad as a tool for interpreting electrical impedance data of semiconductor diodes.
I have been away from academic life for 10 years so I do not understand easily those mathcad files I used then.
Can you explain me how to integrate a function found on the basis of fitting?
Kristjan Laes
Solved! Go to Solution.
Still unclear to me what you have in mind.
What puzzle me is this:
1) Lets suppose we can calculate vectors A and B. There would be different vectors A and B for every iteration step. Is that what you have in mind?
2) Those correction vectors A and B would not affect the further iterations at all as you don't say how you would like to use them. So the resulting resistance vectors would be the very same as they are now
And I just noticed it now:
3) The two equations you offered only differ in the index. u in one and u-1 in the other. As u is running from 1 to rows V0-1 anyway. I may be wrong but it looks to me that this does not make much sense and that actually for every value of u you just have one equation but two variables to solve for which is an under-determined task with an infinite number of possible solutions A and B.
Afterthought:
Maybe you mean that the values for A and B with index u should depend on U, I , R1 and R2 with index u AND the elements with index u-1. That way we would use two different equations and could solve.
1) These calculated vectors A and B should be applied in the next iteration as a corrections for V0 and I0.
2) As such I hope that these vectors evolve as do evolve other parameters in that iterative cycle. I mean R1, R2, I1, I2 and V1 but now together with A and B.
These A and B have to be found that way because they affect all the seeked parameters from the beginning of the iterative cycle.
3) Yes, these equations differ only in index u. As you look on the graphs of R1 and R2, these are not constants, and the same equation applied to two consecutive experimental conditions can be solved for these two parameters A and B.
Also do differ I0 and V0.
And this also means that if there are number of u points of data, A and B can be calculated in number as u-1.
The best fit solution by using minerr applied to all u data may be a good enough solution.
But all the same this best fit solution should also be applied to the next iteration in order to correct for previous V and I (V0 and I0 at the very beginning of the cycle).
So this is also
Again:
Do you expect A and B to be a single value each for every iteration step? That means it should be the very same value for each combination of u and u-1.
In this case a solve block with "minerr" would be necessary as we need two scalar values A and B to best fit 20 equations.
Or, as I assumed so far, do you want to be A and B be a vector of 21 (or 20 as the first correction value would possibly be 0) values each like R1' etc. In this case we have two equations for two variables for every u starting with u=1 (A=B=0 for u=0 I suppose). This equations can be solved exactly(symbolically) but of course a numeric solve block with "find" would do the job equally well.
I implemented the second variant from the above but I may not got the point. Actually I lost track on your calculations already long ago and just concentrated on the help with Mathcad itself.
The "correction" vector A contains rather large values and as a result the elements in the new vector V.0 are not in ascending order after the first iteration. This makes "linterp" fail as it expects the abscissa values in ascending order.
Do you really intend to change the nicely spaced values in V.0?
Anyway - the attached sheet might give you an idea how to implement whatever you really had in mind. Good luck!
Hello!
I just found something that probably shows that this difference what I have been bothering about, is not about this corrections of A and B.
My colleague made a series of fittings with different results for the same type of network but with different numerical values.
These graphs of difference in resistances showed remarkable differences.
And here they are.
I feel a bit bad with my wants.
Thank you for helping me, again.
I feel that at the moment I am in a kind of confusion, and not having a good idea, what to do and what do these results mean.
Need to think and meditate a bit.
The best is this:
Have to find out what makes it better than others do.
I would like now to solve the similar task for the next circuit which has one more unknown element.
What is wrong with the constants in the definition in the Given block?
And how to give the solutions now in the the same form as previously:
if there are two sets of solutions for the system of equations? How should this to be addressed here?
What about I3? You neither provide is as a function argument of function M, nor can you solve for it (because you only have four equations).
So either you have to provide the value of I3 in function M or, if you want to solve for I3, too, you have to supply a fifth equation and then solve for I3, too.
Here I added I3 as additional function argument and show how to select between the two sets of solutions vi the column selector
Thank you for noticing this I3 in the Given block.
I come to the computer to do these things at the evenings after a day job, and my brain is not in a good shape at this time of the day.
This was by mistake, this I3, it has to be there I0.
Also today, I noticed myself suddenly that the fourth equation in not right. It has to have additional members:
But this finding, as it turns out, is a dependent equation.
Yes, you need another equation.
The solution 0 for V.2 does not necessarily mean that the equations are dependent, but if you add "fully" and "simplify" you see that you can chose any value for V.2 (Mathcad calls it _z) and calculate the other variables depending on it.