Method for applying motor to mechanical gear shifting switch

文档序号:1892892 发布日期:2021-11-26 浏览:10次 中文

阅读说明:本技术 电机应用于机械换挡开关的方法 (Method for applying motor to mechanical gear shifting switch ) 是由 张洋 张虎 于 2021-08-27 设计创作,主要内容包括:本申请公开了一种电机应用于机械换挡开关的方法。所述方法的一实施方式包括:预先定义零电角度的位置为一档;控制直轴电流取值为预设电流值,交轴电流取值为零,产生电磁场,采用FOC驱动转子转动到最近的一个零电角度的位置;检测转子的当前转动角度;根据当前转动角度、每档对应的角度值,计算转子转动的档数。该实施方式因定义零电角度的位置为一档,且一直控制直轴、交轴电流的取值,采用FOC驱动转子,造成零电角度的位置为转子在不受外力作用下最稳定的位置,用户扭动转子从一档位转动至相邻一档,所需的扭动力从大变小到变零,用户可明显的感知自己转动了几档。而用户所感知的转动挡位数与计算得到的档数相同。实现了用电机完美模拟机械开关。(The application discloses a method for applying a motor to a mechanical gear shift switch. One embodiment of the method comprises: predefining a position of a zero electrical angle as a first gear; controlling the direct-axis current to be a preset current value and the quadrature-axis current to be zero, generating an electromagnetic field, and driving the rotor to rotate to a nearest position with a zero electrical angle by adopting FOC; detecting the current rotation angle of the rotor; and calculating the gear number of the rotor rotation according to the current rotation angle and the angle value corresponding to each gear. This embodiment is because of the position of definition zero electricity angle is one grade, and controls the value of direct axis, quadrature axis electric current always, adopts FOC drive rotor, and the position that causes zero electricity angle is the most stable position of rotor under not receiving the exogenic action, and the user twists the rotor and rotates to adjacent one grade from one grade, and required twisting power is from big or small to becoming zero, and what the user can be obvious perception oneself has rotated several grades. The number of the rotating gears perceived by the user is the same as the calculated gear number. The perfect simulation of the mechanical switch by the motor is realized.)

1. A method of applying an electric machine to a mechanical shift switch, the method comprising:

predefining the position of a zero electrical angle as a first gear, and the pole number of a rotor as M, wherein the corresponding angle value of each gear is 360/M, and the value of the zero electrical angle is equal to zero;

controlling the direct axis current to be a preset current value and the quadrature axis current to be zero, generating an electromagnetic field, and controlling the FOC to drive the rotor to rotate to a nearest position with a zero electrical angle by adopting magnetic steering;

detecting a current rotation angle of the rotor;

and calculating the gear number of the rotor rotation according to the current rotation angle and the angle value corresponding to each gear.

2. The method of claim 1, further comprising:

and adjusting the strength of the electromagnetic field by adjusting the preset current value, and further adjusting the torque force required by twisting the rotor.

3. The method of claim 2, wherein calculating the number of steps of the rotor rotation according to the current rotation angle and the angle value corresponding to each step comprises:

the rotation angle corresponding to the mth gear is M × 360/M, and the rotation angles corresponding to the M gears form a list [0 × 360/M, 1 × 360/M, 2 × 360/M … (M-1) × 360/M ];

and sequentially comparing the current rotation angle with the elements in the list, wherein if the current rotation angle is equal to the elements in the list, the index corresponding to the element is the number of the rotating steps of the rotor.

4. The method of claim 2, wherein calculating the number of steps of the rotor rotation according to the current rotation angle and the angle value corresponding to each step comprises:

detecting the current rotation angle of the rotor after a preset interval time;

and if the current rotating angle after the preset interval time is equal to the current rotating angle of the rotor detected last time, dividing the current rotating angle after the preset interval time by the corresponding angle value 360/M of each gear to obtain the gear of the rotor rotation.

