Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Problem with Simulink Parameter Estimation

Subject: Problem with Simulink Parameter Estimation

From: German Campetelli

Date: 2 Feb, 2010 18:44:04

Message: 1 of 7

Hello, I have a non-linear model in Simulink. It has 13 states and almost 30 parameters. I want te adjust the model parameters to some experimental datasets (2). I am using the Simulink Parameter Estimation tool to estimate 15 parameters. The problem I have is that when the tool finishes the estimation process the fit is great, but when I run the simulation again the fit is not the same. I don't know why this happens. I've tried using different solvers with different step sizes and different optimization algorithms and it's always the same. I have used this tool before with a simpler model (just 3 parameters) and the fit was excelent and it functioned perfectly.

Does anyone know why this is happening to me?

Thanks in advance.

German.

Subject: Problem with Simulink Parameter Estimation

From: Arkadiy Turevskiy

Date: 2 Feb, 2010 20:52:07

Message: 2 of 7

Could it be that you have some callback in the model that resets parameter values when you run the simulation? After the optimization finishes, write down final parameter values, and then see if they change when you run the simulation.
Arkadiy


"German Campetelli" <campetelli@cifasis-conicet.gov.ar> wrote in message <hk9rpk$mi3$1@fred.mathworks.com>...
> Hello, I have a non-linear model in Simulink. It has 13 states and almost 30 parameters. I want te adjust the model parameters to some experimental datasets (2). I am using the Simulink Parameter Estimation tool to estimate 15 parameters. The problem I have is that when the tool finishes the estimation process the fit is great, but when I run the simulation again the fit is not the same. I don't know why this happens. I've tried using different solvers with different step sizes and different optimization algorithms and it's always the same. I have used this tool before with a simpler model (just 3 parameters) and the fit was excelent and it functioned perfectly.
>
> Does anyone know why this is happening to me?
>
> Thanks in advance.
>
> German.

Subject: Problem with Simulink Parameter Estimation

From: Marcus M. Edvall

Date: 3 Feb, 2010 02:40:13

Message: 3 of 7

Hi German,

Have you tested a global optimization solver?

Best wishes, Marcus
http://tomsym.com/
http://tomdyn.com/

Subject: Problem with Simulink Parameter Estimation

From: German Campetelli

Date: 3 Feb, 2010 13:42:02

Message: 4 of 7

Arkadiy, thanks for your help. I don't think that that's the problem. I am not using an m file to do the optimization. When you use the Simulink Parameter Estimation tool, I don't know if I could do what you say. I think it's standardized and automatically save the parameter values. Moreover, In the window of this tool you can see the values of all the parameters after the estimation, and I have checked them in the workspace of Matlab and were all the same. I think the problem is in the visualization of this tool (Simulink Parameter Estimation), but as I said before, I tried with a simpler model and it functioned perfectly!!!

Best wishes!

German.

"Arkadiy Turevskiy" <arkadiy.turevskiy@mathworks.com> wrote in message <hka39n$ce6$1@fred.mathworks.com>...
> Could it be that you have some callback in the model that resets parameter values when you run the simulation? After the optimization finishes, write down final parameter values, and then see if they change when you run the simulation.
> Arkadiy
>
>
> "German Campetelli" <campetelli@cifasis-conicet.gov.ar> wrote in message <hk9rpk$mi3$1@fred.mathworks.com>...
> > Hello, I have a non-linear model in Simulink. It has 13 states and almost 30 parameters. I want te adjust the model parameters to some experimental datasets (2). I am using the Simulink Parameter Estimation tool to estimate 15 parameters. The problem I have is that when the tool finishes the estimation process the fit is great, but when I run the simulation again the fit is not the same. I don't know why this happens. I've tried using different solvers with different step sizes and different optimization algorithms and it's always the same. I have used this tool before with a simpler model (just 3 parameters) and the fit was excelent and it functioned perfectly.
> >
> > Does anyone know why this is happening to me?
> >
> > Thanks in advance.
> >
> > German.

Subject: Problem with Simulink Parameter Estimation

From: German Campetelli

Date: 3 Feb, 2010 13:45:26

Message: 5 of 7

Marcus, in the Simulink Parameter Estimation tool you can use a gradient descent algorithm, nonlinear least squares, simplex and even a genetic algorithm. With all of them I had the same error.

Thank you anyway.

Cheers!

German.

"Marcus M. Edvall" <edvall@gmail.com> wrote in message <c7508b94-ee01-49a2-8f77-236faeb3de2a@m31g2000yqd.googlegroups.com>...
> Hi German,
>
> Have you tested a global optimization solver?
>
> Best wishes, Marcus
> http://tomsym.com/
> http://tomdyn.com/

Subject: Problem with Simulink Parameter Estimation

From: Arkadiy Turevskiy

Date: 3 Feb, 2010 18:51:04

Message: 6 of 7

