I have a pwm driven DC motor control system with magnetic encoder that measures the output shaft speed and outputs the RPM values every 50ms over serial comms to plot a graph of RPM vs Time. The system is stepped from 0 to 10% of the maximum possible duty cycle initially and then after a period of time stepped again from 10% of the maximum to 20% of the maximum. I would now like to determine the parameters of the system from this graph - mainly the time constant, gain and time delay.
\$\tau\$ is measured as 0.63 of the steady state value. So this is obtained by taking 0.63*112 = 70.56 and finding the corresponding time, roughly 400ms.
I'd like to know if I have the correct approach in obtaining the gain. I found this formula:
\$K = \frac{\Delta Y}{\Delta U}(t \to \infty)\$
Does this mean I can calculate the gain as the RPM difference between 10% and 20% duty cycle step divided by the difference between the duty cycle step. i.e
\$ K = \frac{120-112}{20-10} = 10.8\$
edit:
I plotted the theoretical response obtained from the experimental response. The step to 20% duty cycle does not seem to correspond to the experimental output.
k = 10.8;
tau = 0.4;
num = k;
den = [tau 1];
H =tf(num,den,'InputDelay',0.1)
t = 0:0.01:10;
u = 10*(t>0)+10*(t>6);
lsim(H,u,t)