5. The method according to any one of claims 1 to 4, wherein controlling the direct axis current to take a preset current value and the quadrature axis current to take a zero value comprises:

adopting PID to control the value of the direct axis current to be a preset current value;

and adopting PID to control the quadrature axis current to be zero.

6. The method of claim 1, further comprising:

and transmitting the gear number of the rotation of the rotor to other devices through a wireless communication module built in the motor.

7. The method of claim 1, further comprising:

and transmitting the gear number of the rotor rotation to other devices through a Bluetooth mesh module built in the motor.

8. The method of claim 7, further comprising:

the rotor is an outer rotor.

9. The method of claim 8, further comprising:

the middle of the rotor is provided with a cross-shaped hole.

10. The method of claim 9, further comprising:

the motor is used for a hub of the toy vehicle.

11. The method of claim 10, further comprising:

the motor calculates the gear number of the rotor in a gear shifting mode, and if the gear number is not equal to zero, a gear shifting command is generated;

and the motor exits the gear shifting mode and executes the gear shifting command.

Technical Field

The application relates to the field of motors, in particular to a method for applying a motor to a mechanical gear shifting switch.

Background

Mechanical gear shifting switches are common in life, and users can obviously feel the existence of resistance in the process of twisting or shifting the switches. For example, a shift lever of a manual shift automobile, a user shifts the lever to several gears, and the automobile runs at several gears. As another example, an old fan twists a mechanical shift switch in a circular fashion.

Mechanical shift switches are nowadays increasingly being replaced by electronic shift switches. For example, an electronic shift switch with buttons combined with a display screen is selected. Or a pure touch screen type gear shift switch, and a user only needs to slide and click on the touch display screen to select a required gear.

The motor mainly functions to generate driving torque as a power source of electric appliances or various machines. Simulating a mechanical switch with a motor is not described in reality.

Disclosure of Invention

The present application is directed to an inventive simulation of a mechanical shift switch with a motor.

The application discloses a method for applying a motor to a mechanical gear shift switch, which comprises the following steps: predefining the position of a zero electrical angle as a first gear, and the pole number of a rotor as M, wherein the corresponding angle value of each gear is 360/M, and the value of the zero electrical angle is equal to zero; controlling the direct axis current to be a preset current value and the quadrature axis current to be zero, generating an electromagnetic field, and controlling the FOC to drive the rotor to rotate to a nearest position with a zero electrical angle by adopting magnetic steering; detecting a current rotation angle of the rotor; and calculating the gear number of the rotor rotation according to the current rotation angle and the angle value corresponding to each gear.

In some embodiments, the method further comprises: and adjusting the strength of the electromagnetic field by adjusting the preset current value, and further adjusting the torque force required by twisting the rotor.

In some embodiments, the calculating the number of steps of the rotor rotation according to the current rotation angle and the angle value corresponding to each step includes: the rotation angle corresponding to the mth gear is M × 360/M, and the rotation angles corresponding to the M gears form a list [0 × 360/M, 1 × 360/M, 2 × 360/M … (M-1) × 360/M ]; and sequentially comparing the current rotation angle with the elements in the list, wherein if the current rotation angle is equal to the elements in the list, the index corresponding to the element is the number of the rotating steps of the rotor.

In some embodiments, the calculating the number of steps of the rotor rotation according to the current rotation angle and the angle value corresponding to each step includes: detecting the current rotation angle of the rotor after a preset interval time; and if the current rotating angle after the preset interval time is equal to the current rotating angle of the rotor detected last time, dividing the current rotating angle after the preset interval time by the corresponding angle value 360/M of each gear to obtain the gear of the rotor rotation.

In some embodiments, the controlling the direct-axis current to be a preset current value and the quadrature-axis current to be zero includes: adopting PID to control the value of the direct axis current to be a preset current value; and adopting PID to control the quadrature axis current to be zero.

