Optimal Control Questions

Topics related to Spinach package
Post Reply
philip
Posts: 2
Joined: Fri Dec 22, 2023 11:50 am

Optimal Control Questions

Post by philip »

Hello,

i have two questions about the the optimal control module:

Is it possible to set Lz=0 as target state (or alternatively any combination of Lx/Ly), e.g. if i want to optimize a pulse that moves a spin 1/2 nucleus from +Z to the X/Y plane and i dont care about the phase?

For an excitation pulse that with initial state Lz and target state -Ly, i would like to penalize resulting Lx magnetization more strongly than residual Lz. Right now Spinach only optimizes the amount -Ly, but for an excitation pulse resulting Lx magnetiation is less desirable compared to residual Lz. Lx magnetization will lead to phase distortions, wherease residual Lz will just reduce signal intensity. This can be pretty severe, e.g. 0.99 -Ly can still have a phase error of ~8 degree, if the rest of the magnetization is in Lx.

Thanks a lot in advance.

Best,
Philip
kuprov
Posts: 201
Joined: Mon Mar 29, 2021 4:26 pm

Re: Optimal Control Questions

Post by kuprov »

Of course - see the "features_multitarget" example file: you can specify which multiple initial conditions should be sent to which destination states. Assign different multipliers to source-target pairs to regulate their relative importance.

For complicated and highly customized penalties, you can make your own error functional from combinations of grape_xy, grape_phase, etc. outputs. Note that fminnewton expects a function handle, and you can of course provide a handle to some other function of your choosing. So long as the order of inputs and outputs is the same as in standard Spinach functions, it would work.
philip
Posts: 2
Joined: Fri Dec 22, 2023 11:50 am

Re: Optimal Control Questions

Post by philip »

Dear Ilya,

thanks a lot for you reply. I am sorry, i tried, but i could not figure out which source-target pairs to use in order to obtain a shape that brings the system from +Z to the X/Y-plane. Or is this a task, where i would have to come up with my own error function?

Best,
Philip
kuprov
Posts: 201
Joined: Mon Mar 29, 2021 4:26 pm

Re: Optimal Control Questions

Post by kuprov »

Simple trigonometry, really. I would suggest the following source states:

{Lz, Lz}

and the following target states

{Lx, Ly}

with a squared overlap fidelity function (control.fidelity='square'). In this way, whichever direction in the XY plane magnetisation points in, that would be an equivalent maximum of that fidelity.
Post Reply