# Why does my motor model match the actual data in transient but not steady state response?

I have created a model of a DC Servo motor using electromechanical system modeling. I simulated the motor in Simulink (MATLAB) and compared the data with data obtained from a real motor having similar characteristics. Just to be sure, I also derived the equations and used laplace and ilaplace transforms to get the response in MATLAB. I obtained the following characteristics:

As expected, the model from Simulink and that of MATLAB (Simulated) are virtually the same. But, I see that the real motor model has a different steady state response. I can see that it has very less transient error, but high steady state error. Any idea why is this happening and if my method of analysis is right at the first place?

I feel there are some non-linear components coming into play here.

The control system used is a PID Controller with filtered derivative (But, just for this example, I've used Kp = 1, Ki = 0, Kd = 0, N = 100, the same constants are even on the real motor). The motor is modeled as having a permanent magnet on rotor to produce a constant magetic field.

I used the following for Simulink Model

The PWM block looks like this:

Kp, Ki and Kd are for PID, N is for the bandwidth of low pass filter on derivative.

And the Motor block looks like this:

sQ(s) is the speed of motor, Ea is the applied EMF. Jm, Dm and Km are the loads acting on the shaft of the motor (not the gearbox output, the motor shaft internally). Nm/No is the gear ratio for getting the speed to the output shaft (output of the gearbox). Ra and La are the resistance and inductance of armature. Kt and Kb are touque and back emf constant of the motor.

• Did you model all the wires and connections? Jun 18 '20 at 7:29
• I did not use the simscape toolbox for this purpose. I used a transfer function block and a block I made to generate a PWM like signal. Jun 18 '20 at 7:52
• If your model does not reflect the real device where you are measuring the real data then the results will not match. Jun 18 '20 at 7:54
• Okay, I've added an edit for showing how I've added modeled the motor. Any suggestions? Jun 18 '20 at 8:01
• Do one step a time. First verify if your model matches with the test-setup and how accurate it describes it. Secondly you're working with only a gain. Physical systems often have a dead-band, e.g. play or have to overcome friction, etc. If the controller output is to small, i.e. if the PWM value is smaller than a critical value, it may not deliver sufficient power to turn the motor. Therefore you should first verify your model and its accuracy. Jun 18 '20 at 10:18