Optimization and Control Theory for Smart