Hello!
Firstly, sorry for my English , but, I have started studying recently.
I am doing a proyect about the control of speed of motor DC with PID and PWM.
I did all the design and I simulated in proteus. I do in LabVIEW the control PID and in PIC signal PWM and calculate the speed.
And the simulation works well.
But them I do the real design with AVAGO encoder HEDS-5500 and HN-GH7.2-2414T motor DC and the sistem it is unstable.
Don’t know AVAGO or your motor. HP encoder is fine.
I assume you are adjusting your parameters? Start with simple Position error, next add some Derivative error. Integral I’m told you can hold off on initially. Test and repeat.
About all I know to suggest, is this for a class project? Might be time to ask for assistance.