  This paper introduces a unified deep neural network (DNN)-based precoder for
two-user multiple-input multiple-output (MIMO) networks with five objectives:
data transmission, energy harvesting, simultaneous wireless information and
power transfer, physical layer (PHY) security, and multicasting. First, a
rotation-based precoding is developed to solve the above problems
independently. Rotation-based precoding is new precoding and power allocation
that beats existing solutions in PHY security and multicasting and is reliable
in different antenna settings. Next, a DNN-based precoder is designed to unify
the solution for all objectives. The proposed DNN concurrently learns the
solutions given by conventional methods, i.e., analytical or rotation-based
solutions. A binary vector is designed as an input feature to distinguish the
objectives. Numerical results demonstrate that, compared to the conventional
solutions, the proposed DNN-based precoder reduces on-the-fly computational
complexity more than an order of magnitude while reaching near-optimal
performance (99.45\% of the averaged optimal solutions). The new precoder is
also more robust to the variations of the numbers of antennas at the receivers.
