Disclosure of Invention
The invention discloses a motor correction system which is mainly used for improving various inconveniences caused by the fact that the zero position of a motor rotor and an encoder is corrected in a manual mode.
One embodiment of the present invention discloses a calibration system for a motor, which is used for calibrating a zero position of the motor and a phase sequence of the motor. The control module is used for being electrically connected with a power supply and comprises a storage and a processor, wherein the storage stores preset steering information, and the processor is electrically connected with the storage; the driving module is electrically connected with the control module and is used for connecting the three-phase line of the motor; the angle reader is used for connecting the motor control module and reading angle information output by the motor control module; a data writer for writing at least one correction angle data into the motor control module; the steering sensor is used for sensing the rotating direction of the motor so as to correspondingly generate steering information; the control module can execute a phase sequence correction program, when the control module executes the phase sequence correction program, the control module controls the motor to rotate through the driving module according to preset steering information, and judges whether the rotating direction of the motor is consistent with the preset steering information or not according to the steering information returned by the steering sensor; if the control module judges that the rotation direction of the motor does not accord with the preset steering information, the control module writes the control data into a writer and changes a forward rotation instruction and a reverse rotation instruction in the motor control module; when the control module executes the phase sequence correction program, the control module executes an angle correction program, and when the control module executes the angle correction program, the control module rotates the motor by a preset angle through the driving module, reads angle information through the angle reader, and writes a current angle contained in the angle information into the motor control module through the data writer to serve as a zero offset value of the motor control module.
Preferably, after the control module executes the phase sequence correction program, the control module can also execute a phase sequence verification program, when the control module executes the phase sequence verification program, the control module controls the motor to rotate according to preset steering information, and the control module judges whether the rotating direction of the motor is correct or not according to the steering information returned by the steering sensor; if the control module judges that the rotation direction of the motor is incorrect, the control module executes the phase sequence correction program again, or the control module sends a phase sequence correction failure signal.
Preferably, the motor calibration system further comprises a warning module electrically connected to the control module, and when the warning module receives the phase sequence calibration failure signal, the warning module warns a user that the motor calibration system fails to calibrate the phase sequence of the motor.
Preferably, after the control module executes the angle correction program, the control module can also execute an angle verification program, when the control module executes the angle verification program, the control module enables the motor to rotate by a verification angle through the driving module, and the control module reads angle information through the angle reader to judge whether the rotation angle of the motor is correct; if the control module judges that the rotation angle of the motor is incorrect, the control module executes the angle correction program or the phase sequence correction program again, or sends an angle correction failure signal.
Preferably, the motor calibration system further comprises a warning module electrically connected to the control module, and when the warning module receives the angle calibration failure signal, the warning module warns a user that the motor calibration system fails to calibrate the angle of the motor.
Preferably, the current angle is defined as θ; when the control module executes the phase sequence correction program, if the control module changes the forward rotation command and the reverse rotation command in the motor control module, the zero offset value is (360-theta) × (4096/360) when the control module executes the angle correction program.
Preferably, the current angle is defined as θ; when the control module executes the phase sequence correction program, if the control module does not change the forward rotation command and the reverse rotation command in the motor control module, the zero offset value is θ (4096/360) when the control module executes the angle correction program.
Preferably, the motor calibration system further comprises a communication module electrically connected to the control module, the communication module is capable of receiving predetermined steering information transmitted by a production system, and the control module is capable of receiving the predetermined steering information through the communication module and storing the predetermined steering information in the storage.
One embodiment of the present invention discloses a calibration system for a motor, which is used for calibrating a zero position of the motor and a phase sequence of the motor. The control module is used for being electrically connected with a power supply and comprises a storage and a processor, wherein the storage stores preset steering information, and the processor is electrically connected with the storage; the driving module is electrically connected with the control module and is used for connecting the three-phase line of the motor; the angle reader is used for connecting the motor control module and reading angle information output by the motor control module; a data writer for writing at least one correction angle data into the motor control module; the control module can execute a phase sequence correction program, when the control module executes the phase sequence correction program, the control module controls the motor to rotate through the driving module according to preset steering information, and judges whether the rotating direction of the motor is consistent with the preset steering information or not according to the steering information returned by the motor control module; if the control module judges that the rotation direction of the motor does not accord with the preset steering information, the control module writes the control data into a writer and changes a forward rotation instruction and a reverse rotation instruction in the motor control module; when the control module executes the phase sequence correction program, the control module executes an angle correction program, and when the control module executes the angle correction program, the control module rotates the motor by a preset angle through the driving module, reads angle information through the angle reader, and writes a current angle contained in the angle information into the motor control module through the data writer to serve as a zero offset value of the motor control module.
In summary, the calibration system of the motor according to the present invention can directly modify the forward rotation command, the reverse rotation command and the zero offset value pre-stored in the motor control module (the motor control module includes the encoder) through the cooperation between the control module and the data writer, so as to directly complete the phase sequence calibration operation of the motor and the angle calibration operation of the motor.
For a better understanding of the nature and technical content of the present invention, reference should be made to the following detailed description of the invention and the accompanying drawings, which are provided for illustration purposes only and are not intended to limit the scope of the invention in any way.
Detailed Description
In the following description, reference is made to or shown in the accompanying drawings for the purpose of illustrating the subject matter described herein, and in which is shown by way of illustration only, and not by way of limitation, specific reference may be made to the drawings.
Referring to fig. 1, a block diagram of acalibration system 100 for a motor according to the present invention is shown. Thecalibration system 100 of the present invention is used for calibrating a zero position of a motor M and a phase sequence (i.e. a forward direction and a reverse direction) of the motor M. Thecalibration system 100 for a motor includes: acontrol module 1, adriving module 2, anangle reader 3, adata writer 4 and asteering sensor 5.
Thecontrol module 1 is electrically connected to a power source P. The power source is, for example, an ac power source, a dc power supply, a dc battery, etc., which is not limited herein. Thecontrol module 1 includes astorage 11 and aprocessor 12, thestorage 11 stores apredetermined steering information 111, and theprocessor 12 is electrically connected to thestorage 11. Thestorage 11 is, for example, various memories, hard disks, etc., and theprocessor 12 is, for example, various microprocessors, processing chips, etc., which are not limited herein. The predeterminedturning information 111 refers to the information of the forward direction (and the reverse direction) of the customized motor input by the relevant user through the relevant input device (e.g. a smart phone, a keyboard, a mouse, a touch screen, etc.) and the relevant user interface.
More specifically, as shown in fig. 2 and 3, fig. 2 is a schematic view showing the motor fixed to the fixing member, and fig. 3 is a front view of fig. 2. In the case that a housing M1 of the motor M is fixedly disposed on one side of a fixing member M2 and a rotating shaft M3 of the motor M is exposed on the other side of the fixing member M2, a user can define that the rotating shaft M3 rotates clockwise to a forward direction and the rotating shaft M3 rotates counterclockwise to a reverse direction when the user faces the fixing member M2 exposed with the rotating shaft M3 through related input devices and related user interfaces (as shown in fig. 3).
As shown in fig. 1 and fig. 3, thedriving module 2 is electrically connected to thecontrol module 1, and thedriving module 2 is used for connecting the three-phase line M4 of the motor M. In practical applications, thedriving module 2 may include related protection mechanisms, for example, a phase current detection circuit, an overcurrent protection circuit, etc. may be included in thedriving module 2, so as to ensure stability of the current and the voltage output to the motor M.
Theangle reader 3 is connected to the motor control module M5, and theangle reader 3 is used for reading the angle information M51 output by the motor control module M5. In practical applications, theangle reader 3 may be a codec (Decoder), a Quadrature Encoder (QEI) module or an Input Capture (Input Capture) module. The motor control module M5 includes a rotary encoder (rotary encoder), such as an absolute (absolute) encoder and an incremental (incremental) encoder, but not limited thereto; the codec (angle reader 3) is used to read the signal outputted from the rotary encoder (motor control module M5) so as to obtain the rotation angle of the rotating shaft M3 controlled by the motor control module M5.
Thedata writer 4 is used for writing the at least one correctedangle data 41 into the motor control module M5. In practical applications, thedata writer 4 may be a component similar to a recorder, and thedata writer 4 can write data into the related control chip or memory of the motor control module M5. Thedata writer 4 may write thecorrected angle data 41 into a blank address of the memory, or thedata writer 4 may write thecorrected angle data 41 into an address of the memory, where corresponding data is already stored in advance, instead of the data originally stored in the memory. For example, the control chip or the memory of the motor control module M5 may default to have an address for storing the correctedangle data 41, and the address may be 0, and if thedata writer 4 writes the correctedangle data 41 into the motor control module M5, the address 0 is replaced with the correctedangle data 41.
Thesteering sensor 5 is disposed on the motor M, and thesteering sensor 5 is configured to sense a rotation direction of the motor M to correspondingly generate asteering information 51. In practical applications, thesteering sensor 5 may be various motor position sensors, such as: a Hall sensor (Hall), an Encoder (Encoder), a Resolver (Resolver), etc., but not limited thereto, any sensing element that can detect the rotation direction of the rotating shaft M3 of the motor M is applicable to thesteering sensor 5 of the present embodiment. It should be noted that, in different embodiments, themotor calibration system 100 may not include thesteering sensor 5, and thecontrol module 1 of themotor calibration system 100 directly obtains thesteering information 51 through the motor control module M5, that is, the motor control module M5 can output thesteering information 51 to thecontrol module 1.
As shown in fig. 1 and 4, fig. 4 is a schematic flow chart illustrating a first embodiment of a motor calibration system according to the present invention. When thecontrol module 1 of themotor calibration system 100 calibrates the motor M, thecontrol module 1 may first execute a phase sequence calibration procedure and then execute an angle calibration procedure.
When thecontrol module 1 executes the phase sequence correction program, thecontrol module 1 may execute a driving and determining step S11 in sequence: controlling the motor M to rotate through thedriving module 2 according to thepreset steering information 51; thecontrol module 1 will determine whether the rotation direction of the motor M matches thepredetermined steering information 111 according to thesteering information 51 returned by thesteering sensor 5. If thecontrol module 1 determines that the rotation direction of the motor M does not match thepredetermined steering information 111, thecontrol module 1 performs a modification step S12: thecontrol data writer 4 modifies a forward rotation command M52 and a reverse rotation command M53 in the motor control module M5.
Specifically, in practice, since the winding manner and direction of the coil of the rotor of the motor M are different, the rotation direction of the rotor after the energization of the rotor is different, and therefore, when the motor control module M5 controls the rotor of the motor M to rotate forward or backward by the forward rotation command M52 and the reverse rotation command M53 stored in the memory after the energization of the motor M, the rotation direction of the rotor of the motor M may be different from the rotation direction expected by the user. For example, if the motor control module M5 controls the rotor to rotate according to the forward rotation command M52, the user sees that the rotating shaft M3 rotates counterclockwise, but the user expects that the rotating shaft M3 of the motor M rotates clockwise when the motor control module M5 controls the rotor to rotate clockwise, which is the situation where thecontrol module 1 determines that the rotating direction of the motor M does not match thepredetermined steering information 111; as described above, when themotor calibration system 100 of the present invention is in this situation, thecontrol module 1 directly uses thedata writer 4 to modify the forward rotation command M52 and the reverse rotation command M53 of the motor control module M5, so that the rotation direction of the rotor is defined by the user when the motor control module M5 controls the rotation of the rotor of the motor M according to the forward rotation command M52 or the reverse rotation command M53.
After thecontrol module 1 executes the phase sequence correction program, thecontrol module 1 will execute an angle correction program, and when thecontrol module 1 executes the angle correction program, thecontrol module 1 will execute an angle reading step S21: rotating the motor M by a preset angle through thedriving module 2; then, thecontrol module 1 executes a write step S22: the angle information M51 is read by theangle reader 3, and a current angle M511 contained in the angle information M51 is written into the motor control module M5 by thedata writer 4 as a zero-point offset value M54 of the motor control module M5.
For example, when thecontrol module 1 executes the angle calibration procedure, thecontrol module 1 may, for example, control the rotor of the motor M to rotate forward 30 degrees (i.e. the predetermined angle) through thedriving module 2, and then thecontrol module 1 will read the angle information M51 outputted by the motor control module M5 through theangle reader 3 to determine whether the motor M rotates forward 30 degrees, if thecontrol module 1 reads that the motor M actually rotates forward 60 degrees through theangle reader 3, thecontrol module 1 will know that the rotor of the motor M rotates 30 degrees more, and thecontrol module 1 will write the 30 degrees more as the current angle M511 as the zero offset value M54 of the motor control module M5, so that when the motor control module M5 is subsequently powered on and executes the command of 30 degrees forward rotation, the motor control module M5 will correct the rotation angle according to the zero offset value M54, and the motor control module M5 will properly control the forward rotation of the rotor by 30 degrees.
In one embodiment of the present invention, assuming that the current angle is defined as θ, when thecontrol module 1 executes the phase sequence correction procedure, if thecontrol module 1 changes the forward rotation command M52 and the reverse rotation command M53 in the motor control module M5, the zero offset value M54 is (360- θ) (4096/360) when thecontrol module 1 executes the angle correction procedure; in contrast, when thecontrol module 1 executes the phase sequence correction routine, if thecontrol module 1 does not modify the forward rotation command M52 and the reverse rotation command M53 of the motor control module M5, the zero offset value M54 is θ (4096/360) when thecontrol module 1 executes the angle correction routine.
The sequence of the phase sequence correction procedure and the angle correction procedure executed by thecontrol module 1 may be changed according to the requirement, and is not limited herein; in a preferred embodiment, thecontrol module 1 may execute the phase sequence correction procedure first and then execute the angle correction procedure, so that when thecontrol module 1 executes the angle correction procedure, thecontrol module 1 may write the current angle M511 obtained by theangle reader 3 into the motor control module M5 directly through thedata writer 4.
Referring to fig. 5 and fig. 6 together, fig. 5 is a schematic diagram illustrating a process of the motor calibration system according to the present invention, wherein the control module of the motor calibration system performs calibration on the motor, and fig. 6 is a schematic block diagram illustrating a motor calibration system according to a second embodiment of the present invention. One of the differences between the present embodiment and the previous embodiment is that: after thecontrol module 1 executes the phase sequence correction program, thecontrol module 1 can also execute a phase sequence verification program. When thecontrol module 1 executes the phase sequence verification program, thecontrol module 1 executes a phase sequence verification step S13: the motor M is controlled to rotate according to thepredetermined steering information 111, and whether the rotating direction of the motor M is correct is determined according to thesteering information 51 returned by thesteering sensor 5. If thecontrol module 1 determines that the rotation direction of the motor M is incorrect, thecontrol module 1 re-executes the phase sequence correction procedure, or thecontrol module 1 sends a phase sequencecorrection failure signal 13. In practical applications, when thecontrol module 1 executes the phase sequence verification program for the first time, thecontrol module 1 may first re-execute the phase sequence correction program once, or may repeatedly execute the phase sequence correction program for a predetermined number of times (e.g., 3 times).
Themotor calibration system 100 of the present embodiment is different from one of the previous embodiments in that: thecalibration system 100 of the motor further includes awarning module 6, thewarning module 6 is electrically connected to thecontrol module 1, when thewarning module 6 receives the phase sequencecalibration failure signal 13, thewarning module 6 will warn the user that thecalibration system 100 of the motor fails to calibrate the phase sequence of the motor M, for example, thewarning module 6 may include a lamp, a speaker, and other components, and when thewarning module 6 receives the phase sequencecalibration failure signal 13, the control lamp and the speaker may respectively emit light and sound with corresponding colors.
One of the differences between the present embodiment and the previous embodiment is that: after thecontrol module 1 executes the angle calibration program, thecontrol module 1 can also execute an angle verification program, and when thecontrol module 1 executes the angle verification program, thecontrol module 1 executes an angle verification step S23: the motor M is rotated by a verification angle through thedriving module 2, and thecontrol module 1 reads the angle information M51 through theangle reader 3 to determine whether the rotation angle of the motor M is correct. If thecontrol module 1 determines that the rotation angle of the motor M is incorrect, thecontrol module 1 re-executes the angle calibration procedure or the phase sequence calibration procedure, or thecontrol module 1 sends an anglecalibration failure signal 14. If thecontrol module 1 determines that the rotation angle of the motor M is correct, thecontrol module 1 performs a calibration ending step S24, in which thecontrol module 1 ends the calibration operation on the motor M in the calibration ending step S24, and thecontrol module 1 can store the related data of the motor M, such as the related basic data, the calibration result data, and the calibration process, in a specific database.
In the embodiment where themotor calibration system 100 includes thewarning module 6, thewarning module 6 is electrically connected to thecontrol module 1, when thewarning module 6 receives the anglecalibration failure signal 14, thewarning module 6 will warn the user that themotor calibration system 100 fails to calibrate the angle of the motor M, and thecontrol module 1 can control the relevant lamp or speaker to emit the corresponding light and sound.
Please refer to fig. 7, which is a block diagram illustrating a motor calibration system according to a second embodiment of the present invention. Thecorrection system 100 of the motor of the present invention is different from the previous embodiments in the following point: thecalibration system 100 of the motor further comprises a communication module 7. The communication module 7 is electrically connected to thecontrol module 1, the communication module 7 can receive a predetermined turning information a1 transmitted by a production system a, and thecontrol module 1 can receive the predetermined turning information a1 through the communication module 7 and store the predetermined turning information a1 in thestorage 11. Specifically, the communication module 7 may be any wired or wireless communication unit, and the production system a may be connected to an input device (e.g., a computer, a smart phone, a tablet computer, etc.) capable of providing the predetermined turning information a1 for the relevant person to input, and the relevant person may generate the predetermined turning information a1 through the input device according to the requirement of the relevant person, and the production system a is used to transmit the predetermined turning information a1 input by the relevant person to the communication module 7 of themotor calibration system 100.
In summary, the calibration system of the motor of the present invention does not require related personnel to manually operate related components of the motor during the calibration process of the motor, and therefore, compared with the conventional manual method, the calibration system of the motor of the present invention operates the turntable of the encoder of the motor and cooperates with the oscilloscope to view the waveform outputted by the motor, which is more efficient and has relatively better calibration accuracy.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, so that all equivalent technical changes made by using the contents of the present specification and the accompanying drawings are included in the scope of the present invention.