The invention provides a control method of a human-
machine interaction mechanical arm, which relates to a safe control method of a mechanical arm working under an unknown environment and solves the problem that an operator accidentally injured due to failure of the existing mechanical arm to accurately model the
working environment when the mechanical arm works in
close contact with the operator. A mechanical arm controller of the invention collects a joint position in a real time manner by a joint sensor and transforms the joint position q to a Descartes position x by the positive
kinematics, and calculates the real-
time trajectory planning xpg which is provided with a feedback of the Descartes force; the mechanical arm controller also collects the torque Tau by the joint sensor in a real time manner, calculates the expected torque Taur by Descartes
impedance control, and calculates the input torque Taum of the mechanical arm joint by the dynamic compensation of a motor. The control method can effectively detect the force from each joint of the mechanical arm; when contacting an object, the mechanical arm can carry out a soft contact; when a collision happens, the mechanical arm can ensure that the
contact force from each direction is within the range of the expected force, thus ensuring the safety of the mechanical arm and the operator.