In some embodiments, the method further comprises: and transmitting the gear number of the rotation of the rotor to other devices through a wireless communication module built in the motor.

In some embodiments, the method further comprises: and transmitting the gear number of the rotor rotation to other devices through a Bluetooth mesh module built in the motor.

In some embodiments, the method further comprises: the rotor is an outer rotor.

In some embodiments, the method further comprises: the middle of the rotor is provided with a cross-shaped hole.

In some embodiments, the method further comprises: the motor is used for a hub of the toy vehicle.

In some embodiments, the method further comprises: the motor calculates the gear number of the rotor in a gear shifting mode, and if the gear number is not equal to zero, a gear shifting command is generated; and the motor exits the gear shifting mode and executes the gear shifting command.

The application provides a method that motor was applied to mechanical gear shift switch, because the position of predefining zero electrical angle is a shelves in advance, and combine to control straight axis electric current value always and be the default current value, the quadrature axis electric current value is zero, adopt magnetic steering control FOC drive rotor, the position that causes zero electrical angle is the most stable position under not receiving the exogenic action for the rotor, also cause the user to twist the rotor and rotate to adjacent gear from a gear, required power of twisting is from big-minded to becoming zero, several shelves have been rotated to user's perception oneself that can be obvious. The number of the rotating gears sensed by the user is the same as the number of the rotating gears of the rotor calculated according to the current rotating angle and the angle value corresponding to each gear. The perfect simulation of the mechanical switch by the motor is realized.

Drawings

Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:

FIG. 1 is a block diagram of a magnetic steering control FOC in an embodiment of the present application;

FIG. 2 is a flow chart of a method for using an electric machine with a mechanical shift switch in an embodiment of the present application;

FIG. 3 is a schematic diagram of a zero electrical angle in an embodiment of the present application;

fig. 4 is a schematic structural diagram of an outer rotor in an embodiment of the present application.

Detailed Description

The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

The motor in this application technical scheme refers to three-phase motor, and this motor includes but not limited to: brushless DC motor, permanent magnet synchronous motor. The motor mainly comprises a stator and a rotor. The rotor has a magnet thereon. The number of rotor poles refers to the number of magnetic poles on the rotor. The magnetic poles are divided into N poles and S poles, and 1N pole and 1S pole are generally called a pair of magnetic poles, that is, the number of poles is 1. The stator has windings of multiples of 3. Energization of the stator produces an electromagnet. The electromagnet of the stator and the magnet on the rotor have the characteristics of repelling with the same polarity and attracting with the opposite polarity.

Referring to FIG. 1, a block diagram of a magnetic steering control FOC in one embodiment of the present application is shown. In FIG. 1, IA、IB、ICRespectively representing the current of the A phase, the B phase and the C phase in the three-phase winding in the motor stator, and the electromagnet can be produced after the winding in the motor stator is electrified. The magnet on the motor rotor can rotate or keep unchanged under the influence of the electromagnetic field formed by the electromagnet. Usually, to accurately control the angle, speed, direction, etc. of rotation of the rotor, the pair I is requiredA、IB、ICAnd (5) performing adjustment control. I can be obtained by sampling the resistanceA、IB、ICThe value of (c). Firstly, I isA、IB、ICClark transformation is carried out. Wherein the Clark transformation is a coordinate system transformation. I.e. from the three-phase ABC coordinate system of the stator to the stationary coordinate system α β. I isA、IB、ICAfter Clark conversion, the current component of the alpha axis is iαThe current component of the beta axis is iβ

Then, for iα、iβAnd carrying out Park transformation. Here, the Park transformation is also coordinate system transformation, i.e., conversion from the coordinate system α β to the coordinate system q d. The coordinate system q d is a coordinate system established on the rotor, and the coordinate system rotates synchronously with the rotor and rotates along with the rotor, taking the magnetic field direction of the rotor as d axis and the direction perpendicular to the magnetic field direction of the rotor as q axis. i.e. iα、iβObtaining a current component i to a d axis after Park conversiondQ-axis current component iq

