CN117833720A - Motor control method and device, motor driver and storage medium - Google Patents

Motor control method and device, motor driver and storage medium Download PDF

Info

Publication number
CN117833720A
CN117833720A CN202311869000.0A CN202311869000A CN117833720A CN 117833720 A CN117833720 A CN 117833720A CN 202311869000 A CN202311869000 A CN 202311869000A CN 117833720 A CN117833720 A CN 117833720A
Authority
CN
China
Prior art keywords
current
motor
sampling
driving
current sampling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311869000.0A
Other languages
Chinese (zh)
Inventor
李禄平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikrobot Co Ltd filed Critical Hangzhou Hikrobot Co Ltd
Priority to CN202311869000.0A priority Critical patent/CN117833720A/en
Publication of CN117833720A publication Critical patent/CN117833720A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control Of Multiple Motors (AREA)

Abstract

The embodiment of the application provides a motor control method, a motor control device, a motor driver and a storage medium, wherein the method comprises the following steps: responding to a motor driving instruction, switching a current sampling channel of a control unit to a current sampling unit connected with a current motor; acquiring the current sampling current of the current motor at the starting moment of each appointed period; based on the current sampling current, determining a driving signal of the current motor, and sending the driving signal to a driving unit of the current motor so that the driving unit drives the current motor to move according to the driving signal; after the current sampling current is obtained, switching a current sampling channel to a current sampling unit connected with a new current motor in the specified period; returning to the step of acquiring the current sampling current of the current motor at the starting time of each designated period. By applying the method provided by the embodiment of the application, the number of motor drivers required by the simultaneous operation of multiple motors can be reduced.

Description

