Disclosure of Invention
The application aims to provide a method, a device and a medium for simultaneously detecting magnetic resonance gradient delay and gradient switching rate, which are used for at least solving the technical problems of complicated operation steps and long time consumption in the prior art that gradient values are required to be respectively changed for testing in a plurality of gradient axes.
In order to achieve the above purpose, the present application adopts the following technical scheme:
a first aspect provides a magnetic resonance gradient delay and gradient switching rate simultaneous detection method comprising:
setting gradient detection parameters, wherein the gradient detection parameters at least comprise a group of test gradient values and a plurality of gradient axes to be detected;
scanning and detecting each gradient axis to be detected based on a preset pulse sequence to obtain a group of echo data corresponding to each test gradient value;
performing inverse Fourier transform on the echo data to obtain first-order phase data, and respectively calculating to obtain gradient delay time and gradient switching rate of the system according to the first-order phase data;
the preset pulse sequence comprises at least one radio frequency pulse RF, n+1 signal acquisition windows and 2 (n+1) gradient waveforms A pre ,A 0 ,A re0 ,A 1 ,A re1 ,...,A re(n-1) ,A n The method comprises the steps of carrying out a first treatment on the surface of the Wherein the center of the jth signal acquisition window corresponds to the center of the jth gradient waveform, the start time of the 1 st gradient waveform is the end time of the radio frequency pulse RF, and the areas of the 1 st gradient waveform and the 2 nd gradient waveform satisfy A pre =A 0 The areas of the 3 rd to 2 (n+1) th gradient waveforms satisfy A re(j-1) =(A j-1 +A j )/2),j=1,2,...,n。
In one possible design, the set of test gradient values includes G 1 ,G 2 ,...,G m And G 1 <G 2 <...<G m ,G m The method comprises the steps of representing the amplitude of a test gradient, wherein a plurality of gradient axes to be tested comprise a gradient X axis to be tested, a gradient Y axis to be tested and a gradient Z axis to be tested;
the gradient detection parameters also comprise an initial gradient delay time TDelay 0 Initial gradient switching Rate S 0 And a gradient edge climbing time range of a preset pulse sequence, wherein the maximum gradient edge climbing time is T max =G m /S 0 Gradient edge minimum climbing time is T min =G 1 /S 0 。
In one possible design, the gradient edge climb times of the first 3 gradient waveforms are all greater than the gradient edge climb time corresponding to the maximum switching rate, and from the 4 th gradient waveform, the gradient edge climb time satisfies the following condition:
T lj =T rj ; (1)
T rel(j-1) =T r(j-1) ; (2)
T rer(j-1) =T lj ; (3)
T lj =T l(j-1) -Δt; (4)
wherein T is lj And T rj Respectively representThe left and right gradient edge climb times of the kth gradient waveform, k=4, 6,..2 (n+1), T l(j-1) And T r(j-1) A left gradient edge climbing time and a right gradient edge climbing time which represent the kth-2 gradient waveform, T rel(j-1) And T rer(j-1) The left gradient edge climb time and the right gradient edge climb time of the kth or g-th gradient waveform, g=3, 5,..2 (n+1) -1, Δt represents the time of the gradient edge between adjacent gradient waveforms, respectively.
In one possible design, the left gradient of the 4 th gradient waveform follows the climb time T l1 Gradient edge climbing time T corresponding to gradient switching rate greater than maximum gradient max The left gradient edge climb time T of the 2 (n+1) th gradient waveform ln Gradient edge climbing time T corresponding to gradient switching rate smaller than maximum gradient switching rate min 。
In one possible design, performing inverse fourier transform on the echo data to obtain first-order phase data, and calculating gradient delay time and gradient switching rate of the system according to the first-order phase data respectively, where the method includes:
echo data echo of each group 0i ,...,echo ni After inverse Fourier transform, a group of first-order phase data ph is obtained 0i ,...,ph ni Wherein i is [1, m ]]M represents the total number of test gradient values;
according to each group of first-order phase data, calculating the gradient delay time corresponding to each test gradient value, wherein the calculation formula is as follows:
TDelay i =ph 0i /2/pi×NoRd×DW; (5)
wherein pi represents the circumferential rate pi, noRd represents the number of sampling points, and DW represents the sampling interval time;
obtaining the gradient delay time of the system according to the average value of the gradient delay times:
TDelay=mean(TDelay 1 ,...,TDelay m ); (6)
obtaining mutation value ph in a group of first-order phase data by adopting difference or fitting calculation xi And according to the mutation value ph xi Calculating to obtain a corresponding gradient switching rate:
S i =G i /T lx ; (7)
wherein G is i Representing the current test gradient value, T lx Representing the mutation value ph xi Corresponding limit gradient climbing time;
obtaining the gradient switching rate of the system according to the average value of the gradient switching rates:
S=mean(S 1 ,...,S m ) (8)。
in one possible design, after calculating the gradient delay time and the gradient switching rate of the system according to the first-order phase data, the method further includes:
respectively calculating the iterative deviation of the gradient delay time and the gradient switching rate of the system:
δTDelay=abs(TDelay-TDelay 0 ); (9)
δS=abs(S-S 0 ); (10)
wherein δtdelay represents the iterative deviation of the gradient delay time, δs represents the iterative deviation of the gradient switching rate;
updating initial gradient delay time to TDelay 0 =tdelay, and updates the initial gradient switching rate to S 0 =S。
In one possible design, after updating the initial gradient delay time and the initial gradient switching rate, the method further comprises:
judging whether to end iteration, if so, ending the iteration loop, wherein the judging conditions are as follows:
δTDelay<δTDelay thre &&δS<δS thre ; (11)
wherein, delta TDelay thre Iteration threshold, δS, representing gradient delay time thre An iteration threshold representing the gradient switching rate.
In one possible design, the radio frequency pulses include soft pulses or hard pulses.
A second aspect provides a magnetic resonance gradient delay and gradient switching rate simultaneous detection apparatus comprising:
the parameter setting module is used for setting gradient detection parameters, wherein the gradient detection parameters at least comprise a group of test gradient values and a plurality of gradient axes to be tested;
the scanning detection module is used for carrying out scanning detection on each gradient axis to be detected based on a preset pulse sequence to obtain a group of echo data corresponding to each test gradient value;
the index calculation module is used for carrying out inverse Fourier transform on the echo data to obtain first-order phase data, and respectively calculating the gradient delay time and the gradient switching rate of the system according to the first-order phase data;
the preset pulse sequence comprises at least one radio frequency pulse RF, n+1 signal acquisition windows and 2 (n+1) gradient waveforms A pre ,A 0 ,A re0 ,A 1 ,A re 1,...,A re(n-1) ,A n The method comprises the steps of carrying out a first treatment on the surface of the Wherein the center of the jth signal acquisition window corresponds to the center of the jth gradient waveform, the start time of the 1 st gradient waveform is the end time of the radio frequency pulse RF, and the areas of the 1 st gradient waveform and the 2 nd gradient waveform satisfy A pre =A 0 The areas of the 3 rd to 2 (n+1) th gradient waveforms satisfy A re(j-1) =(A j-1 +A j )/2),j=1,2,...,n。
A third aspect provides a computer readable storage medium having instructions stored thereon which, when run on a computer, perform a magnetic resonance gradient delay and gradient switching rate simultaneous detection method as described in any one of the possible designs of the first aspect.
A fourth aspect provides a computer device comprising a memory, a processor and a transceiver in sequential communication connection, wherein the memory is for storing a computer program, the transceiver is for transceiving messages, and the processor is for reading the computer program to perform a magnetic resonance gradient delay and gradient switching rate simultaneous detection method as described in any one of the possible designs of the first aspect.
A fifth aspect provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the magnetic resonance gradient delay and gradient switching rate simultaneous detection method as described in any one of the possible designs of the first aspect.
Compared with the prior art, the application has the beneficial effects that:
according to the application, a group of test gradient values and a plurality of gradient axes to be tested are set, and each gradient axis to be tested is scanned and detected based on a preset pulse sequence, so that a group of echo data corresponding to each test gradient value is obtained; then, carrying out inverse Fourier transform on the echo data to obtain first-order phase data, and respectively calculating the gradient delay time and the gradient switching rate of the system according to the first-order phase data, so that a test gradient value is not required to be changed for each test axis, the gradient switching rate of the system is detected while the gradient delay time is corrected, and the test time of the system is greatly saved; and a plurality of gradient delay times and a plurality of gradient switching rates are correspondingly obtained by setting a plurality of test gradient values, so that the gradient delay time and the gradient switching rate of the system are obtained according to the average value of the gradient delay times and the average value of the gradient switching rates, and the authenticity and the accuracy of the detection result are effectively improved.
Detailed Description
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the present application will be briefly described below with reference to the accompanying drawings and the description of the embodiments or the prior art, and it is obvious that the following description of the structure of the drawings is only some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art. It should be noted that the description of these examples is for aiding in understanding the present application, but is not intended to limit the present application.
Examples
As shown in fig. 1, before the gradient delay and the gradient switching rate are detected, a pulse sequence for scanning the acquisition signal needs to be set, and in the embodiment of the present application, fig. 1 shows a timing chart of the pulse sequence in the embodiment of the present application. Specifically, the pulse sequence in the embodiment of the present application includes at least one radio frequency pulse RF, n+1 signal acquisition windows, and 2 (n+1) gradient waveforms a pre ,A 0 ,A re0 ,A 1 ,A re 1,...,A re(n-1) ,A n The method comprises the steps of carrying out a first treatment on the surface of the Wherein the center of the jth signal acquisition window corresponds to the center of the jth gradient waveform, the start time of the 1 st gradient waveform is the end time of the radio frequency pulse RF, and the areas of the 1 st gradient waveform and the 2 nd gradient waveform satisfy A pre =A 0 The areas of the 3 rd to 2 (n+1) th gradient waveforms satisfy A re(j-1) =(A j-1 +A j )/2),j=1,2,...,n。
The radio frequency pulse may be a hard pulse or a soft pulse, and when the soft pulse is selected, a layer selection gradient may be selectively added on the gradient axis. Wherein, the 1 st signal acquisition window echo 0 The center corresponds to the 2 nd gradient waveform A 0 Center, 2 nd acquisition window echo 1 Center corresponds to gradient A4 1 Center, and so on, n+1th acquisition window echo n The center corresponds to the 2 (n+1) th gradient A n And a center. Wherein, when the 1 st gradient waveform starts from the end of the radio frequency pulse, the following gradients are sequentially ordered; the area of the 1 st gradient waveform is A pre The area of the 2 nd gradient waveform is A 0 The following formula is satisfied: a is that pre =A 0 2; wherein the area of the 3 rd gradient waveform is A re0 Area of the 4 th gradient waveform is A 1 The area of the 5 th gradient waveform is A re1 The area of the 6 th gradient waveform is A 2 By analogy, the area of the 2 (j+1) th gradient waveform is A j 2 (j +)1) -1 gradient waveform area A re(j-1) J=1, 2,..n, and satisfies the following formula: a is that re(j-1) =(A j-1 +A j )/2。
Referring to fig. 2-3 in combination, a flowchart of a method for simultaneously detecting magnetic resonance gradient delay and gradient switching rate according to an embodiment of the present application includes, but is not limited to, implementation by steps S1-S3:
s1, setting gradient detection parameters, wherein the gradient detection parameters at least comprise a group of test gradient values and a plurality of gradient axes to be tested;
in step S1, specifically, setting gradient detection parameters includes:
301: setting an initial gradient delay time TDelay 0 And an initial gradient switching rate S 0 Preferably, embodiments of the present application delay the initial gradient by a time TDelay 0 Set to 0, initial gradient switching rate S 0 Setting a default or recommended value of the system;
302: setting a group of test gradient values G 1 <G 2 <...<G m ,G m Representing the magnitude of the test gradient;
303: setting a plurality of gradient axes to be tested, including a gradient X axis to be tested, a gradient Y axis to be tested and a gradient Z axis to be tested, specifically setting the sequence of testing each gradient axis so that a preset pulse sequence scans and detects each gradient axis to be tested successively according to the test sequence;
304: setting a gradient edge climbing time range of a preset pulse sequence, wherein the maximum climbing time of the gradient edge is T max =G m /S 0 Gradient edge minimum climbing time is T min =G 1 /S 0 The method comprises the steps of carrying out a first treatment on the surface of the In the embodiment of the application, the left gradient of the 4 th gradient waveform preferably has the climbing time T l1 Gradient edge climbing time T corresponding to gradient switching rate greater than maximum gradient max The left gradient edge climb time T of the 2 (n+1) th gradient waveform ln Gradient edge climbing time T corresponding to gradient switching rate smaller than maximum gradient switching rate min More preferably T l1 =1.2×T max ,T ln =0.8×T min 。
Wherein, the left gradient of the 4 th gradient waveform is along the climbing time T l1 Gradient edge climbing time T corresponding to a gradient switching rate greater than the maximum gradient max The left gradient edge climb time T of the 2 (n+1) th gradient waveform ln Gradient edge climbing time T corresponding to gradient switching rate smaller than maximum gradient switching rate min The principle of (2) is as follows: the 4 th gradient starts to test the switching rate, so the gradient of each gradient needs to be gradually shortened from long along the climbing time (i.e., the following formula (4)), at this time, the switching rate is gradually increased until the maximum switching rate is finally exceeded, and finally, the limit switching rate of the system can be measured through the above arrangement. Tmax and Tmin are upper and lower limits of the test gradient value G1 … Gm, ensuring that the switching rate is met from low to high until the maximum switching rate is exceeded in all gradient value tests.
As shown in fig. 4, in a specific embodiment of 304, the gradient edge climbing time of the first 3 gradient waveforms is greater than the gradient edge climbing time corresponding to the maximum switching rate, and from the 4 th gradient waveform, the gradient waveforms are set to triangular waveforms, and the gradient edge climbing time satisfies the following conditions:
T lj =T rj ; (1)
T rel(j-1) =T r(j-1) ; (2)
T rer(j-1) =T lj ; (3)
T lj =T l(j-1) -Δt; (4)
wherein T is lj And T rj The left gradient edge climb time and the right gradient edge climb time, respectively, of the kth gradient waveform, k=4, 6,..2 (n+1), T l(j-1) And T r(j-1) A left gradient edge climbing time and a right gradient edge climbing time which represent the kth-2 gradient waveform, T rel(j-1) And T rer(j-1) The left gradient edge climbing time and the right gradient edge climbing time of the kth or the g gradient waveform are respectively represented, g=3, 5.
The reason why the gradient edge climbing time of the first 3 gradient waveforms is set to be longer than the gradient edge climbing time corresponding to the maximum switching rate, and the gradient edge climbing time is set to satisfy the above condition from the 4 th gradient waveform is as follows: since tmax=gm/S0, where Gm is the maximum gradient value tested, if the climbing time of the first 3 gradient waveforms is set to be less than Tmax, then when testing Gm gradient values, the actually output switching rate exceeds the system switching rate, and the gradient waveforms are distorted by the system limitation at this time, so that the gradient area cannot meet the system requirement, and the gradient delay calculation has deviation, so that the gradient delay calculation is set to be used for testing the switching rate from the 4 th gradient waveform, so that the gradient of each gradient needs to be gradually shortened from long along the climbing time (i.e. formula (4)), the switching rate gradually increases until finally exceeding the maximum switching rate, and finally, the limit switching rate of the system can be measured through the above setting.
S2, scanning and detecting each gradient axis to be detected based on a preset pulse sequence to obtain a group of echo data corresponding to each test gradient value, wherein the method specifically comprises the following steps:
305: based on the pulse sequence shown in fig. 1, a set of echo data corresponding to each test gradient value is acquired as follows:
echo 01 、echo 11 、...、echo n1
…
s3, performing inverse Fourier transform on the echo data to obtain first-order phase data, and respectively calculating gradient delay time and gradient switching rate of the system according to the first-order phase data;
in step S3, performing inverse fourier transform on the echo data to obtain first-order phase data, and calculating gradient delay time and gradient switching rate of the system according to the first-order phase data, where the method includes:
306: echo data echo of each group 0i ,...,echo ni Performing inverse Fourier transform;
307: calculating first-order phase data ph after inverse Fourier transform of each echo data 0i ,...,ph ni Wherein i is [1, m ]]M represents the total number of test gradient values, and is specifically as follows:
ph 01 、ph 11 、...、ph u1
…
308: according to each group of first-order phase data, calculating the gradient delay time corresponding to each test gradient value, wherein the calculation formula is as follows:
TDelay i =ph 0i /2/pi×NoRd×DW; (5)
wherein pi is the circumferential rate pi, noRd represents the number of sampling points, and DW represents the sampling interval time;
then, the gradient delay time corresponding to a set of test gradient values can be expressed as follows:
TDelay 1 =ph 01 /2/pi*NoRd*DW
…TDelay m =ph 0m /2/pi*NoRd*DW;
309: obtaining the gradient delay time of the system according to the average value of the gradient delay times:
TDelay=mean(TDelayl,...,TDelaym); (6)
310: obtaining mutation value ph in a group of first-order phase data by adopting difference or fitting calculation xi And according to the mutation value ph xi Calculating to obtain a corresponding gradient switching rate:
S i =G i /T lx : (7)
wherein G is i Representing the current test gradient value, T lx Representing the mutation value ph xi Corresponding limit gradient climbing time;
for example: when the test gradient value is G m When in use, a fitting or difference method is adopted to find ph 0m ,...,ph nm Mutation value ph in (a) xm Description at echo x The gradient switching rate reaches the limit, and the corresponding limit gradient climbing time T lx Then the gradient switching rate is S m =G m /T lx 。
311: obtaining the gradient switching rate of the system according to the average value of the gradient switching rates:
S=mean(S 1 ,...,S m ) (8)。
it should be noted that, in the embodiment of the present application, the testing of three gradient axes is completed through steps 304-311, after the scanning detection and index calculation of one gradient axis to be tested are finished, it is determined through step 312 whether all the gradient axis tests are completed, if not, after a new gradient axis to be tested is set, steps 304-311 are repeated until all the gradient axis tests are completed; of course, it is understood that the embodiment of the present application may also directly add a cycle of switching gradient axes in the sequence, and complete the testing of three gradient axes by one scan, without the need for the cycle of the external step 312.
Preferably, in one possible design, after calculating the gradient delay time and the gradient switching rate of the system according to the first-order phase data, the method further includes:
313: respectively calculating the iterative deviation of the gradient delay time and the gradient switching rate of the system:
δTDelay=abs(TDelay-TDelay 0 ); (9)
δS=abs(S-S 0 ); (10)
wherein δtdelay represents the iterative deviation of the gradient delay time, δs represents the iterative deviation of the gradient switching rate;
314: updating initial gradient delay time to TDelay 0 =tdelay, and updates the initial gradient switching rate to S 0 =S。
Preferably, in one possible design, after updating the initial gradient delay time and the initial gradient switching rate, the method further comprises:
315: judging whether to end iteration, if so, ending the iteration loop, wherein the judging conditions are as follows:
δTDelay<δTDelay thre &&δS<δS thre ; (11)
wherein, delta TDelay thre Iteration threshold, δS, representing gradient delay time thre An iteration threshold representing a gradient switching rate;
otherwise, repeating steps 303-314 continues the iteration, so that the accuracy of the gradient delay and gradient switching rate test can be further improved by the iteration during the gradient delay time correction process.
Based on the disclosure, the embodiment of the application obtains a set of echo data corresponding to each test gradient value by setting a set of test gradient value and a plurality of gradient axes to be tested and scanning and detecting each gradient axis to be tested based on a preset pulse sequence; then, carrying out inverse Fourier transform on the echo data to obtain first-order phase data, and respectively calculating the gradient delay time and the gradient switching rate of the system according to the first-order phase data, so that a test gradient value is not required to be changed for each test axis, the gradient switching rate of the system is detected while the gradient delay time is corrected, and the test time of the system is greatly saved; and a plurality of gradient delay times and a plurality of gradient switching rates are correspondingly obtained by setting a plurality of test gradient values, so that the gradient delay time and the gradient switching rate of the system are obtained according to the average value of the gradient delay times and the average value of the gradient switching rates, and the authenticity and the accuracy of the detection result are effectively improved.
A second aspect provides a magnetic resonance gradient delay and gradient switching rate simultaneous detection apparatus comprising:
the parameter setting module is used for setting gradient detection parameters, wherein the gradient detection parameters at least comprise a group of test gradient values and a plurality of gradient axes to be tested;
the scanning detection module is used for carrying out scanning detection on each gradient axis to be detected based on a preset pulse sequence to obtain a group of echo data corresponding to each test gradient value;
the index calculation module is used for carrying out inverse Fourier transform on the echo data to obtain first-order phase data, and respectively calculating the gradient delay time and the gradient switching rate of the system according to the first-order phase data;
the preset pulse sequence comprises at least one radio frequency pulse RF, n+1 signal acquisition windows and 2 (n+1) gradient waveforms A pre ,A 0 ,A re0 ,A 1 ,A re 1,...,A re(n-1) ,A n The method comprises the steps of carrying out a first treatment on the surface of the Wherein the center of the jth signal acquisition window corresponds to the center of the jth gradient waveform, the start time of the 1 st gradient waveform is the end time of the radio frequency pulse RF, and the areas of the 1 st gradient waveform and the 2 nd gradient waveform satisfy A pre =A 0 The areas of the 3 rd to 2 (n+1) th gradient waveforms satisfy A re(j-1) =(A j-1 +A j )/2),j=1,2,...,n。
A third aspect provides a computer readable storage medium having instructions stored thereon which, when run on a computer, perform a magnetic resonance gradient delay and gradient switching rate simultaneous detection method as described in any one of the possible designs of the first aspect.
The computer readable storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash Memory, and/or a Memory Stick (Memory Stick), etc., where the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
The working process, working details and technical effects of the foregoing computer readable storage medium provided in the third aspect of the present embodiment may refer to the method as described in the foregoing first aspect or any one of the possible designs of the first aspect, which are not repeated herein.
A fourth aspect provides a computer device comprising a memory, a processor and a transceiver in sequential communication connection, wherein the memory is for storing a computer program, the transceiver is for transceiving messages, and the processor is for reading the computer program to perform a magnetic resonance gradient delay and gradient switching rate simultaneous detection method as described in any one of the possible designs of the first aspect.
By way of specific example, the Memory may include, but is not limited to, random-Access Memory (RAM), read-Only Memory (ROM), flash Memory (Flash Memory), first-in first-out Memory (First Input First Output, FIFO), and/or first-in last-out Memory (First Input Last Output, FILO), etc.; the processor may not be limited to use with a microprocessor of the STM32F105 family; the transceiver may be, but is not limited to, a WiFi (wireless fidelity) wireless transceiver, a bluetooth wireless transceiver, a GPRS (General Packet Radio Service, general packet radio service technology) wireless transceiver, and/or a ZigBee (ZigBee protocol, low power local area network protocol based on the ieee802.15.4 standard), etc. In addition, the computer device may include, but is not limited to, a power module, a display screen, and other necessary components.
The working process, working details and technical effects of the foregoing computer device provided in the fourth aspect of the present embodiment may be referred to as the foregoing first aspect or any one of the possible designs of the first aspect, which are not described herein.
A fifth aspect provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the magnetic resonance gradient delay and gradient switching rate simultaneous detection method as described in any one of the possible designs of the first aspect.
The working process, working details and technical effects of the foregoing computer program product containing instructions provided in the fifth aspect of the present embodiment may be referred to as the method described in the foregoing first aspect or any one of the possible designs of the first aspect, which are not repeated herein.
Finally, it should be noted that: the foregoing description is only of the preferred embodiments of the application and is not intended to limit the scope of the application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.