For accurately controlling the speed and the angle of the rotation of the rotor, i is respectively pairedq、idAnd performing PI control. Wherein, Iq_Ref、Id_RefThe desired q-axis quadrature-axis current and d-axis direct-axis current are provided. i.e. iqOutputting q-axis voltage V through PI controlq,idD-axis voltage V is output through PI controld. To Vq、VdCarrying out Park inverse transformation to obtain the voltage V of an alpha axis under the coordinate system alpha betaαVoltage V of beta axisβ. Since the coordinate system q d is established on the rotor, it is necessary to know the position of the rotor when performing the Park inverse transformation, and a position sensor is often used to detect the angle of rotation of the rotor and obtain the rotor position. Wherein the position sensor includes but is not limited to: magnetic encoding sensor, hall sensor, photoelectric encoder.

Then, for Vα、VβCarrying out Space Vector Pulse Width Modulation (SVPWM) control to obtain a high-level voltage value V of an A-axis PWM signal under a three-phase ABC coordinate systemAHigh level voltage value V of B-axis PWM signalBHigh level voltage value V of C-axis PWM signalC. Where SVPWM is actually an inverse Clark transform. The SVPWM uses two adjacent vectors of 6 non-zero vectors to control the direction of the synthesized vector, and uses the zero vector to adjust the amplitude of the synthesized vector. That is, 6 non-zero vectors and 2 zero vectors are used as the base to form a vector formula, and a vector pointing to any direction is generated. Thus, SVPWM decouples these finite 6 directions, creating infinite successive directions to fill the 360 vector, thereby controlling the direction of the electromagnetic field in the stator.

Finally, according to the vector formula, the conduction and the cut-off of six inverter tubes in the three-phase inverter bridge are controlled, the direct current is inverted into three-phase alternating current, and the current I is output to the stator of the motorA、IB、IC. The three-phase inverter bridge mainly comprises six inverter tubes.

With continued reference to fig. 2, a flow chart of a method of using an electric machine for a mechanical shift switch in an embodiment of the present application is shown.

Step 201, predefining a position of a zero electrical angle as a first gear, a pole number of a rotor as M, and an angle value corresponding to each gear as 360/M.

Referring to fig. 3, the figure is a schematic diagram of a zero electrical angle in an embodiment of the present application. In the present embodiment, the positive direction of the d-axis in the coordinate system q d is the direction in which the rotor magnetic pole S points to N, and the q-axis is electrically perpendicular to the d-axis. Where the d-axis is often referred to as the direct axis and the q-axis is often referred to as the quadrature axis. As in fig. 3, when the rotor flux linkage coincides with the a axis in the three-phase ABC coordinate system, the value of the electrical angle is equal to zero. We define this position as first gear. For the sake of illustration, fig. 3 shows a rotor with only one pair of magnetic poles, and in fact, the rotor has multiple pairs of NS magnetic poles, and the flux linkage of each pair of NS magnetic poles on the rotor is coincident with the a axis of the three-phase ABC coordinate system when the rotor rotates once, so that there are many pairs of NS magnetic poles on the rotor and there are many gears. The number of rotor poles NS is also called the number of rotor poles. The number of poles of the rotor is the total number of steps. Wherein, the number of poles of the rotor includes but is not limited to: 6. 7, 8, 9, etc. Assuming that the total number of gears of the rotor is M and the rotation of the rotor is 360 degrees, the corresponding angle value of each gear is 360/M.

And 202, controlling the direct axis current to be a preset current value and the quadrature axis current to be zero, generating an electromagnetic field, and controlling the FOC to drive the rotor to rotate to a nearest position with a zero electrical angle by adopting magnetic steering.

