# How to obtain transfer function of servo?

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.

• Can you please describe how determine optimal output from the Servo. My assumption is that the servo is generating a mechanical output. What are the measurements used to determine the optimal mechanical output. Oct 15, 2019 at 17:00
• I didn’t quite get what you want me to describe. I am trying to figure out what are the optimal inputs to servo for which I should measure the output (degree of rotation) of servo. Oct 15, 2019 at 21:14
• Help us understand. Are you doing a simulation or have built a working proto type with using Arduino and servo motor. Can you add some pictures to help visualize what you are doing. Oct 16, 2019 at 9:34
• Generally you would treat the servo as a black box whose input is a PWM command, and whose output is an angle. Given that, where is your confusion? Oct 16, 2019 at 19:42
• No you don't need to use a sensor, unless you seeking feed back control. To help get a response I suggest you update the question with information on what you have done so far. Oct 18, 2019 at 10:50