Variable speed drives control motor speed and torque by converting AC electricity from mains supply. Drives require a speed demand signal and feedback from motor sensors to run control algorithms. Drives are tuned to match the motor and load conditions for optimal speed maintenance. Variable speed drives can be programmed either using the drive's internal function blocks or programming blocks in a PLC. Using internal blocks is often quicker but requires learning proprietary software, while PLC programming is more flexible but more complex and resource-intensive. The best approach depends on the application and expertise of the engineering team.