When the motor is started, the initial position of the rotor is uncertain, and the rotor is controlled to rotate to a nearest zero electrical angle through the FOC magnetic guide of FIG. 1 for accurate control. The direct axis current is controlled to be a preset current value, the quadrature axis current is controlled to be zero, an electromagnet is generated, and the magnetic steering is adopted to control the FOC to drive the rotor to rotate to a nearest position with a zero electrical angle. The formula of the direct-axis current and quadrature-axis current values is derived as follows:

IA、IB、ICthe method is characterized in that the method is implemented by obtaining the currents of an A phase, a B phase and a C phase under a three-phase ABC coordinate system through a sampling resistor in real time according to the kirchhoff current law:

IA+IB+IC=0

as in fig. 3, when the rotor flux linkage coincides with the a axis:

IA=IDC

wherein, IDCAnd (4) representing the value of the given direct-axis current, namely controlling the direct-axis current to be a preset current value of the preset current value.

The Clark transformation, which is the transformation between the three-phase ABC coordinate system and the stationary coordinate system alpha beta, satisfies the following transformation formula:

iα=IA

wherein iαCurrent component of alpha axis, iβIs the current component of the beta axis.

Will IA=IDCSubstituting the above transformation formula:

iα=IA=IDC

due to Park transformation, the following transformation formula needs to be satisfied:

id=iα*cosθ+iβ*sinθ

iq=-iα*sinθ+iβ*cosθ

where θ represents an electrical angle. Since the current electrical angle θ is zero, θ is made 0, iα=IA=IDC,iβSubstituting 0 into the Park transformation formula to obtain:

id=IDC

iq=0

it can be known from the above formula that only a certain current needs to be given to the direct-axis current, the quadrature-axis current is assigned to be zero, the stator generates an electromagnetic field under the action of the current, and the magnet on the rotor automatically rotates under the action of the electromagnetic field and the like-polarity repulsion and opposite-polarity attraction of the magnetic poles until the magnet rotates to the zero-electrical-angle position.

Under the condition that the value of the direct-axis current is unchanged and the quadrature-axis current is kept to be zero, the electromagnetic field generated by the stator is unchanged, and the rotor can be stabilized at the zero electrical angle. At this time, no matter the user twists the rotor clockwise or anticlockwise, the user is hindered by the magnetic force generated by the electromagnetic field, and the user feels like twisting a mechanical gear shift switch.

The larger the value of the direct-axis current is, the stronger the electromagnetic field generated by the stator is, and the larger the twisting force required by a user for twisting the rotor is, so that the strength of the electromagnetic field can be adjusted by adjusting the size of the preset current value, and the size of the twisting force required for twisting the rotor can be adjusted.

In this embodiment, the motor is an outer rotor motor, and the number of poles of the rotor on the outer rotor motor is greater than the number of poles of the rotor on the inner rotor motor under the condition that the size of the motor is the same, so that the outer rotor motor has more total steps. In other alternative implementations of this embodiment, the motor is an inner rotor motor.

Referring to fig. 4, the figure is a schematic structural diagram of an outer rotor in an embodiment of the present application. As shown in fig. 4, the number of poles of the outer rotor is 7, N1 denotes the N pole of the first magnet, S1 denotes the S pole of the first magnet, similarly, N2, N3, N4, N5, N6, and N7 denote the N poles of the second, third, fourth, fifth, sixth, and seven magnets, respectively, and S2, S3, S4, S5, S6, and S7 denote the S poles of the second, third, fourth, fifth, sixth, and seven magnets, respectively.

