Having problem about change the volume position

Sorry this problem may seem awkward.
I rendered two object,and i need to move object_B to a specific position in object_A.
And i had calculate the position and direction,
here is the problem:
when i set the object_B origin position, for example:

old_origin(0,0,0)—>new_roigin(50,50,50)

I found the object_B was in the wrong position,and then I realized that the origin position is the Physical coordinate system.But the origin position what i calculate is according the object_A 3D array index.
No matter how I set the origin position, it always change in the Physical coordinate system,how can i change the origin according object_A 3D array index.
Forgive my poor English and expression