Magnetic interference compensation method and device
By combining the linear expansion state observer, linear state error feedback control law and frequency adaptive proportional resonance controller, the problem of suppressing magnetic interference in cardioencephalogram imaging is solved, and the anti-interference ability and imaging quality are significantly improved.
Patent Information
- Application Number
- CN202510261964.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The prior art is difficult to effectively suppress random interference and high-magnitude unknown frequency magnetic interference in cardioencephalography imaging, resulting in limited anti-interference ability.
A linear expansion state observer and linear state error feedback control law are used to combine with frequency adaptive proportional resonance controller to dynamically compensate magnetic interference to generate a magnetic field with an amplitude opposite to magnetic interference.
It significantly improves the system's anti-interference ability and stability against random interference and high-magnitude unknown frequency interference, and improves the quality of cardioencephalography imaging.
Smart Images

Figure CN120185375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of magnetic compensation, and particularly to a magnetic interference compensation method and device. Background Art
[0002] Cardio-cerebral function imaging technology can realize the dynamic monitoring of the spatio-temporal characteristics of the heart and brain, and provide an important tool for the research in the field of human life sciences for the diagnosis of major heart and brain diseases. Among them, magnetocardiogram (MCG) and magnetoencephalogram (MEG) have both high time resolution and spatial resolution, and are one of the most advanced functional imaging technologies in the current field of cardio-cerebral function imaging. The theoretical sensitivity of the SERF cardio-cerebral magnetograph for magnetic field measurement can reach the order of aT (1 aT = 10 -18 T), and it also has the advantages of being wearable and flexible in application. It is expected to become a new generation of mobile and wearable cardio-cerebral magnetograph imaging medical equipment, with a broader application prospect. However, cardio-cerebral magnetograph imaging is an extremely complex technology. The magnetocardiogram signal is only at the order of pT (10 -12 T), and the intensity of the brain magnetic field outside the scalp is at the order of fT (10 -15 T), which is much smaller than the 50 μT (10 -6 T) of the geomagnetic field. In order to improve the imaging quality of the cardio-cerebral magnetograph, it is necessary to provide a near-zero magnetic environment with high stability and low noise for it. Applying active magnetic compensation on the basis of a passive magnetic shielding cabin helps to further improve the level of magnetic interference suppression and achieve high signal-to-noise ratio cardio-cerebral magnetograph imaging.
[0003] Achieving high-performance compensation control of magnetic interference is one of the key issues for improving the level of magnetic interference suppression. At present, the compensation of magnetic interference in the field of cardio-cerebral magnetic measurement is mostly based on the PID control algorithm. However, this passive way of eliminating errors based on error feedback in PID must wait until the disturbance affects the object before it takes effect, so its anti-interference ability is limited. Although the extended observer can further attenuate random interference on the basis of PID and increase the anti-interference ability of the system. However, limited by the bandwidth of the extended observer, it is also unable to effectively attenuate the high-amplitude unknown frequency magnetic interference introduced by the operation of 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 device 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, including: obtaining 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, using a linear extended state observer and a linear state error feedback control law to obtain an intermediate control signal at the current moment; based on the intermediate control signal at the current moment, using a frequency adaptive proportional resonant controller to obtain a control signal at the current moment; based on the control signal at the current moment, controlling a current source to generate a compensation current at the current moment, and the compensation current is used to generate a magnetic field with the same amplitude and opposite direction to the magnetic interference.
[0006] The present invention first proposes a frequency adaptive proportional resonant controller, and this scheme can effectively suppress the high-amplitude magnetic field interference with unknown frequencies. And this scheme can avoid the attenuation of the gain of the output control quantity at non-resonant frequencies by the resonant controller for the linear extended observer and the linear feedback control law; combining the linear extended state observer, the linear feedback control law and the frequency adaptive proportional resonant controller can effectively improve the anti-interference ability and stability of the system when random interference and high-amplitude unknown frequency interference coexist.
[0007] In an optional implementation manner, 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 an optional implementation manner, the process of obtaining the intermediate control signal at the current moment includes: based on the magnetic field information at the current moment and the control signal at the previous moment, using a linear extended state observer to obtain multiple estimated value parameters at the current moment; based on the preset parameters of magnetic interference and the multiple estimated value parameters at the current moment, combining with the linear state error feedback control law to obtain the intermediate control signal at the current moment.
[0009] In an optional implementation manner, the process of obtaining the control signal at the current moment includes: based on the magnetic field information at the current moment, using a frequency estimator to obtain an 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, using a proportional resonant controller to convert the intermediate control signal at the current moment into the control signal at the current moment.
[0010] In an optional implementation manner, the process of using a frequency estimator to obtain an estimated value of the magnetic interference frequency at the current moment includes: establishing a noise subspace matrix and a frequency sweep matrix; according to the orthogonality between the frequency sweep matrix and the noise subspace matrix, constructing a spectral peak search function matrix; finding the row vector in the frequency sweep matrix corresponding to the maximum value of the elements of the spectral peak search function matrix; based on the position of the found row vector, calculating the estimated value of the magnetic interference frequency at the current moment.
[0011] In an alternative embodiment, the process of establishing the noise subspace matrix includes: segmenting and stacking the magnetic field information at the current moment according to a time series to form a multi-dimensional observation matrix; solving the covariance matrix using the multi-dimensional observation matrix to obtain the autocorrelation matrix; performing singular value decomposition on the autocorrelation matrix to obtain the singular value matrix; calculating the 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] The frequency estimator of the present invention adopts a frequency estimation method based on the multiple signal classification algorithm, which converts the frequency estimation problem of high-amplitude magnetic field interference into an orthogonality judgment problem between the signal subspace and the noise subspace. This method constructs a covariance matrix based on the sensor feedback signal, and performs eigenvalue decomposition or singular value decomposition on the covariance matrix to obtain the signal subspace and the noise subspace. The orthogonality criterion between the signal subspace and the noise subspace is used for spectral peak search to extract the main frequency component of the high-amplitude magnetic interference. This method can maintain a high estimation accuracy under a limited data length and is applicable to low signal-to-noise ratio or multi-frequency magnetic interference environments.
[0013] In a second aspect, the present invention provides a magnetic interference compensation device. Based on the magnetic interference compensation method of the first aspect and any of its alternative embodiments, 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. Among them, the magnetometer is used to obtain the 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 the 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 the control signal at the previous moment; the second control module is used to obtain the control signal at the current moment by using a frequency adaptive proportional resonance controller based on the intermediate control signal at the current moment; the digital-to-analog converter is used to convert the control signal at the current moment into an analog signal; the current source is used to generate the compensation current at the current moment based on the control signal at the current moment, and the compensation current is used to generate a magnetic field with the same amplitude and opposite direction to the magnetic interference.
[0014] In an alternative embodiment, the first control module includes: a linear extended state observer and a linear state error feedback control law. Among them, the linear extended state observer is used to obtain multiple estimated value parameters at the current moment based on the magnetic field information at the current moment and the control signal at the previous moment; 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 the magnetic interference and the multiple estimated value parameters at the current moment.
[0015] In an alternative embodiment, 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 configured to obtain an estimated value of the magnetic interference frequency at the current moment based on the residual magnetic interference information at the current moment. The proportional-resonant controller is configured to convert the intermediate control signal at the current moment into a control signal at the current moment based on the estimated value of the magnetic interference frequency at the current moment.
[0016] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which 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 according to the first aspect or any corresponding embodiment thereof.
[0017] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to perform the magnetic interference compensation method according to the first aspect or any corresponding embodiment thereof.
[0018] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to perform the magnetic interference compensation method according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is a schematic flowchart of the magnetic interference compensation method according to an embodiment of the present invention;
[0021] Figure 2 is a magnetic interference compensation control block diagram according to an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of the frequency adaptive proportional-resonant controller according to an embodiment of the present invention;
[0023] Figure 4 is an experimental verification waveform diagram;
[0024] Figure 5 is a schematic hardware structure diagram of the computer device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0026] According to an embodiment of the present invention, an embodiment of a magnetic interference compensation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0027] In this embodiment, a magnetic interference compensation method is provided, as Figure 1 shown, including:
[0028] Step S1: Obtain the magnetic field information at the current moment.
[0029] Specifically, a magnetic measurement instrument can be used to detect the residual magnetic interference information in the current system. The magnetic measurement instrument can be a magnetometer, etc., but only as an example here, and is not limited thereto.
[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, use a linear extended state observer and a linear state error feedback control law to obtain the intermediate control signal at the current moment.
[0032] Specifically, before obtaining the intermediate control signal at the current moment, since the output value of the magnetic measurement instrument is an analog signal, an analog-to-digital converter is needed to convert the analog signal into a digital signal.
[0033] Specifically, the linear extended state observer is the core part of the active disturbance rejection control system. It can observe the state variables and unknown disturbances of the system. However, since there will be observation errors in the linear extended state observer, the linear state error feedback control law can be used to suppress it.
[0034] Step S3: Based on the intermediate control signal at the current moment, use a frequency adaptive proportional resonance controller to obtain the control signal at the current moment.
[0035] Specifically, the frequency adaptive proportional resonance controller is used to first estimate the frequency of the current magnetic interference, and then based on the frequency estimation value of the magnetic interference, the intermediate control signal is converted into the control signal of the current source.
[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, and the compensation current is used to generate a magnetic field with the same amplitude and opposite direction to the magnetic interference.
[0037] Specifically, a controlled current source is set, and the current source can be a DC-DC power supply or the like. The control signal is the driving 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 direction to the magnetic interference is generated, thereby suppressing the influence of the magnetic interference.
[0038] In some optional embodiments, 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, use a linear extended state observer to obtain multiple estimated value parameters at the current moment; based on the preset parameters of the magnetic interference and the multiple estimated value parameters at the current moment, combine the linear state error feedback control law to obtain the intermediate control signal at the current moment.
[0040] Optionally, the control block diagram of this embodiment is as Figure 2 shown. In the whole control process, it is necessary to construct the transfer functions of the magnetic field coil and the magnetometer. Among them, the transfer functions of the magnetic field coil and the magnetometer are respectively:
[0041]
[0042]
[0043] Among them, G vi (s) is the transfer function of the magnetic field coil; k c is the coil constant; L is the coil inductance; R is the coil resistance; s is a complex frequency variable without practical significance; G s (s) is the transfer function of the magnetometer; k s is the coefficient for converting the magnetic field measured by the magnetometer into a voltage value; ω s is 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 pole configuration; 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, obtaining multiple estimated value parameters at the current moment.
[0045] Specifically, referring to Figure 2 , the system input r, output y, and disturbance fd The differential equation between:
[0046]
[0047] where the system input r is Figure 2 B in ref (t), and B ref (t) is actually the value 0; the output y is Figure 2 B in out (t); the disturbance f d is Figure 2 f in e (t), and f e (t) is the preset magnetic field interference parameter in the environment; u is Figure 2 u2(t) in ; b0 is the controller coefficient, which is an adjustable parameter that can change the controller output.
[0048] Based on Equation (3), the state equation of the linear extended observer under pole placement is:
[0049]
[0050] where x1 represents the estimated value of the system output y; x2 represents the estimated value of the derivative of the system output ; x3 represents the estimated value of the system disturbance f d ; ω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 G1(s) of the magnetic compensation system under the control of the linear extended state observer and the linear feedback control law is derived:
[0052] b0U(s) = (k p (R(s) - X1(s)) - k d X2(s) - X3(s)) (5)
[0053]
[0054] where U(s) represents the result of taking the Laplace transform of u; X1(s) represents the result of taking the Laplace transform of x1(s); X2(s) represents the result of taking the Laplace transform of x2(s); x3(s) represents the result of taking the Laplace transform of x3(s); R(s) represents the result of taking the Laplace transform of r; k da is the digital-to-analog conversion coefficient; k ad is the analog-to-digital conversion coefficient; k p represents the proportional gain, and k d represents the derivative gain.
[0055] In Equation (6), G ref (s) is the transfer function of the linear state error feedback control law, specifically:
[0056]
[0057] where, ω c is the bandwidth of the linear feedback control law.
[0058] G b (s) is the transfer function of the linear extended state observer, specifically:
[0059]
[0060] In some optional embodiments, the process of obtaining the control signal at the current moment includes:
[0061] Based on the magnetic field information at the current moment, using a frequency estimator 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, using a proportional-resonant controller 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 the control of the linear extended state observer and the linear feedback control law, a frequency adaptive proportional-resonant controller is introduced to obtain the transfer function of the magnetic interference compensation control system based on the adaptive proportional-resonant controller. Figure 3 is the schematic diagram of the frequency adaptive proportional-resonant controller. The frequency adaptive proportional-resonant controller includes two parts: a frequency estimator and a proportional-resonant controller.
[0063] In an optional embodiment, the process of using a frequency estimator to obtain the estimated value of the magnetic interference frequency at the current moment includes: establishing a noise subspace matrix and a frequency sweep matrix; constructing a spectral peak search function matrix according to the orthogonality of the frequency sweep matrix and the noise subspace matrix; finding the row vector in the frequency sweep matrix corresponding to the maximum value of the elements of the spectral peak search function matrix; and calculating the estimated value of the magnetic interference frequency 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 multi-dimensional observation matrix; solving the covariance matrix using the multi-dimensional observation matrix to obtain the autocorrelation matrix; performing singular value decomposition on the autocorrelation matrix to obtain the singular value matrix; calculating the 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, first, the acquisition data at the current moment, i.e., Bout(t), is segmented and stacked according to the time series to form a multi-dimensional observation matrix. The covariance matrix is solved using the multi-dimensional observation matrix to obtain the autocorrelation matrix as follows:
[0066]
[0067] Among them, R x represents the autocorrelation matrix; P m×n represents the matrix obtained after slicing; m represents the dimension of each slice vector; n represents the number of slice vectors.
[0068] This processing method significantly reduces the estimated variance of the covariance matrix by increasing the time redundancy of the observation samples, while suppressing the influence of accidental noise, ensuring that the matrix is closer to the true statistical characteristics under limited data conditions.
[0069] Perform singular value decomposition on the autocorrelation matrix R x to determine the signal subspace and the noise subspace based on the magnitudes of the singular values.
[0070] R x = UΣM T (10)
[0071] Among them, U is the left singular value matrix; M is the right singular value matrix; T represents the transpose.
[0072] Take the number of singular values less than 1 in the left singular value matrix and the right singular value matrix as the number of column vectors of the noise subspace matrix.
[0073] Establish a frequency-sweeping matrix through the following formula:
[0074]
[0075]
[0076] Among them, C1 represents the sine frequency-sweeping matrix; C2 represents the cosine frequency-sweeping matrix; q represents the number of sweeping frequencies f i (i = 1, 2,..., q); t s represents the single-sampling time.
[0077] Construct a spectral peak search function vector based on the orthogonality between the frequency-sweeping matrix and the noise subspace matrix:
[0078]
[0079] Among them, A and B are intermediate variables; A = C1U m×o , B = C2U m×o .
[0080] Frequency estimation value It can be expressed as:
[0081]
[0082] where ω1 = 2πf1 represents the initial value of the frequency sweep frequency; k v represents the position of the row vector in the frequency sweep matrix V corresponding to the maximum value of the elements of the spectral peak search function matrix; Δf represents the preset frequency difference. q×1
[0083] The calculation formula of Δf is as follows:
[0084] Δf = f i - f i-1 (15)
[0085] where f i represents the frequency sweep frequency of the i-th row of the frequency sweep matrix; f i-1 represents the frequency sweep frequency of the (i - 1)-th row of the frequency sweep matrix; i = 1 to N, and N is the number of rows of the frequency sweep matrix.
[0086] The transfer function of the proportional-resonant controller is:
[0087]
[0088] where k m represents the proportional gain; k n represents the resonant controller gain coefficient; k r is the resonant frequency of the resonant controller; ε represents the damping factor; Ω represents the resonant frequency of the resonant controller, and this value is provided by the output of the frequency estimator
[0089] The proportional-resonant controller adopts a structure with the proportional term and the resonant term in parallel, and an adaptive damping factor is added to the resonant term, enabling the controller to dynamically adjust the compensation characteristics according to the interference frequency and amplitude to suppress the gain attenuation problem at non-resonant frequencies. And this structure can enhance the stability of the system in a variable-frequency magnetic interference environment, avoid compensation errors caused by resonant frequency deviation, and improve the robustness of magnetic field compensation.
[0090] Based on the above analysis, the transfer function of the magnetic interference compensation control system based on the frequency-adaptive proportional-resonant controller is:
[0091]
[0092] In this embodiment, the above method is verified. By using the PID compensation method, no compensation, and the compensation method of this embodiment, the waveforms of the magnetic field are obtained as Figure 4 shown, and from Figure 4 It can be seen that the method proposed by the present invention can effectively compensate for random interference and high-amplitude unknown-frequency interference, enabling the magnetocardiogram signals of the subject to be clearly observed.
[0093] In this embodiment, a magnetic interference compensation device is further provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0094] This embodiment provides a magnetic interference compensation device. Based on the magnetic interference compensation method of the above embodiment and any of its alternative implementation manners, 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, where,
[0095] The magnetometer is used to obtain the magnetic field information at the current moment;
[0096] The analog-to-digital converter is used to convert the magnetic field information at the current moment into a digital signal;
[0097] 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;
[0098] 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;
[0099] The digital-to-analog converter is used to convert the control signal at the current moment into an analog signal;
[0100] The current source is used to generate the compensation current at the current moment based on the control signal at the current moment, and the compensation current is used to generate a magnetic field with the same amplitude and opposite direction to the magnetic interference.
[0101] In some alternative implementation manners, the first control module includes: a linear extended state observer and a linear state error feedback control law, where,
[0102] The linear extended state observer is used to obtain multiple estimated parameter values at the current moment based on the magnetic field information at the current moment and the control signal at the previous moment;
[0103] 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 the magnetic interference and the multiple estimated parameter values at the current moment.
[0104] In some alternative embodiments, 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. The second control module includes: a frequency estimator and a proportional-resonant controller, where
[0105] The frequency estimator is configured to obtain an estimated value of the magnetic interference frequency at the current moment based on the residual magnetic interference information at the current moment;
[0106] The proportional-resonant controller is configured to convert the intermediate control signal at the current moment into the control signal at the current moment based on the estimated value of the magnetic interference frequency at the current moment.
[0107] Specifically, referring to Figure 2 , the magnetic shielding cabin is used to shield the geomagnetism and strong electromagnetic interference of electromagnetic devices; the magnetometer is used to measure the residual magnetic interference information inside the magnetic shielding cabin; the analog-to-digital converter is used to convert the magnetic interference analog quantity into a digital quantity; the linear extended state observer is used to estimate the system output and disturbance information, and generate an intermediate control signal based on the linear state error feedback control law; the frequency adaptive proportional-resonant controller is used to further enhance the system's ability to suppress high-amplitude unknown-frequency magnetic interference and generate the final digital control signal; the digital-to-analog converter is used to convert the digital control signal into an analog quantity; the current source is used to generate a corresponding current according to the analog control signal; the magnetic compensation coil is used to generate a magnetic field with the same amplitude and opposite direction to the magnetic interference to cancel it.
[0108] The further function descriptions of the above various modules and units are the same as those in the corresponding above embodiments, and will not be elaborated here.
[0109] The magnetic interference compensation device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0110] The embodiment of the present invention also provides a computer device having the above magnetic interference compensation device.
[0111] Please refer to Figure 5 , Figure 5 is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories if needed. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 5 Taking one processor 10 as an example in
[0112] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field-programmable gate array, a generic array logic, or any combination thereof.
[0113] Among them, the memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiments.
[0114] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0115] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.
[0116] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected through a bus or other means.Figure 5 Take the bus connection as an example.
[0117] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.
[0118] The embodiments of the present invention also provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented by downloading via a network and originally stored in a remote storage medium or a non-transitory machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0119] A part of the present invention can be applied as a computer program product, such as computer program instructions. When executed by a computer, through the operation of the computer, the methods and / or technical solutions according to the present invention can be invoked or provided. Those skilled in the art should be able to understand that the forms of existence of computer program instructions 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 executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.
[0120] Although embodiments of the present 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 present invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A magnetic interference compensation method, characterized in that: include: Get the 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, 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; Based on the intermediate control signal at the current moment, a control signal at the current moment is obtained by using a frequency adaptive proportional resonant controller; Based on the control signal at the current moment, the current source is controlled to generate a compensation current at the current moment, and the compensation current is used to generate a magnetic field with an equal amplitude and opposite to the magnetic interference.
2. The magnetic interference compensation method according to claim 1, characterized in that: 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.
3. The magnetic interference compensation method according to claim 2, characterized in that: The process of obtaining the intermediate control signal at the current moment includes: Based on the magnetic field information at the current moment and the control signal at the previous moment, a linear extended state observer is used to obtain a plurality of estimated value parameters at the current moment; Based on the preset parameters of magnetic interference and multiple estimated value parameters at the current moment, combined with the linear state error feedback control law, the intermediate control signal at the current moment is obtained.
4. The magnetic interference compensation method according to claim 2, characterized in that: The process of obtaining the control signal at the current moment includes: Based on the magnetic field information at the current moment, using a frequency estimator to obtain an 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, a proportional resonant controller is used to convert the intermediate control signal at the current moment into a control signal at the current moment.
5. The magnetic interference compensation method according to claim 4, characterized in that: The process of obtaining the estimated value of the magnetic interference frequency at the current moment by using the frequency estimator includes: Establish noise subspace matrix and frequency sweep matrix; Constructing a spectrum peak search function matrix according to the orthogonality of the frequency sweep matrix and the noise subspace matrix; Finding the row vector in the frequency sweep matrix corresponding to the maximum value of the elements of the spectrum peak search function matrix; Based on the position of the found row vector, the estimated value of the magnetic interference frequency at the current time is calculated.
6. The magnetic interference compensation method according to claim 5, characterized in that: The process of establishing the noise subspace matrix includes: The magnetic field information at the current moment is segmented and stacked according to the time series to form a multi-dimensional observation matrix; The covariance matrix is solved using the multidimensional observation matrix to obtain the 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; The number of the singular values less than 1 is used as the number of the matrix column vectors of the noise subspace, and the noise subspace matrix is constructed.
7. A magnetic interference compensation device, characterized in that: Based on the magnetic interference compensation method according to any one of claims 1 to 6, 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 obtain 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 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 by 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 by using a frequency adaptive proportional resonant controller based on the intermediate control signal at the current moment; The digital-to-analog converter is used to convert the control signal at the current moment into an analog signal; The current source is used to generate a compensation current at a current moment based on the control signal at the current moment, and the compensation current is used to generate a magnetic field with an equal amplitude and opposite to the magnetic interference.
8. The magnetic interference compensation device according to claim 7, characterized in that: 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 value parameters at the current moment based on the magnetic field information at the current moment and the control signal at the previous moment; The linear state error feedback control law is used to obtain an intermediate control signal at the current moment based on a preset magnetic interference parameter and a plurality of estimated value parameters at the current moment.
9. The magnetic interference compensation device according to claim 7, characterized in that: 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, and the second control module includes: a frequency estimator and a proportional resonant controller, wherein: The frequency estimator is used to obtain an estimated value of the magnetic interference frequency at the current moment based on the residual magnetic interference information at the current moment; The proportional resonant controller is used for converting the intermediate control signal at the current moment into a control signal at the current moment based on the estimated value of the magnetic interference frequency at the current moment.
10. A computer device, characterized in that: include: 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 magnetic interference compensation method according to any one of claims 1 to 6 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the magnetic interference compensation method according to any one of claims 1 to 6.
12. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the magnetic interference compensation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Artificial pancreas self-adaption and active-disturbance-rejection controller based on blood glucose variation trend
CN109999270A
High-frequency LLC resonant direct-current converter
CN113938022A
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
Method for functional brain imaging from magnetoencephalographic data by estimation of source signal-to-noise ratio
US6697660B1