A method for optimizing user equipment wireless localization using K reconfigurable intelligent surfaces, with K an integer such that K≥1, each reconfigurable intelligent surface comprising M elements controllable in phase, with M an integer such that M≥1, said K reconfigurable intelligent surfaces reflecting signals transmitted between a base station and said user equipment, said method being implemented by an electronic device and said method comprising, regardless of an a priori position of said user equipment:
- selecting at least one reconfigurable intelligent surface to activate among said K reconfigurable intelligent surfaces, and
- determining phases of elements of said at least one selected reconfigurable intelligent surface to activate, by minimizing a predetermined cost function depending on said a priori position of said user equipment, said predetermined cost function accounting for a predetermined position error bound of said user equipment, while
- ensuring that no more than K reconfigurable intelligent surfaces are selected, and
- ensuring that a minimum Euclidian distance between two consecutive selected reconfigurable intelligent surfaces of a predetermined configuration of said K reconfigurable intelligent surfaces, is greater than a predetermined value limiting interference between additional multipath components generated by said at least one selected reconfigurable intelligent surface.