Motor current sampling method and system
By adjusting the motor current sampling frequency in real time and combining it with an SDFM sampling chip and a digital filter, the sampling delay is optimized, solving the problems of high precision, high accuracy, and low delay in elevator motor current sampling, thus improving the smoothness of elevator operation and ride comfort.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-03-10
AI Technical Summary
Existing motor current sampling methods cannot simultaneously achieve high precision, high accuracy, and low latency. Especially in elevator applications, there is a contradiction between sampling accuracy and data output delay, and the sampling time overlaps with the switching time of the drive circuit, resulting in switching noise interference.
By monitoring the motor current value in real time, adjusting the sampling frequency and performing compensated sampling, and using the SDFM sampling chip combined with a digital filter, combined with the PWM synchronization signal and digital filter combination settings, the sampling frequency and delay compensation are optimized to avoid sampling at the moment of switching transistor operation.
This technology improves the accuracy and precision of motor current sampling, reduces delay interference, and enhances the smoothness of elevator operation and passenger comfort while ensuring elevator comfort.
Smart Images

Figure CN121643549A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of elevator technology, and in particular to a method and system for sampling motor current. Background Technology
[0002] With the development of electronic technology, elevator technology has also advanced rapidly. As elevators become more widely used, people's demands for smooth operation, comfortable starting and stopping, and efficient operation are constantly increasing. Motor current sampling, as a core component of elevator vector control, directly determines the amplitude of torque fluctuations, thus affecting car vibration, noise, and passenger comfort. Therefore, the UVW three-phase current sampling of the elevator motor is particularly important.
[0003] Existing motor current sampling primarily employs a combination of Hall effect sensors and an ADC (Analog-to-Digital Converter). This method converts the high-current signal on the motor phase lines into a 0-3.3V voltage signal using Hall effect devices. The converted voltage signal is then converted into a digital signal by the ADC for a digital signal processor to calculate and control the three-phase output (UVW). This approach has several drawbacks. First, the Hall effect devices and their associated signal conditioning circuitry increase the system's hardware cost and circuit board area. Second, the ADC's sampling accuracy and anti-interference capabilities are limited, leading to significant fluctuations in the sampled values, especially during low-current operation where the signal-to-noise ratio is poor. This reduces the control accuracy of the current loop, resulting in perceptible vibrations during elevator startup and leveling, thus decreasing ride comfort.
[0004] Delta-Sigma (Δ-Σ) modulation technology, especially the current sampling method implemented through a synchronous SDFM (Sigma-Delta Filter Module, Σ-Δ filter module), has been applied in high-performance servo drive systems due to its high resolution and strong anti-interference capability. Delta-Sigma modulation technology, through oversampling and digital filtering, can achieve a higher signal-to-noise ratio and accuracy than traditional ADCs. However, the SDFM current sampling method has not yet been applied in the elevator field, for the following reasons: First, there is a contradiction between the sampling accuracy and data output delay of the SDFM module; high order and high oversampling rate will bring significant signal lag, affecting the real-time performance of the current loop. Second, the elevator load and operating state change repeatedly, resulting in frequent changes in the motor operating current; a fixed configuration of SDFM parameters cannot simultaneously achieve high accuracy and low delay throughout the entire range. Third, if the sampling time overlaps with the switching time of the Insulated Gate Bipolar Transistor (IGBT) in the drive circuit, it will introduce severe switching noise, interfering with the sampling accuracy.
[0005] Therefore, existing motor current sampling methods cannot simultaneously achieve high precision, high accuracy, and low latency, and no effective solution has yet been proposed. Summary of the Invention
[0006] Therefore, it is necessary to provide a method and system for sampling motor current to address the aforementioned technical problems.
[0007] Firstly, this application provides a method for sampling motor current. The method includes:
[0008] The current value of the motor is monitored in real time, and when the current value of the motor is lower than a preset current threshold, the sampling frequency of the motor current is adjusted to obtain the adjusted sampling frequency; the preset current threshold is the minimum value of motor current to maintain elevator comfort.
[0009] During the process of sampling the motor current using the adjusted sampling frequency, the sampling delay of the motor current is measured, and the motor current is compensated based on the sampling delay to obtain the sampled value of the motor current after compensation sampling.
[0010] In one embodiment, sampling the motor current includes:
[0011] Using an SDFM sampling chip and a digital filter, two phase currents of the motor's three-phase current are sampled to obtain the sampling results of the motor's two-phase currents.
[0012] Based on the sampling results of the two-phase current of the motor, the sampled value of the motor current is determined.
[0013] In one embodiment, adjusting the sampling frequency of the motor current when the operating current value of the motor is lower than a preset current threshold to obtain an adjusted sampling frequency includes:
[0014] Determine whether the current value of the motor is lower than the preset current threshold.
[0015] When the current value of the motor is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip, thus obtaining the adjusted sampling frequency.
[0016] In one embodiment, when the current value of the motor is lower than the preset current threshold, adjusting the sampling frequency of the motor current by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip to obtain the adjusted sampling frequency includes:
[0017] When the current value of the motor is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip until the sampled value of the motor current is greater than or equal to the preset threshold of the adjusted sampling window, thus obtaining the adjusted sampling frequency; the adjusted sampling window is the sampling window of the motor current corresponding to the adjusted sampling frequency.
[0018] In one embodiment, during the process of sampling the motor current using the adjusted sampling frequency, measuring the sampling delay of the motor current, and performing compensated sampling on the motor current based on the sampling delay to obtain a compensated sampling value of the motor current, includes:
[0019] During the process of sampling the motor current using the adjusted sampling frequency, a PWM synchronization signal is used as the reference trigger signal for sampling the motor current. The first delay of sampling the motor current is measured, and based on the first delay, the motor current is sampled with first compensation to obtain the sampled value of the motor current after the first compensation sampling. The first delay is the delay from the reference trigger signal to the time when the sampling data is ready.
[0020] In one embodiment, the method further includes:
[0021] Within each PWM cycle, it is determined whether the difference between the PWM cycle register value and the duty cycle instruction is less than a preset offset time; the preset offset time is the minimum time to avoid the operation of the switching transistor.
[0022] When the difference between the PWM period register value and the current duty cycle instruction is less than the preset offset time, the sum of the preset offset time and the first delay is taken as the second delay, and the motor current is sampled for second compensation based on the second delay to obtain the sampled value of the motor current after the second compensation sampling.
[0023] Secondly, this application also provides a motor current sampling system. The system includes: a current sampling module and a main control module;
[0024] The current sampling module is used to implement the motor current sampling method described in the first aspect above;
[0025] The main control module is used to control the current sampling module to sample the motor current.
[0026] In one embodiment, the current sampling module includes an SDFM sampling chip and a digital filter;
[0027] The SDFM sampling chip samples based on the frequency of the sampling clock signal sent by the main control module;
[0028] The oversampling rate of the digital filter is 64; the order of the digital filter is 3.
[0029] Thirdly, this application also provides a motor control method for an elevator. The method includes: acquiring a sampled value of the motor current using the motor current sampling method described in the first aspect above;
[0030] In the current loop, the preset current command is compared with the sampled value of the acquired motor current to obtain the comparison result;
[0031] Using the PID controller of the current loop, the PWM duty cycle instruction required for the next carrier cycle is determined based on the comparison result, and the PWM duty cycle instruction is written into the comparison register of the PWM generator;
[0032] The PWM generator outputs a drive signal based on the PWM duty cycle instruction written in the comparator register, thereby driving the motor to run.
[0033] Fourthly, this application also provides an elevator. The elevator includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the motor current sampling method described in the first aspect and the elevator motor control method described in the third aspect.
[0034] The aforementioned motor current sampling method and system monitors the motor's operating current value in real time. When the motor's operating current value is lower than a preset current threshold (the minimum motor current required to maintain elevator comfort), the sampling frequency of the motor current is adjusted to obtain the adjusted sampling frequency. This adjustment is based on dynamic current, ensuring the elevator current value meets comfort requirements. During the sampling process using the adjusted sampling frequency, high-precision sampling leads to sampling delay. Therefore, by measuring the sampling delay and compensating for it, the motor current is sampled to obtain a compensated sampling value. This optimizes sampling accuracy under low current conditions, fundamentally suppressing current feedback noise that causes elevator shaking and jerking. While ensuring comfort, it first addresses the issues of high precision and accuracy, and then further resolves the high delay problem caused by high precision through delay compensation. This solves the problem that existing motor current sampling methods cannot simultaneously achieve high precision, high accuracy, and low delay.
[0035] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0036] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0037] Figure 1 A hardware structure block diagram of a terminal for a motor current sampling method provided in an embodiment of this application;
[0038] Figure 2 A flowchart illustrating a method for sampling motor current according to an embodiment of this application;
[0039] Figure 3 A flowchart illustrating a preferred embodiment of the motor current sampling method provided in this application;
[0040] Figure 4 This is a structural block diagram of a motor current sampling system provided in one embodiment of this application;
[0041] Figure 5 This is a structural block diagram of an SDFM sampling module provided in an embodiment of this application;
[0042] Figure 6 A flowchart of an elevator motor control method provided in an embodiment of this application;
[0043] Figure 7 This is a schematic diagram of the CAN data results from zero-point current sampling of a traditional ADC.
[0044] Figure 8 This is a schematic diagram of SDFM zero-point current sampling CAN data results provided in an embodiment of this application;
[0045] Figure 9 This is a schematic diagram of the peak-to-peak vibration test of an elevator descending at a speed of 1m, provided in one embodiment of this application. Detailed Implementation
[0046] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0047] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.
[0048] The method embodiments provided in this example can be executed in an elevator terminal, a computer, or a similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal for the motor current sampling method in this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0049] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the motor current sampling method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0050] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0051] This embodiment provides a method for sampling motor current. Figure 2 This is a flowchart of the motor current sampling method in this embodiment, as shown below. Figure 2 As shown, the process includes the following steps:
[0052] Step S210: Monitor the motor current value in real time, and when the motor current value is lower than the preset current threshold, adjust the sampling frequency of the motor current to obtain the adjusted sampling frequency; the preset current threshold is the minimum value of motor current to maintain elevator comfort.
[0053] When the elevator decelerates, the motor current is relatively low. If the sampling window is fixed, the proportion of the small current signal within the window is very small, resulting in a poor signal-to-noise ratio. In this case, even minor noise interference can cause significant fluctuations in the feedback value (sampled value) of the motor current, causing the elevator controller to issue jitter commands, ultimately manifesting as the elevator's "creeping" or "jerking" sensation, affecting the elevator's comfort. Therefore, although the Delta-Sigma current sampling method of the servo system can meet control requirements without considering motor operation and current loop hysteresis, the elevator control system has high requirements for ride comfort and still needs improvement in cases of low comfort. Therefore, when the current is below the minimum motor current required to maintain elevator comfort (a preset current threshold), the sampling frequency needs to be actively increased.
[0054] Since the sampling window is determined by the sampling frequency, increasing the sampling frequency can reduce the sampling window, allowing the small current signal to "fill" more of the window and significantly improving the signal-to-noise ratio. Therefore, by adjusting the sampling frequency, the feedback value of the motor current and the sampling window can be adjusted, thereby adjusting the proportion of the motor current feedback value in the sampling window and thus adjusting the comfort level of the elevator.
[0055] The aforementioned real-time monitoring of the motor's operating current value can be achieved by a motor current sampling system periodically sampling the motor's operating current value based on a preset time interval. This preset time interval is the sampling period, which can be the period of current loop interruption. The preset time interval can be specifically set based on the specific application scenario and requirements; this embodiment does not impose a specific limitation, but it is generally on the order of hundreds of microseconds.
[0056] The aforementioned preset current threshold can be set differently for motors of different power ratings. It can be a current threshold calibrated through testing to distinguish whether comfort requirements are met, or it can be set as a certain percentage of the rated current; for example, the preset current threshold could be set to one-third of the rated current. When the feedback value of the motor current is less than the preset current threshold, passengers will feel uncomfortable riding the elevator. When the feedback value of the motor current is greater than or equal to the preset current threshold, passengers will not feel uncomfortable riding the elevator.
[0057] This embodiment modifies the server's preset current threshold for motors of different power ratings. The preset current threshold is then written into the flash memory of the main control module of the motor current sampling system and saved upon power-on and power-off cycles, thus achieving the setting of the preset current threshold.
[0058] The aforementioned adjustment of the motor current sampling frequency can be achieved by increasing the motor current sampling frequency according to a preset adjustment scale. This preset adjustment scale can be a numerical increase in the sampling frequency for each adjustment cycle, or a multiple of the previous sampling frequency for each adjustment cycle. It should be noted that the preset adjustment scale can also be determined based on the difference between the motor current feedback value and a preset current threshold, or based on the ratio of the difference between the motor current feedback value and the preset current threshold to the preset current threshold. This embodiment does not specifically limit the specific preset adjustment scale, as long as it allows adjustment of the motor current sampling frequency so that the sampled value of the motor current is greater than or equal to the preset threshold of the adjusted sampling window. The preset threshold can be specifically set based on specific needs, and this embodiment does not impose specific limitations. For example, the preset threshold can be 50%. It should be noted that the preset threshold is a value less than 1; the larger the preset threshold, the larger the proportion of the sampling window and the higher the accuracy.
[0059] This embodiment improves sampling accuracy and effectively reduces current sampling interference by switching the configuration of the SDFM sampling chip when the motor is running at low current, which is more advantageous than fixed bit ADC sampling.
[0060] Step S220: During the process of sampling the motor current using the adjusted sampling frequency, the sampling delay of the motor current is measured, and the motor current is compensated based on the sampling delay to obtain the sampled value of the motor current after compensation sampling.
[0061] In step S210, by increasing the sampling frequency of the motor current, the feedback value of the motor current in the current loop becomes more accurate, thus improving control performance. However, while improving the signal-to-noise ratio at low currents, it also increases the sampling lag time, resulting in relatively poor performance of the motor current sampling system. Therefore, compensatory sampling is required to compensate for the sampling delay.
[0062] The aforementioned sampling delay includes at least the inherent sampling delay of the SDFM sampling chip (the first delay), which is the delay from the reference trigger signal to the readiness of the sampling data. Therefore, the aforementioned sampling delay for measuring motor current is the total time from issuing the sampling command (PWM1SOCA signal) to the SDFM sampling chip's data readiness and the main control module entering the interrupt. The aforementioned first delay mainly consists of the group delay of the SINC (Sinc Filter) filter (the inherent and unavoidable time cost of mathematical operations performed by the digital filter), the digital signal transmission delay (the time for data to be transmitted from the SDFM sampling chip to the main control module), and the internal processing overhead of the main control module (the small amount of time required for the main control module to trigger the interrupt and prepare to read data). The aforementioned compensation sampling of motor current based on the sampling delay can be achieved by the motor current sampling system automatically issuing the next PWM1SOCA signal for triggering sampling ahead of the first delay time through the CMPB register (specifically, the main control module can write the delayed first delay into the PWM's CMPB register in real time each time, automatically adjusting the sampling interrupt entry time). In this way, when the current loop needs to perform calculations at a specific time, the required sampling data is ready, thus offsetting the lag caused by the SDFM sampling chip processing link and ensuring the real-time performance of the control.
[0063] Steps S210 to S220 involve real-time monitoring of the motor's operating current value. When the motor's operating current value is lower than a preset current threshold (the minimum motor current required to maintain elevator comfort), the sampling frequency of the motor current is adjusted to obtain the adjusted sampling frequency. This adjustment of the sampling frequency based on dynamic current ensures that the elevator current value meets comfort requirements. During the sampling of the motor current using the adjusted sampling frequency, high-precision sampling can lead to sampling delay. Therefore, by measuring the sampling delay of the motor current and compensating for it, a compensated sampling value of the motor current is obtained. This optimizes the sampling accuracy under low current conditions, fundamentally suppressing current feedback noise that causes elevator shaking and jerking. While ensuring comfort, the problem of high precision and accuracy is addressed first, and then delay compensation is used to solve the high delay problem caused by high precision. This solves the problem that existing motor current sampling methods cannot simultaneously achieve high precision, high accuracy, and low delay.
[0064] In one embodiment, sampling the motor current includes:
[0065] Step S230: Using the SDFM sampling chip and digital filter, sample two phase currents of the motor's three phase currents to obtain the sampling results of the motor's two phase currents.
[0066] In this embodiment, when sampling the motor current, a high-precision digital sampling scheme can be used instead of a traditional analog sampling scheme. Specifically, for each phase current in two of the three-phase currents, the following operations are performed: a high-speed bitstream is acquired using an SDFM sampling chip. Specifically, the input analog current signal (voltage signal converted by a shunt or Hall sensor) is sampled at a rate much higher than the Nyquist frequency (i.e., a very high frequency), and converted into a one-bit (0 or 1) high-speed bitstream. This high-speed bitstream is then sent to a SINC filter. The SINC filter then accumulates (integrates) the input high-speed bitstream. Finally, oversampling filtering is performed according to a set oversampling rate, and the filtered data is differentiated to obtain the output data of that phase current. The SDFM sampling chip can be a Δ-Σ modulator such as the AMC1306.
[0067] Step S240: Determine the sampled value of the motor current based on the sampling results of the two-phase current of the motor.
[0068] The sampling of two phases of the motor's three-phase current described above can be performed on any two phases of the three-phase current. For example, sampling two phases of the motor's three-phase current could be performed on the U and W phases. Furthermore, according to Kirchhoff's current law, in a three-phase three-wire system, the sum of the U, V, and W phase currents is zero. Therefore, the V phase current can be fitted based on the sampled U and W phase currents.
[0069] Steps S230 to S240 above improve accuracy by combining the SDFM sampling chip with a digital filter and setting the order and oversampling rate of the digital filter. By sampling only two phase currents, cost is reduced while ensuring performance.
[0070] Specifically, in one embodiment, step S210, when the current value of the motor is lower than a preset current threshold, adjusts the sampling frequency of the motor current to obtain the adjusted sampling frequency, including:
[0071] Step S212: Determine whether the current value of the motor is lower than the preset current threshold.
[0072] Step S214: When the current value of the motor is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip, so as to obtain the adjusted sampling frequency.
[0073] In existing designs based on SDFM sampling chips, the sampling clock is a fixed value, provided by the chip itself. This fixed sampling clock indirectly determines the size of the data integration window of the back-end digital filter (SINC filter). When the motor current is very small, the useful current signal is weak within this fixed data integration window, while the inherent circuit noise (white noise, switching noise, etc.) intensity remains relatively constant, resulting in a low signal-to-noise ratio. This embodiment uses a main control module to send the sampling clock to the SDFM sampling chip, thereby adjusting the sampling frequency of the motor current. The sampling clock is programmable and adjustable in real time. Utilizing the main control module enables flexible adjustment of the sampling clock, saving hardware costs.
[0074] In steps S212 to S214 above, by determining whether the current value of the motor is lower than a preset current threshold, and when the current value of the motor is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip, and the adjusted sampling frequency is obtained. This realizes the adjustment of the sampling frequency of the motor current by controlling the sampling clock with the main control module, and thus makes the value of the elevator current meet the comfort requirements.
[0075] In another embodiment, step S214, when the motor operating current value is lower than a preset current threshold, adjusts the sampling frequency of the motor current by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip, to obtain the adjusted sampling frequency, including:
[0076] Step S2142: When the current value of the motor is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip until the sampled value of the motor current is greater than or equal to the preset threshold of the adjusted sampling window, and the adjusted sampling frequency is obtained; the adjusted sampling window is the sampling window of the motor current corresponding to the adjusted sampling frequency.
[0077] When the sampled value of the motor current is greater than or equal to the preset threshold of the sampling window, the noise is low, and the elevator ride comfort is good. Within the measurement range, the higher the proportion of the sampled value to the sampling window, the lower the noise. During adjustment, if the sampled value of the motor current is still much lower than the preset threshold of the sampling window, it means the window is still too large and the sampled signal of the motor current is still too small. It is necessary to continue to increase the sampling clock to increase the sampling frequency and further narrow the window. Doubling the sampling frequency corresponds to doubling the measurement range. If the sampled value of the motor current fills the sampling window, the optimal measurement state has been reached, and adjustment can be stopped.
[0078] In one embodiment, step S220, during the process of sampling the motor current using the adjusted sampling frequency, involves measuring the sampling delay of the motor current and, based on the sampling delay, performing compensated sampling on the motor current to obtain the sampled value of the motor current after compensated sampling, including:
[0079] Step S222: During the process of sampling the motor current using the adjusted sampling frequency, the PWM synchronization signal is used as the reference trigger signal for motor current sampling. The first delay of motor current sampling is measured, and based on the first delay, the motor current is sampled with first compensation to obtain the sampled value of the motor current after the first compensation sampling. The first delay is the delay between the reference trigger signal and the time when the sampling data is ready.
[0080] The aforementioned PWM (Pulse Width Modulation) synchronization signal is the PWM1SOCA signal, specifically a highly precise hardware signal generated by a PWM timer when it counts to a specific point and is strictly synchronized with the PWM wave itself. Using the PWM synchronization signal as the reference trigger signal for motor current sampling ensures that the entire current loop control (PWM output) and current feedback (motor current sampling) are based on the same clock source, possessing a unified time base. This eliminates drift and uncertainty between different clock domains and also ensures that sampling occurs at exactly the same position in each PWM cycle.
[0081] This embodiment compensates for the delay problem of the sampling method by compensating the PWM synchronization signal triggered by SDFM, thereby improving the control accuracy of the current loop.
[0082] In another embodiment, the above method further includes:
[0083] Step S250: In each PWM cycle, determine whether the difference between the PWM cycle register value and the duty cycle instruction is less than a preset offset time; the preset offset time is the minimum time to avoid the operation of the switching transistor.
[0084] In a current loop vector control system, the PWM duty cycle of the output is adjusted by a PID (Proportional-Integral-Derivative Controller) controller to achieve consistency between the given current and the feedback current. The feedback current is sampled using an SDFM sampling chip (SDFM sampling for short). The main drawbacks of this method are: 1. Sampling accuracy is directly proportional to sampling lag; 2. The sampling time needs to avoid the operating time of PWM-controlled switching transistors (such as IGBTs) in the drive circuit to reduce interference.
[0085] Therefore, simply performing a first-stage compensation sampling on the motor current only ensures the timeliness of the data, but not necessarily its accuracy. If the compensated sampling point happens to fall at the moment the switching transistor operates, the sampled value of the motor current will contain significant noise, leading to control distortion. Therefore, it is also necessary to set a staggered time during the sampling process to avoid the switching action of the switching transistor.
[0086] The above-mentioned method of determining whether the difference between the PWM cycle register value and the duty cycle instruction within each PWM cycle is less than a preset offset time can be achieved after SDFM sampling. This can be done by calculating the duty cycle instruction (PWM wave duty cycle) through the current loop, reading the PWM cycle register value (PWM's TBTCR (Time-Base Timer Counter Register) register count value), calculating the difference between the PWM cycle register value and the duty cycle instruction, and comparing this difference with the preset offset time to determine if the difference is less than the preset offset time. By calculating whether the difference between the PWM cycle register value and the duty cycle instruction is less than the preset offset time, it is determined whether the PWM duty cycle is close to the PWM cycle register value. If the PWM duty cycle is close to the PWM cycle register value, the IGBT switching time will be near the PWM cycle register value. In this case, the sampling time needs to be compensated by the preset offset time to offset the switching time. The preset offset time can be flexibly adjusted by the server; this embodiment does not impose a specific limitation.
[0087] Step S260: When the difference between the PWM period register value and the current duty cycle instruction is less than the preset offset time, the sum of the preset offset time and the first delay is used as the second delay, and the motor current is sampled for second compensation based on the second delay to obtain the sampled value of the motor current after the second compensation sampling.
[0088] The above-mentioned method of using the sum of the preset staggered time and the first delay as the second delay, and performing a second compensation sampling of the motor current based on the second delay, can be described as the motor current sampling system, after compensating for the inherent delay (first delay), advancing the sampling time by a preset staggered time, and controlling the sampling point within a time range unaffected by switching interference.
[0089] Steps S250 to S260 above determine whether the difference between the PWM cycle register value and the duty cycle instruction is less than a preset offset time in each PWM cycle. When the difference between the PWM cycle register value and the current duty cycle instruction is less than the preset offset time, the sum of the preset offset time and the first delay is used as the second delay. Based on the second delay, the motor current is sampled for second compensation to obtain the sampled value of the motor current after the second compensation sampling. This not only compensates for the inherent delay but also accurately avoids switching interference, resulting in a more accurate motor current and smoother and more precise motor torque control. Especially under high duty cycle (high speed, heavy load) conditions, it can effectively suppress torque pulsation and electromagnetic noise caused by sampling noise.
[0090] For example, the PWM period register value is set to 100,000 oscillator cycles (1ms). The clock frequency of the SDFM sampling chip is 5MHz. The digital filter order is 3, and the oversampling rate is 64. Therefore, the first delay is: t1 = 1 ÷ 5,000,000 × 64 × 3 × 3 = 115.2µs. The current duty cycle instruction is the real-time calculated value of the main control module; taking 99,990 oscillator cycles as an example. x Set a value for the server (preset stagger time) to offset the delay caused by the switching action of the switch tube. x The value is 1µs. When the PWM wave counter reaches the PWM period register value, a sampling will be triggered. At this time, the difference between the PWM period register value and the current duty cycle instruction is: 100000 - 99990 = 10 oscillation cycles, equivalent to 0.1µs, which is less than the preset offset time t. x (1us), at this time the sampling will be affected by the operation of the switching transistor, so compensation time is required, and the preset staggered time t is adjusted. x The sum of the first delay t1 and the second delay is: 115.2us + lus = 116.2us.
[0091] The present embodiment will now be described and illustrated through preferred embodiments.
[0092] Figure 3 This is a flowchart of a preferred embodiment of a motor current sampling method provided in this application. For example... Figure 3 As shown, the method for sampling the motor current includes the following steps:
[0093] Step S301: Monitor the current value of the motor in real time;
[0094] Step S302: Determine whether the current value of the motor is lower than the preset current threshold.
[0095] Step S303: When the current value of the motor is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip, so as to obtain the adjusted sampling frequency.
[0096] Step S304: During the process of sampling the motor current using the adjusted sampling frequency, the PWM synchronization signal is used as the reference trigger signal for motor current sampling, and the first delay of motor current sampling is measured; the first delay is the delay from the reference trigger signal to the time when the sampling data is ready.
[0097] Step S305: In each PWM cycle, determine whether the difference between the PWM cycle register value and the duty cycle instruction is less than a preset offset time; the preset offset time is the minimum time to avoid the operation of the switching transistor.
[0098] Step S306: When the difference between the PWM period register value and the current duty cycle instruction is less than the preset offset time, the sum of the preset offset time and the first delay is used as the second delay, and the motor current is sampled for second compensation based on the second delay to obtain the sampled value of the motor current after the second compensation sampling.
[0099] Steps S301 to S306 above involve real-time monitoring of the motor's operating current value. When the motor's operating current value is lower than a preset current threshold (the minimum motor current required to maintain elevator comfort), the sampling frequency of the motor current is adjusted to obtain the adjusted sampling frequency. This adjustment of the sampling frequency based on dynamic current ensures that the elevator current value meets comfort requirements. During the sampling of the motor current using the adjusted sampling frequency, a certain delay may occur. Therefore, by measuring the sampling delay of the motor current and compensating for it, the sampled motor current value is obtained. This optimizes the sampling accuracy under low current conditions, fundamentally suppressing current feedback noise that causes elevator shaking and jerking. While ensuring comfort, it first addresses the issues of high precision and high accuracy, and then further addresses the high delay problem caused by high precision through delay compensation. This solves the problem that existing motor current sampling methods cannot simultaneously achieve high precision, high accuracy, and low delay.
[0100] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0101] Based on the same inventive concept, this embodiment also provides a motor current sampling system, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. The terms "module," "unit," "subunit," etc., used below can refer to combinations of software and / or hardware that achieve a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0102] In one embodiment, Figure 4 This is a structural block diagram of a motor current sampling system provided in one embodiment of this application, as shown below. Figure 4 As shown, the motor current sampling system includes: a current sampling module 42 and a main control module 44;
[0103] The current sampling module 42 is used to implement the steps of the motor current sampling method in any of the above embodiments;
[0104] The main control module 44 is used to control the current sampling module to sample the motor current.
[0105] The aforementioned motor current sampling system, controlled by the main control module 44, monitors the motor's operating current value in real time through the current sampling module 42. When the motor's operating current value is lower than a preset current threshold value (the minimum motor current required to maintain elevator comfort), the system adjusts the motor current sampling frequency to obtain the adjusted sampling frequency. This adjustment is based on dynamic current, ensuring the elevator current value meets comfort requirements. During the sampling process using the adjusted sampling frequency, a certain delay may occur. Therefore, by measuring the motor current sampling delay and compensating for it, the system obtains a compensated motor current sampling value. This optimizes sampling accuracy under low current conditions, fundamentally suppressing current feedback noise that causes elevator shaking and jerking. While ensuring comfort, it first addresses the issues of high precision and accuracy, and then further resolves the high delay problem caused by high precision through delay compensation. This solves the problem that existing motor current sampling methods cannot simultaneously achieve high precision, high accuracy, and low delay.
[0106] In one embodiment, the current sampling module 42 includes an SDFM sampling chip and a digital filter;
[0107] The aforementioned SDFM sampling chip samples based on the frequency of the sampling clock signal sent by the main control module.
[0108] The SDFM sampling chip mentioned above can be an AMC1306 chip, and the input range of the AMC1306 chip can be ±320mV.
[0109] The oversampling rate of the digital filter described above is 64; the order of the digital filter is 3. The digital filter described above can be a SINC filter.
[0110] The filter order and oversampling rate of the SINC filter mentioned above affect the accuracy and hysteresis of the sampled data. The larger the oversampling rate (OSR) and the higher the filter order, the higher the sampling accuracy, but the greater the hysteresis.
[0111] The effective number of bits of a DFM sampling chip can be derived from the following relationship:
[0112] ;
[0113] ;
[0114] in, This represents the maximum number of effective bits (i.e., the number of bits in the output data) of the DFM sampling chip. is the minimum effective bit depth (i.e., the number of bits of output data) of the DFM sampling chip, OSR is the oversampling rate of the SINC filter, and N is the filter order of the SINC filter.
[0115] In one embodiment, an SDFM sampling module based on the TMS280045 chip is provided. The SDFM sampling module is configured with corresponding filters and oversampling rates. Through the configuration of the SDFM sampling module, the sampling accuracy of the UVW three-phase current is improved, resulting in higher control accuracy of the motor.
[0116] Figure 5 The figure shows a block diagram of the SDFM sampling module provided in this embodiment. The SDFM sampling module's filters include a primary filter and a secondary filter. The input signals are the data bit stream SD_D1 output by the SDFM sampling chip and the synchronization clock SD_C1 provided by the SDFM sampling chip. When the primary filter completes a valid data output, it triggers an SDFM interrupt. SDSYNC is the synchronization control signal in the SDFM sampling chip, used to precisely control the sampling timing of the filter. The secondary filter is a comparison filter used to set corresponding upper and lower thresholds for the sampled data; if the data exceeds the threshold range, a fault interrupt is triggered.
[0117] Specifically, the SDFM sampling chip is an AMC1306 chip, and the main control module is a TMS280045 main chip. The data from the SDFM sampling chip is fed back through the primary filter and then input to the TMS280045 main chip. The TMS280045 main chip converts the sampled value into an actual quantity through per-unit conversion to control the operation of the three-phase motor, and at the same time sends a 5MHz clock to the SDFM sampling chip.
[0118] This embodiment uses Delta-Sigma sampling, which reduces the number of components related to ADC sampling and saves copper area on the PCB, thus lowering hardware costs.
[0119] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0120] This embodiment provides a method for controlling the motor of an elevator. Figure 6 This is a flowchart of the elevator motor control method in this embodiment, as shown below. Figure 6 As shown, the process includes the following steps:
[0121] Step S610: Obtain the sampled value of the motor current obtained by the sampling method of motor current;
[0122] Step S620: In the current loop, the preset current command is compared with the sampled value of the acquired motor current to obtain the comparison result;
[0123] Step S630: Using the PID controller of the current loop, based on the comparison result, determine the PWM duty cycle instruction required for the next carrier cycle, and write the PWM duty cycle instruction into the comparison register of the PWM generator;
[0124] In step S640, the PWM generator outputs a drive signal based on the PWM duty cycle instruction written in the compare register, thereby driving the motor to run.
[0125] Steps S610 to S640 above involve acquiring the sampled value of the motor current using a sampling method, comparing the preset current command with the acquired sampled value of the motor current in the current loop to obtain a comparison result, and then using the PID controller of the current loop to determine the PWM duty cycle command required for the next carrier cycle based on the comparison result. The PWM duty cycle command is then written into the comparison register of the PWM generator. The PWM generator outputs a drive signal based on the PWM duty cycle command written into the comparison register to drive the motor. This achieves motor operation using the acquired sampled value, ensuring comfort while solving the problems of high precision, high accuracy, and high latency in motor current sampling. It balances high precision, high accuracy, and low latency, thus achieving precise motor drive.
[0126] In one embodiment, to facilitate observation of the sampling effect of the SDFM module, the aforementioned motor current sampling system is also equipped with a CAN communication module for observing the Delta-Sigma sampling values. The CAN communication transmits sampling data every 200µs, which can be collected using the CANtest software and generated into charts for easy comparison and analysis.
[0127] In one embodiment, the zero-point static current value of SDFM sampling and ADC sampling is sent through CAN. Through a series of operations such as per-unit, the corresponding value of the zero-point current is around 2048, which has a certain deviation. Figure 7 This is a schematic diagram of the CAN data results from a traditional ADC zero-point current sampling, as shown below. Figure 7 As shown, the vertical axis represents the range of sampled values, and the horizontal axis represents the number of sampled data. Figure 8 This is a schematic diagram of the SDFM zero-point current sampling CAN data results provided in this embodiment, as shown below. Figure 8 As shown, the vertical axis represents the range of sampled values, and the horizontal axis represents the number and label of the sampled data. By comparison... Figure 7 and Figure 8 The CAN sampling data shows that the SDFM sampling method has smaller fluctuations, with an up-and-down fluctuation of about 4; while the ADC sampling method has larger fluctuations, with an up-and-down fluctuation of about 9. Figure 9 This is a schematic diagram of the peak-to-peak vibration test of an elevator descending at a speed of 1m, as provided in this embodiment. Figure 9 As shown, from top to bottom, the vertical axis represents the change in velocity over time, the vibration acceleration in the X direction over time, the vibration acceleration in the Y direction over time, and the vibration acceleration in the Z direction over time, respectively, while the horizontal axis represents time. The A95 (95% confidence level peak-to-peak vibration) value is 7.3, lower than the standard value of 9.0, and the maximum instantaneous vibration value during the entire journey is also relatively small. The actual elevator ride comfort is good, and the elevator vibration is almost imperceptible during startup and operation.
[0128] In one embodiment, an elevator is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements any of the motor current sampling methods in the above embodiments and the motor control method for the elevator described above.
[0129] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0130] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0131] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method of sampling motor current, characterized by, The method comprises: Real-time monitoring of the current value of the motor operation, and adjusting the sampling frequency of the motor current when the current value of the motor operation is lower than the preset current threshold, to obtain an adjusted sampling frequency; the preset current threshold is the minimum value of the motor current for maintaining the comfort of the elevator; In the process of sampling the motor current using the adjusted sampling frequency, the sampling delay of the motor current is measured, and the motor current is compensated based on the sampling delay to obtain the sampling value of the motor current after compensation sampling.
2. The method of sampling motor current of claim 1, wherein, Sampling the motor current comprises: Using an SDFM sampling chip and a digital filter to sample two-phase current in the three-phase current of the motor to obtain the sampling result of the two-phase current of the motor; Based on the sampling result of the two-phase current of the motor, the sampling value of the motor current is determined.
3. The method of sampling motor current of claim 1, wherein, The adjustment of the sampling frequency of the motor current when the current value of the motor operation is lower than the preset current threshold to obtain the adjusted sampling frequency comprises: Judging whether the current value of the motor operation is lower than the preset current threshold; When the current value of the motor operation is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip to obtain the adjusted sampling frequency.
4. The method of sampling motor current according to claim 3, wherein, The adjustment of the sampling frequency of the motor current when the current value of the motor operation is lower than the preset current threshold to obtain the adjusted sampling frequency comprises: When the current value of the motor operation is lower than the preset current threshold, the sampling frequency of the motor current is adjusted by increasing the frequency of the sampling clock signal sent by the main control module to the SDFM sampling chip until the sampling value of the motor current is greater than or equal to the preset threshold of the adjusted sampling window, to obtain the adjusted sampling frequency; the adjusted sampling window is the sampling window of the motor current corresponding to the adjusted sampling frequency.
5. The method of sampling motor current of claim 1, wherein, The measurement of the sampling delay of the motor current in the process of sampling the motor current using the adjusted sampling frequency, and the compensation sampling of the motor current based on the sampling delay to obtain the sampling value of the motor current after compensation sampling comprises: In the process of sampling the motor current using the adjusted sampling frequency, the PWM synchronization signal is used as the reference trigger signal of the motor current sampling to measure the first delay of the motor current sampling, and the first compensation sampling of the motor current is performed based on the first delay to obtain the sampling value of the motor current after first compensation sampling; the first delay is the delay between the reference trigger signal and the sampling data ready.
6. The method of sampling motor current according to claim 5, wherein, Further comprising: In each PWM period, judging whether the difference between the PWM period register value and the duty cycle instruction is less than the preset stagger time; The preset stagger time is the minimum time that can avoid the action of the switch tube; When the difference between the PWM period register value and the current duty cycle instruction is less than the preset offset time, the sum of the preset offset time and the first delay is taken as a second delay, and the motor current is secondly compensated and sampled based on the second delay to obtain a sampling value of the motor current after second compensation sampling.
7. A system for sampling motor current, comprising: The system comprises a current sampling module and a main control module. The current sampling module is configured to implement the motor current sampling method in any one of claims 1-6. The main control module is configured to control the current sampling module to sample the motor current.
8. The system for sampling motor current of claim 7, wherein, The current sampling module comprises an SDFM sampling chip and a digital filter. The SDFM sampling chip samples based on the frequency of the sampling clock signal sent by the main control module. The oversampling rate of the digital filter is 64, and the order of the digital filter is 3.
9. A method of controlling a motor of an elevator, characterized by The method comprises: obtaining the sampling value of the motor current by using the motor current sampling method in any one of claims 1-6. In the current loop, a preset current instruction is compared with the obtained sampling value of the motor current to obtain a comparison result. A PID controller of the current loop is used to determine the PWM duty cycle instruction required for the next carrier period based on the comparison result, and the PWM duty cycle instruction is written into a comparison register of a PWM generator. The PWM generator outputs a driving signal based on the PWM duty cycle instruction written into the comparison register to drive the motor to run.
10. An elevator comprising a memory and a processor, the memory storing a computer program, characterized in that The processor implements the motor current sampling method in any one of claims 1-6 and the motor control method of the elevator in claim 9 when executing the computer program.