hi
Im Hassan I wrote a library for arduino , it's used to generate a PID control signal
for any plant . the library is very powerfull because it Compatible with matlab PID tuner و and have some additional options
1- anti winding up caused by integral term
2- modified derivative term for noise filtering
3- modified PID for setpint kick
4- modified PID for filtering noise measured signal
5- function that generation signal for Dual Channel DC Motor Driver (10A Each)
Dual Channel DC Motor Driver
this options can be selected by the user
how can I share the library with arduino ?
The following figures shows the deference between matlab simulation and system build with this library
I designed the system for 0.09 rise time , 0% overshoot , and 70 phase margin , the result is perfect
response with modified derivative term for noise filtering
response with nose fillter
libirary
system
tuning approach
1- The parameter of DC motor is estimated by compare the simulation results with experimental data , Matlab used nonlinear least squares method and Trust-Region-reflective algorithm to perform the operation
2- the PID parameters is tuned using matlab optimization toolbox
3- The system is powered by 12 volt 32khz pwm supply to avoid noise response
4- I use a second order single-step method ( trapezoidal rule) for numerical integration , and backward deference for numerical differentiation to ensure that mathematical operations is performed accurately
my facebook account