The Convex Optimized Diffusion Encoding (CODE) framework generates optimized diffusion encoding gradient waveforms for a target b-value subject to gradient hardware constraints, moment nulling requirements and sequence timing parameters as described in Aliotta et al. (MRM 2016). This reduces echo times (TE) and thereby improves SNR. CODE can also incorporate first (M1) and second (M2) moment gradient waveform compensation to mitigate bulk motion artifacts in moving structures.

The provided MATLAB function generates the CODE waveform for user defined sequence parameters (b-value, echo time, moment compenstation) and hardware parameters (GMax and SRMax).

Github: HERE

Running this code requires installation of the Yalmip toolbox and the IBM CPLEX linear solver, both are available as free downloads. Alternatively, the optimization can be modified to use the cvx software package (without Yalmip or CPLEX).

CODE supports moment compensated diffusion encoding (e.g., velocity compensated and velocity+acceleration compensated) that is useful for DWI in body and cardiac applications, as well as non-motion compensated encoding that is typical in neuro DWI/DTI.

Shown below are examples of CODE waveforms compared with typical non-optimized encoding strategies:

Figure1 2
Figure1 3