An adaptive method and system for a coreless DC motor
By testing and optimizing the control parameters and phase exchange meter of hollow cup DC motors at various temperatures, the problem of unstable motor performance caused by temperature changes is solved, and the stable operation and efficient control of the motor at different temperatures is achieved.
Patent Information
- Application Number
- CN202410845261.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-06-27
AI Technical Summary
When the temperature changes in the hollow cup DC motor, the accuracy of the Hall sensor output signal changes, causing the microcontroller to match the wrong commutation timing, affecting the performance of the motor, such as unstable speed control or insufficient torque output.
By testing and running the motor at various temperatures, obtaining the control parameters corresponding to each temperature, building a phase commutation table, and adjusting the power-on sequence and PWM duty cycle according to the control parameters, the stable operation of the motor at different temperatures is achieved.
By optimizing the phase commutation meter and control parameters, the motor can maintain stable speed control and torque output under different temperature conditions, improving the performance and reliability of the motor.
Smart Images

Figure CN118739912B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of motors, and in particular to an adaptive method and system for a coreless direct current motor. Background Art
[0002] With the continuous development of motor technology and people's constant pursuit of motor performance and reliability, brushless motors came into being. DC hollow cup motors are a type of brushless motors. Brushless motors are driven by sensor control through microcontrollers. The control algorithm makes electronic commutation and controls the rotor of the motor.
[0003] At present, coreless motors usually use Hall sensors to sense changes in the magnetic field inside the motor and output electrical signals to control the rotation of the motor. The output signal of the Hall sensor is easily affected by the ambient temperature, and the accuracy of the signal changes with the temperature. Under the influence of temperature changes, the error between the actual electrical signal and the ideal electrical signal will cause the microcontroller to match the wrong commutation timing through the preset commutation table and control parameters and perform incorrect PWM (pulse width modulation), which will affect the performance of the motor, such as unstable speed control or insufficient torque output.
[0004] Therefore, it is necessary to provide a coreless DC motor that can be applied to different temperature conditions. Summary of the invention
[0005] The object of the present invention is to provide an adaptive method for a coreless DC motor, based on a microcontroller connected to the motor, wherein the microcontroller stores a commutation table, wherein the commutation table is provided with a power-on sequence, a digital signal and a control parameter, and the method comprises the steps of:
[0006] Test and operate the motor at various temperatures, obtain the control parameters corresponding to each temperature, obtain the corresponding power-on sequence in the commutation table based on the control parameters, and the logic control unit energizes each winding of the motor in turn according to the power-on sequence;
[0007] Each winding of the motor is powered on and started. The motor's rotor drives the permanent magnet to rotate and generate magnetic field changes. The Hall sensor detects the magnetic field changes and continuously outputs electrical signals according to the magnetic field changes.
[0008] The microcontroller continuously reads the digital signal corresponding to the electrical signal through the timer unit;
[0009] The logic control unit retrieves the commutation table according to the digital signal and obtains a control signal;
[0010] The advanced timer unit sets the PWM duty cycle according to the control signal and adjusts the motor speed through the PWM duty cycle;
[0011] According to the control signal, the speed control unit calculates the speed error E;
[0012] An error threshold S is set in the logic control unit. If the relationship: E≥S is satisfied, the logic control unit executes the loop program, continuously generates new control parameters, and continuously compares the speed error E and the error threshold S according to the control parameters until the relationship: E<S is satisfied. Then the logic control unit jumps out of the loop program and retains the control parameters in the current loop.
[0013] Preferably, the commutation table further includes commutation steps, each commutation step having a corresponding power-on sequence;
[0014] Among them, the motor runs according to the power-on sequence and the commutation steps, the temperature sensor obtains the temperature T1 when the motor is running, and the temperature sensor is set with a critical temperature T2. When T1<T2, the motor runs stably; when T1≥T2, the efficiency of the motor operation is reduced.
[0015] More preferably, if the motor operating efficiency decreases, the logic control unit increases the control parameter, and according to the control parameter, the corresponding power-on sequence in the commutation table changes;
[0016] When the motor is running stably, the commutation table obtains and saves the control parameters and power-on sequence corresponding to the current temperature.
[0017] More preferably, if the commutation table records a power-on sequence that matches the digital signal, the logic control unit obtains the first control signal according to the control parameter corresponding to the digital signal;
[0018] If the commutation table does not record a power-on sequence that matches the digital signal, the logic control unit adds a second control parameter, updates the commutation table, and obtains the second control signal according to the newly added control parameter.
[0019] Preferably, when the control signal is the first control signal, the power-on sequence preset in the commutation table is executed, and when the control signal is the second control signal, the second control signal is transmitted to the speed control unit through the advanced timer unit, and the speed control unit obtains the set speed and the actual speed, and calculates the speed error E according to the set speed S1 and the actual speed S2, and satisfies the relationship: E = |S1-S2|;
[0020] Among them, if E<S, the logic control unit retains the second control parameter and saves the current commutation table; if E≥S, the logic control unit deletes the second control parameter and adds a third control parameter. The logic control unit obtains a third control signal according to the third control parameter and transmits it to the advanced timer unit. The advanced timer unit resets the PWM duty cycle through the third control signal and adjusts the actual speed S2 of the motor according to the PWM duty cycle; and determines whether the third control parameter is available based on the actual speed S2 adjusted by the third control signal.
[0021] More preferably, the timer unit includes a universal timer unit, through which the microcontroller obtains the electrical signal of the Hall sensor, and the electrical signal is converted into a digital signal by the analog-to-digital conversion unit and transmitted to the timer unit;
[0022] The control parameters and the set speed are stored in the peripheral memory, wherein the direct memory access unit supports data transmission between the microcontroller and the peripheral device by skipping the processor, the speed control unit obtains the set speed through the direct memory access unit, and the logic control unit obtains the control parameters through the direct memory access unit.
[0023] Preferably, the method further comprises the steps of:
[0024] If the motor stops, the power management unit triggers the power saving mode, the timer unit and the direct memory access unit are powered off, and the logic control unit operates at the first power P1.
[0025] More preferably, if the motor is started, the Hall sensor outputs an electrical signal, and the electrical signal enters the analog-to-digital conversion unit, the analog-to-digital conversion unit converts the electrical signal into an interrupt signal, and transmits it to the logic control unit. According to the interrupt signal, the logic control unit interrupts the power saving mode of the power management unit and clears the interrupt signal. By interrupting the power saving mode, the powered-off components are powered on again.
[0026] After the power-on mode is restored, the logic control unit operates at the second power P2 and satisfies the relationship:
[0027] P1≤P2×0.1.
[0028] More preferably,
[0029] The higher the PWM duty cycle, the higher the proportion of voltage received by the motor and the faster the motor speed;
[0030] The lower the PWM duty cycle, the lower the voltage ratio received by the motor, and the slower the motor speed;
[0031] When the duty cycle is 0%, the motor is powered off, and the speed gradually decreases and eventually stops.
[0032] A system of a coreless DC motor, wherein the system implements the self-adaptive method of the coreless DC motor.
[0033] The present invention has the following beneficial effects:
[0034] The present invention obtains a commutation table including control parameters corresponding to each temperature by testing and operating the motor at various temperatures, and drives the motor to operate at various temperatures according to the various control parameters. By comparing the speed error E and the error threshold S, it is determined whether the control parameters at different temperatures are accurate. The motor executes a cycle program to continuously optimize the commutation table and control parameters, so that the motor can be applied to different temperature conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 This is a structural block diagram of a motor according to an embodiment of the present application;
[0037] Figure 2 A connection block diagram of a motor according to an embodiment of the present application;
[0038] Figure 3 A connection block diagram of a direct memory access unit in a motor according to an embodiment of the present application;
[0039] Figure 4 A connection block diagram of a timer unit in a motor according to an embodiment of the present application;
[0040] Figure 5 A connection block diagram of an analog-to-digital conversion unit in a motor according to an embodiment of the present application;
[0041] Figure 6 A connection block diagram of a power management unit in a motor according to an embodiment of the present application;
[0042] Figure 7 A connection block diagram of a logic control unit in a motor according to an embodiment of the present application;
[0043] Explanation of the accompanying drawings: 500, temperature sensor; 400, motor; 300, peripheral memory; 200, Hall sensor; 100, microcontroller; 10, commutation table; 20, timer unit; 21, advanced timer unit; 22, general timer unit; 30, logic control unit; 40, speed control unit; 50, analog-to-digital conversion unit; 60, direct memory access unit; 70, power management unit. DETAILED DESCRIPTION
[0044] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive.
[0045] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0047] Please refer to Figure 1 - Figure 7 , an adaptive method for a coreless DC motor 400, based on a microcontroller 100 connected to the motor 400, characterized in that the method comprises the steps of:
[0048] S01 tests and operates the motor 400 at various temperatures, obtains the control parameters corresponding to each temperature, obtains the corresponding power-on sequence in the commutation table 10 according to the control parameters, and the logic control unit 30 sequentially energizes each winding of the motor according to the power-on sequence.
[0049] More specifically, the commutation table 10 is also provided with a commutation step, and each commutation step has a corresponding power-on sequence. The motor operates according to the power-on sequence and the commutation step, and the temperature sensor 500 obtains the temperature T1 when the motor 400 is running, and the temperature sensor 500 is provided with a critical temperature T2. When T1<T2, the motor 400 operates stably; when T1≥T2, the efficiency of the motor 400 is reduced. If the operating efficiency of the motor 400 is reduced, the logic control unit 30 increases the control parameter, and according to the control parameter, the corresponding power-on sequence in the commutation table 10 is changed. When the motor 400 is running stably, the commutation table 10 obtains and saves the control parameter and power-on sequence corresponding to the current temperature.
[0050] According to step S01, this specific implementation provides a specific example to show the commutation table and corresponding control parameters under different temperature conditions:
[0051] In this example, the motor 400 is provided with six power-on sequences, which are marked as A, B, C, D, E, and F, respectively, and the critical temperature T2 of the temperature controller is set to 70°C. In this example, a speed control unit 40 is used, and the control parameters include proportional P, integral I, and differential D. In this example, three temperatures T1 are provided, which are 25°C, 50°C, and 75°C, respectively. The entries in the commutation table include commutation steps and power-on sequences. The commutation steps refer to the order in which the current switches between different coils of the motor 400 during the control process of the motor 400. The commutation steps are to supply power to different windings of the motor 400 at different time points, thereby generating a rotating magnetic field to drive the rotor of the motor 400 to rotate continuously. The power-on sequence refers to which specific motor 400 windings are energized in each commutation step, as well as the direction of the current. The power-on sequence determines the direction and size of the generated magnetic field.
[0052] First, define the commutation table 10. The commutation steps of the commutation table 10 are six items, namely Step 1, Step 2, Step 3, Step 4, Step 5 and Step 6. Among them, Step 1 corresponds to the power-on sequence A, Step 2 corresponds to the power-on sequence B, Step 3 corresponds to the power-on sequence C, Step 4 corresponds to the power-on sequence D, Step 5 corresponds to the power-on sequence E, and Step 6 corresponds to the power-on sequence F. This is the power-on sequence corresponding to each commutation step of the motor 400 by default.
[0053] Then the motor 400 is operated at three temperature conditions of 25°C, 50°C and 75°C respectively, and the commutation table 10 and control parameters corresponding to each temperature condition are obtained:
[0054] When T1=25°C, T1<T2, the power-on sequence corresponding to each commutation step is the same as that in commutation table 10, and the control parameters are: proportional P=1.0, integral I=0.1, differential D=0.01.
[0055] When T1=50°C, T1<T2, the power-on sequence corresponding to each commutation step is the same as that in commutation table 10, and the control parameters are: proportional P=1.0, integral I=0.1, differential D=0.01.
[0056] When T1 = 75 °C, the relationship is satisfied: TI ≥ T2. At this time, the power-on sequence corresponding to each commutation step in the commutation table is: Step 1 corresponds to power-on sequence A, Step 2 corresponds to power-on sequence C, Step 3 corresponds to power-on sequence E, Step 4 corresponds to power-on sequence B, Step 5 corresponds to power-on sequence D, and Step 6 corresponds to power-on sequence F. The control parameters are increased to: proportional P = 1.5, integral I = 0.2, differential D = 0.03.
[0057] When the operating temperature T1 ≥ T2 of the motor 10, as the operating temperature T1 increases, the control parameters P, I, and D will increase. This is because the performance of the motor 400 will change in a high temperature environment, and the control parameters need to be adjusted to maintain a stable control effect. At 75°C, the power-on sequence of the commutation table is adjusted. This is to adapt to the operating characteristics of the motor 400 in a high temperature environment and optimize the operating efficiency and stability of the motor 400.
[0058] S02 The windings of the motor 400 are powered on and started, the rotor of the motor 400 drives the permanent magnet to rotate and generates a magnetic field change, the Hall sensor 200 detects the magnetic field change, and continuously outputs an electrical signal according to the magnetic field change;
[0059] Among them, the permanent magnet usually has two poles, the north pole and the south pole. When the permanent magnet rotates, the two poles will move relative to the fixed position of the Hall sensor 200. Since the magnetic field of the permanent magnet is directional, the rotation will cause the Hall sensor 200 to be in different magnetic field positions, thereby causing changes in the strength and direction of the magnetic field. If the permanent magnet continues to rotate, the Hall sensor 200 will periodically detect changes in the magnetic field. The frequency of this change is directly related to the rotation speed of the permanent magnet. When the magnetic field passes through the Hall sensor 200, the direction of current flow inside the sensor is perpendicular to the direction of the magnetic field. Under the action of the magnetic field, a Hall voltage is formed in the sensor. The Hall sensor 200 converts the detected Hall voltage into a corresponding electrical signal, the amplitude and frequency of which are proportional to the strength and rate of change of the magnetic field. This electrical signal is usually output in the form of voltage or current, and then transmitted to the microcontroller 100 for processing.
[0060] S03 the microcontroller 100 continuously reads the electrical signal output by the Hall sensor 200 through the timer unit 20;
[0061] The timer unit 20 includes a general timer unit 22. According to the input capture function of the general timer unit 22, the microcontroller 100 obtains the electrical signal of the Hall sensor 200, and the electrical signal is converted into a digital signal through the analog-to-digital conversion unit 50 and transmitted to the timer unit 20. More specifically, the electrical signal enters the timer unit 20 through the GPIO pin of the microcontroller 100. The prescaler and the automatic reload register of the timer are configured to set the time base of the counter. The capture register of the timer is configured to select which input pin is used for capture and select the capture condition. When the edge of the input signal arrives, the count value of the current timer is copied to the capture register. An interrupt is triggered or a flag is set to notify the microcontroller 100 of the occurrence of the capture event. The analog-to-digital conversion unit 50 is also called ADC. In the ADC, the reference voltage and resolution of the ADC are configured. The ADC input channel connected to the output of the Hall sensor 200 is selected. According to the characteristics of the input signal, the sampling time is set to ensure sufficient accuracy. The conversion is started by software or the timer is configured to automatically trigger the conversion. The ADC collects the voltage signal of the input pin. The sampled voltage is kept stable by the sample-and-hold circuit. The analog voltage is quantized into discrete digital values, and the quantized voltage value is encoded into a digital signal. Finally, the conversion result is read from the data register into the memory of the microcontroller 100.
[0062] More specifically, according to step S03, this specific implementation provides a specific example. The following is the running code and code notes in the example:
[0063] / / Timer capture configuration function
[0064] void Timer_Capture_Init(){
[0065] / / Assume that timer TIM2 is used and the system clock is 80MHz
[0066] RCC->APB1ENR|=RCC_APB1ENR_TIM2EN; / / Enable TIM2 clock
[0067] TIM2->PSC=79; / / Set the prescaler to 79 (80MHz / (79+1)=1MHz, i.e. 1 microsecond unit)
[0068] TIM2->ARR=0xFFFF; / / Automatically reload register, maximum value
[0069] / / Configure capture mode
[0070] TIM2->CCMR1|=TIM_CCMR1_CC1S_0; / / Input capture select CC1 channel
[0071] TIM2->CCER|=TIM_CCER_CC1E; / / Enable capture 1
[0072] TIM2->CCER&=~TIM_CCER_CC1P; / / Capture rising edge
[0073] TIM2->DIER|=TIM_DIER_CC1IE; / / Capture 1 interrupt enable
[0074] / / Start the timer
[0075] TIM2->CR1|=TIM_CR1_CEN; / / Enable timer
[0076] }
[0077] / / ADC initialization function
[0078] voidADC_Init()
[0079] / / Assume that ADC1 is used
[0080] RCC->APB2ENR|=RCC_APB2ENR_ADC1EN; / / Enable ADC1 clock ADC1->CR1=0; / / Clear CR1 register
[0081] ADC1->CR2 = ADC_CR2_ADON; / / Enable ADC and set continuous conversion mode / / Set ADC resolution to 12 bits
[0082] ADC1->CR1|=ADC_CR1_RES_12BIT;
[0083] / / Configure the sampling time to be 15 cycles
[0084] ADC1->SMPR2=ADC_SMPR2_SMP1_15CYCLES;
[0085] / / Select channel 1
[0086] ADC1->SQR3=ADC_SQR3_SQ1_0;
[0087] / / Enable ADC ADC1->CR2 |= ADC_CR2_ADON;
[0088] / / ADC read function
[0089] uint16_tADC_Read(){
[0090] / / Start ADC conversion
[0091] ADC1->CR2|=ADC_CR2_SWSTART;
[0092] / / Wait for the conversion to complete
[0093] while(!(ADC1->SR&ADC_SR_EOC));
[0094] / / Read the conversion result
[0095] returnADC1->DR;
[0096] }
[0097] S04 the logic control unit 30 retrieves the commutation table 10 according to the electrical signal and obtains the control signal;
[0098] Among them, the control parameters are stored in the peripheral memory 300, and the logic control unit 30 obtains the control parameters through the direct memory access unit 60DMA. The peripheral memory 300 usually has a larger storage capacity and can save more control parameters and configuration data. The internal memory capacity of the microcontroller 100 is limited and may not be enough to store all required control parameters. The peripheral memory 300 has a non-volatile feature and can maintain data even in the case of power failure. The control parameters need to be saved after the motor 400 system is powered off, so that they can be used directly at the next startup without reconfiguration.
[0099] The direct memory access unit 60 is also called a DMA unit. The DMA unit can read the control parameters directly from the peripheral memory 300 and transfer them to the memory area used by the logic control unit 30 without occupying CPU resources. This improves the efficiency of data transmission and reduces the load on the CPU. Using the DMA unit for data transmission can ensure that the control parameters are quickly obtained when needed to meet the needs of real-time control. Especially in high-performance motor 400 control applications, fast response is crucial. Data transmission through DMA allows the CPU to focus on other tasks, such as processing complex control algorithms and real-time decision-making, thereby improving the performance and response speed of the entire system.
[0100] The control parameters usually include PID (proportional, integral and differential) parameters, commutation timing, PWM duty cycle, etc., which directly affect the performance and stability of the motor 400. The logic control unit 30 generates a control signal based on these parameters to ensure that the motor 400 operates according to the expected performance. According to different working conditions (such as load changes, temperature changes), the control parameters can be dynamically adjusted. The logic control unit 30 uses these dynamically adjusted control parameters to generate appropriate control signals to adapt to different working environments and optimize the performance of the motor 400. In a closed-loop control system, the logic control unit 30 needs to continuously adjust the control signal to minimize the error and ensure that the motor 400 runs according to the set trajectory or speed. The control parameters are the key to achieving this process. They determine the generation method and adjustment strategy of the control signal.
[0101] More specifically, according to step S04, this specific implementation provides a specific example. The following is the running code and code remarks of the adaptive control function in the example:
[0102] #include<stdint.h>
[0103] / / Assume that the control parameters are stored at a certain address in the peripheral memory 300
[0104] #defineCONTROL_PARAM_ADDRESS0x0800F000
[0105] / / Control parameter structure
[0106] typedefstruct{
[0107] uint16_t commutationTable;
[0108] floatpwmDutyCycle;
[0109] floatpidParams[3]; / / P,I,D
[0110] }ControlParams;
[0111] / / DMA configuration function
[0112] void DMA_Config(){
[0113] / / Configure DMA registers
[0114] / / Assume that DMA1 channel 1 is used
[0115] RCC->AHBENR|=RCC_AHBENR_DMA1EN; / / Enable DMA1 clock
[0116] DMA1_Channel1->CPAR=CONTROL_PARAM_ADDRESS; / / peripheral address
[0117] DMA1_Channel1->CMAR=(uint32_t)&controlParams; / / Memory address to be stored DMA1_Channel1->CNDTR=sizeof(ControlParams) / sizeof(uint32_t); / / Data size DMA1_Channel1->CCR=DMA_CCR_MINC|DMA_CCR_TCIE|DMA_CCR_EN; / / Configure DMA
[0118] }
[0119] / / Logic control unit 30
[0120] voidLogicControlUnit(ControlParams*params){
[0121] / / Generate control signal according to control parameters
[0122] uint16_tcommutationTable=params->commutationTable;
[0123] floatpwmDutyCycle=params->pwmDutyCycle;
[0124] floatp=params->pidParams[0];
[0125] floati=params->pidParams[1];
[0126] floated=params->pidParams[2];
[0127] / / Example: Set PWM duty cycle
[0128] SetPWM(pwmDutyCycle);
[0129] / / Example: Use PID parameters to adjust the speed
[0130] PID_Controller(p,i,d);
[0131] }
[0132] intmain(){
[0133] / / Initialize the system
[0134] SystemInit();
[0135] / / Configure DMA
[0136] DMA_Config();
[0137] / / Wait for DMA transfer to complete
[0138] while(!(DMA1->ISR&DMA_ISR_TCIF1));
[0139] / / Logic control unit 30 processing
[0140] LogicControlUnit(&controlParams);
[0141] while(1) / / Main loop
[0142] }
[0143] S05: the advanced timer unit 21 sets the PWM duty cycle according to the control signal, and adjusts the speed of the motor 400 by the PWM duty cycle;
[0144] The higher the PWM duty cycle, the higher the voltage ratio received by the motor 400, and the faster the speed of the motor 400; the lower the PWM duty cycle, the lower the voltage ratio received by the motor 400, and the slower the speed of the motor 400; when the duty cycle is 0%, the motor 400 is powered off, and the speed gradually decreases and eventually stops. According to the power-on sequence of the commutation table, the logic control unit 30 cyclically powers each coil of the motor 400 in turn.
[0145] S06 According to the control signal, the speed control unit 40 determines whether to calculate the speed error; wherein the set speed is stored in the peripheral memory 300, and the speed control unit 40 obtains the set speed through the direct memory access unit 60. When the control signal is the second control signal, the logic control unit 30 executes the adaptive control function, in which the second control signal is transmitted to the speed control unit 40 through the advanced timer unit 21, and the speed control unit 40 obtains the set speed and the actual speed, and calculates the speed error E according to the set speed S1 and the actual speed S2, specifically: E = |S1-S2|. It is determined whether the third control parameter is available according to the actual speed S2 adjusted by the third control signal.
[0146] S07 An error threshold S is set in the logic control unit 30, and the speed error E is analyzed according to the error threshold S to determine whether to reconfigure the speed of the motor 400; wherein, if the speed error E<error threshold S, the second control parameter is retained and the commutation table is updated; when the speed error E≥error threshold S, the logic control unit 30 deletes the second control parameter and adds a third control parameter, the logic control unit 30 obtains the third control signal according to the third control parameter, and transmits it to the advanced timer unit 21, the advanced timer unit 21 resets the PWM duty cycle through the third control signal, and readjusts the actual speed S2 of the motor 400 according to the PWM duty cycle. Determine whether the third control parameter is available according to the actual speed S2 adjusted by the third control signal, if E≥S, the logic control unit 30 executes the adaptive control function cyclically until the expression is satisfied; if E<S, the logic control unit 30 jumps out of the loop and retains the control parameters in the current loop.
[0147] According to steps S05, S06 and S07, this specific implementation provides a specific example:
[0148] First, set the following initial parameters: set speed = 1500RPM, actual speed = 1400RPM, initial PWM duty cycle = 50, error threshold S = 50RPM.
[0149] Calculate the speed error E:
[0150] Speed error E = |S1-S2| = |1500-1400| = 100RPM
[0151] Because E(100RPM)≥S(50RPM), the motor needs to be reconfigured to 400 RPM.
[0152] According to the error threshold, it is determined that: E(100RPM)≥S(50RPM), so the control parameters need to be adjusted, a third control signal is generated, and the PWM duty cycle is adjusted: the PWM duty cycle adjusted by the speed control unit 40 is 55%. The advanced timer unit 21 sets the PWM duty cycle to 55% according to the third control signal, and the voltage received by the motor 400 is 12V*55%=6.6V.
[0153] If the adjusted actual speed S2 is 1460RPM, recalculate the speed error E=|S1-S2|=|1500-1460|=50RPM. Since E(40RPM)<S(50RPM), the third control parameter is valid, update the commutation table and retain the current control parameter. If the adjusted actual speed S2 is 1430RPM, recalculate the speed error E=|S1-S2|=|1500-1430|=70RPM. Since E(70RPM)≥S(50RPM), the third control parameter is invalid, the logic control system deletes the third control parameter and adds a new control parameter, and iterates the process of determining whether the control parameter is valid until the expression is satisfied: speed error E<S.
[0154] S08 If the motor 400 stops, the power management unit 70 triggers the power saving mode, the timer unit 20 and the direct memory access unit 60 are powered off, and the logic control unit 30 operates at the first power.
[0155] Among them, when the motor 400 stops, continuing to maintain the operation of all system units will result in unnecessary power consumption. Through the power-off timer unit 20 and the direct memory access unit 60 (DMA), energy consumption can be significantly reduced. In a battery-powered system, reducing unnecessary power consumption directly extends the battery life. The triggering of the power saving mode is one of the key measures for energy saving. By reducing the number and power of the running units, the heat generation of the system can be reduced. This is particularly important when the ambient temperature is high or the ventilation conditions are poor. When designing the system, through the effective management of the power saving mode, the strict requirements for heat dissipation and power supply design can be reduced, thereby simplifying the overall design and improving system reliability.
[0156] The timer unit 20 is used to manage the commutation timing and PWM signal generation when the motor 400 is running. When the motor 400 stops, these functions are no longer needed, so the power is turned off to save energy. The DMA unit is usually used for efficient data transmission and reduces the CPU load. When the motor 400 is stopped, the data transmission demand is reduced, and powering off can avoid unnecessary energy consumption. The logic control unit 30 continues to monitor the Hall sensor 200 or other start signals in low power mode.
[0157] S09 When the motor 400 starts, the Hall sensor 200 outputs an electrical signal, and the electrical signal enters the analog-to-digital conversion unit 50. The analog-to-digital conversion unit 50 converts the electrical signal into an interrupt signal and transmits it to the logic control unit 30. According to the interrupt signal, the logic control unit 30 executes the interrupt control function, interrupts the power saving mode of the power management unit 70, and clears the interrupt signal. By interrupting the power saving mode, the power-off components are powered on again. The logic control unit 30 operates at the second power P2, and the first power P1 is less than the second power P2, specifically: the first power P1 ≤ the second power P2×0.1.
[0158] Specifically, according to step S09, an instance is simulated and the following parameters are set:
[0159] In power saving mode, the power consumption of the timer unit 20 is 0W; the power consumption of the DMA unit is 0W; the power consumption of the logic control unit 30 is 0.1W; and the total power consumption is 0.1W. After exiting the power saving mode, the power consumption of the timer unit 20 is 0.5W; the power consumption of the DMA unit is 0.3W; the power consumption of the logic control unit 30 is 1W; and the total power consumption is 1.8W.
[0160] The motor 400 starts to rotate, the rotor drives the permanent magnet to rotate and generates a change in the magnetic field. The Hall sensor 200 detects the change in the magnetic field and outputs an electrical signal, which enters the ADC. The electrical signal output by the Hall sensor 200 is 2.5V, and the ADC converts the 2.5V electrical signal into a digital signal 512. 512 is transmitted to the logic unit as an interrupt signal, and the logic control unit 30 receives the interrupt signal and executes the interrupt control function. The timer unit 20 is powered on again, with a power consumption of 0.5W; the DMA unit is powered on again, with a power consumption of 0.3W; the logic control unit 30 switches from the first power mode (0.1W) to the second power mode (1W).
[0161] Thus, the present invention obtains a commutation table 10 including control parameters corresponding to each temperature by testing and operating the motor 400 at various temperatures, and drives the motor 400 to operate at various temperatures according to the various control parameters. By comparing the speed error E and the error threshold S, it is determined whether the control parameters at different temperatures are accurate. The commutation table 10 and the control parameters are continuously optimized by the motor 400 executing a loop program, so that the motor 400 can be applied to different temperature conditions.
[0162] This specific embodiment also provides a system of a coreless DC motor 400, and the system is used to implement the self-adaptation method of the coreless DC motor 400.
[0163] The system comprises:
[0164] Logic control module: used to interrupt the power management unit 70 and implement the adaptive function.
[0165] Power management module: used to provide power to each unit of the motor 400, and has a power saving mode, which is activated when the motor 400 stops.
[0166] Timer module: used to capture the electrical signal of the Hall sensor 200 and to set the PWM duty cycle to adjust the rotation speed of the motor 400 .
[0167] Analog-to-digital conversion module: used to convert electrical signals into digital signals so that each module can operate normally.
[0168] Judgment module: used to judge whether it is necessary to calculate the rotation speed error E and whether the third control parameter is available.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0170] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An adaptive method for a coreless DC motor, based on a microcontroller connected to the motor, wherein the microcontroller stores a commutation table, characterized in that: The commutation table is provided with a power-on sequence, a digital signal and a control parameter, and the method comprises the steps of: Test and operate the motor at various temperatures, obtain the control parameters corresponding to each temperature, obtain the corresponding power-on sequence in the commutation table based on the control parameters, and the logic control unit energizes each winding of the motor in turn according to the power-on sequence; Each winding of the motor is powered on and started. The motor's rotor drives the permanent magnet to rotate and generate magnetic field changes. The Hall sensor detects the magnetic field changes and continuously outputs electrical signals according to the magnetic field changes. The microcontroller continuously reads the digital signal corresponding to the electrical signal through the timer unit; The logic control unit retrieves the commutation table according to the digital signal and obtains a control signal; The advanced timer unit sets the PWM duty cycle according to the control signal and adjusts the motor speed through the PWM duty cycle; According to the control signal, the speed control unit calculates the speed error E; An error threshold S is set in the logic control unit. If the relationship: E≥S is satisfied, the logic control unit executes the loop program, continuously generates new control parameters, and continuously compares the speed error E and the error threshold S according to the control parameters until the relationship: E<S is satisfied. Then the logic control unit jumps out of the loop program and retains the control parameters in the current loop. The commutation table also has commutation steps, and each commutation step has a corresponding power-on sequence; The motor runs according to the power-on sequence and the commutation steps. The temperature sensor obtains the temperature T1 when the motor is running, and the temperature sensor is set with a critical temperature T2. When T1<T2, the motor runs stably; when T1≥T2, the efficiency of the motor operation decreases. If the motor operating efficiency decreases, the logic control unit increases the control parameter, and according to the control parameter, the corresponding power-on sequence in the commutation table changes; When the motor is running stably, the commutation table obtains and saves the control parameters and power-on sequence corresponding to the current temperature.
2. The self-adaptive method of a coreless DC motor according to claim 1, characterized in that: If the commutation table records a power-on sequence that matches the digital signal, the logic control unit obtains a first control signal according to a control parameter corresponding to the digital signal; If the commutation table does not record a power-on sequence that matches the digital signal, the logic control unit adds a second control parameter, updates the commutation table, and obtains the second control signal according to the newly added control parameter.
3. The self-adaptive method of a coreless DC motor according to claim 2, characterized in that: When the control signal is the first control signal, the power-on sequence preset in the commutation table is executed. When the control signal is the second control signal, the second control signal is transmitted to the speed control unit through the advanced timer unit. The speed control unit obtains the set speed and the actual speed, and calculates the speed error E according to the set speed S1 and the actual speed S2, and satisfies the relationship: E = |S1-S2|; Among them, if E<S, the logic control unit retains the second control parameter and saves the current commutation table; if E≥S, the logic control unit deletes the second control parameter and adds a third control parameter. The logic control unit obtains a third control signal according to the third control parameter and transmits it to the advanced timer unit. The advanced timer unit resets the PWM duty cycle through the third control signal and adjusts the actual speed S2 of the motor according to the PWM duty cycle; and determines whether the third control parameter is available based on the actual speed S2 adjusted by the third control signal.
4. The self-adaptive method of a coreless DC motor according to claim 1, characterized in that: The timer unit includes a universal timer unit, through which the microcontroller obtains the electrical signal of the Hall sensor, and the electrical signal is converted into a digital signal through the analog-to-digital conversion unit and transmitted to the timer unit; The control parameters and the set speed are stored in the peripheral memory, wherein the direct memory access unit supports data transmission between the microcontroller and the peripheral device by skipping the processor, the speed control unit obtains the set speed through the direct memory access unit, and the logic control unit obtains the control parameters through the direct memory access unit.
5. The self-adaptive method of a coreless DC motor according to claim 1, characterized in that: The method further comprises the steps of: If the motor stops, the power management unit triggers the power saving mode, the timer unit and the direct memory access unit are powered off, and the logic control unit operates at the first power P1.
6. The self-adaptation method of a coreless DC motor according to claim 5, characterized in that: If the motor starts, the Hall sensor outputs an electrical signal, and the electrical signal enters the analog-to-digital conversion unit, which converts the electrical signal into an interrupt signal and transmits it to the logic control unit. According to the interrupt signal, the logic control unit interrupts the power saving mode of the power management unit and clears the interrupt signal. By interrupting the power saving mode, the power-off components are powered on again. After the power-on mode is restored, the logic control unit operates at the second power P2 and satisfies the relationship: P1≤P2×0.
1.
7. The self-adaptive method of a coreless DC motor according to claim 1, characterized in that: The higher the PWM duty cycle, the higher the proportion of voltage received by the motor and the faster the motor speed; The lower the PWM duty cycle, the lower the voltage ratio received by the motor, and the slower the motor speed; When the duty cycle is 0%, the motor is powered off, and the speed gradually decreases and eventually stops.
8. A system of a coreless DC motor, the system implementing the self-adaptation method of a coreless DC motor as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Position sensor-free double closed-loop speed regulation control method for brushless DC motor
CN103248294A
Method and system for controlling brushless direct current motor of electric vehicle
CN103490681A