A real experiment to estimate the parameters of a DC motor with no data sheet. The original tutorial which uses measured angle can be found here DC Servo Motor Parameter Estimation. The same method has been used to estimate the motor parameters.
The motor used is a cheap DC 775 motor and the data acquisition(angle and RPM) has been collected using AMT CUI 102 encoder operating at 8092 pulses for revolution.
ChibiOS has been used for collecting data and bluepill has been used as a Microcontroller board. The matlab scripts and simscape subsystems used for parameter estimation can be found in Matlab folder.
RPM has been used to estimate the parameter of the DC motor. The interrupts caused by AMT CUI 102
encoder are too many at about 1000 RPM, the microprocessor doesn't even get time to send the result on USB. Due to this the RPM used for estimating has been limited to below 1000RPM. Further experiment using the Index pulse
of the encoder should be possible which can help in achieving much higher RPM.
The estimation result can be seen here
The estimated parameters are further utilized to tune a PID controller which can be seen as a system block as
and the result of the above control system which has 1 second response time is
Python script that has been used to collect data can be found in scripts folder.
Open VSCode and install Cortex Debug extension. ctrl+shift+p
and select build to build the binary file. Debug it using the debug window of VSCode.
Make sure that the ARM-GNU-GCC compiler is available in the path.