An automated N-port network analyzer for linear and non linear multi-port RF and digital circuits