The present application relates to the technical field of
motor control, and particularly relates to a
motor control method for an
electric bed and the
electric bed, which comprises the following steps: at the moment of starting the motor, sampling a current
ripple signal, performing
frequency spectrum analysis on the current
ripple signal, extracting a load
resonance frequency, generating an anti-phase
harmonic current, and injecting the anti-phase
harmonic current into a motor winding; at a motor pre-braking stage, injecting a damping
harmonic into the motor winding, and at a motor main-braking stage, injecting a phase-synchronous
reverse current into the motor winding. The present application realizes low-
impact control of starting and stopping of the
electric bed through an electromechanical energy hedging mechanism, and is compatible with the existing electromechanical architecture of the electric
bed. At the moment of starting the motor, the anti-phase harmonic current is injected to neutralize high-frequency
resonance exciting force. At the pre-braking stage, the damping harmonic is used to dissipate
kinetic energy, and at the main-braking stage, the current is reversed to lock, so that the residual amplitude at the destination approaches zero. Based on real-
time frequency spectrum analysis,
control parameters are dynamically tuned to ensure that the starting and stopping time is relatively constant under varying loads, and the problems of overshoot under
light load and
delay under
heavy load are solved.