Motor control method and device, motor driver and storage medium
Technical Field
The present disclosure relates to the field of motor technologies, and in particular, to a motor control method, a motor control device, a motor driver, and a storage medium.
Background
In an industrial application scenario, there are situations where it is necessary to control the operation of multiple motors simultaneously, for example, in some cases, it is necessary to control the operation of motors on multiple joints of a robot simultaneously.
In the related art, a mode of controlling one motor by one motor driver is generally adopted to realize simultaneous control of a plurality of motors. As shown in fig. 1, when it is required to control the motor 1 and the motor 2 to operate simultaneously, the motor 1 may be controlled by the motor driver 1, the motor 2 may be controlled by the motor driver 2, and each motor driver may include 1 control unit, 1 sampling unit, and 1 driving unit. The control device may send motor driving instructions to a plurality of motor drivers, each of which may drive a motor to which the motor driver is connected into an operating state after receiving the motor driving instructions.
However, a plurality of motors to be controlled simultaneously may be located on the same apparatus, for example, a plurality of motors to be controlled simultaneously are located on one robot, in which case, a mode of controlling one motor by one motor driver will result in a larger number of motor drivers to be required, a larger space occupied by the motor drivers, a higher production cost of the apparatus and unfavorable miniaturization of the apparatus.
Disclosure of Invention
An object of the embodiments of the present application is to provide a motor control method, apparatus, motor driver, and storage medium, so as to reduce the number of motor drivers required for simultaneous operation of multiple motors, reduce the space occupied by the motor drivers in the device for simultaneous operation of multiple motors, promote the miniaturization development of the device for simultaneous operation of multiple motors, and reduce the production cost of the device for simultaneous operation of multiple motors. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a motor control method, where the method is applied to a control unit in a motor driver, where the motor driver further includes a plurality of driving units and a plurality of current sampling units, each driving unit is connected to one motor of the plurality of motors, each current sampling unit is connected to one motor of the plurality of motors, and the plurality of driving units and the plurality of current sampling units are both connected to the control unit; the method comprises the following steps:
responding to a motor driving instruction, and switching a current sampling channel of the control unit to a current sampling unit connected with a current motor;
acquiring the current sampling current of the current motor at the starting time of each appointed period; the current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor;
Determining a driving signal of the current motor based on the current sampling current, and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor drives the current motor to move according to the driving signal;
after the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with a new current motor in the specified period; if the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor of the current motor in the preset driving sequence;
and returning to the step of acquiring the current sampling current of the current motor at the starting time of each designated period.
Optionally, in a specific implementation manner, the plurality of motors include a first motor and a second motor;
the response to the motor driving instruction, the current sampling channel of the control unit is switched to the current sampling unit connected with the current motor, and the current sampling unit comprises:
Responding to a motor driving instruction, taking the first motor as a current motor, and switching a current sampling channel of the control unit to a current sampling unit connected with the current motor;
after the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with a new current motor in the specified period, wherein the current sampling unit comprises:
if the current motor is the first motor, switching the current sampling channel to a current sampling unit connected with the second motor in the appointed period after the current sampling current is acquired;
and if the current motor is the second motor, switching the current sampling channel to a current sampling unit connected with the first motor in the appointed period after the current sampling current is acquired.
Optionally, in a specific implementation manner, before the switching the current sampling channel of the control unit to the current sampling unit connected to the current motor, the method further includes:
determining a plurality of target motors to be driven indicated by the motor driving instruction from the plurality of motors;
The determining a driving signal of the current motor based on the current sampling current includes:
if the current motor is the target motor, determining a driving signal of the current motor based on the current sampling current;
the method further comprises the steps of:
and if the current motor is not the target motor, waiting for the ending of the appointed period after the current sample collecting current is obtained.
Optionally, in a specific implementation manner, the control unit includes: and the counting value change periods and the counting value change frequencies of the timers included in the control unit are the same, and the counting values of the timers at the same moment are the same.
Optionally, in a specific implementation manner, the motor driver further includes: a plurality of feedback units connected to the control unit, each feedback unit being connected to one of the plurality of motors;
the step of obtaining the current sampling current of the current motor at the starting time of each appointed period comprises the following steps:
acquiring the current sampling current of the current motor and the current rotor position of the current motor at the starting moment of each appointed period; the current rotor position is obtained by sampling the rotor position of the current motor through a feedback unit connected with the current motor;
The determining a driving signal of the current motor based on the current sampling current includes:
calculating a drive signal of the current motor based on the current sampling current and the current rotor position;
the step of returning to the starting time of each designated period to obtain the current sampling current of the current motor comprises the following steps:
and returning to the starting time of each appointed period, and acquiring the current sampling current of the current motor and the current rotor position of the current motor.
Optionally, in a specific implementation manner, the calculating the driving signal of the current motor based on the current sampling current and the current rotor position includes:
calculating a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, and taking the PWM signal as a driving signal of the current motor; wherein the PWM signal comprises: duty cycle, amplitude and period.
Optionally, in a specific implementation manner, the control unit controls the plurality of motors in a cascade manner of a position loop, a speed loop and a current loop; the execution time length of the position ring is smaller than the time length of the appointed period;
Said calculating a drive signal for said current motor based on said current sampled current and said current rotor position, comprising:
converting the current sampling current into a current digital signal, and starting to execute a designated loop when the current digital signal is obtained; wherein the designated loop is the position loop, the speed loop, or the current loop; the time interval for which the outer rings of any two motors are started to execute is longer than the duration of the specified period; the outer ring includes the position ring and the speed ring;
if the designated ring is the position ring, calculating the target speed of the current motor based on the target rotor position of the current motor and the current rotor position in the execution process of the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; calculating a driving signal of the current motor based on the target digital signal and the current digital signal; the feedback speed is obtained by measuring the speed of the current motor by a feedback unit connected with the current motor;
if the designated loop is the speed loop, calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; calculating a driving signal of the current motor based on the target digital signal and the current digital signal;
If the designated loop is the current loop, calculating a driving signal of the current motor based on the target digital signal of the current motor and the current digital signal in the execution process of the designated loop;
before the end of the specified period where the current is located, switching the current sampling channel to a new current motor, including:
and switching the current sampling channel to a new current motor when the current digital signal is obtained through conversion.
In a second aspect, an embodiment of the present application provides a motor control device, where the device is applied to a control unit in a motor driver, where the motor driver further includes a plurality of driving units and a plurality of current sampling units, each driving unit is connected to one motor of the plurality of motors, each current sampling unit is connected to one motor of the plurality of motors, and the plurality of driving units and the plurality of current sampling units are both connected to the control unit; the device comprises:
the channel switching module is used for responding to the motor driving instruction and switching the current sampling channel of the control unit to the current sampling unit connected with the current motor;
the current acquisition module is used for acquiring the current sampling current of the current motor at the starting moment of each appointed period; the current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor;
The signal determining module is used for determining a driving signal of the current motor based on the current sampling current and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor drives the current motor to move according to the driving signal;
the motor switching module is used for switching the current sampling channel to a current sampling unit connected with a new current motor in the appointed period after the current sampling current is acquired, and triggering the current acquisition module; if the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor of the current motor in the preset driving sequence.
Optionally, in a specific implementation manner, the plurality of motors include a first motor and a second motor;
the channel switching module is specifically configured to:
responding to a motor driving instruction, taking the first motor as a current motor, and switching a current sampling channel of the control unit to a current sampling unit connected with the current motor;
The motor switching module is specifically used for:
if the current motor is the first motor, switching the current sampling channel to a current sampling unit connected with the second motor in the appointed period after the current sampling current is acquired;
if the current motor is the second motor, switching the current sampling channel to a current sampling unit connected with the first motor in the appointed period after the current sampling current is acquired;
optionally, in a specific implementation manner, the apparatus further includes:
a motor determining module configured to determine, among the plurality of motors, a plurality of target motors to be driven indicated by the motor driving instruction;
the signal determining module is specifically configured to:
if the current motor is the target motor, determining a driving signal of the current motor based on the current sampling current;
the apparatus further comprises:
the period waiting module is used for waiting for ending the appointed period after acquiring the current sample collecting current if the current motor is not the target motor;
optionally, in a specific implementation manner, the control unit includes: and the counting value change periods and the counting value change frequencies of the timers included in the control unit are the same, and the counting values of the timers at the same moment are the same.
Optionally, in a specific implementation manner, the motor driver further includes: a plurality of feedback units connected to the control unit, each feedback unit being connected to one of the plurality of motors;
the current acquisition module is specifically used for:
acquiring the current sampling current of the current motor and the current rotor position of the current motor at the starting moment of each appointed period; the current rotor position is obtained by sampling the rotor position of the current motor through a feedback unit connected with the current motor;
the signal determining module is specifically configured to:
a drive signal for the current motor is calculated based on the current sampling current and the current rotor position.
Optionally, in a specific implementation manner, the signal determining module is specifically configured to:
calculating a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, and taking the PWM signal as a driving signal of the current motor; wherein the PWM signal comprises: duty cycle, amplitude and period.
Optionally, in a specific implementation manner, the control unit controls the plurality of motors in a cascade manner of a position loop, a speed loop and a current loop; the execution time length of the position ring is smaller than the time length of the appointed period;
The signal determining module is specifically configured to:
converting the current sampling current into a current digital signal, and starting to execute a designated loop when the current digital signal is obtained; wherein the designated loop is the position loop, the speed loop, or the current loop; the time interval for which the outer rings of any two motors are started to execute is longer than the duration of the specified period; the outer ring includes the position ring and the speed ring;
if the designated ring is the position ring, calculating the target speed of the current motor based on the target rotor position of the current motor and the current rotor position in the execution process of the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; calculating a driving signal of the current motor based on the target digital signal and the current digital signal; the feedback speed is obtained by measuring the speed of the current motor by a feedback unit connected with the current motor;
if the designated loop is the speed loop, calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; calculating a driving signal of the current motor based on the target digital signal and the current digital signal;
If the designated loop is the current loop, calculating a driving signal of the current motor based on the target digital signal of the current motor and the current digital signal in the execution process of the designated loop;
the motor switching module is specifically used for:
and switching the current sampling channel to a new current motor when the current digital signal is obtained through conversion.
In a third aspect, embodiments of the present application provide a motor driver, including:
a memory for storing a computer program;
and the processor is used for realizing any one of the motor control methods when executing the programs stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having a computer program stored therein, which when executed by a processor, implements any of the above-described motor control methods.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the above-described motor control methods.
The beneficial effects of the embodiment of the application are that:
it can be seen that, by applying the scheme provided by the embodiment of the application, the motor driver can comprise a control unit, a plurality of driving units and a plurality of current sampling units, each of the plurality of motors can be respectively connected with one driving unit and one current sampling unit, and the plurality of driving units and the plurality of current sampling units can be connected with the control unit. Further, when controlling the plurality of motors, the control unit in the motor driver may switch the current sampling channel of the control unit to the current sampling unit to which the current motor is connected in response to the motor driving instruction.
The current sampling unit connected with the current motor samples the current of the current motor to obtain the current sampling current, and the control unit can acquire the current sampling current of the current motor at the starting moment of each appointed period, so that the driving signal of the current motor is determined based on the current sampling current, and the driving signal is sent to the driving unit connected with the current motor, so that the driving unit connected with the current motor drives the current motor to move according to the driving signal. If the current motor is the last motor in the preset driving sequence of the plurality of motors, the first motor in the preset driving sequence can be used as a new current motor; otherwise, in the preset driving sequence, the next motor of the current motor can be used as a new current motor. For each specified period, the control unit can switch the current sampling channel to a current sampling unit connected with a new current motor in the specified period after acquiring the current sampling current; furthermore, the control unit can acquire the current sampling current of the new current motor at the starting time of the next designated period, so as to determine the driving signal of the new current motor based on the current sampling current of the new current motor, and send the driving signal to the driving unit connected with the new current motor, so that the driving unit connected with the new current motor drives the new current motor to move according to the driving signal.
Based on this, when the plurality of motors are controlled, the control unit may alternately control the driving units of the plurality of motors according to a predetermined driving sequence of the plurality of motors and a designated period, thereby realizing simultaneous control of the plurality of motors by one motor driver. Therefore, by applying the scheme provided by the embodiment of the application, the number of motor drivers required by simultaneous operation of multiple motors can be reduced, the space occupied by the motor drivers in the equipment for simultaneous operation of the multiple motors is reduced, the miniaturization development of the equipment for simultaneous operation of the multiple motors is promoted, and the production cost of the equipment for simultaneous operation of the multiple motors is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other embodiments may also be obtained according to these drawings to those skilled in the art.
Fig. 1 is a schematic diagram of a multi-motor control system according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a motor control method according to an embodiment of the present application;
Fig. 3 is another flow chart of a motor control method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a multi-motor control system including a motor drive according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a control loop according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a control sequence of an outer ring of a dual motor according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a motor control device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. Based on the embodiments herein, a person of ordinary skill in the art would be able to obtain all other embodiments based on the disclosure herein, which are within the scope of the disclosure herein.
In the related art, a mode of controlling one motor by one motor driver is generally adopted to realize simultaneous control of a plurality of motors. As shown in fig. 1, when it is required to control the motor 1 and the motor 2 to operate simultaneously, the motor 1 may be controlled by the motor driver 1, the motor 2 may be controlled by the motor driver 2, and each motor driver may include 1 control unit, 1 sampling unit, and 1 driving unit. The control device may send motor driving instructions to a plurality of motor drivers, each of which may drive a motor to which the motor driver is connected into an operating state after receiving the motor driving instructions. However, a plurality of motors to be controlled simultaneously may be located on the same apparatus, for example, a plurality of motors to be controlled simultaneously are located on one robot, in which case, a mode of controlling one motor by one motor driver will result in a larger number of motor drivers to be required, a larger space occupied by the motor drivers, a higher production cost of the apparatus and unfavorable miniaturization of the apparatus.
In order to solve the above-described problems, an embodiment of the present application provides a motor control method.
The method is applicable to various scenes in which a plurality of motors need to be controlled simultaneously, for example, a scene in which motor movements at respective joints of a robot are controlled simultaneously, a scene in which a plurality of motors on a production apparatus are controlled simultaneously, and the like. For the application scenario of the embodiment of the present application, the embodiment of the present application is not specifically limited.
The motor may be a permanent magnet synchronous motor, a brushless dc motor, a stepping motor, or other motors, and the embodiments of the present application do not specifically limit the types of the motors.
And, the execution subject of the method may be a control unit in a motor driver, the motor driver may further include a plurality of driving units and a plurality of current sampling units, each driving unit may be connected to one of the plurality of motors, each current sampling unit may be connected to one of the plurality of motors, and the plurality of driving units and the plurality of current sampling units may be connected to the control unit.
The motor control method provided by the embodiment of the application can comprise the following steps:
responding to a motor driving instruction, and switching a current sampling channel of the control unit to a current sampling unit connected with a current motor;
Acquiring the current sampling current of the current motor at the starting time of each appointed period; the current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor;
determining a driving signal of the current motor based on the current sampling current, and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor drives the current motor to move according to the driving signal;
after the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with a new current motor in the specified period; if the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor of the current motor in the preset driving sequence;
and returning to the step of acquiring the current sampling current of the current motor at the starting time of each designated period.
It can be seen that, by applying the scheme provided by the embodiment of the application, the motor driver can comprise a control unit, a plurality of driving units and a plurality of current sampling units, each of the plurality of motors can be respectively connected with one driving unit and one current sampling unit, and the plurality of driving units and the plurality of current sampling units can be connected with the control unit. Further, when controlling the plurality of motors, the control unit in the motor driver may switch the current sampling channel of the control unit to the current sampling unit to which the current motor is connected in response to the motor driving instruction.
The current sampling unit connected with the current motor samples the current of the current motor to obtain the current sampling current, and the control unit can acquire the current sampling current of the current motor at the starting moment of each appointed period, so that the driving signal of the current motor is determined based on the current sampling current, and the driving signal is sent to the driving unit connected with the current motor, so that the driving unit connected with the current motor drives the current motor to move according to the driving signal. If the current motor is the last motor in the preset driving sequence of the plurality of motors, the first motor in the preset driving sequence can be used as a new current motor; otherwise, in the preset driving sequence, the next motor of the current motor can be used as a new current motor. For each specified period, the control unit can switch the current sampling channel to a current sampling unit connected with a new current motor in the specified period after acquiring the current sampling current; furthermore, the control unit can acquire the current sampling current of the new current motor at the starting time of the next designated period, so as to determine the driving signal of the new current motor based on the current sampling current of the new current motor, and send the driving signal to the driving unit connected with the new current motor, so that the driving unit connected with the new current motor drives the new current motor to move according to the driving signal.
Based on this, when the plurality of motors are controlled, the control unit may alternately control the driving units of the plurality of motors according to a predetermined driving sequence of the plurality of motors and a designated period, thereby realizing simultaneous control of the plurality of motors by one motor driver. Therefore, by applying the scheme provided by the embodiment of the application, the number of motor drivers required by simultaneous operation of multiple motors can be reduced, the space occupied by the motor drivers in the equipment for simultaneous operation of the multiple motors is reduced, the miniaturization development of the equipment for simultaneous operation of the multiple motors is promoted, and the production cost of the equipment for simultaneous operation of the multiple motors is reduced.
Next, a motor control method provided in the embodiment of the present application will be specifically described with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a motor control method according to an embodiment of the present application, as shown in fig. 2, the method may include the following steps S201 to S204.
S201: and responding to the motor driving instruction, and switching the current sampling channel of the control unit to the current sampling unit connected with the current motor.
Wherein the first current motor may be any one of the plurality of motors described above.
The motor driver may include a control unit, a plurality of driving units, and a plurality of current sampling units, each of the plurality of motors may be connected to the driving unit and the current sampling unit, respectively, and the plurality of driving units and the plurality of current sampling units may be connected to the control unit. The control unit of the motor driver may be communicatively connected with the control devices of the plurality of motors, and the control devices of the plurality of motors may generate motor driving instructions regarding the plurality of motors.
When the motor driver controls each motor, the control unit of the motor driver can acquire the sampling current of the motor first, the control unit can comprise a plurality of current sampling channels, each motor in the plurality of motors can correspond to one current sampling channel, the current sampling unit connected with each motor can sample the current of the motor, and the control unit can acquire the sampling current of the motor, which is obtained by sampling the current of the motor, through the current sampling channel corresponding to the current sampling unit connected with the motor. Therefore, after receiving the motor driving instruction, the control unit can switch the current sampling channel of the control unit to the current sampling unit connected with the current motor in response to the motor driving instruction.
S202: and acquiring the current sampling current of the current motor at the starting moment of each appointed period.
The current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor.
The current sampling unit connected with the current motor samples the current of the current motor, so that the current sampling current of the current motor can be obtained. Since the current sampling channel of the control unit has been switched to the current sampling unit to which the current motor is connected at the start time of each specified period, the control unit can acquire the current sampling current of the current motor at the start time of each specified period.
The duration of the above specified period may be set by a person skilled in the art according to the actual application, and the embodiment of the present application is not specifically limited.
Alternatively, the duration of the specified period may be determined according to the number of the plurality of motors, the control accuracy requirement, and the computing power of the control unit.
Optionally, the control unit may include a timer, and further, the control unit may determine a start time of each specified period according to the timer to perform timing of the specified period.
S203: and determining a driving signal of the current motor based on the current sampling current, and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor drives the current motor to move according to the driving signal.
After the current sampling current of the current motor is obtained, a driving signal of the current motor can be determined based on the current sampling current, and the driving signal is sent to a driving unit connected with the current motor, so that the driving unit connected with the current motor can drive the current motor to move according to the received driving signal.
It should be noted that the control unit needs to have an analog-to-digital conversion function, that is, a function of converting an analog signal into a digital signal, and in most cases, the control unit can process only one analog signal at a time. Because the current sampling current is an analog signal, the analog signal cannot be directly used for calculation, after the current sampling current of the current motor is obtained, the control unit can firstly convert the current sampling current into a current digital signal, then determine a control signal of the current motor according to the current digital signal, and send the control signal to a driving unit of the current motor, so that the driving unit connected with the current motor is controlled through the control signal, and the current motor is driven and controlled.
Alternatively, the control signal may be a PWM (Pulse width modulation ) signal.
Alternatively, the control unit may also receive control instructions for the respective motors in real time and determine, for each motor, a target current for the motor based on the motor drive instructions and/or the control instructions for the motor. The control unit can also determine the sampling current value of the current motor according to the current digital signal of the current motor, further determine the control signal of the current motor based on the target current and the feedback current, and send the control signal to the driving unit of the current motor, so that the driving unit connected with the current motor is controlled by the control signal to drive and control the current motor.
S204: after the current sampling current is obtained, the current sampling channel is switched to a new current sampling unit connected to the current motor in the specified period, and the step S202 is returned.
If the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor in the preset driving sequence.
The driving sequence of the plurality of motors can be preset by a person skilled in the art according to practical application conditions, and the motor driver can control the motors based on the preset driving sequence as the preset driving sequence of the plurality of motors.
If the current motor is the last motor in the preset driving sequence of the plurality of motors, the first motor in the preset driving sequence can be used as a new current motor; otherwise, in the preset driving sequence, the next motor of the current motor can be used as a new current motor. For each specified period, the control unit may switch the current sampling channel to the current sampling unit to which the new current motor is connected within the specified period after the current sampling current is acquired.
Furthermore, at the starting time of the next designated period, the control unit may acquire the current sampling current of the new current motor, thereby determining a driving signal of the new current motor based on the current sampling current of the new current motor, and transmitting the driving signal to the driving unit connected to the new current motor, so that the driving unit connected to the new current motor drives the new current motor to move according to the driving signal.
According to the cycle, the control unit can alternately control the driving units of the motors according to the preset driving sequence of the motors and the specified period, so that the simultaneous control of one motor driver on the motors is realized.
For example, when the plurality of motors include a motor 1, a motor 2, and a motor 3, and the plurality of motors are sequentially the motor 1, the motor 2, and the motor 3 in a preset driving order, the control unit may switch a current sampling channel of the control unit to a current sampling unit connected to the motor 1 in response to a motor driving command, and acquire a current sampling current of the motor 1 at a start time of a first designated period, thereby determining a driving signal of the motor 1 based on the current sampling current of the motor 1, and transmitting the driving signal to the driving unit connected to the motor 1, so that the driving unit connected to the motor 1 drives the motor 1 to move according to the driving signal. In the first specified period, after the current sampling current of the motor 1 is obtained, the control unit may switch the current sampling channel to the current sampling unit connected to the motor 2, and obtain the current sampling current of the motor 2 at the starting time of the second specified period, so as to determine a driving signal of the motor 2 based on the current sampling current of the motor 2, and send the driving signal to the driving unit connected to the motor 2, so that the driving unit connected to the motor 2 drives the motor 2 to move according to the driving signal. In the second specified period, after the current sampling current of the motor 2 is obtained, the control unit may switch the current sampling channel to the current sampling unit connected to the motor 3, and obtain the current sampling current of the motor 3 at the start time of the third specified period, so as to determine a driving signal of the motor 3 based on the current sampling current of the motor 3, and send the driving signal to the driving unit connected to the motor 3, so that the driving unit connected to the motor 3 drives the motor 3 to move according to the driving signal. In the third specified period, after the current sampling current of the motor 3 is obtained, the motor controller may switch the current sampling channel to the current sampling unit connected to the motor 1, and obtain the current sampling current of the motor 1 at the start time of the fourth specified period, so as to determine a driving signal of the motor 1 based on the current sampling current of the motor 1, and send the driving signal to the driving unit connected to the motor 1, so that the driving unit connected to the motor 1 drives the motor 1 to move according to the driving signal. According to the circulation, the control unit can alternately control the driving units of the motor 1, the motor 2 and the motor 3, so that the simultaneous control of the motor 1, the motor 2 and the motor 3 is realized.
After the control unit acquires the current sampling current of the current motor, the current sampling current of the current motor needs to be converted into a current digital signal, and after the appointed period of the current motor starts, the control unit can immediately send a signal to trigger the current sampling unit of the current motor to sample the current sampling channel of the current motor, and the control unit can acquire the current sampling current of the current motor and convert the current sampling current of the current motor into the current digital signal. Therefore, the time when the current sampling channel is switched to the new current motor for each specified period may be any time after the current sampling current of the current motor is converted to the current digital signal in the specified period.
Based on this, when the plurality of motors are controlled, the control unit may alternately control the driving units of the plurality of motors according to a predetermined driving sequence of the plurality of motors and a designated period, thereby realizing simultaneous control of the plurality of motors by one motor driver. Therefore, by applying the scheme provided by the embodiment of the application, the number of motor drivers required by simultaneous operation of multiple motors can be reduced, the space occupied by the motor drivers in the equipment for simultaneous operation of the multiple motors is reduced, the miniaturization development of the equipment for simultaneous operation of the multiple motors is promoted, and the production cost of the equipment for simultaneous operation of the multiple motors is reduced.
Optionally, in a specific implementation manner, the plurality of motors may include a first motor and a second motor, and further, step S201 is described above: switching the current sampling channel of the control unit to the current sampling unit to which the present motor is connected in response to the motor driving instruction may include the following step 11.
Step 11: and responding to the motor driving instruction, taking the first motor as the current motor, and switching a current sampling channel of the control unit to a current sampling unit connected with the current motor.
Corresponding to the above step 11, the above step S204: after the current sampling current is obtained, the current sampling channel is switched to a current sampling unit connected with a new current motor in the specified period, which can include the following steps 12 and 13.
Step 12: if the current motor is the first motor, after the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with the second motor in the appointed period.
Step 13: if the current motor is the second motor, after the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with the first motor in the appointed period.
In this embodiment, when the plurality of motors includes a first motor and a second motor, the first motor may be the first current motor. Further, after receiving the motor driving instruction, the control unit of the motor driver may respond to the motor driving instruction, take the first motor as the current motor, and switch the current sampling channel of the control unit to the current sampling unit connected with the current motor.
Furthermore, for each specified period, after the current sampling current is obtained, if the current motor is the first motor, the current sampling channel can be switched to a current sampling unit connected with the second motor in the specified period; if the current motor is the second motor, the current sampling channel can be switched to the current sampling unit connected with the first motor in the appointed period.
That is, the control unit may switch the current sampling channel of the control unit to the current sampling unit connected to the first motor in response to the motor driving instruction, and acquire the current sampling current of the first motor at the start time of the first designated period, thereby determining the driving signal of the first motor based on the current sampling current of the first motor, and transmitting the driving signal to the driving unit connected to the first motor, so that the driving unit connected to the first motor drives the first motor to move according to the driving signal. In the first specified period, after the current sampling current of the first motor is obtained, the control unit can switch the current sampling channel to a current sampling unit connected with the second motor, and obtain the current sampling current of the second motor at the starting time of the second specified period, so that the driving signal of the second motor is determined based on the current sampling current of the second motor, and the driving signal is sent to the driving unit connected with the second motor, so that the driving unit connected with the second motor drives the second motor to move according to the driving signal. In the second specified period, after the current sampling current of the second motor is obtained, the control unit can switch the current sampling channel to the current sampling unit connected with the first motor, and obtain the current sampling current of the first motor at the starting time of the third specified period, so that the driving signal of the first motor is determined based on the current sampling current of the first motor, and the driving signal is sent to the driving unit connected with the first motor, so that the driving unit connected with the first motor drives the first motor to move according to the driving signal. According to the circulation, the control unit can alternately control the driving units of the first motor and the second motor, so that the first motor and the second motor are controlled simultaneously.
Optionally, in a specific implementation manner, when the motor that needs to be controlled by the motor driver at the same time is a part of motors in the plurality of motors, the motor driving instruction may be a motor driving instruction of a plurality of target motors to be driven in the plurality of motors, and further, in step S201, before the current sampling channel of the control unit is switched to the current sampling unit connected to the current motor, the motor control method provided in the embodiment of the present application may further include the following step 21.
Step 21: among the plurality of motors, a plurality of target motors to be driven indicated by the motor drive instruction are determined.
In this embodiment, the motor driving instruction may be a motor driving instruction about a plurality of target motors to be driven from among the plurality of motors, and further, after receiving the motor driving instruction, the control unit may determine, from among the plurality of motors, the plurality of target motors to be driven indicated by the motor driving instruction in response to the motor driving instruction.
In the step S203, the determining the driving signal of the current motor based on the current sampling current may include the following step 22, corresponding to the step 21.
Step 22: and if the current motor is the target motor, determining a driving signal of the current motor based on the current sampling current.
Corresponding to the above steps 21 and 22, a motor control method provided in the embodiment of the present application may further include the following step 23.
Step 23: if the current motor is not the target motor, after the current sample collection current is obtained, waiting for the ending of the appointed period.
Because the plurality of target motors to be driven are part of the motors, after the current sampling current of the current motor is obtained, if the current motor is the target motor, the driving signal of the current motor can be determined based on the current sampling current, and the driving signal is sent to the driving unit connected with the current motor, so that the driving unit connected with the current motor can drive the current motor to move according to the received driving signal; if the current motor is not the target motor, it is possible to wait for the end of the specified period without determining the driving signal of the current motor.
For example, when the plurality of motors include motor 1, motor 2, and motor 3, which are motor 1, motor 2, and motor 3 in order according to a preset driving order, and a plurality of target motors to be driven among the plurality of motors indicated by the motor driving instruction are motor 1 and motor 3, the control unit may determine the motor 1 and motor 3 as target motors in response to the motor driving instruction, then switch the current sampling channel to the current sampling unit connected to motor 1 and acquire the current sampling current of motor 1 at the start time of the first designated period, thereby determining a driving signal of motor 1 based on the current sampling current of motor 1, and transmitting the driving signal to the driving unit connected to motor 1, so that the driving unit connected to motor 1 drives motor 1 to move according to the driving signal. In the first specified period, after the current sampling current of the motor 1 is obtained, the control unit may switch the current sampling channel to the current sampling unit connected to the motor 2, and obtain the current sampling current of the motor 2 at the start time of the second specified period, because the motor 2 is not the target motor, in the second specified period, the control unit may not determine the driving signal of the current motor and not send the driving signal to the driving unit connected to the current motor after obtaining the current sampling current of the motor 2, but wait for the end of the second specified period. In the second specified period, after the current sampling current of the motor 2 is obtained, the control unit may switch the current sampling channel to the current sampling unit connected to the motor 3, and obtain the current sampling current of the motor 3 at the start time of the third specified period, so as to determine a driving signal of the motor 3 based on the current sampling current of the motor 3, and send the driving signal to the driving unit connected to the motor 3, so that the driving unit connected to the motor 3 drives the motor 3 to move according to the driving signal. In the third specified period, after the current sampling current of the motor 3 is obtained, the control unit may switch the current sampling channel to the current sampling unit connected to the motor 1, and obtain the current sampling current of the motor 1 at the start time of the fourth specified period, so as to determine the driving signal of the motor 1 based on the current sampling current of the motor 1, and send the driving signal to the driving unit connected to the motor 1, so that the driving unit connected to the motor 1 drives the motor 1 to move according to the driving signal. According to the circulation, the control unit can alternately control the driving units of the motor 1 and the motor 3, thereby realizing the simultaneous control of the motor 1 and the motor 3.
As described above, for each specified period, if the current motor at the start time of the specified period is the target motor, the control unit may acquire the current sampling current of the current motor at the start time of the specified period in the specified period; after the current sampling current of the current motor is obtained, determining a driving signal of the current motor based on the current sampling current, and sending the driving signal to a driving unit connected with the current motor; and in the appointed period, after the current sampling current is obtained, switching the current sampling channel to a new current motor.
For each specified period, if the current motor at the starting time of the specified period is not the target motor, the control unit may acquire the current sampling current of the current motor at the starting time of the specified period in the specified period; and in the appointed period, after the current sampling current is obtained, switching the current sampling channel to a new current motor.
Based on this, the control unit may alternately control the driving units of the partial target motors among the plurality of motors, thereby realizing simultaneous control of one motor driver over the partial target motors among the plurality of motors.
Optionally, in a specific implementation manner, the control unit may include: and the counting value change periods of the plurality of timers included in the control unit are the same, the counting value change frequencies are the same, and the counting values of the plurality of timers at the same moment are the same.
In this specific implementation manner, the control unit may be provided with a plurality of timers, and each of the plurality of motors may correspond to one timer. The counting value change periods of the timers included in the control unit are the same, the counting value change frequencies are the same, and the counting values of the timers at the same moment are the same, namely the timers included in the characterization control unit are aligned. Therefore, the count value change period of the plurality of aligned timers may be the specified period.
Alternatively, in each count value change period, the count values of the plurality of timers may be changed from a maximum value in a specified numerical range to a minimum value in the specified numerical range according to the same count value change frequency, and then changed from the minimum value back to the maximum value. Further, the duration of the specified period may be a duration that the count value of the timer changes from a maximum value within a specified range of values to a minimum value within the specified range of values according to the frequency of change of the count value, and then changes from the minimum value back to the maximum value, and the start time of each specified period may be a time when the count value of the timer is the maximum value within the specified range of values.
Illustratively, the count values of the plurality of timers may be decremented from 1 to 0 each time and incremented from 1 to 10 each time by 0 each time at the same count value change frequency within each count value change period. Furthermore, the duration of the specified period may be a duration that the count value of the timer is decremented from 10 to 0 and then incremented from 0 to 10, and the start time of each specified period may be a time when the count value of the timer is 10.
Optionally, after receiving the motor driving instruction, the control unit may send an alignment control instruction for controlling each timer to establish a cascade relationship to each corresponding timer of the plurality of motors, and each timer may establish a cascade relationship in response to the alignment control instruction, so as to achieve alignment of each timer.
Optionally, in a specific implementation manner, the motor driver may further include: and a plurality of feedback units connected with the control unit, wherein each feedback unit can be connected with one motor of the plurality of motors. Further, as shown in fig. 3, step S202 is described above: at the start time of each designated period, the current sampling current of the current motor is acquired, which may include the following step S301.
S301: at the beginning of each specified period, the current sampling current of the current motor and the current rotor position of the current motor are obtained.
The current rotor position is obtained by sampling the rotor position of the current motor through a feedback unit connected with the current motor.
The motor driver may further include: and the feedback units are connected with the control unit, and each motor in the plurality of motors can uniquely correspond to one feedback unit and is connected with the uniquely corresponding feedback unit. Each feedback unit can sample the rotor position of the motor connected with the feedback unit, and the rotor position of the motor connected with the feedback unit is obtained. Further, the control unit may acquire the current sampling current of the current motor and the current rotor position of the current motor at the start time of each designated period.
Alternatively, the feedback unit may be an encoder.
Optionally, the feedback unit may sample the rotor position of the motor connected to the feedback unit in real time, and the control unit may obtain the rotor position of each motor sampled by each feedback unit in real time, and determine the rotor speed of each motor according to the obtained rotor position of the motor.
Correspondingly, the step S203: based on the current sampling current, determining a driving signal of the current motor and transmitting the driving signal to the driving unit connected to the current motor so that the driving unit connected to the current motor drives the current motor to move according to the driving signal, the method may include the following step S302.
S302: and calculating a driving signal of the current motor based on the current sampling current and the current rotor position, and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor controls the current motor to move according to the driving signal.
After the current sampling current and the current rotor position are obtained, the control unit can calculate a driving signal of the current motor based on the current sampling current and the current rotor position, and send the driving signal to the driving unit connected with the current motor. The driving unit connected with the current motor can receive the driving signal sent by the control unit and control the current motor to move according to the driving signal.
Optionally, the feedback unit may sample the rotor position of the motor connected to the feedback unit in real time, and the control unit may obtain the rotor position of each motor sampled by each feedback unit in real time, and determine the rotor speed of each motor according to the obtained rotor position of the motor. Further, the control unit may calculate the driving signal of the current motor based on the current sampling current, the current rotor position and the current rotor speed.
Optionally, in a specific implementation manner, calculating the driving signal of the current motor based on the current sampling current and the current rotor position may include the following step 31.
Step 31: and calculating a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, and taking the PWM signal as a driving signal of the current motor.
Wherein the PWM signal comprises: duty cycle, amplitude and period.
After the current sampling current and the current rotor position are obtained, the control unit may determine a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, as a driving signal of the current motor, and send the PWM signal corresponding to the current motor to the driving unit of the current motor. Furthermore, the driving unit of the current motor can control the current motor according to the received PWM signal.
Since the above step S202 is replaced with the above step S301 in this specific implementation manner, the above step S204 corresponds to: after the current sampling current is obtained, the current sampling channel is switched to a current sampling unit connected to a new current motor in the specified period, and the step S202 is returned, which may include the following step S303.
S303: after the current sampling current is obtained, the current sampling channel is switched to a new current sampling unit connected to the current motor in the specified period, and the step S301 is returned.
That is, in this embodiment, after switching the current sampling channel to the new current motor, the control unit may acquire the current sampling current and the current rotor position of the new current motor at the start time of the next designated period.
Based on this, applying the present embodiment, compared with determining the driving signal of the current motor according to the current sampling current, determining the driving signal of the current motor according to the current sampling current and the current rotor position can further improve the control accuracy of motor control.
Illustratively, taking a motor driver that can control two motors simultaneously as an example, in this particular implementation, the motor driver may be structured as shown in fig. 4.
As shown in fig. 4, in this specific implementation, the motor driver may include a feedback unit 1, a feedback unit 2, a current sampling unit 1, a current sampling unit 2, a driving unit 1, a driving unit 2, and a control unit. The control unit may comprise an analog-to-digital converter (ADC, anaologue to digital conversion) and two timers: TIMER1 and TIMER2. The control unit may be communicatively coupled to the control device via a CAN (Controller Area Network ) bus. The motor 1 is connected with a feedback unit 1, a current sampling unit 1 and a driving unit 1 of the motor driver, and the motor 2 is connected with a feedback unit 2, a current sampling unit 2 and a driving unit 2 of the motor driver. The feedback unit 1 can sample the rotor position of the motor 1 to obtain the rotor position 1 of the motor 1, and send the rotor position 1 to the control unit; the feedback unit 2 may sample the rotor position of the motor 2, obtain the rotor position 2 of the motor 2, and send the rotor position 2 to the control unit. The current sampling unit 1 can sample the current of the motor 1 to obtain the phase current 1 of the motor 1, and sends the phase current 1 to the analog-to-digital converter of the control unit; the current sampling unit 2 may sample the current of the motor 2 to obtain a phase current 2 of the motor 2, and send the phase current 2 to an analog-to-digital converter of the control unit.
Furthermore, at the starting time of each specified period, if the current motor is the motor 1, the analog-to-digital converter of the control unit may acquire the current sampling current of the motor 1, that is, the current phase current 1, and convert the current phase current 1 into the current digital signal 1, the control unit may determine the control parameter 1 of the motor 1 based on the current digital signal 1, the timer1 may generate the pulse width modulation signal of the motor 1 according to the control parameter 1, that is, the PWM1, and the control unit 1 may send the PWM1 to the driving unit 1, so that the driving unit 1 may perform driving control on the motor 1 based on the PWM 1.
Similarly, at the beginning of each specified period, if the current motor is the motor 2, the analog-to-digital converter of the control unit may obtain the current sampling current of the motor 2, that is, the current phase current 2, and convert the current phase current 2 into the current digital signal 2, the control unit may determine the control parameter 2 of the motor 2 based on the current digital signal 2, the timer2 may generate a pulse width modulation signal of the motor 2 according to the control parameter 2, that is, the PWM2, and the control unit 2 may send the PWM2 to the driving unit 2, so that the driving unit 2 may perform driving control on the motor 2 based on the PWM 2.
Optionally, in a specific implementation manner, the control unit may control the plurality of motors in a cascade manner of a position loop, a speed loop and a current loop; the execution time of the position ring is smaller than the time of the appointed period.
A schematic diagram of a control loop for controlling motor a in a cascade of position loop, speed loop and current loop is shown in fig. 5. Wherein the target current, target speed and target rotor position are the current, speed and position desired to be reached by motor a.
It can be seen that when motor a is controlled in a cascade of position loop, speed loop and current loop, the innermost control loop is the current loop. The control unit may convert the acquired current sampling current of the current sampling unit into a current digital signal, and determine a feedback current of the motor a based on the current digital signal. The feedback current may be regarded as an actual value of the current of the motor a, and when the current loop is operated, the control unit may compare the feedback current of the motor a with a target current of the motor a and generate a PWM signal of the motor a based on a comparison result, and the driving unit of the motor a may receive the PWM signal and control the motor a through the PWM signal, thereby making the actual current of the motor a closer to the target current.
The speed loop has a current loop nested therein, that is, when the speed loop is executed, the current loop is executed. The feedback unit can feed back the rotor position of the motor A to the control unit, and the control unit can determine the feedback speed of the motor A through a speed measurement algorithm according to the rotor position of the motor A fed back by the feedback unit. The feedback speed may be regarded as an actual value of the speed of the motor a, and when the speed loop is operated, the control unit may compare the feedback speed of the motor a with the target speed of the motor a, determine a target current of the motor a based on the comparison result, and then compare the feedback current of the motor a with the target current of the motor a through the current loop to generate a PWM signal of the motor a, and the driving unit of the motor a may receive the PWM signal and control the motor a through the PWM signal, so that the actual speed of the motor a is closer to the target speed and the actual current is closer to the target current.
The position loop has a speed loop nested therein, that is, when the position loop is executed, the speed loop and the current loop are also executed. The feedback unit may feedback the rotor position of the motor a to the control unit, the feedback rotor position may be regarded as an actual value of the rotor position of the motor a, and when the position loop is operated, the control unit may compare the feedback rotor position of the motor a with the target rotor position of the motor a, and determine a target speed of the motor a based on the comparison result, then compare the feedback speed of the motor a with the target speed of the motor a through the speed loop, and determine a target current of the motor a based on the comparison result, and finally compare the feedback current of the motor a with the target current of the motor a through the current loop, generate a PWM signal of the motor a, and control the motor a through the PWM signal, so that the actual rotor position of the motor a is closer to the target rotor position, the actual speed is closer to the target speed, and the actual current is closer to the target current.
As can be seen from the above, the position loop is nested with the speed loop and the speed loop is nested with the current loop, so that the time taken to execute the position loop is longest and the time taken to execute the current loop is shortest.
In the related art, the position loop and the speed loop are generally called an outer loop, and since the outer loop takes much more time than the current loop, the frequency of execution of the outer loop is often set to 1/n of the current loop in the form of frequency division, where n is an integer not less than 2. Since the control unit consumes more computing resources when executing the outer loop, if the outer loop is executed in consecutive designated periods, the control chip may have a higher computing resource occupancy in the consecutive designated periods, and insufficient computing resources are available for other threads.
Therefore, in order to optimize the computation resource occupation situation of the control unit, the calculation of the driving signal of the current motor based on the current sampling current and the current rotor position in the above step S302 may include the following steps 41-44.
Step 41: the current sampling current is converted into a current digital signal, and when the current digital signal is obtained, execution of the designated loop is started.
Wherein the designated ring is a position ring, a speed ring or a current ring; the time interval for which the outer rings of any two motors are started to execute is longer than the duration of a specified period; the outer ring includes a position ring and a velocity ring.
Because the current sampling current is an analog signal, the analog signal cannot be directly used for calculation, after the current sampling current of the current motor is obtained, the control unit can firstly convert the current sampling current into a current digital signal, and then when the current digital signal is obtained, the execution of the designated loop is started.
The execution frequency of the outer ring and the current ring of each motor can be set by a person skilled in the art according to actual application requirements, and the embodiment of the application is not specifically limited.
Optionally, the control unit may further determine the execution sequence of the current loop and the outer loop of each motor according to the driving sequence of each motor and the execution frequency of the current loop and the outer loop of each motor, so that the time interval in which the outer loops of any two motors are started to be executed is longer than the duration of the designated period, thereby reducing the possibility of executing the outer loops in consecutive designated periods.
By way of example, as shown in fig. 6, taking an example in which the motor driver simultaneously controls two motors, the current loop execution frequency of motor 1 and motor 2 may be 10KHz, the outer loop execution frequency of motor 1 and motor 2 may be 2KHz, the numbers in fig. 6 represent the frequency division count of the outer loop compared to the current loop, and the outer loop will be executed when the frequency division count reaches 5. With reference to the uppermost part of fig. 6, the execution sequence of the outer ring and the current ring in the control process of the motor 1 is 5 cases as in the case of case 1-case 5 in the figure. In case 1 and case 2, the outer rings of the motor 1 and the motor 2 are executed in two consecutive designated periods, and in such an execution sequence, if the execution time of the outer ring is long, the computation resource occupancy of the control unit in this period is high, so that it is necessary to avoid both cases in the scheduling of the execution sequences of the current ring and the outer ring. In case 3, case 4 and case 5, the outer ring execution sequence of the outer ring of any two motors is satisfied, where the time interval between the outer rings of any two motors is longer than the duration of a specified period, and it can be seen that, in this embodiment, there is at least one time interval of a specified period between the outer rings of motor 1 and motor 2, the outer rings of motor 1 and motor 2 can no longer be continuously executed, so that the instantaneous occupancy rate of the computing resources is reduced, and the computing resources are saved for the control unit to process other threads.
Step 42: if the designated ring is a position ring, calculating the target speed of the current motor based on the target rotor position and the current rotor position of the current motor in the execution process of the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; based on the target digital signal and the current digital signal, a drive signal of the current motor is calculated.
The feedback speed is obtained by measuring the speed of the current motor by a feedback unit connected with the current motor.
The feedback unit connected with the current motor can obtain the feedback speed of the current motor by measuring the speed of the current motor. If the designated ring is a position ring, the control unit may calculate a target speed of the current motor based on the target rotor position and the current rotor position of the current motor in performing the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; based on the target digital signal and the current digital signal, a drive signal of the current motor is calculated.
The method for obtaining the feedback speed by measuring the speed of the current motor by the feedback unit connected with the current motor can be any currently existing method for determining the feedback speed of the motor, and the embodiment of the application is not particularly limited.
Optionally, the feedback unit to which the current motor is connected may include a speed sensor mounted on the rotor of the motor, and the speed sensor may directly measure the speed of the rotor of the motor, so as to directly obtain the feedback speed.
Optionally, when the feedback unit connected with the current motor measures the speed of the current motor, the feedback speed of the current motor can be calculated by using a speed measurement algorithm based on the current rotor position of the current motor.
The above-mentioned speed measurement algorithm may be various methods for determining the feedback speed of the current motor based on the current rotor position of the current motor, which is not specifically limited in the embodiments of the present application.
For example, when calculating the feedback speed of the current motor using the speed measurement algorithm, a position increment of the rotor of the current motor within a specified time period may be determined based on the current rotor position of the current motor, and then a ratio of the position increment to the specified time period may be determined as the feedback speed of the current motor.
Step 43: if the designated loop is a speed loop, calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; based on the target digital signal and the current digital signal, a drive signal of the current motor is calculated.
If the designated loop is a speed loop, the control unit can calculate a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; based on the target digital signal and the current digital signal, a drive signal of the current motor is calculated.
Step 44: if the designated ring is a current ring, in the execution process of the designated ring, calculating a driving signal of the current motor based on the target digital signal and the current digital signal of the current motor.
If the designated loop is a current loop, the control unit may calculate a driving signal of the current motor based on the target digital signal of the current motor and the current digital signal during execution of the designated loop.
Accordingly, step S204 may include the following step 45, where after the current sampling current is obtained, the current sampling channel is switched to the current sampling unit connected to the new current motor in the specified period.
Step 45: when the current digital signal is obtained through conversion, the current sampling channel is switched to a current sampling unit connected with a new current motor.
Corresponding to step 41 described above, the control unit may switch the current sampling channel to the current sampling unit to which the new current motor is connected when the current digital signal is converted.
Corresponding to the motor control method provided by the embodiment of the application, the embodiment of the application also provides a motor control device, which is applied to a control unit in a motor driver, wherein the motor driver further comprises a plurality of driving units and a plurality of current sampling units, each driving unit is connected with one motor in a plurality of motors, each current sampling unit is connected with one motor in the plurality of motors, and the plurality of driving units and the plurality of current sampling units are connected with the control unit; as shown in fig. 7, a motor control device provided in an embodiment of the present application may include the following modules.
The channel switching module 701 is configured to switch a current sampling channel of the control unit to a current sampling unit connected to a current motor in response to a motor driving instruction;
a current obtaining module 702, configured to obtain a current sampling current of the current motor at a start time of each specified period; the current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor;
a signal determining module 703, configured to determine a driving signal of the current motor based on the current sampling current, and send the driving signal to a driving unit connected to the current motor, so that the driving unit connected to the current motor drives the current motor to move according to the driving signal;
The motor switching module 704 is configured to switch the current sampling channel to a current sampling unit connected to a new current motor in the specified period after the current sampling current is obtained, and trigger the current obtaining module 702; if the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor of the current motor in the preset driving sequence.
It can be seen that, by applying the scheme provided by the embodiment of the application, the motor driver can comprise a control unit, a plurality of driving units and a plurality of current sampling units, each of the plurality of motors can be respectively connected with one driving unit and one current sampling unit, and the plurality of driving units and the plurality of current sampling units can be connected with the control unit. Further, when controlling the plurality of motors, the control unit in the motor driver may switch the current sampling channel of the control unit to the current sampling unit to which the current motor is connected in response to the motor driving instruction.
The current sampling unit connected with the current motor samples the current of the current motor to obtain the current sampling current, and the control unit can acquire the current sampling current of the current motor at the starting moment of each appointed period, so that the driving signal of the current motor is determined based on the current sampling current, and the driving signal is sent to the driving unit connected with the current motor, so that the driving unit connected with the current motor drives the current motor to move according to the driving signal. If the current motor is the last motor in the preset driving sequence of the plurality of motors, the first motor in the preset driving sequence can be used as a new current motor; otherwise, in the preset driving sequence, the next motor of the current motor can be used as a new current motor. For each specified period, the control unit can switch the current sampling channel to a current sampling unit connected with a new current motor in the specified period after acquiring the current sampling current; furthermore, the control unit can acquire the current sampling current of the new current motor at the starting time of the next designated period, so as to determine the driving signal of the new current motor based on the current sampling current of the new current motor, and send the driving signal to the driving unit connected with the new current motor, so that the driving unit connected with the new current motor drives the new current motor to move according to the driving signal.
Based on this, when the plurality of motors are controlled, the control unit may alternately control the driving units of the plurality of motors according to a predetermined driving sequence of the plurality of motors and a designated period, thereby realizing simultaneous control of the plurality of motors by one motor driver. Therefore, by applying the scheme provided by the embodiment of the application, the number of motor drivers required by simultaneous operation of multiple motors can be reduced, the space occupied by the motor drivers in the equipment for simultaneous operation of the multiple motors is reduced, the miniaturization development of the equipment for simultaneous operation of the multiple motors is promoted, and the production cost of the equipment for simultaneous operation of the multiple motors is reduced.
Optionally, in a specific implementation manner, the plurality of motors include a first motor and a second motor;
the channel switching module 701 is specifically configured to: responding to a motor driving instruction, taking the first motor as a current motor, and switching a current sampling channel of the control unit to a current sampling unit connected with the current motor;
the motor switching module 704 is specifically configured to: if the current motor is the first motor, switching the current sampling channel to a current sampling unit connected with the second motor in the appointed period after the current sampling current is acquired; if the current motor is the second motor, switching the current sampling channel to a current sampling unit connected with the first motor in the appointed period after the current sampling current is acquired;
Optionally, in a specific implementation manner, the apparatus further includes:
a motor determining module configured to determine, among the plurality of motors, a plurality of target motors to be driven indicated by the motor driving instruction;
the signal determining module 703 is specifically configured to: if the current motor is the target motor, determining a driving signal of the current motor based on the current sampling current;
the apparatus further comprises:
the period waiting module is used for waiting for ending the appointed period after acquiring the current sample collecting current if the current motor is not the target motor;
optionally, in a specific implementation manner, the control unit includes: and the counting value change periods and the counting value change frequencies of the timers included in the control unit are the same, and the counting values of the timers at the same moment are the same.
Optionally, in a specific implementation manner, the motor driver further includes: a plurality of feedback units connected to the control unit, each feedback unit being connected to one of the plurality of motors;
The current acquisition module 702 is specifically configured to: acquiring the current sampling current of the current motor and the current rotor position of the current motor at the starting moment of each appointed period; the current rotor position is obtained by sampling the rotor position of the current motor through a feedback unit connected with the current motor;
the signal determining module 703 is specifically configured to: a drive signal for the current motor is calculated based on the current sampling current and the current rotor position.
Optionally, in a specific implementation manner, the signal determining module 703 is specifically configured to: calculating a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, and taking the PWM signal as a driving signal of the current motor; wherein the PWM signal comprises: duty cycle, amplitude and period.
Optionally, in a specific implementation manner, the control unit controls the plurality of motors in a cascade manner of a position loop, a speed loop and a current loop; the execution time length of the position ring is smaller than the time length of the appointed period;
the signal determining module 703 is specifically configured to:
converting the current sampling current into a current digital signal, and starting to execute a designated loop when the current digital signal is obtained; wherein the designated loop is the position loop, the speed loop, or the current loop; the time interval for which the outer rings of any two motors are started to execute is longer than the duration of the specified period; the outer ring includes the position ring and the speed ring;
If the designated ring is the position ring, calculating the target speed of the current motor based on the target rotor position of the current motor and the current rotor position in the execution process of the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; calculating a driving signal of the current motor based on the target digital signal and the current digital signal; the feedback speed is obtained by measuring the speed of the current motor by a feedback unit connected with the current motor;
if the designated loop is the speed loop, calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; calculating a driving signal of the current motor based on the target digital signal and the current digital signal;
if the designated loop is the current loop, calculating a driving signal of the current motor based on the target digital signal of the current motor and the current digital signal in the execution process of the designated loop;
The motor switching module 704 is specifically configured to: and switching the current sampling channel to a new current motor when the current digital signal is obtained through conversion.
The embodiment of the application also provides a motor driver, as shown in fig. 8, including:
a memory 801 for storing a computer program;
the processor 802 is configured to implement any one of the motor control methods provided in the embodiments of the present application when executing the program stored in the memory 801.
And the electronic device may further comprise a communication bus and/or a communication interface, through which the processor 802, the communication interface, and the memory 801 communicate with each other.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided herein, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the motor control methods described above.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the motor control methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a Solid State Disk (SSD), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, the motor drive embodiments, the computer-readable storage medium embodiments, and the computer program product embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, and relevant places are referred to in the section of the method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (11)

