Designing of half- and full-duplex relay systems based on MMSE formulation