Re: [odin-devel] sinusoidal gradients
develop, simulate and run magnetic resonance sequences
Brought to you by:
wodan
|
From: Lazar F. <laz...@gm...> - 2009-04-06 20:59:19
|
Hello Thies,
On Mon, Apr 6, 2009 at 1:25 PM, Thies Jochimsen <th...@jo...> wrote:
> Dear Lazar,
>
>> Am I doing something wrong?
>>
>
> no, you don't ;-) It's just the way SeqGradTrapez calculates gradient
> pulses:
> It adjust the duration of the constant part of pulse to match the integral
> using the gradient strength provided. Then it adds the integral of the ramps
> and decreases the gradient strength so that the integral is preserved.
> Admittedely, this approach will result in sub-optimal performance, but it is
> easy to implement and will never excedd the slew rate. If you know what
> you're doing, you can use SeqGradWave to impement arbitrary gradient shapes
> without restrictions.
> Because you are not the first asking for optimized gradient pulses, I will
> look into it, hopefully in the next couple of weeks...
This sounds as a correct strategy to me. I will try to look at the
code, but here is my
understanding on how one might approach the design which is exactly
how you described.
find integral of slopes and after that, find the horizontal part.
Notaions:
There are three components up, flat and down, so the integral will be
A_u, A_f, A_d and the total A.
the max gradient amplitude is G. the slewrate (slewrateMax*userfactor)
is S. The rampTimes are
T_u and T_d and the flat time of the gradient is T_f.
G0 and S0 are the system limits, where is G and S are the user
specified quantities.
I will also assume symmetric gradient ramps, as it is in the current
code, so A_u=A_d and T_u=T_d.
Algorithm:
If user specifies the amplitude which is above system capabilities,
reset it to the
system capabilities (or generate an error and exit) in other words, check G<=G0,
do the same for the slew rate S<=S0
1) Trapezoidal shape
Check Slew rate limit:
if T_u is not given by user, assume shortest T_u=G/S0
T_u >= G/S; if false set T_u=G/S
Set T_u on the timing grid.
A_u = 0.5*G*T_u
find flat part
T_f = (A- A_u- A_d)/G;
if (T_f> 0 )set T_f on the timing grid and recompute G so that
the total A is what the user asked.
if ( T_f < 0) we need to reduce the gradient G and adjust the ramptimes.
T_u = sqrt(A/S) set T_u to the timing grid and recompute the slewrate S to
get total A what the user asked. S=A/T_u/T_u, recompute G = A/T_u
2) half-sinusoidal gradients g(t) = G*sin(a*t) 0<t<pi/(2*a)
Check sewrate limits:
check T_u >= pi*G/(2*S) if false or not given by yser, set T_u = pi*G/(2*S)
set T_u to timing grid
A_u = G*T_u/(2*pi)
find T_f as in trapezoidal. if T_f >0 do the as in trapezoidal
if T_f < 0, we do not change the shape of the gradients, but reduce their
amplitude. this way we get full sinusoidal quater-wave.
T_u = pi* sqrt(2*pi*A/S) set T_u to timing grid
reset G = pi*A/T_u
3) sinusoidal gradients g(t) = G(1-cos(a*t)) 0<t<pi/a
Check sewratelimit:
check T_u >= pi*G/S. if false or not given, set T_u = pi*G/S
set T_u on timing grid
A_u = G*T_u
if T_f > 0, do as in trapezoidal
if (T_f < 0) adjust the max gradeint but keep the shape of the gradeints
T_u = sqrt(pi*A/(2*S))
set T_u to timing table
set G = 0.5*A/T_u
This is how I see it. It is exactly what you described in words and it
will never fail.
I hope I did not loose any steps or made a mistake in the calculation
of the gradients.
Thanks for your help,
Lazar
|