0
\$\begingroup\$

I'm taking a class on control theory, and for our final project we've been assigned to choose whichever system we want and develop a controller for it. I've choosen to perform RPM control on a simple brushed DC motor. I have a pair of those motors and I want to set them running at the same speed using an Arduino and PID control.

The problem is: everything I've worked on this class has been very theoretical, and I'm stuck with the System Identification. I know the basics of it: if we don't have a mathematical model for the system (which is my case) we can see how the system responds to different inputs and deduce it's parameters from it.

How do generate a 'plant' model for a DC motor?

\$\endgroup\$
  • \$\begingroup\$ I remember umich's website being very helpful. Try googling "DC motor system model" and re-ask your question if you still need help. \$\endgroup\$ – pgvoorhees Oct 8 '16 at 2:33
  • \$\begingroup\$ Turn the question around. Matlab is a tool, not a technique. Ask yourself how you would do it without Matlab. Once you know that, then you're ready to ask yourself how you would do it with Matlab, but I suspect by the time you're there, you won't have any trouble. \$\endgroup\$ – Scott Seidman Nov 7 '16 at 22:10
1
\$\begingroup\$

First you need to gather data from the system under normal operating conditions by feeding your motor sine sweep or white noise inputs (there are other ways, but these are most common). After you provide a sine sweep, for example, with frequencies of say 0-1000Hz, you record the data, and then load it into MATLAB. From here you can use the System Identification Toolbox to import and prepare the data.

Take a look here for help with getting up and running with System Identification Toolbox:

https://www.mathworks.com/company/newsletters/articles/motor-control-with-arduino-a-case-study-in-data-driven-modeling-and-control-design.html

https://www.mathworks.com/products/sysid/

\$\endgroup\$
1
\$\begingroup\$

You could do this with a pencil and a paper. I'm not going to go into all the steps because it would devalue your learning.

First draw your control system and label each 'thing' in your system (controllers, motors, ADC's, encoders, ect) and also figure out what the relationship of the control signal and relationship of the physical units (voltage, current, RPM and digtial signals if you have them) of your system between them. Once you have an idea of how you would drive you system and what it looks like.

Then record some data to build a model for the motor (and drivers) First do this open loop, vary the input out of the controller and record the values going into the controller. Put a step input into the 'Plant' and figure out what the open loop response is. Find the steady state response. Does it have overshoot? (hint the step response has a frequency response in the laplace domain and FFT's are a great way to get stuff into the frequency world)

Figure out what kind of 'plant' you have from this data(its probably only going to have 1 or 2 poles and zeros) by using the steady state response.

You could also input a known frequency and then sweep the frequency higher and higher and then observe the output. This can be useful for finding frequency cutoffs.

Once you have figured out a model for your plant, from the open loop case you can start designing a controller. Do you have a digital or analog controller. If it's digital you will probably want to transfer the open loop plant to the z-domain and do your analysis there.

Another option is to run a digital PID controller on your Arudino and tune it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.