The objective function is related to summation, and the problem is as follows:

where ,

In the objective function , N is large, i.e., 100~1000. In addition, I_L is an unity matrix (L=2), N_B=5, N_E=3. Q_B is a matrix with size L*L*N, and Q_E is also a matrix with size L*L*N. P_u and P_a are diagonal matrices with size L*L*N.

I think it is very difficult for me to express the objective function when N is large, and I don’t think it could be expressed with for-loop if N is very large.

So could somebody please help me that? Thanks in advance.