Motor control method, controller, fitness bicycle and storage medium
By obtaining the vehicle and working parameters of the fitness bike and calculating the motor speed, it solves the problem that existing fitness bikes cannot simulate different riding scenarios, achieves precise control and riding data query, and improves user experience and energy utilization efficiency.
Patent Information
- Application Number
- CN202410625818.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-08-30
AI Technical Summary
Existing exercise bikes cannot effectively simulate various outdoor riding scenarios, such as hill climbing and headwind riding, which limits the user's riding experience.
By obtaining the vehicle parameters and working parameters of the exercise bike, the power and comprehensive resistance exerted by the user on the exercise bike are determined, and the given speed of the motor is calculated based on the total weight, wheel radius and these parameters to achieve precise control of the motor, thereby simulating different Cycling scene.
It realizes the simulation of various riding scenarios by exercise bikes, improves the user experience, avoids energy waste, and provides the riding data query function of exercise bikes.
Smart Images

Figure CN118557944A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fitness equipment, and in particular to a motor control method, a controller, a fitness bicycle and a storage medium. Background Art
[0002] As an efficient and safe indoor fitness equipment, exercise bike (also known as spinning bike) has become a healthy lifestyle choice for more and more people.
[0003] Existing fitness bikes usually simulate wheel rotation by rotating a frisbee, and the resistance of such fitness bikes can only be adjusted by adjusting the magnetic resistance torque. If users want to simulate various outdoor riding scenes, such as climbing riding scenes, riding against the wind, etc., existing fitness bikes cannot achieve this. Summary of the invention
[0004] The present invention provides a motor control method, a controller, a fitness bike and a storage medium, which can achieve precise control of the motor and enable the fitness bike to simulate various riding scenes.
[0005] According to one aspect of the present invention, a method for controlling a motor is provided, which is applied to a fitness bike, wherein the fitness bike is provided with a motor, and the method comprises:
[0006] Obtaining vehicle parameters of the fitness bike and working parameters of the fitness bike in the current control cycle, wherein the vehicle parameters include the total weight of the fitness bike, the wheel radius of the fitness bike, and the torque coefficient of the motor, and the working parameters include the current torque current of the motor, the current speed of the motor, and the comprehensive resistance of the fitness bike;
[0007] determining a first power applied by the user to the fitness bike according to the current torque current, the torque coefficient and the current rotation speed;
[0008] determining a second power applied by the comprehensive resistance to the fitness bike according to the comprehensive resistance, the wheel radius and the current rotation speed;
[0009] The given speed of the motor in the next control cycle is determined according to the total weight, the wheel radius, the first power and the second power, and the motor is controlled to run at the given speed in the next control cycle.
[0010] Optionally, the comprehensive resistance includes at least one of the following: external resistance applied to the fitness bike, constant resistance set by the user, and slope resistance of the fitness bike when simulating slope riding;
[0011] Among them, the slope resistance is determined based on the riding slope and total weight.
[0012] Optionally, determining the first power applied by the user to the fitness bike according to the current torque current, the torque coefficient and the current rotation speed includes:
[0013] Determine the current output torque of the motor according to the current torque current and torque coefficient;
[0014] The first power is determined according to the current output torque and the current rotation speed.
[0015] Optionally, determining the second power applied by the comprehensive resistance on the fitness bike according to the comprehensive resistance, the wheel radius and the current rotation speed includes:
[0016] Determine the current speed of the exercise bike based on the wheel radius and the current rotation speed;
[0017] The second power is determined based on the comprehensive resistance and current speed.
[0018] Optionally, determining a given speed of the motor in a next control cycle according to the total weight, the wheel radius, the first power, and the second power includes:
[0019] determining the energy of the fitness bike in a current control cycle according to the first power and the second power;
[0020] Determine the ideal speed for an exercise bike based on total weight and energy;
[0021] Determine the given rotation speed based on the ideal speed and wheel radius.
[0022] Optionally, obtain the current torque current and current speed, including:
[0023] In the current control cycle, the three-phase current of the motor in the three-phase stationary coordinate system is collected;
[0024] Clarke transform is performed on the three-phase current to obtain the two-phase current of the motor in the two-phase stationary coordinate system;
[0025] Determine the current speed and the position of the motor rotor according to the two-phase current and the given two-phase voltage of the current control cycle;
[0026] Perform Park transformation on the position of the motor rotor and the two-phase current to obtain the current torque current.
[0027] Optionally, the fitness bike is also provided with a three-phase bridge connected to the motor;
[0028] In the next control cycle, the motor is controlled to run at a given speed, including:
[0029] In the next control cycle, a given torque current of the motor is determined according to a given rotation speed and a current rotation speed; a first voltage is determined according to the given torque current and the current torque current;
[0030] Determine a second voltage according to a given excitation current and a current excitation current of the motor, wherein the current excitation current is obtained by performing a Park transformation on the position of the motor rotor and the two-phase current;
[0031] Performing an inverse Park transformation on the position of the motor rotor, the first voltage, and the second voltage to obtain a given two-phase voltage of the motor in the next control cycle;
[0032] The space vector pulse width modulation (SVPWM) module is used to process the given two-phase voltage of the next control cycle to obtain a switching signal, and the switching signal is input into the three-phase bridge to control the three-phase bridge drive motor to run at a given speed.
[0033] According to another aspect of the present invention, there is provided a controller, the controller comprising:
[0034] at least one processor; and a memory in communication with the at least one processor; wherein,
[0035] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the motor control method according to any embodiment of the present invention.
[0036] According to another aspect of the present invention, there is provided a fitness bike, comprising a controller according to any one of the embodiments of the present invention, a motor and a three-phase bridge; wherein the motor is connected to the three-phase bridge.
[0037] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. The computer instructions are used to enable a processor to implement the motor control method of any embodiment of the present invention when executed.
[0038] The technical solution of the embodiment of the present invention obtains the vehicle parameters of the fitness bike and the working parameters of the fitness bike in the current control cycle, and then determines the first power applied by the user to the fitness bike and the second power applied by the comprehensive resistance to the fitness bike, and finally determines the given speed of the motor in the next control cycle according to the total weight, wheel radius, first power and second power, and controls the motor to run at the given speed in the next control cycle. On the one hand, since the working parameters include the comprehensive resistance of the fitness bike, different comprehensive resistances can describe different riding scenes of the fitness bike, so the simulation of various riding scenes by the fitness bike is realized. On the second hand, the motor is controlled according to the control cycle, and the duration of the control cycle can be determined according to the actual demand or the hardware conditions of the controller. When the control cycle is relatively short, the smooth control of the fitness bike can be realized; when the control cycle is relatively long, the demand for computing power of the fitness bike can be reduced. On the third hand, the given speed of the motor in the next control cycle is determined based on the total weight, wheel radius, first power and second power, following the law of conservation of energy, avoiding the waste of energy, thereby realizing the precise control of the motor. In addition, when determining the given speed of the motor in the next control cycle, the solution can obtain various riding data of the fitness bike, which is convenient for users to query.
[0039] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 is a flow chart of a method for controlling a motor provided in Embodiment 1 of the present invention;
[0042] Figure 2 is a flow chart of a motor control method provided in Embodiment 2 of the present invention;
[0043] Figure 3 is a motor control logic diagram provided by the second embodiment of the present invention;
[0044] Figure 4 is a structural schematic diagram of a motor control device provided in Embodiment 3 of the present invention;
[0045] Figure 5is a schematic diagram of the structure of a controller provided by Embodiment 4 of the present invention;
[0046] Figure 6 It is a structural schematic diagram of a fitness bicycle provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0048] It should be noted that the terms "first", "second", "current", "given", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] Embodiment 1
[0050] Figure 1 1 is a flow chart of a motor control method provided by the first embodiment of the present invention. This embodiment is applicable to the case where a user controls a motor of an exercise bike when the user is using the exercise bike. The method can be executed by a controller, which can be implemented in the form of hardware and / or software. The controller can be configured in an exercise bike, and a motor is provided in the exercise bike. Figure 1 As shown, the method includes:
[0051] S110, obtaining vehicle parameters of the fitness bike and operating parameters of the fitness bike in the current control cycle, wherein the vehicle parameters include the total weight of the fitness bike, the wheel radius of the fitness bike and the torque coefficient of the motor, and the operating parameters include the current torque current of the motor, the current speed of the motor and the comprehensive resistance of the fitness bike.
[0052] In the present invention, the fitness bike can be a fitness bike used indoors, or a bike with fitness function used outdoors. The fitness bike at least includes a controller and a motor, the motor has a driving function and a power generation function, and the controller is used to control the motor. Optionally, the fitness bike can also include a display screen for displaying various riding data (such as power consumption, current speed, etc.) of the fitness bike. When the display screen includes a touch function, the user can perform various operations on the fitness bike through the display screen, such as setting a constant resistance, querying riding data, etc.
[0053] The control method of the motor provided by the present invention can be executed when the user starts to use the fitness bike, or it can be executed during use. The controller controls the motor according to the control period, and the duration of the control period can be determined according to actual needs or the hardware conditions of the controller. For example, the duration of the control period is 1ms, 10ms, 50ms, 100ms, 500ms, 1s, 3s, 5s, etc. Exemplarily, assuming that the hardware conditions of the controller are relatively good (such as faster calculation), the control period can be set to be relatively short; assuming that the user has high requirements for the riding experience of the fitness bike, the control period can also be set to be relatively short.
[0054] The current control cycle is the control cycle corresponding to the current execution of the motor control method, and the next control cycle is the next control cycle relative to the current control cycle. Therefore, the current control cycle and the next control cycle are relative concepts in time.
[0055] In one embodiment, the vehicle parameters of the fitness bike include the gross weight of the fitness bike, the wheel radius of the fitness bike and the torque coefficient of the motor. The gross weight includes the weight of the fitness bike itself and the load (including but not limited to the bike counterweight and the user's weight). The torque coefficient of the motor refers to the torque generated under unit current, which is one of the key parameters of motor performance and reflects the torque output capacity of the motor under working conditions. In general, the higher the torque coefficient of the motor is, the greater the torque of the motor output is under the same current, and the higher the work efficiency is.
[0056] The vehicle parameters usually do not change during a user's use. The wheel radius and the torque coefficient of the motor of the fitness bike can be pre-stored in the controller, and the controller can directly read it. The total weight of the fitness bike can be obtained by measuring the weight of the fitness bike and adding the pre-stored weight of the fitness bike.
[0057] In one embodiment, the working parameters of the fitness bike in the current control cycle include the current torque current of the motor, the current speed of the motor, and the comprehensive resistance experienced by the fitness bike.
[0058] The comprehensive resistance of the fitness bike may include at least one of the following: external resistance of the fitness bike, constant resistance set by the user, and slope resistance of the fitness bike when simulating slope riding. The external resistance of the fitness bike includes but is not limited to wind resistance and wheel friction resistance.
[0059] Specifically, when the comprehensive resistance includes external resistance, the controller can measure the size of the external resistance through sensors and other devices; when the comprehensive resistance includes a constant resistance set by the user, the controller can directly read the size of the constant resistance; when the comprehensive resistance includes the slope resistance during simulated slope riding on a fitness bike, the riding slope of the simulated slope riding can be preset / user-set, and by determining the riding slope, the slope resistance can be calculated according to the formula: F3=mgsinθ, where F3 is the slope resistance, m is the total weight, g is the gravity coefficient, and θ is the riding slope.
[0060] Since the comprehensive resistance may include different resistance types and different resistance magnitudes, different comprehensive resistances can describe different riding scenarios of fitness bikes. In particular, when the comprehensive resistance includes slope resistance, the fitness bike can simulate the slope riding scenario, providing users with multiple riding scenario options and improving the user experience.
[0061] The current torque current and current speed of the motor may be directly read by a measuring device or calculated by an algorithm, and this embodiment does not impose any specific restrictions on this.
[0062] S120: Determine a first power applied by the user to the fitness bike according to the current torque current, the torque coefficient, and the current rotation speed.
[0063] According to the law of conservation of energy, energy can neither be created nor disappear out of thin air, it can only be converted from one form to another, or transferred from one object to another, while the total amount of energy remains unchanged. In other words, for a fitness bike, the change in total energy can only be equal to the amount of energy transferred into or out of the fitness bike. Therefore, in the present invention, to achieve control of the motor, it is necessary to consider the work done by the user on the fitness bike and the work done by the comprehensive resistance on the fitness bike.
[0064] The work done by the user on the fitness bike can be determined based on the current torque current, torque coefficient and current speed. For example, the controller can first determine the current output torque of the motor based on the current torque current and torque coefficient; and then determine the first power based on the current output torque and current speed.
[0065] S130: Determine a second power applied by the comprehensive resistance to the fitness bike according to the comprehensive resistance, the wheel radius and the current rotation speed.
[0066] The work done by the comprehensive resistance on the fitness bike can be determined based on the comprehensive resistance, wheel radius and current speed. For example, the controller can first determine the current speed of the fitness bike based on the wheel radius and current speed, and then determine the second power based on the comprehensive resistance and current speed.
[0067] It should be noted that there is no order of execution between steps S120 and S130 in this embodiment, that is, step S120 may be executed first, and then step S130; step S130 may be executed first, and then step S120; or steps S120 and S130 may be executed simultaneously.
[0068] S140, determining a given speed of the motor in a next control cycle according to the total weight, the wheel radius, the first power and the second power, and controlling the motor to run at the given speed in the next control cycle.
[0069] Since step S120 determines the first power applied by the user to the fitness bike, and step S130 determines the second power applied by the comprehensive resistance to the fitness bike, the controller can first determine the energy of the fitness bike in the current control cycle based on the first power and the second power, and then further determine the given speed of the motor in the next control cycle based on the energy, total weight and wheel radius, thereby controlling the motor to run at the given speed in the next control cycle.
[0070] In this way, the given speed of the motor in the next control cycle is determined in accordance with the law of conservation of energy, thus avoiding energy waste and achieving precise control of the motor.
[0071] Embodiment 2
[0072] Figure 2 1 is a flow chart of a motor control method provided by Embodiment 2 of the present invention. Based on the above Embodiment 1, this embodiment provides a specific implementation method for controlling the motor. Figure 2 As shown, the method includes:
[0073] S201. Obtain vehicle parameters of an exercise bike, wherein the vehicle parameters include a total weight of the exercise bike, a wheel radius of the exercise bike, and a torque coefficient of a motor.
[0074] In the present embodiment, the fitness bike includes a controller, a motor and a three-phase bridge, the motor has a driving function and a power generation function, the three-phase bridge (e.g., a three-phase inverter bridge) is connected to the motor, and the controller is used to control the three-phase bridge so that the three-phase bridge drives the motor to work. Optionally, the fitness bike may also include a display screen for displaying various riding data (such as power consumption, current speed, etc.) of the fitness bike. When the display screen includes a touch function, the user can perform various operations on the fitness bike through the display screen, such as setting a constant resistance, setting a riding slope, querying riding data, etc.
[0075] The total weight of an exercise bike includes the weight of the exercise bike itself and the weight of the load (including but not limited to the bike weight and the user's weight). The torque coefficient of a motor refers to the torque generated under unit current. It is one of the key parameters of motor performance and reflects the torque output capacity of the motor under working conditions.
[0076] The vehicle parameters usually do not change during a user's use. The wheel radius and the torque coefficient of the motor of the fitness bike can be pre-stored in the controller, and the controller can directly read it. The total weight of the fitness bike can be obtained by measuring the weight of the fitness bike and adding the pre-stored weight of the fitness bike.
[0077] S202: Obtain operating parameters of the fitness bike in the current control cycle, wherein the operating parameters include the current torque current of the motor, the current speed of the motor, and the comprehensive resistance experienced by the fitness bike.
[0078] The controller controls the motor according to the control cycle, and the length of the control cycle can be determined according to actual needs or the hardware conditions of the controller. For example, the length of the control cycle is 1ms, 10ms, 50ms, 100ms, 500ms, 1s, 3s, 5s, etc. When the hardware conditions of the controller are relatively good (such as faster calculation) or the user has higher requirements for the riding experience of the fitness bike, the control cycle can be set to be relatively short, so that smooth control of the fitness bike can be achieved; conversely, when the control cycle is relatively long, the requirements for the hardware conditions of the controller will be reduced accordingly, thereby saving production costs.
[0079] The current control cycle and the next control cycle are relative concepts in time. For example, assuming that the duration of the control cycle is 1s, the current time is 12:00:00, the user starts riding the fitness bike from the current time, the motor of the fitness bike starts working, and the controller starts to execute the motor control method provided by the present invention. 12:00:00-12:00:01 is the current control cycle, and 12:00:01-12:00:02 is the next control cycle. When the time reaches 12:00:01, 12:00:01-12:00:02 becomes the current control cycle, 12:00:02-12:00:03 is the next control cycle, and so on.
[0080] In one embodiment, the comprehensive resistance of the fitness bike may include at least one of the following: external resistance of the fitness bike, constant resistance set by the user, and slope resistance of the fitness bike when simulating slope riding. The external resistance of the fitness bike includes but is not limited to wind resistance and wheel friction resistance.
[0081] Specifically, when the comprehensive resistance includes external resistance F1, the controller can measure the size of the external resistance through sensors and other devices; when the comprehensive resistance includes the constant resistance F2 set by the user, the controller can directly read the size of the constant resistance; when the comprehensive resistance includes the slope resistance F3 when the fitness bike simulates slope riding, the riding slope of the simulated slope riding can be preset / user-set, and by determining the riding slope, the slope resistance can be calculated according to the formula: F3 = mgsinθ, where m is the total weight, g is the gravity coefficient, and θ is the riding slope. In other words, the comprehensive resistance F = F1 + F2 + F3, when the value of F1 is 0, it means that the comprehensive resistance does not include external resistance, when the value of F2 is 0, it means that the comprehensive resistance does not include constant resistance, and when the value of F3 is 0, it means that the comprehensive resistance does not include slope resistance.
[0082] Since the comprehensive resistance may include different resistance types and different resistance magnitudes, different comprehensive resistances can describe different riding scenarios of fitness bikes. In particular, when the comprehensive resistance includes slope resistance, the fitness bike can simulate the slope riding scenario, providing users with multiple riding scenario options and improving the user experience.
[0083] In one embodiment, Figure 3 This is a motor control logic diagram provided by the second embodiment of the present invention. Figure 3 As shown, the current torque current and current speed of the motor can be obtained by the following four steps:
[0084] Step A1) In the current control cycle, the three-phase current of the motor in the three-phase stationary coordinate system is collected.
[0085] Usually, the third phase can be obtained without any doubt by taking two phases of the three-phase current. Figure 3 The three-phase currents are denoted as ia and ib.
[0086] Step A2) Clarke transform is performed on the three-phase current to obtain the two-phase current of the motor in a two-phase stationary coordinate system.
[0087] Figure 3 The two-phase currents are denoted as iα and iβ.
[0088] Step A3) Determine the current speed and the position of the motor rotor according to the two-phase currents and the given two-phase voltages of the current control cycle.
[0089] The given two-phase voltage of the current control cycle is the given two-phase voltage determined when the motor is controlled to run at the given speed of the previous control cycle in the current control cycle. The given two-phase voltage is the voltage in the two-phase stationary coordinate system. Figure 3 In the equation, the given two-phase voltages are denoted as Uα and Uβ.
[0090] By performing position and speed estimation on the two-phase currents iα and iβ, and the given two-phase voltages Uα and Uβ of the current control cycle, the current speed ω of the motor and the position γ of the motor rotor can be determined.
[0091] Step A4) Perform Park transformation on the position of the motor rotor and the two-phase current to obtain the current torque current.
[0092] Figure 3 The current torque current is recorded as I q . From this, we can get the current torque current I of the motor q and the current speed ω.
[0093] In addition, continue to refer to Figure 3 In step A4), when the motor rotor position and the two-phase current are subjected to Park transformation, the current excitation current of the motor can also be obtained, which is recorded as I d .
[0094] S203: Determine the current output torque of the motor according to the current torque current and the torque coefficient.
[0095] For example, assuming that the torque coefficient is Kt, the current output torque T of the motor is equal to the torque coefficient Kt and the current torque current I q The product of. That is, T = Kt*I q .
[0096] S204: Determine a first power according to a current output torque and a current rotation speed.
[0097] Since the first power reflects the work done by the user on the fitness bike, the first power P1 is equal to the negative of the product of the current output torque T of the motor and the current rotation speed ω, that is, P1 = -T*ω.
[0098] Typically, the unit of the first power is watt (w).
[0099] S205: Determine the current speed of the exercise bike according to the wheel radius and the current rotation speed.
[0100] For example, assuming that the wheel radius is R, the current speed of the exercise bike is
[0101] Usually, the unit of wheel radius is meter (m) and the unit of current speed is meter / second (m / s).
[0102] S206: Determine the second power according to the comprehensive resistance and the current speed.
[0103] Since the second power reflects the work done by the comprehensive resistance on the fitness bike, the second power P2 is equal to the product of the comprehensive resistance F and the current speed v. That is, P2 = F*v.
[0104] Typically, the unit of integrated resistance is Newton (N) and the unit of secondary power is Watt (W).
[0105] It should be noted that in this embodiment, there is no order of execution between steps S203-204 and S205-206. That is, step S203-204 may be executed first, and then step S205-206; step S205-206 may be executed first, and then step S203-204; or steps S203-204 and S205-206 may be executed simultaneously.
[0106] S207: Determine the energy of the fitness bike in the current control cycle according to the first power and the second power.
[0107] According to the law of conservation of energy, the change in the total energy of the fitness bike can only be equal to the amount of energy transferred into or out of the fitness bike. Therefore, in a control cycle of the present invention, the work done by the user on the fitness bike, the work done by the comprehensive resistance on the fitness bike, and the work done by the motor are balanced. Therefore, the energy of the fitness bike in the current control cycle can be determined based on the first power and the second power.
[0108] Specifically, the energy of the fitness bike in the current control period is E=∫(P1+P2)·dt, wherein ∫()·dt represents the integration of the total power exerted on the fitness bike by the outside world in the current control period t.
[0109] S208: Determine the ideal speed of the exercise bike according to the total weight and energy.
[0110] Since the energy of a fitness bike is mainly kinetic energy, the ideal speed of a fitness bike can be calculated by combining the kinetic energy formula.
[0111] Usually, the unit of total weight is kilogram (kg) and the unit of ideal speed v0 is meter / second (m / s).
[0112] S209: Determine a given rotation speed according to the ideal speed and the wheel radius.
[0113] Specifically, given speed
[0114] S210: Control the motor to run at a given speed in the next control cycle.
[0115] Combination Figure 3 As shown, in step S210, "controlling the motor to run at a given speed in the next control cycle" can be obtained by the following four steps:
[0116] Step B1) In the next control cycle, the given torque current of the motor is determined according to the given rotational speed and the current rotational speed; and the first voltage is determined according to the given torque current and the current torque current.
[0117] Specifically, the given speed ωRef and the current speed ω can be multiplied first, and then the linear controller (PI controller) is operated on the result to obtain the given torque current I of the motor. q Ref; further for the given torque current I q Ref and current torque current I q Perform a product operation, and then perform a linear controller (PI controller) operation on the operation result to obtain the first voltage U q .
[0118] Step B2) determining a second voltage according to a given excitation current and a current excitation current of the motor, wherein the current excitation current is obtained by performing a Park transformation on the position of the motor rotor and the two-phase current.
[0119] Specifically, we can first set the given excitation current I of the motor d Ref and current excitation current I d , perform product operation, and then perform linear controller (PI controller) operation on the operation result to obtain the second voltage U d . Usually, given the excitation current I d Ref is set to 0.
[0120] It should be noted that the first voltage U q and the second voltage U d is the voltage in the two-phase rotating coordinate system.
[0121] Step B3) performs an inverse Park transformation on the position of the motor rotor, the first voltage and the second voltage to obtain a given two-phase voltage of the motor in the next control cycle.
[0122] Step B4) Use the Space Vector Pulse Width Modulation (SVPWM) module to process the given two-phase voltage of the next control cycle to obtain a switching signal, and input the switching signal into the three-phase bridge to control the three-phase bridge drive motor to run at a given speed.
[0123] It should be noted that at the initial moment when the user starts riding the fitness bike, the given speed ωRef of the motor is 0. Once riding begins, as long as the sum of the first power applied by the user to the fitness bike and the second power applied by the comprehensive resistance to the fitness bike is not 0, the motor will start working. Of course, if the sum of the first power applied by the user to the fitness bike and the second power applied by the comprehensive resistance to the fitness bike is equal to 0, the work done by the outside on the fitness bike is balanced and the motor does not work. Current torque current I q When the value is negative, it means that the motor is in the generating state; the current torque current I q When the value of is positive, it means the motor is in driving state.
[0124] In this way, the given speed of the motor in the next control cycle is determined in accordance with the law of conservation of energy, thus avoiding energy waste and achieving precise control of the motor. In addition, when determining the given speed of the motor in the next control cycle, this solution can obtain various riding data of the fitness bike, which is convenient for users to query.
[0125] An embodiment of the present invention provides a method for controlling a motor, which is applied to an exercise bike. The exercise bike is provided with a motor, and the method comprises: obtaining vehicle parameters of the exercise bike and working parameters of the exercise bike in a current control cycle, wherein the vehicle parameters include the total weight of the exercise bike, the wheel radius of the exercise bike and the torque coefficient of the motor, and the working parameters include the current torque current of the motor, the current rotation speed of the motor and the comprehensive resistance experienced by the exercise bike; determining a first power applied to the exercise bike by a user according to the current torque current, the torque coefficient and the current rotation speed; determining a second power applied to the exercise bike by the comprehensive resistance according to the comprehensive resistance, the wheel radius and the current rotation speed; determining a given rotation speed of the motor in the next control cycle according to the total weight, the wheel radius, the first power and the second power, and controlling the motor to operate at the given rotation speed in the next control cycle. The technical solution of the embodiment of the present invention obtains the vehicle parameters of the fitness bike and the working parameters of the fitness bike in the current control cycle, and then determines the first power applied by the user to the fitness bike and the second power applied by the comprehensive resistance to the fitness bike, and finally determines the given speed of the motor in the next control cycle according to the total weight, wheel radius, first power and second power, and controls the motor to run at the given speed in the next control cycle. On the one hand, since the working parameters include the comprehensive resistance of the fitness bike, different comprehensive resistances can describe different riding scenes of the fitness bike, so the simulation of various riding scenes by the fitness bike is realized. On the second hand, the motor is controlled according to the control cycle, and the duration of the control cycle can be determined according to the actual demand or the hardware conditions of the controller. When the control cycle is relatively short, the smooth control of the fitness bike can be realized; when the control cycle is relatively long, the demand for computing power of the fitness bike can be reduced. On the third hand, the given speed of the motor in the next control cycle is determined based on the total weight, wheel radius, first power and second power, following the law of conservation of energy, avoiding the waste of energy, thereby realizing the precise control of the motor. In addition, when determining the given speed of the motor in the next control cycle, the solution can obtain various riding data of the fitness bike, which is convenient for users to query.
[0126] Embodiment 3
[0127] Figure 4 Schematic diagram of the structure of a motor control device provided by the third embodiment of the present invention. Figure 4 As shown, the device includes: a parameter acquisition module 401, a power determination module 402, a given speed calculation module 403 and a control module 404.
[0128] The parameter acquisition module 401 is used to acquire vehicle parameters of the fitness bike and working parameters of the fitness bike in the current control cycle, wherein the vehicle parameters include the total weight of the fitness bike, the wheel radius of the fitness bike and the torque coefficient of the motor, and the working parameters include the current torque current of the motor, the current speed of the motor and the comprehensive resistance of the fitness bike;
[0129] The power determination module 402 is used to determine the first power applied by the user to the fitness bike according to the current torque current, the torque coefficient and the current speed; and to determine the second power applied by the comprehensive resistance to the fitness bike according to the comprehensive resistance, the wheel radius and the current speed;
[0130] A given speed calculation module 403, used to determine a given speed of the motor in the next control cycle according to the total weight, the wheel radius, the first power and the second power;
[0131] The control module 404 is used to control the motor to run at a given speed in the next control cycle.
[0132] Optionally, the comprehensive resistance includes at least one of the following: external resistance applied to the fitness bike, constant resistance set by the user, and slope resistance when the fitness bike simulates slope riding; wherein the slope resistance is determined based on the riding slope and the total weight.
[0133] Optionally, the power determination module 402 is specifically used to determine the current output torque of the motor according to the current torque current and the torque coefficient; and determine the first power according to the current output torque and the current rotation speed.
[0134] Optionally, the power determination module 402 is specifically configured to determine the current speed of the fitness bike according to the wheel radius and the current rotation speed; and determine the second power according to the comprehensive resistance and the current speed.
[0135] Optionally, a given speed calculation module 403 is specifically used to determine the energy of the fitness bike in the current control cycle based on the first power and the second power; determine the ideal speed of the fitness bike based on the total weight and energy; and determine the given speed based on the ideal speed and wheel radius.
[0136] Optionally, the parameter acquisition module 401 is specifically used to collect the three-phase current of the motor in a three-phase stationary coordinate system in the current control cycle; perform Clarke transform on the three-phase current to obtain the two-phase current of the motor in a two-phase stationary coordinate system; determine the current speed and the position of the motor rotor according to the two-phase current and the given two-phase voltage of the current control cycle; perform Park transform on the position of the motor rotor and the two-phase current to obtain the current torque current.
[0137] Optionally, the control module 404 is specifically used to determine, in the next control cycle, a given torque current of the motor according to a given speed and a current speed; determine a first voltage according to a given torque current and a current torque current; determine a second voltage according to a given excitation current and a current excitation current of the motor, wherein the current excitation current is obtained by performing a Park transform on the position of the motor rotor and the two-phase current; perform an inverse Park transform on the position of the motor rotor, the first voltage and the second voltage to obtain a given two-phase voltage of the motor in the next control cycle; use a space vector pulse width modulation SVPWM module to process the given two-phase voltage of the next control cycle to obtain a switching signal, and input the switching signal into a three-phase bridge to control the three-phase bridge to drive the motor to run at a given speed.
[0138] The motor control device provided in the embodiment of the present invention can execute the motor control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0139] Embodiment 4
[0140] Figure 5 is a schematic diagram of a controller provided in Embodiment 4 of the present invention. The controller is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0141] like Figure 5 As shown, the controller 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the controller 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0142] A number of components in the controller 10 are connected to the I / O interface 15, including: an input unit 16, such as adjustment buttons of the fitness bike, a touch screen, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the controller 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0143] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a control method for a motor.
[0144] Figure 6 Schematic diagram of the structure of a fitness bike provided by the fourth embodiment of the present invention. Figure 6 As shown, the fitness bike includes the controller 10 described in the above embodiment, as well as the motor 20 and the three-phase bridge 30; wherein the motor 20 is connected to the three-phase bridge 30. The motor 20 has a driving function and a power generation function, and the controller 10 is used to control the three-phase bridge 30 so that the three-phase bridge 30 drives the motor 20 to work.
[0145] In some embodiments, the control method of the motor can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the controller 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the control method of the motor described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the control method of the motor in any other appropriate manner (for example, by means of firmware).
[0146] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0147] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0148] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0149] To provide interaction with a user, the systems and techniques described herein may be implemented on a controller having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the controller. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0150] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0151] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0152] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the behavior operation determination method provided by any embodiment of the present invention.
[0153] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0154] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0155] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for controlling a motor, characterized in that: Applied to a fitness bike, wherein a motor is provided in the fitness bike, the method comprises: Acquire vehicle parameters of the fitness bike and operating parameters of the fitness bike in a current control cycle, wherein the vehicle parameters include the total weight of the fitness bike, the wheel radius of the fitness bike, and the torque coefficient of the motor, and the operating parameters include the current torque current of the motor, the current speed of the motor, and the comprehensive resistance of the fitness bike; determining a first power applied by a user to the fitness bike according to the current torque current, the torque coefficient and the current rotation speed; Determine a second power applied by the comprehensive resistance to the fitness bike according to the comprehensive resistance, the wheel radius and the current rotation speed; The given speed of the motor in the next control cycle is determined according to the total weight, the wheel radius, the first power and the second power, and the motor is controlled to run at the given speed in the next control cycle.
2. The motor control method according to claim 1, characterized in that: The comprehensive resistance includes at least one of the following: external resistance of the fitness bike, constant resistance set by the user, and slope resistance of the fitness bike when simulating slope riding; Wherein, the slope resistance is determined based on the riding slope and the total weight.
3. The motor control method according to claim 1, characterized in that: The determining, according to the current torque current, the torque coefficient and the current rotation speed, a first power applied by the user to the fitness bike comprises: Determining a current output torque of the motor according to the current torque current and the torque coefficient; The first power is determined according to the current output torque and the current rotation speed.
4. The motor control method according to claim 1, characterized in that: Determining the second power applied by the comprehensive resistance to the fitness bike according to the comprehensive resistance, the wheel radius and the current rotation speed comprises: Determining a current speed of the exercise bike according to the wheel radius and the current rotation speed; The second power is determined according to the comprehensive resistance and the current speed.
5. The motor control method according to claim 1, characterized in that: The step of determining the given speed of the motor in the next control cycle according to the total weight, the wheel radius, the first power and the second power includes: determining the energy of the fitness bike in a current control cycle according to the first power and the second power; determining an ideal speed of the exercise bike based on the total weight and the energy; The given rotation speed is determined according to the ideal speed and the wheel radius.
6. The motor control method according to claim 1, characterized in that: The obtaining of the current torque current and the current speed includes: In the current control cycle, the three-phase current of the motor in the three-phase stationary coordinate system is collected; Performing Clarke transformation on the three-phase current to obtain the two-phase current of the motor in a two-phase stationary coordinate system; Determine the current speed and the position of the motor rotor according to the two-phase current and the given two-phase voltage of the current control cycle; The position of the motor rotor and the two-phase current are subjected to Park transformation to obtain the current torque current.
7. The motor control method according to claim 6, characterized in that: The fitness bike is also provided with a three-phase bridge connected to the motor; The step of controlling the motor to run at the given speed in the next control cycle includes: In the next control cycle, the given torque current of the motor is determined according to the given rotational speed and the current rotational speed; the first voltage is determined according to the given torque current and the current torque current; Determine a second voltage according to a given excitation current and a current excitation current of the motor, wherein the current excitation current is obtained by performing a Park transformation on the position of the motor rotor and the two-phase current; Performing an inverse Park transformation on the position of the motor rotor, the first voltage and the second voltage to obtain a given two-phase voltage of the motor in the next control cycle; The given two-phase voltage of the next control cycle is processed by a space vector pulse width modulation (SVPWM) module to obtain a switching signal, and the switching signal is input into the three-phase bridge to control the three-phase bridge to drive the motor to run at the given speed.
8. A controller, characterized in that: The controller comprises: at least one processor; and a memory in communication with the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the control method of the motor according to any one of claims 1 to 7.
9. A fitness bike, characterized in that: It comprises the controller as claimed in claim 8, and a motor and a three-phase bridge; wherein the motor is connected to the three-phase bridge.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the motor control method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Motor output power limitation method and device
WO2026208416A1