1. A motor control method, characterized in that the method is applied to a control unit in a motor driver, the motor driver further comprises a plurality of driving units and a plurality of current sampling units, each driving unit is connected with one motor of a plurality of motors, each current sampling unit is connected with one motor of the plurality of motors, and the plurality of driving units and the plurality of current sampling units are connected with the control unit; the method comprises the following steps:
responding to a motor driving instruction, and switching a current sampling channel of the control unit to a current sampling unit connected with a current motor;
acquiring the current sampling current of the current motor at the starting time of each appointed period; the current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor;
determining a driving signal of the current motor based on the current sampling current, and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor drives the current motor to move according to the driving signal;
After the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with a new current motor in the specified period; if the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor of the current motor in the preset driving sequence;
and returning to the step of acquiring the current sampling current of the current motor at the starting time of each designated period.
2. The method of claim 1, wherein the plurality of motors includes a first motor and a second motor;
the response to the motor driving instruction, the current sampling channel of the control unit is switched to the current sampling unit connected with the current motor, and the current sampling unit comprises:
responding to a motor driving instruction, taking the first motor as a current motor, and switching a current sampling channel of the control unit to a current sampling unit connected with the current motor;
after the current sampling current is obtained, switching the current sampling channel to a current sampling unit connected with a new current motor in the specified period, wherein the current sampling unit comprises:
If the current motor is the first motor, switching the current sampling channel to a current sampling unit connected with the second motor in the appointed period after the current sampling current is acquired;
and if the current motor is the second motor, switching the current sampling channel to a current sampling unit connected with the first motor in the appointed period after the current sampling current is acquired.
3. The method according to claim 1, characterized in that before said switching the current sampling channel of the control unit to the current sampling unit to which the current motor is connected, the method further comprises:
determining a plurality of target motors to be driven indicated by the motor driving instruction from the plurality of motors;
the determining a driving signal of the current motor based on the current sampling current includes:
if the current motor is the target motor, determining a driving signal of the current motor based on the current sampling current;
the method further comprises the steps of:
and if the current motor is not the target motor, waiting for the ending of the appointed period after the current sample collecting current is obtained.
4. The method according to claim 1, wherein the control unit comprises: and the counting value change periods and the counting value change frequencies of the timers included in the control unit are the same, and the counting values of the timers at the same moment are the same.
5. The method of claim 1, wherein the motor drive further comprises: a plurality of feedback units connected to the control unit, each feedback unit being connected to one of the plurality of motors;
the step of obtaining the current sampling current of the current motor at the starting time of each appointed period comprises the following steps:
acquiring the current sampling current of the current motor and the current rotor position of the current motor at the starting moment of each appointed period; the current rotor position is obtained by sampling the rotor position of the current motor through a feedback unit connected with the current motor;
the determining a driving signal of the current motor based on the current sampling current includes:
calculating a drive signal of the current motor based on the current sampling current and the current rotor position;
The step of returning to the starting time of each designated period to obtain the current sampling current of the current motor comprises the following steps:
and returning to the starting time of each appointed period, and acquiring the current sampling current of the current motor and the current rotor position of the current motor.
6. The method of claim 5, wherein the calculating the drive signal for the current motor based on the current sampled current and the current rotor position comprises:
calculating a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, and taking the PWM signal as a driving signal of the current motor; wherein the PWM signal comprises: duty cycle, amplitude and period.
7. The method of claim 5, wherein the control unit controls the plurality of motors in a cascade of position loops, speed loops, and current loops; the execution time length of the position ring is smaller than the time length of the appointed period;
said calculating a drive signal for said current motor based on said current sampled current and said current rotor position, comprising:
converting the current sampling current into a current digital signal, and starting to execute a designated loop when the current digital signal is obtained; wherein the designated loop is the position loop, the speed loop, or the current loop; the time interval for which the outer rings of any two motors are started to execute is longer than the duration of the specified period; the outer ring includes the position ring and the speed ring;
If the designated ring is the position ring, calculating the target speed of the current motor based on the target rotor position of the current motor and the current rotor position in the execution process of the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; calculating a driving signal of the current motor based on the target digital signal and the current digital signal; the feedback speed is obtained by measuring the speed of the current motor by a feedback unit connected with the current motor;
if the designated loop is the speed loop, calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; calculating a driving signal of the current motor based on the target digital signal and the current digital signal;
if the designated loop is the current loop, calculating a driving signal of the current motor based on the target digital signal of the current motor and the current digital signal in the execution process of the designated loop;
Before the end of the specified period where the current is located, switching the current sampling channel to a new current motor, including:
and switching the current sampling channel to a new current motor when the current digital signal is obtained through conversion.
8. A motor control device, characterized in that the device is applied to a control unit in a motor driver, the motor driver further comprises a plurality of driving units and a plurality of current sampling units, each driving unit is connected with one motor of a plurality of motors, each current sampling unit is connected with one motor of the plurality of motors, and the plurality of driving units and the plurality of current sampling units are connected with the control unit; the device comprises:
the channel switching module is used for responding to the motor driving instruction and switching the current sampling channel of the control unit to the current sampling unit connected with the current motor;
the current acquisition module is used for acquiring the current sampling current of the current motor at the starting moment of each appointed period; the current sampling current is obtained by sampling the current of the current motor by a current sampling unit connected with the current motor;
The signal determining module is used for determining a driving signal of the current motor based on the current sampling current and sending the driving signal to a driving unit connected with the current motor so that the driving unit connected with the current motor drives the current motor to move according to the driving signal;
the motor switching module is used for switching the current sampling channel to a current sampling unit connected with a new current motor in the appointed period after the current sampling current is acquired, and triggering the current acquisition module; if the current motor is the last motor in the preset driving sequence of the plurality of motors, the new current motor is the first motor in the preset driving sequence; otherwise, the new current motor is the next motor of the current motor in the preset driving sequence.
9. The apparatus of claim 8, wherein the plurality of motors comprises a first motor and a second motor;
the channel switching module is specifically configured to: responding to a motor driving instruction, taking the first motor as a current motor, and switching a current sampling channel of the control unit to a current sampling unit connected with the current motor;
The motor switching module is specifically used for: if the current motor is the first motor, switching the current sampling channel to a current sampling unit connected with the second motor in the appointed period after the current sampling current is acquired; if the current motor is the second motor, switching the current sampling channel to a current sampling unit connected with the first motor in the appointed period after the current sampling current is acquired;
and/or the number of the groups of groups,
the apparatus further comprises: a motor determining module configured to determine, among the plurality of motors, a plurality of target motors to be driven indicated by the motor driving instruction;
the signal determining module is specifically configured to: if the current motor is the target motor, determining a driving signal of the current motor based on the current sampling current;
the apparatus further comprises: the period waiting module is used for waiting for ending the appointed period after acquiring the current sample collecting current if the current motor is not the target motor;
and/or the number of the groups of groups,
the control unit includes: the counting value change cycles of the timers included in the control unit are the same, the counting value change frequencies are the same, and the counting values of the timers are the same at the same moment;
And/or the number of the groups of groups,
the motor driver further includes: a plurality of feedback units connected to the control unit, each feedback unit being connected to one of the plurality of motors;
the current acquisition module is specifically used for: acquiring the current sampling current of the current motor and the current rotor position of the current motor at the starting moment of each appointed period; the current rotor position is obtained by sampling the rotor position of the current motor through a feedback unit connected with the current motor;
the signal determining module is specifically configured to: calculating a drive signal of the current motor based on the current sampling current and the current rotor position;
and/or the number of the groups of groups,
the signal determining module is specifically configured to: calculating a PWM signal corresponding to the current motor based on the current sampling current and the current rotor position, and taking the PWM signal as a driving signal of the current motor; wherein the PWM signal comprises: duty cycle, amplitude and period;
and/or the number of the groups of groups,
the control unit controls the motors in a cascade mode of a position ring, a speed ring and a current ring; the execution time length of the position ring is smaller than the time length of the appointed period;
The signal determining module is specifically configured to:
converting the current sampling current into a current digital signal, and starting to execute a designated loop when the current digital signal is obtained; wherein the designated loop is the position loop, the speed loop, or the current loop; the time interval for which the outer rings of any two motors are started to execute is longer than the duration of the specified period; the outer ring includes the position ring and the speed ring;
if the designated ring is the position ring, calculating the target speed of the current motor based on the target rotor position of the current motor and the current rotor position in the execution process of the designated ring; calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed; calculating a driving signal of the current motor based on the target digital signal and the current digital signal; the feedback speed is obtained by measuring the speed of the current motor by a feedback unit connected with the current motor;
if the designated loop is the speed loop, calculating a target digital signal corresponding to the target current of the current motor based on the target speed and the feedback speed of the current motor in the execution process of the designated loop; calculating a driving signal of the current motor based on the target digital signal and the current digital signal;
If the designated loop is the current loop, calculating a driving signal of the current motor based on the target digital signal of the current motor and the current digital signal in the execution process of the designated loop;
the motor switching module is specifically used for: and switching the current sampling channel to a new current motor when the current digital signal is obtained through conversion.
10. A motor driver, comprising:
a memory for storing a computer program;
a processor for implementing the method of any of claims 1-7 when executing a program stored on a memory.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-7.
CN202311869000.0A 2023-12-29 2023-12-29 Motor control method and device, motor driver and storage medium Pending CN117833720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311869000.0A CN117833720A (en) 2023-12-29 2023-12-29 Motor control method and device, motor driver and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311869000.0A CN117833720A (en) 2023-12-29 2023-12-29 Motor control method and device, motor driver and storage medium

