From: Karthi on
i want to find the the value of integral gain Ki which minimize the cost function

cost function=integral(x1^2+x2^2)dt
where x1 and x2 are state variables.

i can calculate the cost function for various ki but i dont know how to optimize the integral gain.please help
From: Matt J on
"Karthi " <gdkkannan(a)yahoo.co.in> wrote in message <hn1n44$s0p$1(a)fred.mathworks.com>...
> i want to find the the value of integral gain Ki which minimize the cost function
>
> cost function=integral(x1^2+x2^2)dt
> where x1 and x2 are state variables.
>
> i can calculate the cost function for various ki but i dont know how to optimize the integral gain.please help
===============

How can we help when you haven't shown the dependence of the cost function on Ki?

From: Karthi on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hn1o7p$88h$1(a)fred.mathworks.com>...
> "Karthi " <gdkkannan(a)yahoo.co.in> wrote in message <hn1n44$s0p$1(a)fred.mathworks.com>...
> > i want to find the the value of integral gain Ki which minimize the cost function
> >
> > cost function=integral(x1^2+x2^2)dt
> > where x1 and x2 are state variables.
> >
> > i can calculate the cost function for various ki but i dont know how to optimize the integral gain.please help
> ===============
>
> How can we help when you haven't shown the dependence of the cost function on Ki?
> ===================
it is actually a simulink diagram, x1 and x2(state variables) are the outputs from two various blocks.the integral gain Ki is in another separate block. by giving various values to Ki cost function was calculated.there is no mathematical expression that relates cost function and Ki.actually cost function is a function of x1 and x2 but x1 and x2 depends upon Ki.
From: Matt J on
"Karthi " <gdkkannan(a)yahoo.co.in> wrote in message <hn7ver$cl$1(a)fred.mathworks.com>...

> > How can we help when you haven't shown the dependence of the cost function on Ki?
> > ===================
> it is actually a simulink diagram, x1 and x2(state variables) are the outputs from two various blocks.the integral gain Ki is in another separate block. by giving various values to Ki cost function was calculated.there is no mathematical expression that relates cost function and Ki.actually cost function is a function of x1 and x2 but x1 and x2 depends upon Ki.
================

If there is no analytical expression for the cost function, you can try fminsearch().
From: Paul Kerr-Delworth on
Hi Karthi,

There are two examples in the Optimization Toolbox documentation which show how incorporate a SIMULINK model into an objective function for use in an Optimization Toolbox solver.

Using lsqnonlin with a SIMULINK model
<<http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brn4noo.html#f11160>>

Using fminimax with a SIMULINK Model
<<http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brn4npl.html#f11247>>

While these do not solve your problem, they do show how to take the output of a simulation and use it in an objective function.

Hope this helps

Best regards,

Paul


"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hn83rc$97t$1(a)fred.mathworks.com>...
> "Karthi " <gdkkannan(a)yahoo.co.in> wrote in message <hn7ver$cl$1(a)fred.mathworks.com>...
>
> > > How can we help when you haven't shown the dependence of the cost function on Ki?
> > > ===================
> > it is actually a simulink diagram, x1 and x2(state variables) are the outputs from two various blocks.the integral gain Ki is in another separate block. by giving various values to Ki cost function was calculated.there is no mathematical expression that relates cost function and Ki.actually cost function is a function of x1 and x2 but x1 and x2 depends upon Ki.
> ================
>
> If there is no analytical expression for the cost function, you can try fminsearch().