Optimization and self-reconfigurability of compact antennas