In the present embodiment, it is assumed that in step 202 the rotor is rotated to the position in fig. 4, i.e. to the nearest zero electrical angle. In fig. 4, arrows indicated at 41 indicate the a-axes of the three-phase ABC coordinate system. Under the condition that the value of the direct-axis current input to the stator is unchanged and the quadrature-axis current is kept to be zero, the direction of the magnetic field formed by the stator is stable and unchanged, and the rotor automatically rotates to the position shown in fig. 4, namely, the rotor is kept unchanged. At the moment, a user rotates and twists the rotor with force, and the rotor rotates under the combined action of the twisting force of the user and the electromagnetic field magnetic force of the stator. Assuming that the user twists the rotor clockwise, in the process that the seventh magnetic pole of the twisted rotor rotates clockwise to the a axis indicated by 41, namely the original first magnetic pole position, because of the electromagnetic field, the resistance felt by the user is larger at first, then the resistance is smaller and smaller, and finally the resistance approaches zero. If the user continues to twist the rotor clockwise. To twist the sixth pole to the a axis indicated at 41, a large twisting force is required at the beginning and a small twisting force is required slowly as in the above process.

It should be particularly noted in this application that, in steps 202 and 203, the direct-axis current is always controlled to be a preset current value, the quadrature-axis current is always controlled to be zero, and meanwhile, the magnetic steering is always used to control the FOC motor, so that the position of the zero electrical angle is a stable position without the action of user torque. Also as an example, fig. 4. In fig. 4, the flux linkage of the first magnetic pole coincides with the a-axis indicated at 41, where the electrical angle is zero. Assuming the user twists the rotating rotor, the distance from zero electrical angle of one pole to zero electrical angle of the adjacent other pole is 1. If a user twists the rotor clockwise, assuming that the seventh magnetic pole in fig. 4 is twisted to the position of the first magnetic pole in fig. 4, i.e. the distance from the zero electrical angle of the first magnetic pole to the zero electrical angle of the seventh magnetic pole is set to 1, if the user only twists one third of the distance and releases his hand, the rotor will rotate counterclockwise to the zero electrical angle of the first magnetic pole under the action of the electromagnetic field of the stator, i.e. reversely rotate back to the original position. If the user twists the rotor and releases the hand at the distance of two thirds, the rotor will automatically continue to rotate clockwise to the zero electrical angle of the seventh magnetic pole under the action of the electromagnetic field of the stator. If the user twists the rotor loose their hand at the five-quarter position, the rotor will turn one-quarter back to the zero angle. If the user twists the rotor loose their hand in one-half position, the rotor will randomly rotate clockwise or counter-clockwise, turning to zero degrees. In general, due to the existence of the stator electromagnetic field, the rotor can rotate to the nearest zero electrical angle without external force. Therefore, the zero electrical angle of each magnetic pole of the rotor is defined as one gear, and the number of poles of the rotor is the total number of gears.

Step 203, detecting the current rotation angle of the rotor.

In this embodiment, a magnetic encoder is used to measure the angle of rotation of the rotor. In step 202, the direct-axis current is controlled to be a preset current value, the quadrature-axis current is controlled to be zero, an electromagnet is generated, the magnetic steering is adopted to control the FOC to drive the rotor to rotate to a position of a nearest zero electrical angle, and the magnetic encoding is initialized to be zero. And then the magnetic encoder is always in a working state regardless of whether a user twists the rotor to rotate or not, and is used for detecting the current rotation angle of the rotor.

And step 204, calculating the gear number of the rotor rotation according to the current rotation angle and the angle value corresponding to each gear.

In this embodiment, the number of poles of the rotor is M, and M magnets on the rotor are uniformly distributed, so that M positions with zero electrical angle are also uniformly distributed on the rotor, and further, the gears of the mechanical switch simulated by the motor are also uniformly distributed. The rotor rotates 360 degrees in one circle, and the rotor needs to rotate 360/M degrees from a certain gear to a gear adjacent to the certain gear, namely, the corresponding angle value of each gear is 360/M. The rotation angle corresponding to the mth gear is M × 360/M, and the rotation angles corresponding to the M gears form a list [0 × 360/M, 1 × 360/M, 2 × 360/M … (M-1) × 360/M ]. Here, the starting value of gear m is set to 0, and the position of the nearest zero electrical angle to which the rotor is rotated in step 202 is defined as gear 0. The position of the 0 gear is random, not fixed and invariable each time the technical scheme is executed. The magnetic encoder detects the current rotation angle of the rotor in real time or at intervals, compares the current rotation angle with the elements in the list in sequence, and if the current rotation angle is equal to the elements in the list, the index corresponding to the elements is the number of the rotating gears of the rotor. And if the current rotation angle is not equal to the elements in the list, ignoring the comparison result. The magnetic encoder does not always read the angle of the rotor that has been rotated at the position where the rotor has rotated to zero electrical angle by a hundred percent each time, and the magnetic encoder itself has errors, and the like, thereby allowing errors to exist in the comparison process. For example, if an error of 5 degrees is allowed, the rotation angle corresponding to the mth gear is [ (M-1) × 360/M-5, (M-1) × 360/M +5 ].

