Distributed Generation and Load Monitoring/Control Through Advanced Metering