An electronic device comprising: an antenna array including a plurality of antenna elements arranged at an interval of a first distance ; and a communication circuit electrically connected to the antenna array, wherein the communication circuit is configured to: feed a first antenna element and a second antenna element spaced a second distance apart from the first antenna element among the plurality of antenna elements, wherein the second distance is two times the first distance; form a first beam including a main lobe and a grating lobe that forms a specified angle with the main lobe using the first antenna element and the second antenna element; sense an RF, radio frequency, signal that is incident externally using the first beam; in response to sensing the RF signal, form a second beam in a direction of the main lobe using the first antenna element and a third antenna element spaced the first distance from the first antenna element among the plurality of antenna elements; when the RF signal is sensed using the second beam, receive the RF signal with a beam formed in the direction of the main lobe by activating at least a part of the plurality of antenna elements; and when the RF signal is not sensed using the second beam, receive the RF signal with a beam formed in a direction of the grating lobe by activating at least a part of the plurality of antenna elements. an antenna array including a plurality of antenna elements arranged at an interval of a first distance ; and a communication circuit electrically connected to the antenna array, wherein the communication circuit is configured to: feed a first antenna element and a second antenna element spaced a second distance apart from the first antenna element among the plurality of antenna elements, wherein the second distance is two times the first distance; form a first beam including a main lobe and a grating lobe that forms a specified angle with the main lobe using the first antenna element and the second antenna element; sense an RF, radio frequency, signal that is incident externally using the first beam; in response to sensing the RF signal, form a second beam in a direction of the main lobe using the first antenna element and a third antenna element spaced the first distance from the first antenna element among the plurality of antenna elements; when the RF signal is sensed using the second beam, receive the RF signal with a beam formed in the direction of the main lobe by activating at least a part of the plurality of antenna elements; and when the RF signal is not sensed using the second beam, receive the RF signal with a beam formed in a direction of the grating lobe by activating at least a part of the plurality of antenna elements. feed a first antenna element and a second antenna element spaced a second distance apart from the first antenna element among the plurality of antenna elements, wherein the second distance is two times the first distance; form a first beam including a main lobe and a grating lobe that forms a specified angle with the main lobe using the first antenna element and the second antenna element; sense an RF, radio frequency, signal that is incident externally using the first beam; in response to sensing the RF signal, form a second beam in a direction of the main lobe using the first antenna element and a third antenna element spaced the first distance from the first antenna element among the plurality of antenna elements; when the RF signal is sensed using the second beam, receive the RF signal with a beam formed in the direction of the main lobe by activating at least a part of the plurality of antenna elements; and when the RF signal is not sensed using the second beam, receive the RF signal with a beam formed in a direction of the grating lobe by activating at least a part of the plurality of antenna elements. <EOS>