Hi German,
It is hard to diagnose the issue without having your model. I recommend you submit a help reuquest to MathWorks technical support, they will be able to help you.
You can use this link:
http://www.mathworks.com/support/contact_us/index.html

Arkadiy

"German Campetelli" <campetelli@cifasis-conicet.gov.ar> wrote in message <hkbufa$hqu$1@fred.mathworks.com>...
> Arkadiy, thanks for your help. I don't think that that's the problem. I am not using an m file to do the optimization. When you use the Simulink Parameter Estimation tool, I don't know if I could do what you say. I think it's standardized and automatically save the parameter values. Moreover, In the window of this tool you can see the values of all the parameters after the estimation, and I have checked them in the workspace of Matlab and were all the same. I think the problem is in the visualization of this tool (Simulink Parameter Estimation), but as I said before, I tried with a simpler model and it functioned perfectly!!!
>
> Best wishes!
>
> German.
>
> "Arkadiy Turevskiy" <arkadiy.turevskiy@mathworks.com> wrote in message <hka39n$ce6$1@fred.mathworks.com>...
> > Could it be that you have some callback in the model that resets parameter values when you run the simulation? After the optimization finishes, write down final parameter values, and then see if they change when you run the simulation.
> > Arkadiy
> >
> >
> > "German Campetelli" <campetelli@cifasis-conicet.gov.ar> wrote in message <hk9rpk$mi3$1@fred.mathworks.com>...
> > > Hello, I have a non-linear model in Simulink. It has 13 states and almost 30 parameters. I want te adjust the model parameters to some experimental datasets (2). I am using the Simulink Parameter Estimation tool to estimate 15 parameters. The problem I have is that when the tool finishes the estimation process the fit is great, but when I run the simulation again the fit is not the same. I don't know why this happens. I've tried using different solvers with different step sizes and different optimization algorithms and it's always the same. I have used this tool before with a simpler model (just 3 parameters) and the fit was excelent and it functioned perfectly.
> > >
> > > Does anyone know why this is happening to me?
> > >
> > > Thanks in advance.
> > >
> > > German.

Subject: Problem with Simulink Parameter Estimation

From: German Campetelli

Date: 4 Feb, 2010 19:33:04

Message: 7 of 7

Arkadiy, I realized where the problem was. My model has integrators with external initialization. These initializations are a function of some of the parameters I was estimating. I thought that this tool had that into account. It seems like when the estimation process starts, it uses all the time the same initialization in all of the integrators, and in my case these changed as the parameters values were changing. I don't know if you have understood anything of what I explained. Anyway, thank you a lot for your advice. I hope this would be useful for anyone else.

Cheers!

German.


"Arkadiy Turevskiy" <arkadiy.turevskiy@mathworks.com> wrote in message <hkcgio$a0j$1@fred.mathworks.com>...
> Hi German,
> It is hard to diagnose the issue without having your model. I recommend you submit a help reuquest to MathWorks technical support, they will be able to help you.
> You can use this link:
> http://www.mathworks.com/support/contact_us/index.html
>
> Arkadiy
>
> "German Campetelli" <campetelli@cifasis-conicet.gov.ar> wrote in message <hkbufa$hqu$1@fred.mathworks.com>...
> > Arkadiy, thanks for your help. I don't think that that's the problem. I am not using an m file to do the optimization. When you use the Simulink Parameter Estimation tool, I don't know if I could do what you say. I think it's standardized and automatically save the parameter values. Moreover, In the window of this tool you can see the values of all the parameters after the estimation, and I have checked them in the workspace of Matlab and were all the same. I think the problem is in the visualization of this tool (Simulink Parameter Estimation), but as I said before, I tried with a simpler model and it functioned perfectly!!!
> >
> > Best wishes!
> >
> > German.
> >
> > "Arkadiy Turevskiy" <arkadiy.turevskiy@mathworks.com> wrote in message <hka39n$ce6$1@fred.mathworks.com>...
> > > Could it be that you have some callback in the model that resets parameter values when you run the simulation? After the optimization finishes, write down final parameter values, and then see if they change when you run the simulation.
> > > Arkadiy
> > >
> > >
> > > "German Campetelli" <campetelli@cifasis-conicet.gov.ar> wrote in message <hk9rpk$mi3$1@fred.mathworks.com>...
> > > > Hello, I have a non-linear model in Simulink. It has 13 states and almost 30 parameters. I want te adjust the model parameters to some experimental datasets (2). I am using the Simulink Parameter Estimation tool to estimate 15 parameters. The problem I have is that when the tool finishes the estimation process the fit is great, but when I run the simulation again the fit is not the same. I don't know why this happens. I've tried using different solvers with different step sizes and different optimization algorithms and it's always the same. I have used this tool before with a simpler model (just 3 parameters) and the fit was excelent and it functioned perfectly.
> > > >
> > > > Does anyone know why this is happening to me?
> > > >
> > > > Thanks in advance.
> > > >
> > > > German.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us