Rejecting disturbance, and tracking the reference speed of a DC motor

Hello all,
I need to code an Arduino program to tune a PID controller to reduce overshoot in reference tracking or to improve rejection of a disturbance at the plant input. I am using Arduino uno, dc motor with a magnetic encoder JGA25-370-CE DC12V250RPM, and L298N as a motor driver. The motor voltage (or speed) is the reference that I need to track. The plant input is a step input.
Thanks!

This appears like a motor without a load, they are almost impossible to get to come to speed and not overshoot. If I am wrong fill in the missing parts.

Once you have a start on the assignment, and some code to post, feel free to ask specific questions about the project.

For suggestions on getting help, have a look at the "How to get the best out of this forum" post.

The load is external you may use weights, but I am going to use my hand trying to slow down the motor speed.


This image from this website: Information | Free Full-Text | Active Disturbance Rejection Control for DC Motor Laboratory Plant Learning Object (mdpi.com), showing the setup

The picture shows an OPTICAL speed encoder, not a magnetic speed encoder. Which one do you have?

I have a magnetic encoder

Ok. How many pulses per revolution?

11 pulse/revolution and 370 gear ratio

What is this input?

Welcome! the L298N Is an obsolete part. You will have about a 3.5V drop from the power source and the motor. Using one with MOSFETS would be a better choice and give you a more solid response. Also consider using PWM, you will probably get better control and much easier to do with an Arduino.

The input is a step unit input to test the system response.
I am already using the PWM technique, I didn't use MOSFETs before I will look at them.
Thanks!

Your welcome, let us know how it works out. Think of the motor having a flywheel (the armature). That stores energy and slows down the acceleration and deacceleration.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.