09-01-2014 01:37 PM
Hi,
I have a vector (row vector, 3 enteries) and I need to calculate it's jacobian matrix with respect to another vector. Below is an image attached with following notes.
Jacobian of array named 'function' with respect to array named 'Quaternion In'.
09-01-2014 01:38 PM
09-02-2014 09:51 AM
I trust you already know how to calculate a Jacobian Matrix in general. But, here's a discussion just in case: http://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant
What have you tried so far? It's usually more helpful to attach your VI rather than a picture of your Front Panel. From there, we can see what your code looks like.
09-02-2014 10:28 AM
There are only two icons of these two array controls in my block diagram and nothing else. Yes I know how to calculate a Jacobian Matirx on page but in this case I am lost in how to calculate a Jacobian of "Function" array with respect to Quaternion array. Below are few things I am confused in:
1. Each entry of FUNCTION array must be partially derivated w.r.t to quaternion array.
2. How am I supposed to partially derivate first entry of FUNCTION with respect to the first entry of quaternion matrix and then derivate rest of the entries in same manner as per the Jacobian definition.
I need a right nudge and meanwhile I am trying myself as well. I will post a VI in a short while.
Regards.
09-02-2014 12:08 PM
This is hox exactly I am trying to achieve Jacobian matrix. VI is also attached.
09-02-2014 01:49 PM
This VI does not make any sense.
You need a function model that is a function of your parameters. You only have a static fuction array so I don't see what you are trying to do at all.
09-08-2014 11:38 AM
By the way, if you objective is to work with Quaternions, the Robotics module actually has most of the operations that you would like to use:
http://zone.ni.com/reference/en-XX/help/372983B-01/lvrobovi/quaternion_pal/
Also, most likely, if you want to obtain the jacobian matrix from quaternion, then you probably need to convert the quaternion into matrix transformation and, then use equation to obtain the jacobian. In robotics, there is a formula for dealing with Jacobian between two transformations. See page 10 in:
http://mech337.engr.scu.edu/references/robot.pdf
09-20-2014 07:23 AM
The problem I'm facing is in derivating.
I have following function
I need it's jacobian, which should come like this
Since we can't symbollicaly multiply equations, how am I supposed to take partial derivative of Function and get it's jacobian? I have following data fed in as initial values
q1=1
q2=q3=q4=0.
09-22-2014 08:01 AM
It would help everyone greatly if you would post your code when you get stuck. If we can't see your code, that leaves us with two realstic options: write the entire program for you or wait for your code. The posters that are the most engaged with their own code in these forums tend to receive the best reception and the community is able to help them much quicker.
Did you make any changes after altenbach pointed to some programming errors?
09-22-2014 10:25 AM
I am being total blind in how to take Jacobian Matirx of objective function by calculating partial derivatives of each entry as I have mentioned earlier. I have calculated objective function as shown in image below (VI also posted). This part of code rotates a vector with quaternion and then subtracted from acceleration measurements of three axis just according to the equation mentioned afore.
The initial values of Quaternion, Vector and Accelerations are shown in fornt panel.