Publications (1)

Publication Number Publication Date
CN117833720A true CN117833720A (en) 2024-04-05

Family

ID=90518699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311869000.0A Pending CN117833720A (en) 2023-12-29 2023-12-29 Motor control method and device, motor driver and storage medium

Country Status (1)

Country Link
CN (1) CN117833720A (en)

Similar Documents

Publication Publication Date Title
JP5081303B2 (en) Method and system for optimizing filter compensation coefficients for digital power control systems
US9501446B2 (en) Control unit for the exchange of data with a peripheral unit, peripheral unit, and method for data exchange
EP3076293A2 (en) Control apparatus
RU2708791C1 (en) Error generator of one-sided nibble transmission
CN108494313B (en) Time sequence control method and device and servo system
CN107462763B (en) Motor current sampling method
EP1981169A1 (en) Analog/digital converter
JP2020518224A (en) Control system and control method
CN117833720A (en) Motor control method and device, motor driver and storage medium
JP2002527977A (en) A / D converter
CN115102552B (en) Successive approximation type analog-digital converter circuit and analog-digital conversion method
CN110609499B (en) Method and device for switching analog-to-digital converter (ADC) real-time sampling and non-real-time sampling
CN112327707B (en) Timing control method, device and system of servo driver
CN212433614U (en) Multi-axis motor pipeline control system based on FPGA
CN109768738B (en) Motor control device, control system, and motor control method
CN109855746B (en) Temperature value transmission device and method thereof
CN113119117A (en) Robot control method, controller, robot and control system
WO2019159310A1 (en) Electronic control device
JP5071497B2 (en) AD converter, current detector using AD converter, and digital servo controller using current detector
CN109067398B (en) Control method of ADC circuit with multi-channel signals
CN112803735B (en) Control method and device of converter and computer readable storage medium
CN117270487B (en) Sampling control system, method and chip for analog signals
CN218679039U (en) Analog-digital converter
CN114448293B (en) Motor synchronous control method, system, vehicle and storage medium
CN111030544A (en) Motor controller and control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination