MATLAB: Jacobian Matrix of partial derivatives of a nonlinear system

jacobianpartial derivative in simulink

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

Best Answer

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)).
Related Question