CPG design with IoT and AI