The transfer function of the K(inf) can be found via
.To compute this equation you can find the F(inf), L(inf), Z(inf), and A(inf) via
.So, after solve your two equation and find X and Y you can find the TF of your controller.
(A, B, C, D) comes from your generalized plant as
[A B1 B2]
P = [C1 D11 D12]
[C2 D21 D22]
For gamma value, you will define a value first and will look for whether you satisfy two condition or not to continue to solve above equations. Two conditions are;
1) Your 1st and 2nd equations corresponding Hamiltonian matrix's eigenvalues should not on the imaginary axis, (If this condition doesnt satisfy with your gamma value, change the gamma value until it satisfies).
2) max(abs(eig(X*Y))) < gamma^2
The minimum gamma value that satisfy these conditions will give you K_optimal controller transfer function.