Jacobian Matrix of partial derivatives of a nonlinear system
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Armand Chrystel Moutchiho
am 23 Mär. 2011
Kommentiert: Yasaman Asiaee
am 19 Sep. 2022
Hello to everyone, i am trying to compute dynamically the jacobians of a nonlinear system. Let say i cannot have the description of he system; It is like a black box and i can just observe the states or measure the outputs!! Is it correct(theoretically) to approximate for example the jacobian-element H(i,j) using H(i,j) = difference of output(i) / difference of output(j) ?? If not why? i have build a simulink block which apply this operation on each output and on each state to build me what i think should be an aprroximation of the system. Please, i am not yet a Control-system expert and would like to know your opinions. Thank you for your help and time. Armand
0 Kommentare
Akzeptierte Antwort
Matt Tearle
am 23 Mär. 2011
Yes, you can use any standard finite difference approximation to get a Jacobian, so H(i,j) = diff(output(i))/diff(input(j)) would work. Computationally it can be expensive. If your system returns the output as a vector, you can at least get the columns of H as vectors - that is, H(:,j) = diff(output)/diff(input(j)).
0 Kommentare
Weitere Antworten (3)
Armand
am 23 Mär. 2011
That is also what i thought. But i try to test the jacobian, by multiplying a simulink signal x(k) (dimensions [3x1], for example three sinus waves) with a matrix C([2x3]), to obtain y. Then i gave y and x as inputs to my Jacobian Block. I was expecting to receive as output a matrix [2x3], with nearly the same values as in C. The output dimensions was as expected, but the values weren't!? Could someone maybe explain why? Thanks a lot for the answer(s). Armand
1 Kommentar
Matt Tearle
am 23 Mär. 2011
Perhaps I misunderstand, but if you're defining your function as y = C*x, then any f.d. method should return the exact Jacobian (C). I think we'd have to see the code to work out what the problem is.
Matt Tearle
am 23 Mär. 2011
Here's a f.d. Jacobian function I threw together:
function J = fdjacobian(f,x,dx)
y = f(x);
m = length(y);
n = length(x);
J = zeros(m,n);
for k = 1:n
xnew = x;
xnew(k) = xnew(k)+dx;
ynew = f(xnew);
J(:,k) = ynew-y;
end
J = J/dx;
But you can find something similar, but better, on File Exchange. Check out Yi Cao's complex-step Jacobian.
2 Kommentare
Haseeb Hassan
am 15 Mai 2018
How i can use Jacobian Function to find derivatavies of the image in X and X Direction?
Siehe auch
Kategorien
Mehr zu State-Space Control Design and Estimation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!