In this embodiment, since the magnetic encoder is a current rotation angle of the rotor that is continuously detected in real time or at intervals, the comparison between the current rotation angle and the elements in the list is also continuously performed. Therefore, when the target rotation gear of the user is 5, in the process that the user twists the rotor to rotate to 5 gears, the scheme calculates the number of the gears rotated by the rotor to be 0, 1, 2, 3, 4 and 5 in sequence. If the gear number is transmitted to a device with a screen for display, a user can more intuitively observe which gear is currently rotated in real time. Of course, in the process of shifting by twisting the rotor, the user feels the process of resistance from large to small to zero every time the user rotates one gear, so the user can default the number of the rotating gears according to the change of the twisting force of the hand.

In other alternative implementations of this embodiment, only the number of steps that the user finally rotates may be output, and which number of steps the user passes during the rotation of the rotor is not output, and the user is allowed to pause for a short time during the twisting of the rotor. Specifically, the method comprises the following steps: detecting the current rotation angle of the rotor after a preset interval time by a magnetic encoder; and if the current rotation angle after the preset interval time is equal to the current rotation angle of the rotor detected last time, dividing the current rotation angle after the preset interval time by 360/M to obtain the gear of the rotor rotation, wherein 360/M represents the corresponding rotation angle of each gear. If the current rotation angle is exactly a multiple of 360/M, the multiple is the calculated number of rotor steps. For various reasons in engineering, the current rotation angle measured by the magnetic encoder has errors. The optimization scheme is to allow for the presence of partial errors. For example, the current rotation angle is allowed to be divided by 360/M, the value after the decimal point of the obtained value is in the interval of [0.9,1) or [0,0.1], and then the integral obtained by rounding is used as the step number obtained by calculation, namely, the error of 360/M × 0.1 ═ 36/M degrees is allowed to exist in the current rotation angle measured by the magnetic encoder. Namely, if the current rotation angle measured by the magnetic encoder is within the range of [ (M-1) × 360/M-36/M, (M-1) × 360/M +36/M ], the number of the calculated steps is M.

The predetermined interval time is a minimum dwell time that allows the user to twist the rotor. Once the current rotation angle values of the rotor detected in the preset interval time before and after twice are equal, the rotor is kept still in the preset interval time by default, and the user is defaulted to rotate to the target gear number. For example, if the preset interval time is 3 seconds, the user rotates from 0 th gear to 1 st gear, stops for a little 2 seconds, and then continues to rotate to 4 th gear, the number of the rotor rotation steps calculated by the above scheme is 4. In other embodiments, the preset interval includes, but is not limited to: 4 seconds, 5 seconds, 6 seconds.

The steps 202 and 203 are executed in real time or continuously, so that the operation of the user can be detected all the time, for example, it can be detected that the user rotates to 3 gears first, and then the current rotation angle detected by the magnetic encoder is reduced because the user rotates to one gear, and the technical scheme can calculate that the user rotates to 2 gears.

