  Cell-free massive MIMO is one of the core technologies for future wireless
networks. It is expected to bring enormous benefits, including ultra-high
reliability, data throughput, energy efficiency, and uniform coverage. As a
radically distributed system, the performance of cell-free massive MIMO
critically relies on efficient distributed processing algorithms. In this
paper, we propose a distributed expectation propagation (EP) detector for
cell-free massive MIMO, which consists of two modules: a nonlinear module at
the central processing unit (CPU) and a linear module at each access point
(AP). The turbo principle in iterative channel decoding is utilized to compute
and pass the extrinsic information between the two modules. An analytical
framework is provided to characterize the asymptotic performance of the
proposed EP detector with a large number of antennas. Furthermore, a
distributed iterative channel estimation and data detection (ICD) algorithm is
developed to handle the practical setting with imperfect channel state
information (CSI). Simulation results will show that the proposed method
outperforms existing detectors for cell-free massive MIMO systems in terms of
the bit-error rate and demonstrate that the developed theoretical analysis
accurately predicts system performance. Finally, it is shown that with
imperfect CSI, the proposed ICD algorithm improves the system performance
significantly and enables non-orthogonal pilots to reduce the pilot overhead.
