I am using a servo motor and controlling it via arduino. Servo motor is part of a control system and I have to use System Identification techniques in order to obtain the servo's transfer function. First step of the whole process is to collect input-output data of the servo's motion and use these data to perform system identification. I read and write data to the servo motor using the Hardware Package for Arduino of Matlab. My question is how to figure out the optimal test signals to enter as input to the servo due to the fact that servos are normally driven using PWM signals ?
UPDATE: I have connected the servo with an Arduino and I currently control it via Matlab (I also can do it with Arduino IDE but I am generally using Matlab for my project). I have created a sine wave with maximum value 0.924 and minimum value 0.111 because this is the range at which my servo responds and changes its position. I am feeding these values at my servo and it performs an oscillation. Now what I want to acquire is the angle of the rotation of the shaft in degrees for each one of the input values or maybe the sine of the angle of rotation of the shaft.