From: Ashgard on
I have performed a system identification on a model (motor with load). The motor with load can be modeled as a fourth order system. The model looks like

sys = tf([m2 b k],[m1*m2 b*(m1+m2) k*(m1+m2) 0 0]);

Now I want to use matlab to find the optimal values for m1, m2, b, k such that the error between system sys and the measurement data (in frequency domain) is minimal.

What function should I use for this problem?

Thanks in advance,
Bob
From: Miroslav Balda on
"Ashgard " <azizz.bob(a)gmail.com> wrote in message <hra3n0$5$1(a)fred.mathworks.com>...
> I have performed a system identification on a model (motor with load). The motor with load can be modeled as a fourth order system. The model looks like
>
> sys = tf([m2 b k],[m1*m2 b*(m1+m2) k*(m1+m2) 0 0]);
>
> Now I want to use matlab to find the optimal values for m1, m2, b, k such that the error between system sys and the measurement data (in frequency domain) is minimal.
>
> What function should I use for this problem?
>
> Thanks in advance,
> Bob

Hi Bob,
If you have a vector of measured complex values g(f) for frequencies f, you may evaluate a vector of differencies rc=tf(f)-g(f), split it into real and imaginary components r = [real(r);imag(r)] via a function r = res(x), where x= [m1; m2; b; k], and use any function for solving a system of nonlinear equations by least squares method, say LMFnlsq from
www.mathworks.com/matlabcentral/fileexchange/17534
or a function from the Optimization Toolbox.
Good luck!

Mira
 | 
Pages: 1
Prev: Error Dialog
Next: Matlab crash!