A method and related equipment for zero bias and amplitude calibration of a signal.
By combining an adaptive notch filter and a phase-locked loop, the magnetic encoder signal is acquired and processed in real time, solving the problem of low efficiency in signal amplitude and zero bias measurement in electric power steering motors, and achieving high-accuracy signal calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 辰致科技有限公司
- Filing Date
- 2024-11-12
- Publication Date
- 2026-05-26
Smart Images

Figure CN119437319B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rotor position detection technology, and in particular to a method and related equipment for zero bias and amplitude calibration of a signal. Background Technology
[0002] Electric power steering motors often use magnetic encoders to detect rotor position. The MCU detects the signal output by the position sensor chip, and the rotor position is obtained through the phase-locked loop. The analog signal acquired by the AD converter needs to be normalized. During mass production, due to distribution errors, individual parts may have large differences. It is necessary to measure the signal amplitude and zero deviation one by one. If all of them are identified manually, the efficiency is too low.
[0003] Signal amplitude and zero bias can also be obtained by performing a Fourier transform on the signal. However, Fourier transform requires storing a large amount of data for calculation, and microcontrollers have limited storage space, so it is not suitable to perform the calculation on a microcontroller. Other methods that use software to simply determine the maximum and minimum values are easily affected by noise, resulting in large errors in the results. Summary of the Invention
[0004] To address the aforementioned technical problems, embodiments of this application provide a method and system for zero bias and amplitude calibration of a signal, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] Firstly, to address the aforementioned technical problems, this application provides a method for zero-bias and amplitude calibration of a signal, applied to an adaptive notch filter, wherein the adaptive notch filter incorporates a low-pass filter, and the method includes:
[0006] Real-time acquisition of the signal to be measured when the magnetic encoder detects the rotor position;
[0007] The signal to be measured is normalized to obtain a first signal;
[0008] The first signal is input into the phase-locked loop for angle tracking processing to obtain the second signal;
[0009] The first signal and the second signal are input into the adaptive notch filter to calculate the amplitude of the signal under test.
[0010] Obtain the output signal of the low-pass filter in the adaptive notch filter, and obtain the zero bias value of the signal under test based on the output signal.
[0011] The beneficial effects are:
[0012] In the technical solution provided by the embodiments of this application, a first signal is obtained by normalizing the signal to be measured corresponding to the real-time acquisition and detection of rotor position; then, the first signal is input into a phase-locked loop for angle tracking processing to obtain a second signal; the first and second signals are input into an adaptive notch filter to calculate the amplitude of the signal to be measured; the output signal of the low-pass filter in the adaptive notch filter is obtained, and the zero-bias value of the signal to be measured is obtained based on the output signal. In this way, this application can individually calibrate the signal to be measured each time the rotor position is detected, overcoming the limitation of Fourier transform requiring the storage of large amounts of data for calculation due to limited device storage space. Furthermore, adding a low-pass filter to the adaptive notch filter can filter out DC signals, calibrate the amplitude and zero-bias value of the signal to be measured, achieve the extraction of signal amplitude and zero-bias, reduce the influence of noise, and improve the accuracy of the results.
[0013] Secondly, the present invention provides a zero-bias and amplitude calibration system for a signal, the zero-bias and amplitude calibration system for a signal includes an adaptive notch filter and a phase-locked loop, the phase-locked loop is connected to the adaptive notch filter, and a low-pass filter is provided in the adaptive notch filter;
[0014] The phase-locked loop is used to perform angle tracking processing on the first signal obtained after normalizing the test signal corresponding to the rotor position detected by the magnetic encoder, to obtain the second signal, and then transmit the second signal to the adaptive notch filter.
[0015] The adaptive notch filter includes multiple input terminals, which are respectively used to receive the first signal and the second signal; the adaptive notch filter is also used to obtain the amplitude of the signal under test based on the first signal and the second signal, and to obtain the zero bias value of the signal under test based on the output signal of the low-pass filter output terminal.
[0016] Thirdly, this application also provides an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the aforementioned signal zero-bias and amplitude calibration method.
[0017] Fourthly, this application also provides a computer-readable storage medium storing computer-readable instructions that, when executed by a computer's processor, cause the computer to perform the zero-bias and amplitude calibration method for the signal as described above.
[0018] Fifthly, this application also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the zero-bias and amplitude calibration methods for signals provided in the various alternative embodiments described above.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0021] Figure 1 This is a flowchart illustrating a method for zero bias and amplitude calibration of a signal, as shown in an exemplary embodiment of this application.
[0022] Figure 2 This is a block diagram illustrating a signal zero-bias and amplitude calibration system, as shown in an exemplary embodiment of this application.
[0023] Figure 3 This is a schematic diagram of an adaptive notch filter and a phase-locked loop that implement the zero-bias and amplitude calibration method of a signal in an exemplary embodiment of this application.
[0024] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments. Detailed Implementation
[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0028] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0029] To address the issues of low efficiency and insufficient accuracy in measuring signal amplitude and zero bias when using magnetic encoders for rotor position detection, embodiments of this application propose a method and system for zero bias and amplitude calibration of signals, electronic devices, and computer-readable storage media. The main focus is on the zero bias and amplitude calibration techniques for signals included in rotor position detection technology. These embodiments will be described in detail below.
[0030] Please refer to the following first. Figure 1 , Figure 1 This is a flowchart illustrating a method for zero-bias and amplitude calibration of a signal, as shown in an exemplary embodiment of this application. This method can be applied to an adaptive notch filter, which incorporates a low-pass filter.
[0031] like Figure 1 As shown, in an exemplary embodiment, the method for zero bias and amplitude calibration of the signal may include steps S101 to S105, which are described in detail below:
[0032] Step S101: Real-time acquisition of the signal to be measured corresponding to the rotor position detected by the magnetic encoder.
[0033] Electric power steering motors often use magnetic encoders to detect rotor position. During mass production, due to distribution errors, individual parts may have significant differences, requiring individual measurements of signal amplitude and zero offset. Therefore, in this embodiment, the signal to be measured is the signal output by the magnetic encoder when detecting rotor position.
[0034] Step S102: Normalize the signal to be tested to obtain the first signal.
[0035] Step S103: Input the first signal into the phase-locked loop for angle tracking processing to obtain the second signal.
[0036] In order to eliminate the dimensional differences between different signals through data normalization and improve the overall measurement rate, this embodiment normalizes the signal under test and inputs the obtained first signal into the phase-locked loop for angle tracking to obtain the second signal. The second signal is then returned as the input of the adaptive notch filter and used as an element to calculate the amplitude of the signal under test.
[0037] Step S104: Input the first signal and the second signal into the adaptive notch filter to calculate the amplitude of the signal to be measured.
[0038] Step S105: Obtain the output signal of the low-pass filter in the adaptive notch filter, and obtain the zero bias value of the signal under test based on the output signal.
[0039] As can be seen from the above, in the method provided in this embodiment, the first signal is obtained by normalizing the signal to be measured corresponding to the real-time acquisition and detection of the rotor position; then, the first signal is input into a phase-locked loop for angle tracking processing to obtain a second signal; the first and second signals are input into an adaptive notch filter to calculate the amplitude of the signal to be measured; the output signal of the low-pass filter in the adaptive notch filter is obtained, and the zero-bias value of the signal to be measured is obtained based on the output signal. In this way, this application can individually calibrate the signal to be measured each time the rotor position is detected, overcoming the limitation of Fourier transform requiring the storage of a large amount of data for calculation and the limited storage space of the device. In addition, the addition of a low-pass filter in the adaptive notch filter can filter out DC signals, calibrate the amplitude and zero-bias value of the signal to be measured, realize the extraction of signal amplitude and zero-bias, reduce the influence of noise, and improve the accuracy of the results.
[0040] In an exemplary embodiment of this application, the specific steps for real-time acquisition of the signal to be measured when detecting the rotor position may include:
[0041] The sensor signal output by the magnetic encoder when detecting the rotor position is acquired, and the sensor signal is processed by AD acquisition to obtain the signal to be measured;
[0042] The signals to be measured include sinusoidal signals and cosine signals, with the following expressions: and In the formula, d1(k) is the sinusoidal signal to be measured, d2(k) is the cosine signal to be measured, A1 and B1 are the amplitude and zero bias corresponding to the sinusoidal signal to be measured, and A2 and B2 are the amplitude and zero bias corresponding to the cosine signal to be measured.
[0043] In this embodiment, when the motor uses a magnetic encoder to detect the rotor position, the sensor signal output by the MCU detection position sensor chip is acquired, and the sensor signal is processed by AD acquisition to obtain the signal to be measured, that is, the sensor signal is converted into a digital quantity that can be recognized by the adaptive notch filter.
[0044] In addition, in this embodiment, the signal to be measured includes a sine signal and a cosine signal, and the signal to be measured is expressed as d(k), then the sine signal to be measured is expressed as... The cosine signal to be measured is expressed as Where A1 and B1 are the amplitude and zero bias values corresponding to the sinusoidal signal to be measured, and A2 and B2 are the amplitude and zero bias values corresponding to the cosine signal to be measured. By inputting the sinusoidal and cosine signals to be measured into the zero bias and amplitude calibration method of the adaptive notch filter application signal provided in this application, the specific values of A1 and B1 and A2 and B2 can be identified, thereby realizing the zero bias and amplitude calibration of the signal.
[0045] In this way, the present application uses both the sine and cosine signals corresponding to the signals when the magnetic encoder detects the rotor position as the signals to be measured through the above embodiments, so as to improve the comprehensiveness of the calculation during the measurement process and thus improve the accuracy of the results.
[0046] In an exemplary embodiment of this application, the signal to be tested is normalized to obtain a first signal for use as the input of a phase-locked loop. Specific steps may include:
[0047] The sine and cosine signals to be measured are normalized to obtain the normalized sine and cosine signals to be measured as the first signal.
[0048] The expressions for the first signal are (d1(k)-B1) / A1 and (d2(k)-B2) / A2.
[0049] In this embodiment, the signal to be measured includes a sine signal and a cosine signal, with the following expressions: In the formula, d1(k) is the sinusoidal signal to be measured, d2(k) is the cosine signal to be measured, A1 and B1 are the amplitude and zero bias of the sinusoidal signal to be measured, and A2 and B2 are the amplitude and zero bias of the cosine signal to be measured. The two input signals of the phase-locked loop are replaced by (d1(k)-B1) / A1 and (d2(k)-B2) / A2, representing the normalized sinusoidal signal to be measured and the cosine signal to be measured.
[0050] In another exemplary embodiment, a first signal is input to a phase-locked loop to obtain an output angle, thereby obtaining a second signal for input to an adaptive notch filter. Specific steps may include:
[0051] Obtain the angular frequency of the first signal, and then obtain the output angle of the phase-locked loop based on the angular frequency of the signal.
[0052] The actual angle of the rotor is obtained, and the tracking angle error is calculated based on the actual angle and the output angle.
[0053] The first signal is processed by the angle tracking regulator in the phase-locked loop based on the tracking angle error to obtain the second signal.
[0054] The formula for calculating the tracking angle error of the angle tracking adjuster is as follows: ε represents the tracking angle error, and θ corresponds to the actual angle of the rotor. The phase-locked loop output angle, where ω is the signal angular frequency, and... In this embodiment, after the first signal is input to the phase-locked loop, the output angle of the phase-locked loop can be obtained through the angle tracking adjuster. And the tracking angle error ε, and then use the tracking angle error calculation formula to deduce and That is, sin(ωk) and cos(ωk) are used as the second signal input to the adaptive notch filter.
[0055] In an exemplary embodiment of this application, the specific steps for obtaining the amplitude of the signal under test using an adaptive notch filter may include:
[0056] The first and second signals are input into an adaptive notch filter, and the LMS adaptive algorithm is used to adaptively filter the first and second signals to obtain the filtering result.
[0057] The weight coefficient correction process is as follows:
[0058]
[0059] The expression for the filtering result is:
[0060]
[0061] In the formula, y(k) represents the filtering result. The signal to be measured includes the sinusoidal signal to be measured, and sin(ωk) and cos(ωk) are the second signals;
[0062] The amplitude of the signal under test is obtained based on the filtering result, expressed as follows:
[0063] In this embodiment, the first signal and the second signal are input into an adaptive notch filter, and the LMS (Least Mean Square) adaptive filtering algorithm is used to adaptively filter the first signal and the second signal. The weight coefficient correction process in this process is as follows:
[0064]
[0065] The expression for the resulting filter is as follows:
[0066]
[0067] In the formula, y(k) represents the filtering result. Let sin(ωk) be the sinusoidal signal to be measured, and cos(ωk) be the second signal. Based on the filtering results, the relationship between the signal to be measured and the second signal can be known. Therefore, after sampling the signal to be measured and obtaining the second signal through a phase-locked loop, the signal amplitude of the signal to be measured can be obtained by substituting it into the above calculation formula.
[0068] It should also be noted that when the signal to be measured includes not only a sine signal but also a cosine signal, the principle for calculating the amplitude of the cosine signal is the same as the above-mentioned principle, so it will not be repeated here.
[0069] In an exemplary embodiment of this application, the specific steps for extracting the zero-bias value of the signal under test using a low-pass filter within an adaptive notch filter may include:
[0070] Obtain the output signal of the low-pass filter in the adaptive notch filter. The output signal is the output of the zero bias value of the signal under test after low-pass filtering.
[0071] The output signal is analyzed and processed to identify the zero bias value of the signal under test.
[0072] Thus, through the above embodiments, this application can obtain the output of the zero-bias signal after passing through the low-pass filter while calculating and extracting the amplitude by adding a low-pass filter to the adaptive notch filter, thereby identifying the zero-bias value.
[0073] Figure 2 This is a block diagram illustrating a signal zero-bias and amplitude calibration system, as shown in an exemplary embodiment of this application. Figure 2 As shown, the system includes an adaptive notch filter and a phase-locked loop (PLL). The PLL is connected to the adaptive notch filter, and a low-pass filter is installed inside the adaptive notch filter.
[0074] The phase-locked loop is used to perform angle tracking processing on the first signal obtained after normalizing the signal to be measured when the magnetic encoder detects the rotor position, to obtain the second signal, and then transmit the second signal to the adaptive notch filter.
[0075] The adaptive notch filter includes multiple input terminals for receiving a first signal and a second signal, respectively. The adaptive notch filter is also used to obtain the amplitude of the signal under test based on the first signal and the second signal, and to obtain the zero bias value of the signal under test based on the output signal of the low-pass filter.
[0076] This system applies the zero-bias and amplitude calibration method for signals provided in this application. It normalizes the measured signal corresponding to the real-time acquisition and detection of rotor position to obtain a first signal. Then, the first signal is input into a phase-locked loop for angle tracking processing to obtain a second signal. The first and second signals are input into an adaptive notch filter to calculate the amplitude of the measured signal. The output signal of the low-pass filter within the adaptive notch filter is acquired, and the zero-bias value of the measured signal is obtained based on the output signal. Thus, the zero-bias and amplitude calibration system provided in this application can individually calibrate the measured signal for each rotor position detection, overcoming the limitation of Fourier transform requiring large amounts of data for calculation due to limited device storage space. Furthermore, the addition of a low-pass filter to the adaptive notch filter filters out DC signals, calibrating the amplitude and zero-bias value of the measured signal, achieving signal amplitude and zero-bias extraction, reducing the impact of noise, and improving the accuracy of the results.
[0077] In another exemplary embodiment, an angle tracking adjuster is provided within the phase-locked loop for performing angle tracking processing on the first signal to obtain the second signal. See also... Figure 3 , Figure 3 This is a schematic diagram of an adaptive notch filter and a phase-locked loop that implement the zero-bias and amplitude calibration method of a signal in an exemplary embodiment of this application.
[0078] like Figure 3 As shown, the sensor signal output by the magnetic encoder when detecting the rotor position is acquired, and the signal to be measured obtained by AD acquisition processing is used as the raw input d(k) to the signal zero bias and amplitude calibration system. d(k) includes the sinusoidal signal to be measured. Sum and cosine of the signal to be measured Then, the sinusoidal and cosine signals to be measured are normalized to obtain the normalized sinusoidal signal (d1(k)-B1) / A1 and cosine signal (d2(k)-B2) / A2, which serve as the inputs to the first signal phase-locked loop (PLL). The angle tracking regulator in the PLL obtains the PLL's output angle and tracking angle error based on the first signal, thus leading to the formula for calculating the tracking angle error. Calculate the corresponding second signals sin(ωk) and cos(ωk).
[0079] The second signal is returned as the input of the adaptive notch filter. The LMS adaptive algorithm is used to adaptively filter the first and second signals to obtain the amplitude. The zero bias value of the signal under test is identified by using the low-pass filtered output signal B(k). Thus, the zero bias and amplitude calibration of the signal are completed.
[0080] It should be noted that the signal zero-bias and amplitude calibration system provided in the above embodiments and the signal zero-bias and amplitude calibration method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the signal zero-bias and amplitude calibration system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0081] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the signal zero-bias and amplitude calibration methods provided in the above embodiments.
[0082] Figure 4 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 4 The computer system 400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0083] like Figure 4 As shown, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 402 or programs loaded from Storage Unit 408 into Random Access Memory (RAM) 403. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404.
[0084] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.
[0085] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs various functions defined in the system of this application.
[0086] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0087] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0088] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0089] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for zero-bias and amplitude calibration of a signal. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not incorporated into the electronic device.
[0090] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the zero-bias and amplitude calibration methods for signals provided in the various embodiments described above.
[0091] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for zero offset and amplitude calibration of a signal, characterized in that, The method, applied to an adaptive notch filter, wherein the adaptive notch filter incorporates a low-pass filter, includes: Real-time acquisition of the signal to be measured when the magnetic encoder detects the rotor position; The sine and cosine signals to be measured are normalized to obtain the normalized sine and cosine signals to be measured as the first signal. The expressions for the first signal are (d1(k)-B1) / A1 and (d2(k)-B2) / A2; The first signal is input into the phase-locked loop for angle tracking processing to obtain the second signal; The first signal and the second signal are input into the adaptive notch filter, and the LMS adaptive algorithm is used to adaptively filter the first signal and the second signal to obtain the filtering result. The weight coefficient correction process is as follows: wherein is the weight coefficient of the first filter after the update at the kth iteration, is the current weight coefficient of the first filter at the kth iteration, and μ is a step size parameter, is the error signal at the kth iteration, is the input vector of the first filter at the kth iteration, is the weight coefficient of the second filter after the update at the kth iteration, is the current weight coefficient of the second filter at the kth iteration, is the input vector of the second filter at the kth iteration. The expression for the filtering result is: ; In the formula, The filtering result is... The signal to be measured includes sinusoidal signals to be measured. and This is the second signal; The amplitude of the signal under test is obtained based on the filtering result, expressed as follows: ; Obtain the output signal of the low-pass filter in the adaptive notch filter, and obtain the zero bias value of the signal under test based on the output signal.
2. The method according to claim 1, characterized in that, The signal to be measured when the magnetic encoder detects the rotor position in real time includes: The sensor signal output by the magnetic encoder when detecting the rotor position is acquired, and the sensor signal is processed by AD acquisition to obtain the signal to be measured; The signal to be measured includes a sinusoidal signal and a cosine signal, with the following expressions: and In the formula, The signal to be measured is a sinusoidal signal. The cosine signal to be measured is given by A1 and B1, which are the amplitude and zero bias values corresponding to the sine signal to be measured, and A2 and B2, which are the amplitude and zero bias values corresponding to the cosine signal to be measured.
3. The method according to claim 1, characterized in that, The step of inputting the first signal into the phase-locked loop for angle tracking processing to obtain the second signal includes: Obtain the angular frequency of the first signal, and obtain the output angle of the phase-locked loop based on the angular frequency of the signal. The actual angle of the rotor is obtained, and the tracking angle error is obtained based on the actual angle and the output angle. The first signal is processed by the angle tracking regulator within the phase-locked loop based on the tracking angle error to obtain the second signal.
4. The method according to claim 1, characterized in that, The step of acquiring the output signal of the low-pass filter within the adaptive notch filter and obtaining the zero-bias value of the signal under test based on the output signal includes: Obtain the output signal of the low-pass filter in the adaptive notch filter, wherein the output signal is the output of the zero bias value of the signal under test after low-pass filtering. The output signal is analyzed to identify the zero bias value of the signal under test.
5. A signal zero-bias and amplitude calibration system, characterized in that, The zero-bias and amplitude calibration system of the signal includes an adaptive notch filter and a phase-locked loop. The phase-locked loop is connected to the adaptive notch filter, and a low-pass filter is provided inside the adaptive notch filter. The phase-locked loop is used to perform angle tracking processing on the first signal obtained by normalizing the test signal corresponding to the rotor position detected by the magnetic encoder, to obtain a second signal, and transmit the second signal to the adaptive notch filter; wherein, the specific steps of normalizing the test signal to obtain the first signal include: normalizing the sine test signal and the cosine test signal included in the test signal to obtain the normalized sine test signal and the cosine test signal as the first signal; the expression of the first signal is (d1(k)-B1) / A1 and (d2(k)-B2) / A2; The adaptive notch filter includes multiple input terminals, which are respectively used to receive the first signal and the second signal; the adaptive notch filter is also used to input the first signal and the second signal into the adaptive notch filter, use the LMS adaptive algorithm to adaptively filter the first signal and the second signal to obtain the filtering result, and obtain the zero bias value of the signal under test based on the output signal of the low-pass filter output terminal; The weight coefficient correction process is as follows: In the formula, Let the weight coefficients of the first filter be the values after the k-th iteration update. Let μ be the current weight coefficient of the first filter in the k-th iteration, and μ be the step size parameter. Let be the error signal at the k-th iteration. Let be the input vector of the first filter in the k-th iteration. Let the weight coefficients of the second filter be the values after the k-th iteration update. Let be the current weight coefficients of the second filter at the k-th iteration. Let be the input vector of the second filter at the k-th iteration; The expression for the filtering result is: ; In the formula, The filtering result is... The signal to be measured includes sinusoidal signals to be measured. and This is the second signal; The amplitude of the signal under test is obtained based on the filtering result, expressed as follows: .
6. The system according to claim 5, characterized in that, The phase-locked loop is equipped with an angle tracking adjuster, which is used to perform angle tracking processing on the first signal to obtain the second signal.
7. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the zero-bias and amplitude calibration method for a signal as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the zero-bias and amplitude calibration method for the signal according to any one of claims 1 to 4.