I am new to the site and would like some help with DC motor speed loop control.
A basic proportional control loop actually works. The problem I am having is that I need my main power supply to vairy, yet keep the motor speed constant. The project deals with a helicopter where I need to keep constant speed independent of the battery voltage slowy dropping off.
I have designed and used PID loops for DC gear motor position control, but I am having trouble using similar equations in this application that required speed control and not position control.
A little ground work:
I'm using an ATTINY861, 8bit controller. Optical tachometer. FET amplifier.
To measure speed I am using the Input Capture HW feature of Timer/Counter 0.
To output PWM, I am using Channel A of Timer/Counter 1.
All of the above HW and SW components work correctly.
The test code changes between two speeds. When I test the controller on a bench power supply, and vary the voltage, the controller tracks the two speeds, but they are higher and lower speeds based on the power supply and not the tachometer.
Also, in a speed control loop, is it required to add the desired set point speed to the calculated PID term when updating the PWM output?
Thank you for your help,