To sum up, because the position of predefining the zero electrical angle is a shelves, and combine to control straight axis electric current value always and be the default current value, the quadrature axis electric current value is zero, adopts magnetic steering control FOC drive rotor, and the position that causes the zero electrical angle is the most stable position of rotor under not receiving the exogenic action, also causes the user to twist the rotor and rotates to adjacent gear from a certain gear, and required power of twisting becomes zero from big-mindedly, and several shelves have been rotated to user's perception oneself that can be obvious. The number of the rotating gears sensed by the user is the same as the number of the rotating gears of the rotor calculated according to the current rotating angle and the angle value corresponding to each gear. The perfect simulation of the mechanical switch by the motor is realized.

In the present application, there is a process of generating magnetism electrically, and there is also a process of generating electricity magnetically. When a user twists a rotor to rotate, a stator winding which is a part of a closed circuit performs magnetic induction line motion for cutting a rotor magnet to generate induction current, so that three-phase current of the motor is influenced, the value of direct-axis current cannot be stabilized to a preset current value, and the value of quadrature-axis current cannot be stabilized to zero. In order to better regulate and control the values of the direct-axis current and the quadrature-axis current, the values of the direct-axis current and the quadrature-axis current are respectively controlled by adopting a proportional-integral-derivative (PID). In fig. 1, only PI (proportional-integral) control is used for adjusting the quadrature axis current and the direct axis current, and both proportional adjustment and integral adjustment are adjusted after errors occur to eliminate the errors, and are post adjustment, so that the adjustment is not bad for the steady state and is certainly bad for the dynamic state, because for the disturbance caused by load change, the adjustment must be performed slowly after the errors occur. Since the differential regulation is a precautionary control, i.e., when the current value tends to become larger or smaller, a control signal for preventing the change is output immediately to prevent overshoot or overshoot. In this embodiment, values of the direct-axis current and the quadrature-axis current are controlled by PID, and the PID control parameter of the direct-axis current and the PID control parameter of the quadrature-axis current specifically adjust the parameter values according to the actual pole number effect, where the PID control parameters include but are not limited to: proportional gain, integral time, integral gain, derivative time, derivative gain, etc.

In this embodiment, after the motor calculates the number of steps of the rotor rotation, the number of steps needs to be transmitted to the relevant device for execution. The motor may transmit in a wired or wireless manner. For example, the gear number is transmitted to other devices through a wireless communication module built in the motor. The wireless communication module includes but is not limited to: WIFI wireless communication module, 4G wireless communication module, 5G wireless communication module, bluetooth wireless communication module.

In other optional implementation manners of the embodiment, the motor is internally provided with a bluetooth mesh module. The motor is an outer rotor motor and is used for a hub of a toy car, and a cross-shaped hole is formed in the middle of the rotor and is used for being connected with an axle in an inserting mode. The hub motor is configured to be used for a left front wheel hub and a right front wheel hub of a toy car. The left rear wheel hub and the right rear wheel hub of the toy car are ordinary mechanical hubs. The left motor and the right motor for the wheel hub form a Bluetooth mesh network. After the left motor and the right motor are started, the left motor and the right motor are in a gear shifting mode by default, any motor can calculate the gear number of the rotor in real time, if the gear number is not zero, a gear shifting instruction is generated, and the gear shifting instruction is sent to the other motor for the wheel hub through the Bluetooth mesh network. Then, both motors exit the gear shifting mode and execute the program corresponding to the gear shifting command.

The motor for the mechanical gear shifting switch can be applied to various scenes, different operations are triggered, and different functions are achieved. For example, to control the speed of the fan, to control the LED light flashing pattern, to control the brightness of the lights, to control the speed of the toy vehicle, etc.

The above embodiment defaults to one rotation of the rotor, but the technical solution of the present application supports more than one rotation of the rotor, and the corresponding total number of stages is not limited to the number of poles of the rotor. For example, the number of poles of the rotor is M, and the total number of stages is M if only one rotation of the rotor is supported by default. If the rotor is supported to rotate n times, the total gear number is n multiplied by M.

The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于扩展电势观测器的永磁同步电机控制方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!