I am trying to identify a plant model for a motor position control using MATLAB System identification toolbox.
If it is a speed control example the data set can be generated easily. In this a case it will be a set of pwm values and the corresponding speed values.
But what will be the input and output parameters for a motor position control? If I have a motor with an encoder and use different pwm values for generating data set, it will start to rotate continuously (or saturate if there is a mechanical stopper) after certain pwm values. Since my aim is to implement something similar to a hobby servo which has single rotation, this method is not useful.
The closest solution I found so far is given below
But I don’t know how to modify this setup for a DC geared motor with encoder because it doesn’t have a mechanical stopper and motor will start to rotate continuously after certain PWM limits indata acquisition phase.