PID Speed Controller For DC Motor - Arduino Project Hub
PID Speed Controller For DC Motor - Arduino Project Hub
Algorithms
kalman filter algorithm ( filter the speed sensor from noise)
Non-linearleast squares algorithm ( parameter estimation)
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 23/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
1.Transfer Function.
2.State-Space.
the armature voltage is treated as the input and the rotational speed is chosen as the
output.
3.Simulink Modeling.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 24/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
subsystem of DC Motor.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 25/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
PREVIOUS • •
NEXT
5.Tuning PID
There are many different ways to tune PID control of any system like ZIEGLER
NICHOLS methods or even TRY AND ERROR method to get the required performance.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 26/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
In this section, PID tuner toolbox is used to tune PID depends on response time
[slower– faster] and the transient behavior [aggressive – robust] that you give.
PREVIOUS • •
NEXT
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 27/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
Measured data comes from real system while simulation data comes from
mathematical model with initial assumption as shown below :
J=0.01;
B=0.1;
K=0.01;
R=1;
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 28/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
L=0.5;
And after a number of iteration, the simulation data try to follow the measured data
by changing these parameters to match measured data and give us realistic model
result.
PREVIOUS • •
NEXT
result of estimation
GUI
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 29/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
GUI app
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 30/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
Open the connect button for making a connection between ARDUINO and the PC.
· Com ports: choose what available.
· Baud rate: 9600
Then press open button from port control panel.
bluetooth / usb
The GUI have also both serial monitor and serial plotter for better visualization data
incoming from ARDUINO.
For serial monitor, you can copy the data and analysis it by either Microsoft excel or
Matlab.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 31/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
save data
2.How to estimate the parameters of the motor: Using non-linear least squares
method.Good estimate but it have some error.
3.How to send and receive command from a computer :Make a GUI using c sharp
windows form application.
4.How to build mathematical model of the motor:Using Simulink and create
subsystem.
5.How to tune PID control: Using system identification toolbox from Matlab Very
good result.
Design
2D part : box.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 33/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
Schematic Diagram.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 34/58
18/05/2022 00:32 PID Speed Controller for DC Motor - Arduino Project Hub
Videos
part1 : hardware.
https://create.arduino.cc/projecthub/tareqwaleed1996/pid-speed-controller-for-dc-motor-74e735 35/58