Please help me with Illegal operation: log( {complex affine} )

You would have to provide a more complete mathematical exposition of your optimization problem. The first step is, have you proved it is a convex optimization problem? if it is, then perhaps readers can suggest reformulation possibilities. if not, you either need to change to a different optimization problem to be solved or use some tool other than CVX. Why isn't CVX accepting my model? READ THIS FIRST!