Analysis and Design of Passive and Active Microstrip Reflectarrays