A motor drive device that drives a motor, the motor drive device comprising: an operation pattern generator that generates an operation pattern and an operation command, the operation pattern issuing an instruction of at least one of a motor speed and a motor position to the motor, the operation command including at least one operation pattern; a position and speed controller that receives the operation command and motor positional information transmitted from an encoder; and a load characteristic compensator; characterized by: the position and speed controller generates a torque command such that a deviation of at least one of the motor position and the motor speed becomes zero, and transmits the generated torque command; the load characteristic compensator that receives the torque command, the motor positional information, and a load characteristic estimated value, adds a friction torque estimated value of a load applied to the motor to the torque command after scaling processing on the torque command in accordance with total inertia which means inertia of the motor and the load applied to the motor, and generates a post-compensation torque command that drives the motor, wherein the friction torque includes biased weight torque, kinetic friction torque, and/or a viscous friction torque; and a load characteristic measurement unit that generates a torque command indicator which is an absolute value of the torque command included in the operation pattern and a torque limit value, receives the post-compensation torque command and the motor positional information, and estimates a load characteristic of the load by estimating automatically the total inertia of the motor and the load or the friction torque from post-compensation torque command and motor positional information to set the load characteristic compensator, wherein the operation pattern generator increases an absolute value of acceleration, at which the motor speed or the motor position is changed, in each operation pattern, the load characteristic measurement unit estimates the load characteristic and outputs the load characteristic estimated value to the load characteristic compensator when the torque command indicator is less than or equal to the torque limit value and updates the load characteristic estimated value as a result of the estimation, and the load characteristic measurement unit ends the estimation of the load characteristic without outputting the load characteristic estimated value to the load characteristic compensator when the torque command indicator is greater than the torque limit value. an operation pattern generator that generates an operation pattern and an operation command, the operation pattern issuing an instruction of at least one of a motor speed and a motor position to the motor, the operation command including at least one operation pattern; a position and speed controller that receives the operation command and motor positional information transmitted from an encoder; and a load characteristic compensator; the position and speed controller generates a torque command such that a deviation of at least one of the motor position and the motor speed becomes zero, and transmits the generated torque command; the load characteristic compensator that receives the torque command, the motor positional information, and a load characteristic estimated value, adds a friction torque estimated value of a load applied to the motor to the torque command after scaling processing on the torque command in accordance with total inertia which means inertia of the motor and the load applied to the motor, and generates a post-compensation torque command that drives the motor, wherein the friction torque includes biased weight torque, kinetic friction torque, and/or a viscous friction torque; and a load characteristic measurement unit that generates a torque command indicator which is an absolute value of the torque command included in the operation pattern and a torque limit value, receives the post-compensation torque command and the motor positional information, and estimates a load characteristic of the load by estimating automatically the total inertia of the motor and the load or the friction torque from post-compensation torque command and motor positional information to set the load characteristic compensator, wherein the operation pattern generator increases an absolute value of acceleration, at which the motor speed or the motor position is changed, in each operation pattern, the load characteristic measurement unit estimates the load characteristic and outputs the load characteristic estimated value to the load characteristic compensator when the torque command indicator is less than or equal to the torque limit value and updates the load characteristic estimated value as a result of the estimation, and the load characteristic measurement unit ends the estimation of the load characteristic without outputting the load characteristic estimated value to the load characteristic compensator when the torque command indicator is greater than the torque limit value.