A method and apparatus for magnetic interference compensation
By combining a linear extended state observer, linear state error feedback control, and a frequency adaptive proportional resonant controller, the problem of insufficient magnetic interference suppression in magnetocardiography of the heart and brain was solved, and effective suppression of random and high-amplitude unknown frequency interference was achieved, thus improving imaging quality.
Patent Information
- Application Number
- CN202510261964.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-03-06
AI Technical Summary
Existing technologies struggle to effectively suppress random interference and high-amplitude, unknown-frequency magnetic interference in magnetocardiography (MCG) of the heart and brain, resulting in insufficient magnetic interference suppression and affecting image quality.
By combining a linear extended state observer, a linear state error feedback control law, and a frequency adaptive proportional resonant controller, a compensation current with the same amplitude and opposite direction to the magnetic interference is generated to suppress the magnetic interference by acquiring magnetic field information and the control signal from the previous moment.
It effectively improves the system's anti-interference ability and stability against random interference and high-amplitude unknown frequency interference, and enhances the signal-to-noise ratio and imaging quality of magnetic resonance imaging of the heart and brain.
Smart Images

Figure CN120185375B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of magnetic compensation technology, specifically to a magnetic interference compensation method and apparatus. Background Technology
[0002] Cardiac and brain functional imaging technology enables dynamic monitoring of the spatiotemporal characteristics of the heart and brain, providing an important tool for research in the human life sciences field for the diagnosis of major cardiac and brain diseases. Among them, magnetocardiography (MCG) and magnetoencephalography (MEG) possess both high temporal and spatial resolution, making them among the most advanced functional imaging technologies in the current field of cardiac and brain functional imaging. The SERF magnetocardiogram (MCG / MEG) system has a theoretical magnetic field measurement sensitivity of up to aT (1 aT = 10⁻⁶). -18 With a magnetic resonance imaging (MRSI) signal in the pT (10^6) range and the added advantages of wearability and flexible application, it is expected to become a new generation of mobile wearable magnetic resonance imaging (MRSI) medical equipment for the heart and brain, with broader application prospects. However, MRSI is an extremely complex technology, and the cardiac magnetic resonance signal is only pT (10^6) -12 The intensity of the brain magnetic field outside the scalp is on the order of T, which is fT(10). -15 The magnitude is on the order of T, much smaller than the 50 uT (10) of the Earth's magnetic field. -6 To improve the imaging quality of magnetocardiography (MCG) of the brain and heart, a highly stable, low-noise, near-zero magnetic environment is essential. Applying active magnetic compensation to a passive magnetic shielding chamber helps to further enhance the level of magnetic interference suppression, achieving high signal-to-noise ratio MCG imaging.
[0003] Achieving high-performance compensation control for magnetic interference is one of the key issues in improving the level of magnetic interference suppression. Currently, in the field of magnetic resonance imaging (MRI) of the heart and brain, magnetic interference compensation is mainly based on PID control algorithms. However, PID, a passive method of eliminating errors based on error feedback, only takes effect after the disturbance has an impact on the object, thus its anti-interference capability is limited. Although extended observers can further attenuate random disturbances on the basis of PID, increasing the system's anti-interference capability, they are limited by the bandwidth of the extended observer and cannot effectively attenuate high-amplitude unknown-frequency magnetic interference introduced by high-power electrical appliances in the environment. Summary of the Invention
[0004] In view of this, the present invention provides a magnetic interference compensation method and apparatus to solve the problem of how to improve the performance of the magnetic compensation control system to achieve dynamic compensation for random interference and high-amplitude unknown frequency interference.
[0005] In a first aspect, the present invention provides a magnetic interference compensation method, comprising: acquiring magnetic field information at the current moment; based on the magnetic field information at the current moment and the control signal at the previous moment, obtaining an intermediate control signal at the current moment using a linear extended state observer and a linear state error feedback control law; based on the intermediate control signal at the current moment, obtaining the control signal at the current moment using a frequency adaptive proportional resonant controller; and based on the control signal at the current moment, controlling a current source to generate a compensation current at the current moment, wherein the compensation current is used to generate a magnetic field with the same amplitude but opposite direction to the magnetic interference.
[0006] This invention proposes for the first time a frequency-adaptive proportional resonant controller, which can effectively suppress high-amplitude magnetic field interference at unknown frequencies. Furthermore, this scheme avoids attenuation of the output control gain at non-resonant frequencies caused by the resonant controller under the control of the linear extended state observer and linear feedback control law. Combining the linear extended state observer, linear feedback control law, and frequency-adaptive proportional resonant controller effectively improves the system's anti-interference capability and stability when random disturbances and high-amplitude unknown frequency interference coexist.
[0007] In one alternative implementation, the current magnetic field information includes the residual magnetic interference information at the current moment and the magnetic field information generated by the compensation current at the previous moment.
[0008] In one optional implementation, the process of obtaining the intermediate control signal at the current moment includes: obtaining multiple estimated parameters at the current moment using a linear extended state observer based on the magnetic field information at the current moment and the control signal at the previous moment; and obtaining the intermediate control signal at the current moment by combining the magnetic interference preset parameters and the multiple estimated parameters at the current moment with a linear state error feedback control law.
[0009] In one optional implementation, the process of obtaining the control signal at the current moment includes: obtaining an estimated value of the magnetic interference frequency at the current moment using a frequency estimator based on the magnetic field information at the current moment; and converting the intermediate control signal at the current moment into the control signal at the current moment using a proportional resonant controller based on the estimated value of the magnetic interference frequency at the current moment.
[0010] In one optional implementation, the process of obtaining the magnetic interference frequency estimate at the current moment using a frequency estimator includes: establishing a noise subspace matrix and a sweep frequency matrix; constructing a spectral peak search function matrix based on the orthogonality between the sweep frequency matrix and the noise subspace matrix; finding the row vector in the sweep frequency matrix corresponding to the maximum value of the elements of the spectral peak search function matrix; and calculating the magnetic interference frequency estimate at the current moment based on the position of the found row vector.
[0011] In one optional implementation, the process of establishing the noise subspace matrix includes: segmenting and stacking the magnetic field information at the current moment according to the time series to form a multidimensional observation matrix; using the multidimensional observation matrix to solve for the covariance matrix to obtain the autocorrelation matrix; performing singular value decomposition on the autocorrelation matrix to obtain the singular value matrix; calculating singular values based on the singular value matrix; using the number of singular values less than 1 as the number of column vectors of the noise subspace matrix, and constructing the noise subspace matrix.
[0012] This invention's frequency estimator employs a frequency estimation method based on a multiple signal classification algorithm, transforming the frequency estimation problem of high-amplitude magnetic field interference into a problem of determining the orthogonality of the signal subspace and noise subspace. This method constructs a covariance matrix based on sensor feedback signals and performs eigenvalue decomposition or singular value decomposition on the covariance matrix to obtain the signal and noise subspaces. A spectral peak search is performed using the orthogonality criterion between the signal and noise subspaces to extract the dominant frequency component of the high-amplitude magnetic interference. This method maintains high estimation accuracy with limited data length and is suitable for low signal-to-noise ratio or multi-frequency magnetic interference environments.
[0013] Secondly, the present invention provides a magnetic interference compensation device based on the magnetic interference compensation method of the first aspect and any optional embodiment thereof. The device includes: a magnetometer, an analog-to-digital converter, a first control module, a second control module, a digital-to-analog converter, and a current source. The magnetometer is used to acquire magnetic field information at the current moment; the analog-to-digital converter is used to convert the magnetic field information at the current moment into a digital signal; the first control module is used to obtain an intermediate control signal at the current moment based on the magnetic field information at the current moment and the control signal at the previous moment, using a linear extended state observer and a linear state error feedback control law; the second control module is used to obtain the control signal at the current moment based on the intermediate control signal at the current moment using a frequency adaptive proportional resonant controller; the digital-to-analog converter is used to convert the control signal at the current moment into an analog signal; and the current source is used to generate a compensation current at the current moment based on the control signal at the current moment, the compensation current being used to generate a magnetic field with the same amplitude but opposite direction to the magnetic interference.
[0014] In one optional implementation, the first control module includes: a linear extended state observer and a linear state error feedback control law, wherein the linear extended state observer is used to obtain multiple estimated parameters at the current time based on the magnetic field information at the current time and the control signal at the previous time; the linear state error feedback control law is used to obtain an intermediate control signal at the current time based on the magnetic interference preset parameters and the multiple estimated parameters at the current time.
[0015] In one optional implementation, the current magnetic field information includes the residual magnetic interference information at the current moment and the magnetic field information generated by the compensation current at the previous moment. Then, the second control module includes: a frequency estimator and a proportional resonant controller. The frequency estimator is used to obtain the magnetic interference frequency estimate at the current moment based on the residual magnetic interference information at the current moment. The proportional resonant controller is used to convert the intermediate control signal at the current moment into the control signal at the current moment based on the magnetic interference frequency estimate at the current moment.
[0016] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the magnetic interference compensation method of the first aspect or any corresponding embodiment described above.
[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the magnetic interference compensation method of the first aspect or any corresponding embodiment described above.
[0018] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the magnetic interference compensation method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a schematic flowchart of a magnetic interference compensation method according to an embodiment of the present invention;
[0021] Figure 2 This is a block diagram of magnetic interference compensation control according to an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of a frequency adaptive proportional resonant controller according to an embodiment of the present invention;
[0023] Figure 4 This is a waveform diagram used in experimental verification.
[0024] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] According to an embodiment of the present invention, a magnetic interference compensation method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0027] This embodiment provides a magnetic interference compensation method, such as Figure 1 As shown, it includes:
[0028] Step S1: Obtain the magnetic field information at the current moment.
[0029] Specifically, magnetic measuring instruments can be used to detect residual magnetic interference information in the current system. These instruments can be magnetometers, etc., but this is just an example and is not a limitation.
[0030] Optionally, the current magnetic field information includes the residual magnetic interference information at the current moment and the magnetic field information generated by the compensation current at the previous moment.
[0031] Step S2: Based on the magnetic field information at the current moment and the control signal at the previous moment, the intermediate control signal at the current moment is obtained by using the linear extended state observer and the linear state error feedback control law.
[0032] Specifically, before obtaining the intermediate control signal at the current moment, since the output value of the magnetic measuring instrument is an analog signal, it is necessary to use an analog-to-digital converter to convert the analog signal into a digital signal.
[0033] Specifically, the linear extended state observer is the core component of the active disturbance rejection control system. It can observe the system's state variables and unknown disturbances. However, since the linear extended state observer will have observation errors, it can be suppressed by using a linear state error feedback control law.
[0034] Step S3: Based on the intermediate control signal at the current moment, obtain the control signal at the current moment using a frequency adaptive proportional resonant controller.
[0035] Specifically, the frequency of the current magnetic interference is first estimated using a frequency adaptive proportional resonant controller, and then the intermediate control signal is converted into a control signal for the current source based on the frequency estimate of the magnetic interference.
[0036] Step S4: Based on the control signal at the current moment, control the current source to generate the compensation current at the current moment. The compensation current is used to generate a magnetic field with the same amplitude but opposite to the magnetic interference.
[0037] Specifically, a controlled current source is set up, which can be a DC-DC power supply, etc. The control signal is the drive signal of the internal switch of the DC-DC power supply. After the current output by the current source is applied to the magnetic compensation coil, a magnetic field with the same amplitude and opposite to the magnetic interference is generated, thereby suppressing the influence of magnetic interference.
[0038] In some optional implementations, the process of obtaining the intermediate control signal at the current moment includes:
[0039] Based on the magnetic field information at the current moment and the control signal at the previous moment, multiple estimated parameters at the current moment are obtained using a linear extended state observer; based on the magnetic disturbance preset parameters and the multiple estimated parameters at the current moment, combined with the linear state error feedback control law, the intermediate control signal at the current moment is obtained.
[0040] Optionally, the control block diagram of this embodiment is as follows: Figure 2 As shown, during the entire control process, it is necessary to construct the transfer functions of the magnetic field coil and the magnetometer, where the transfer functions of the magnetic field coil and the magnetometer are respectively:
[0041] (1)
[0042] (2)
[0043] in, G vi ( s ) is the transfer function of the magnetic field coil; k c The constant of the coil; L For coil inductance; R The coil resistance; s As a complex frequency variable, it has no practical significance; G s ( s ) is the transfer function of the magnetometer; k s The coefficient by which a magnetometer converts a magnetic field into a voltage value; ω s This represents the bandwidth of the magnetometer.
[0044] Optionally, the process of obtaining the intermediate control signal at the current moment includes: constructing the state equation of the linear extended observer under the pole configuration; and obtaining multiple estimated parameters at the current moment based on the magnetic field information at the current moment, the control signal at the previous moment, and the state equation of the linear extended observer.
[0045] Specifically, refer to Figure 2 System input r Output y and disturbance f d Differential equations between:
[0046] (3)
[0047] Among them, system input r for Figure 2 In B ref ( t ), B ref ( t The actual value is 0; output y for Figure 2 middle B out( t ); disturbance f d for Figure 2 middle f e ( t ), f e ( t () represents the preset magnetic field interference parameters in the environment; u for Figure 2 In u 2(t); b 0 represents the controller coefficient, which can change the adjustable parameters of the controller output.
[0048] Based on equation (3), the state equation of the linear extended observer under the pole configuration is constructed as follows:
[0049] (4)
[0050] in, x 1 represents an estimate of the system output y; x 2 represents the derivative with respect to the system output. The estimated value; x 3 indicates the disturbance to the system. f d The estimated value; ω 0 represents the bandwidth of the extended state observer.
[0051] Based on equations (1) to (4), and combined with the linear state error feedback control law of equation (5), the closed-loop transfer function of the magnetic compensation system under the control of the linear extended state tensor observer and the linear feedback control law is derived. G 1( s ):
[0052] (5)
[0053] (6)
[0054] Among them, U ( s ) indicates to u The result of performing the Laplace transform; X 1(s) represents the pair of pairs ... x The result of performing a Laplace transform on 1(s); X 2( s ) indicates to x 2( s The result after performing a Laplace transform; x 3( s ) indicates to x 3( s The result after performing a Laplace transform; R ( s ) indicates to r The result after performing the Laplace transform; k da These are the digital-to-analog conversion coefficients; k ad These are the analog-to-digital conversion coefficients; k p Indicates proportional gain. k d This represents the differential gain.
[0055] In equation (6), G ref (s) is the transfer function of the linear state error feedback control law, specifically:
[0056] (7)
[0057] in, ω c This represents the bandwidth of the linear feedback control law.
[0058] G b ( s ) is the transfer function of the linear extended state tension observer, specifically:
[0059] (8)
[0060] In some alternative implementations, the process of obtaining the control signal at the current moment includes:
[0061] Based on the magnetic field information at the current moment, the frequency estimator is used to obtain the estimated value of the magnetic interference frequency at the current moment; based on the estimated value of the magnetic interference frequency at the current moment, the proportional resonant controller is used to convert the intermediate control signal at the current moment into the control signal at the current moment.
[0062] Specifically, based on the closed-loop transfer function of the magnetic compensation system under linear extended state observer and linear feedback control law, a frequency adaptive proportional resonant controller is introduced to obtain the transfer function of the magnetic disturbance compensation control system based on the adaptive proportional resonant controller. Figure 3 This is a schematic diagram of a frequency adaptive proportional resonant controller, which consists of two parts: a frequency estimator and a proportional resonant controller.
[0063] In one optional implementation, the process of obtaining the magnetic interference frequency estimate at the current moment using a frequency estimator includes: establishing a noise subspace matrix and a sweep frequency matrix; constructing a spectral peak search function matrix based on the orthogonality between the sweep frequency matrix and the noise subspace matrix; finding the row vector in the sweep frequency matrix corresponding to the maximum value of the elements of the spectral peak search function matrix; and calculating the magnetic interference frequency estimate at the current moment based on the position of the found row vector.
[0064] Optionally, the process of establishing the noise subspace matrix includes: segmenting and stacking the magnetic field information at the current moment according to the time series to form a multidimensional observation matrix; using the multidimensional observation matrix to solve the covariance matrix to obtain the autocorrelation matrix; performing singular value decomposition on the autocorrelation matrix to obtain the singular value matrix; calculating singular values based on the singular value matrix; using the number of singular values less than 1 as the number of column vectors of the noise subspace matrix, and constructing the noise subspace matrix.
[0065] Specifically, the collected data at the current moment, i.e., Bout(t), is first segmented according to the time series and stacked to form a multidimensional observation matrix. The covariance matrix is then solved using the multidimensional observation matrix to obtain the autocorrelation matrix, as follows:
[0066] (9)
[0067] in, R x Represents the autocorrelation matrix; P m×n This represents the matrix obtained after slicing; m This represents the dimension of each slice vector; n This indicates the number of slice vectors.
[0068] This approach significantly reduces the estimated variance of the covariance matrix by increasing the temporal redundancy of the observed samples, while suppressing the influence of random noise, ensuring that the matrix is closer to the true statistical properties under limited data conditions.
[0069] For autocorrelation matrix R x Singular value decomposition is performed, and the signal subspace and noise subspace are determined by the magnitude of the singular values.
[0070] (10)
[0071] in, U It is a left singular value matrix; M It is a right singular value matrix; T This indicates transpose.
[0072] The number of singular values less than 1 in the left and right singular value matrices is taken as the number of column vectors of the noise subspace matrix.
[0073] The frequency sweep matrix is established using the following formula:
[0074] (11)
[0075] (12)
[0076] in, C 1 represents a sinusoidal sweep frequency matrix; C 2 represents the cosine sweep frequency matrix; q Indicates the sweep frequency f i ( i =1,2,..., q The number of ); t s This indicates the time for a single sampling.
[0077] Based on the orthogonality between the frequency sweep matrix and the noise subspace matrix, a spectral peak search function vector is constructed.
[0078] Frequency estimates It can be represented as:
[0079] (13)
[0080] in, ω 1=2 πf 1 indicates the initial value of the sweep frequency; k v This represents the row vector in the sweep matrix corresponding to the maximum value of the element in the spectral peak search function matrix. V q×1Position in the middle; Δ f This indicates the preset frequency difference.
[0081] Δ f The calculation formula is as follows:
[0082] (14)
[0083] in, f i The sweep frequency matrix represents the first... i The sweep frequency of the row; f i-1 The sweep frequency matrix represents the first... i -1 row sweep frequency; i =1~N, where N is the number of rows in the sweep frequency matrix.
[0084] The transfer function of the proportional resonant controller is:
[0085] (15)
[0086] in, k m Indicates proportional gain; k n This represents the gain coefficient of the resonant controller; k r This is the resonant frequency of the resonant controller; ε Indicates the damping factor; This represents the resonant frequency of the resonant controller, a value derived from the output of the frequency estimator. supply.
[0087] The proportional resonant controller employs a parallel structure of proportional and resonant terms, incorporating an adaptive damping factor into the resonant term. This allows the controller to dynamically adjust its compensation characteristics based on the interference frequency and amplitude, suppressing gain attenuation at non-resonant frequencies. Furthermore, this structure enhances system stability under variable-frequency magnetic interference environments, avoids compensation errors caused by resonant frequency shifts, and improves the robustness of magnetic field compensation.
[0088] Based on the above analysis, the transfer function of the magnetic interference compensation control system based on the frequency adaptive proportional resonant controller is as follows:
[0089] (16)
[0090] This embodiment verifies the above method by using the PID compensation method, no compensation, and the compensation method of this embodiment to obtain the waveform of the magnetic field as follows: Figure 4 As shown, by Figure 4 It is evident that the method proposed in this invention can effectively compensate for random interference and high-amplitude unknown frequency interference, enabling the subject's magnetic field signal to be clearly observed.
[0091] This embodiment also provides a magnetic interference compensation device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0092] This embodiment provides a magnetic interference compensation device based on the magnetic interference compensation method of the above embodiments and any optional implementations. The device includes: a magnetometer, an analog-to-digital converter, a first control module, a second control module, a digital-to-analog converter, and a current source.
[0093] A magnetometer is used to obtain magnetic field information at the current moment;
[0094] An analog-to-digital converter is used to convert the current magnetic field information into a digital signal;
[0095] The first control module is used to obtain the intermediate control signal at the current moment based on the magnetic field information at the current moment and the control signal at the previous moment, using a linear extended state observer and a linear state error feedback control law.
[0096] The second control module is used to obtain the control signal at the current moment based on the intermediate control signal at the current moment using a frequency adaptive proportional resonant controller;
[0097] A digital-to-analog converter is used to convert the control signal at the current moment into an analog signal;
[0098] The current source is used to generate the compensation current based on the control signal at the current moment. The compensation current is used to generate a magnetic field with the same amplitude but opposite direction to the magnetic interference.
[0099] In some optional implementations, the first control module includes: a linear extended state observer and a linear state error feedback control law, wherein,
[0100] The linear extended state observer is used to obtain multiple estimated parameters at the current moment based on the magnetic field information at the current moment and the control signal at the previous moment;
[0101] The linear state error feedback control law is used to obtain the intermediate control signal at the current moment based on the preset parameters of magnetic disturbance and multiple estimated parameters at the current moment.
[0102] In some optional implementations, the current magnetic field information includes the residual magnetic interference information at the current moment and the magnetic field information generated by the compensation current at the previous moment. In this case, the second control module includes: a frequency estimator and a proportional resonant controller.
[0103] The frequency estimator is used to obtain the estimated magnetic interference frequency at the current moment based on the residual magnetic interference information at the current moment;
[0104] The proportional resonant controller is used to convert the intermediate control signal at the current moment into the control signal at the current moment based on the estimated magnetic interference frequency at the current moment.
[0105] Specifically, refer to Figure 2 The system consists of a magnetic shielding chamber to shield against strong interference from geomagnetic and electromagnetic equipment; a magnetometer to measure residual magnetic interference information within the shielding chamber; an analog-to-digital converter to convert analog magnetic interference quantities into digital quantities; a linear extended state observer to estimate system output and disturbance information, and to generate intermediate control signals based on a linear state error feedback control law; a frequency adaptive proportional resonant controller to further enhance the system's ability to suppress high-amplitude, unknown-frequency magnetic interference, generating the final digital control signal; a digital-to-analog converter to convert the digital control signal into an analog quantity; a current source to generate corresponding current based on the analog control signal; and a magnetic compensation coil to generate a magnetic field with the same amplitude but opposite direction to the magnetic interference to cancel it out.
[0106] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0107] In this embodiment, the magnetic interference compensation device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0108] This invention also provides a computer device having the above-described magnetic interference compensation device.
[0109] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.
[0110] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0111] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0112] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0113] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0114] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0115] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0116] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0117] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0118] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A magnetic interference compensation method, characterized by, The method comprises: acquiring magnetic field information at a current moment; based on the magnetic field information at the current moment and a control signal at a previous moment, obtaining an intermediate control signal at the current moment by using a linear extended state observer and a linear state error feedback control law; based on the intermediate control signal at the current moment, obtaining a control signal at the current moment by using a frequency adaptive proportional-resonant controller; based on the control signal at the current moment, controlling a current source to generate a compensation current at the current moment, the compensation current being used to generate a magnetic field with the same amplitude and opposite direction as a magnetic disturbance; the magnetic field information at the current moment comprises residual magnetic disturbance information at the current moment and magnetic field information generated by the compensation current at the previous moment; the process of obtaining the control signal at the current moment comprises: based on the magnetic field information at the current moment, obtaining a magnetic disturbance frequency estimation value at the current moment by using a frequency estimator; and based on the magnetic disturbance frequency estimation value at the current moment, converting the intermediate control signal at the current moment into the control signal at the current moment by using a proportional-resonant controller; the process of obtaining the magnetic disturbance frequency estimation value at the current moment by using the frequency estimator comprises: establishing a noise subspace matrix and a sweep matrix; constructing a spectral peak search function matrix according to the orthogonality between the sweep matrix and the noise subspace matrix; finding a row vector in the sweep matrix corresponding to the maximum value of an element of the spectral peak search function matrix; and based on the position of the found row vector, calculating the magnetic disturbance frequency estimation value at the current moment.
2. The magnetic interference compensation method according to claim 1, characterized in that, the process of obtaining the intermediate control signal at the current moment comprises: based on the magnetic field information at the current moment and the control signal at the previous moment, obtaining a plurality of estimated value parameters at the current moment by using a linear extended state observer; based on a magnetic disturbance preset parameter and the plurality of estimated value parameters at the current moment, obtaining the intermediate control signal at the current moment by combining a linear state error feedback control law.
3. The magnetic interference compensation method of claim 1, wherein, the process of establishing the noise subspace matrix comprises: segmenting and stacking the magnetic field information at the current moment according to a time sequence to form a multi-dimensional observation matrix; solving a covariance matrix by using the multi-dimensional observation matrix to obtain an autocorrelation matrix; performing singular value decomposition on the autocorrelation matrix to obtain a singular value matrix; based on the singular value matrix, calculating singular values; taking the number of singular values less than 1 as the number of matrix column vectors of the noise subspace, and constructing the noise subspace matrix.
4. A magnetic interference compensation device, characterized by The magnetic disturbance compensation method according to any one of claims 1-3, the device comprises: a magnetometer, an analog-to-digital converter, a first control module, a second control module, a digital-to-analog converter, and a current source, wherein the magnetometer is used to acquire magnetic field information at a current moment; the analog-to-digital converter is used to convert the magnetic field information at the current moment into a digital signal; the first control module is used to obtain an intermediate control signal at the current moment by using a linear extended state observer and a linear state error feedback control law based on the magnetic field information at the current moment and a control signal at a previous moment; the second control module is used to obtain a control signal at the current moment by using a frequency adaptive proportional-resonant controller based on the intermediate control signal at the current moment; and the current source is used to generate a compensation current at the current moment based on the control signal at the current moment. The digital-to-analog converter is configured to convert the control signal at the current time into an analog signal. The current source is configured to generate a compensation current at the current time based on the control signal at the current time, and the compensation current is configured to generate a magnetic field with a same magnitude and opposite direction as the magnetic interference.
5. The magnetic interference compensation device of claim 4, wherein, The first control module comprises a linear extended state observer and a linear state error feedback control law, wherein The linear extended state observer is configured to obtain a plurality of estimated value parameters at the current time based on the magnetic field information at the current time and the control signal at the previous time. The linear state error feedback control law is configured to obtain an intermediate control signal at the current time based on the magnetic interference preset parameter and the plurality of estimated value parameters at the current time.
6. The magnetic interference compensation device of claim 4, wherein, The magnetic field information at the current time comprises residual magnetic interference information at the current time and magnetic field information generated by the compensation current at the previous time, and the second control module comprises a frequency estimator and a proportional resonant controller, wherein The frequency estimator is configured to obtain a magnetic interference frequency estimation value at the current time based on the residual magnetic interference information at the current time. The proportional resonant controller is configured to convert the intermediate control signal at the current time into the control signal at the current time based on the magnetic interference frequency estimation value at the current time.
7. A computer device, comprising: comprising: a memory and a processor, which are communicatively connected, and the memory stores computer instructions, and the processor executes the computer instructions to perform the magnetic interference compensation method in any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the magnetic interference compensation method in any one of claims 1 to 3.
9. A computer program product, characterised in that, comprising computer instructions, which are used to make a computer execute the magnetic interference compensation method in any one of claims 1 to 3.
Citation Information
Patent Citations
Magnetic compensation control system and method based on frequency conversion tracking and suppression
CN118295232A
External magnetic field active disturbance rejection control method and system based on Kalman filtering
CN119472290A