After Taylor approximation, the optimization function needs to optimize the variables each iteration
I have no idea what you’re doing. But you can start by carefully reading
and
I think you need something like:
set initial value at which to linearize
for …
cvx_begin
…
cvx_end
update value at which to linearize with optimal variable value from just concluded iteration
end

