Control Systems - Part 4

Extracting Transfer Function of DC Motor

System Identification Toolbox


Transfer function can also be obtained using System Identification Toolbox in MATLAB. To work on the data we first convert our data into time domain data for this we use ‘iddata(y,u,Ts)’ command, this creates an iddata object containing a time-domain output signal y and input signal u, respectively. Ts specify the sampling interval of the experimental data.
Once the datasets are created they are imported into the toolbox. These data sets are then processed to create transfer function or other desired method.
Using the toolbox the transfer function of any order can be obtained by specifying the number of poles and zeros.

To learn how to obtain this data please click on the link below
Introduction
Hardware Setup
Data Acquisition 


iddata

To convert the data into id data simply create 2 empty arrays in MATLAB. Once the variable for array appears in the workspace, double click on the variable and paste the values of all the input in one column. Similarly do this for the output variable. 

Once that is done simply use the command iddata(y,u,Ts). We measured the speed at interval of 100ms,giving us a step of  0.1s. Therefore our Ts is 0.1

Once the iddata is formed open the System Identification Toolbox and import the data into the toolbox


In the figures you can see the time plot of the data that has been successfully uploaded. Once that is done we can estimate the transfer function of the model, by specifying poles and zeroes of the system.

From the mathematical model we derive the following transfer function



From this we know that we need a 2 pole and 0 zero transfer function. Also we can see that the response of our system is smooth and resembles a first order transfer function therefore we can also extract 1 pole transfer function too.

Once the transfer function is extracted it can also be verified by viewing the model output.


In the figure black is the original response,while blue and orange shows response of the transfer function derived using different data sets.

The extracted transfer functions are

  419.4
  -------------------------------
  s^2 + 245.3 s + 404.4


1.773
  ------------------
  s + 1.709 

Comments