Dear Lixian,
Sorry for the confusion, but it looks like I had a typo in the forum post you linked to. Here are the corrected equations:
Consider the linear system:
(M_swl + A_swl)qdd_swl + B_swlqd_swl + C_swl*q_swl = F_swl
where q_swl = [ surge, sway, heave, roll, pitch, yaw ]^T are the platform displacements, and F_swl are the platform loads, relative to the platform centerline at still water level (SWL) (0,0,0). The same equations can be written in terms of displacements and loads about the center of gravity located at (x_cg, y_cg, z_cg) using the following transformation:
q_swl = TransMatq_cg
q_cg = TransMat^-1q_swl
F_cg = TransMat^T*F_swl
where,
TransMat =
[ [ 1 0 0 0 -z_cg y_cg ];
[ 0 1 0 z_cg 0 -x_cg ];
[ 0 0 1 -y_cg x_cg 0 ];
[ 0 0 0 1 0 0 ];
[ 0 0 0 0 1 0 ];
[ 0 0 0 0 0 1 ] ]
TransMat^-1 =
[ [ 1 0 0 0 z_cg -y_cg ];
[ 0 1 0 -z_cg 0 x_cg ];
[ 0 0 1 y_cg -x_cg 0 ];
[ 0 0 0 1 0 0 ];
[ 0 0 0 0 1 0 ];
[ 0 0 0 0 0 1 ] ]
and
TransMat^T =
[ [ 1 0 0 0 0 0 ];
[ 0 1 0 0 0 0 ];
[ 0 0 1 0 0 0 ];
[ 0 z_cg -y_cg 1 0 0 ];
[ -z_cg 0 x_cg 0 1 0 ];
[ y_cg -x_cg 0 0 0 0 1 ] ]
Thus, the transformed system is:
(M_cg + A_cg)qdd_cg + B_cgqd_cg + C_cg*q_cg = F_cg
where,
M_cg = TransMat^TM_swlTransMat
A_cg = TransMat^TA_swlTransMat
B_cg = TransMat^TB_swlTransMat
C_cg = TransMat^TC_swlTransMat
Thus, you have the signs backwards on x_cg and z_cg (y_cg = 0).
Best regards,