finding parameters by inverse problem in time domain

5 views (last 30 days)
Dear Walter,
First, Thank you for taking time and answering all of my questions.
I have a function in s-domain, TR. I used Durbin to bring it in time domain.
the function has a few parameters. I decidede to find one or a few parameters using inverse problem.
I have a file of another function which I need to match my function with it, then I can find my parameter.(MINIMIZATION)
My concern is to know how I use inverse problem here?
I haver to use Durbin, because they are in S-domain.
I decided to add a few lines at the end of my durbin regarding inverse problem(minimization) and start my durbin code with a function name [function y=f(x)].
attached, you can see my TR, f (include Durbin+ a few more line for inverse) and a mat file including the data of another function which I need to have minimization with it. Also, there is a mfile with name fint as it is just a function.
when I use optimization, I get "Index in position 1 is invalid. Array indices must be positive integers or logical values."
I went through your old respnse to others and removed that problem. Thank you.
Now, I have another problem and it is killing me.
it says Objective function is undefined at initial point. Fmincon cannot continue."
Please note that I use fmincon
If you know better function please let me know.
please find my files and see inside f.m
Again, thank you for your time and answers.
Best
M.H.
  1 Comment
Walter Roberson
Walter Roberson on 16 May 2020
You did not include your f . I can guess that it invokes TR, but I cannot guess what value of s you might be passing in, or how the .mat is connected to this.

Sign in to comment.

Accepted Answer

mohammad hodaei
mohammad hodaei on 16 May 2020
Dear Walter,
Please accept my apologies. I am so sorry.
Attahced, please find the f.m as well.
If you need to come up with the new question, ask, please let me do that.
Sincerely
M.H.

More Answers (3)

Walter Roberson
Walter Roberson on 16 May 2020
tthrough=8.8e-5:1e-9:tmax;
That becomes a vector of 12001 elements
trange=tthrough(1):(length(tthrough))/100:(length(tthrough));
That uses the 8.8e-5 as the first element, and increments by 12001/100 = 120.001 to 12001, for a total of 100 elements. But why ?? Why would use use the time value of 8.8e-5 as the first value, and otherwise be dealing with the length of the time vector??
length(trange)
for b=1:length(trange)
disp(b)
t=trange(b);
For the first iteration, t will be trange(1) which is the tthrough(1) which is 8.8e-5 .
For the second iteration, t will be 120.001 higher, about 120.010088 .
yt(b)=(2*exp(mu.*t)/T0)*(S+0.5*real(TR(x,mu)));
mu is close to 25000. Multiply that by the 120.010088 to get 3000102.19489026 . exp() of that is about 6.7*10^1302927 which overflows to inf.
??? Why are you building tthrough just to take its (known) first value and its length ???
I suspect you mean something more like
trange = linspace(8.8e-5, tmax, 100);

mohammad hodaei
mohammad hodaei on 16 May 2020
That uses the 8.8e-5 as the first element, and increments by 12001/100 = 120.001 to 12001, for a total of 100 elements. But why ?? because I need to find fig 15 from the attached file.
Why would use use the time value of 8.8e-5 as the first value, and otherwise be dealing with the length of the time vector??
please load Fellah2006.mat, then you see I divided my trange is going up like what you see. In fact, I need to have the same array for both of them. Fellah2006 is experimental point that I got from the figure while my code has many more poitn, so I did that.
mu is close to 25000. Multiply that by the 120.010088 to get 3000102.19489026 . exp() of that is about 6.7*10^1302927 which overflows to inf.
??? Why are you building tthrough just to take its (known) first value and its length ???
You are right. that is my mistake. And I think trange = linspace(8.8e-5, tmax, 100) will work.
Thanks.
Also, I need to acknoWledge you in my thesis. I will defend in the summer. please let me know your name.
Do you accept to talk about you? if so, can I use this name you have?
What is the best for you to say.
Thanks abnd advice
M.H.
  1 Comment
Walter Roberson
Walter Roberson on 17 May 2020
because I need to find fig 15 from the attached file
Figure 15 says nothing about incrementing by 120 at a time. The x axis for figure 15 goes up to about 10.2 * 10^(-5) not up to 12001 .
Fellah2006 is experimental point that I got from the figure
Figure 15 has two lines together on it, and you have mixed the data for the two lines together in Fellah2006, resulting in having multiple entries with the same time coordinate (the last 3 times are all the same for example.)

Sign in to comment.


mohammad hodaei
mohammad hodaei on 17 May 2020
Thank you for your more attention.
I think I fixed the problem by the formulla you gave me.
linspace(8.8e-5, tmax, 100), tmax=10e-5. is not it?
Bets
M.H.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!