Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PID DC motor controller project

Status
Not open for further replies.

gehan_s

Member
Hi all,

For my final year project I wanted to do a PID temperature control unit but some other guy beat me to it so now he is doing it. My lecturers suggested me that I do a PID DC motor control trainer panel (one can be used to simulate PID motor control in a lab).

I would like your input on this so I can improve this idea. But what I would really like is my project to have an industrial use. Can you all please help me with your valuable input.

Thanks in advance !!!!!!!!!!!!!!!
 
Could you tell us first "how you would do it?". So we can comment on that.. and hopefully improve something.

If this is a digital control, I would buy a DC motor with a quadrature encoder, an H-bridge to drive the motor and a microcontroller board to implement the PID.. I might even go with an Arduino board. Then write the firmware for the uC and software for a PC client that communicates with the microcontroller. You should be able to plot speed and PID parameter graphs on the PC.. and of course be able to set parameters etc. You can simulate load changes easily by switching power resistors in series with the DC motor.

Or, are you going to do an analog simulator of a DC motor? That could be interesting.
 
Last edited:
The first thing you must decide is:
do I want to do it with analog or digital circuits?

For analog, the PID controller uses 3 opamps with 3 potentiometers to adjust the gain of the P, I and D.

Digitally, you would have to use what mister T advised
 
Thank you both for replying !!!!!!!!

I was initially thinking of a digital approach. But the analog control also sounds nice. I would like to implement an auto tuning option. I do not know how it could be done yet but it would be nice to implement it. The thing is this project should carry enough weight to be qualified as a final year project and at the end of the day I should be able to sell myself to potential employers with the help of it.

Regards
 
Auto tuning will certainly make it a sizeable and challenging project, which would easily meet a final year project.
 
I'm not an expert on auto-tuning PID loops, but have seen brief discussions of its implementations, and they were a little too complex for a PIC. Perhaps a DSPIC.

Even simpler would be to write a routine in a higher level language like VB, C or even Basic. Run that in a computer which is serially communicating with the target microcontroller, which could then store the optimized coefficients..
Once that you tune a system, there is no need to routinely re-tune it, unless a system modification occurs.
In which case, you reconnect the computer again.
 
Hi all,

For my final year project I wanted to do a PID temperature control unit but some other guy beat me to it so now he is doing it. My lecturers suggested me that I do a PID DC motor control trainer panel (one can be used to simulate PID motor control in a lab).

I would like your input on this so I can improve this idea. But what I would really like is my project to have an industrial use. Can you all please help me with your valuable input.

Thanks in advance !!!!!!!!!!!!!!!

Just to throw out an idea... Industrial temperature chambers now use controllers based on fuzzy logic control, rather than the old PID control that used to be used. The main advantage is that manual tuning or auto-tuning is no longer necessary. If you do that as a project, you can upstage the other PID guy (all in fun, of course) and provide a nice technology comparison example to other students too. Fuzzy control can be implemented with just about any micro-processor, since the required update speed for temperature control is relatively low. Personally, I've done simple fuzzy logic controllers, but I have never looked at just how sophisticated modern fuzzy temp controllers need to be to be automatically adaptive to a wide range of thermal systems, but I think this is what gives this project high value as a learning example.

DC motor control is also a good idea and a good learning example, but it is very well known and well understood. Just to throw out another idea... If you do use PID control with analog rather than digital implementation, you can do the PID function with one OPAMP, to try and impress your lecturer.
 
Industrial temperature chambers now use controllers based on fuzzy logic control, rather than the old PID control that used to be used. The main advantage is that manual tuning or auto-tuning is no longer necessary.

How does fuzzy logic eliminate the need of tuning?
 
How does fuzzy logic eliminate the need of tuning?

I'm not an expert, nor even moderately knowledgable about fuzzy logic control. It's important that I make that clear up front. I guess you can say my knowledge about fuzzy logic control is "fuzzy" at best.

I'm much more familiar with classical and modern control theory and application and always try to attack problems from that point of view first, and usually succeed with that approach. The one place where I find myself using fuzzy logic control is when trying to control for maximization of a variable, rather than regulation or tracking of a variable. Maximization is not usually a straightforward control problem; however, a very simple fuzzy logic rule set can be used to maximize variables (multivariable maximization too!) and this tends to be very robust to system parameter changes. I can't really explain why, other than to say the rule set itself does not relate to system parameters, but mainly to system inputs and outputs. The output and the past history of the control inputs are monitored (and classified with membership funcitons), and then a rule set determines how to vary the modify the inputs for the desired outputs.

Generally, the modern and classical control approach requires having a model of the system and then matching control parameters (gains, and compensations). If we don't have a good model, then we might use PID and go through a tuning process, but in the end we've matched the controller to the system. Of course, there are ways to allow classical/modern control systems to be adaptive or self tuning.

My primary basis for making the suggesting and the claim that it is possible to design a fuzzy logic controller for temperature that is robust to a wide range of system parameter changes is that it seems that most modern temperature controllers have switched to this method. In the old days, we used to have a general set of PID gains for our temperature chambers, but if a significantly different system was to be tested with a complicated temperature profile, we sometimes had to retune to get the best response. These new controllers seem to have eliminated that need, at least according to what I've read when we purchased a new thermal chamber recently.

I guess a general statement that we can make (maybe) is that the need to do tuning when using PID control is replaced by the need to make a good rule set when doing fuzzy logic control. I think even with fuzzy control there is some gross tuning that needs to be done. For example, the update rate of the fuzzy control and the system dynamics need to be compared at a high level when planning the system design.
 
Last edited:
Ok.. so this was just a confusion over terms. To me choosing a (fuzzy) rule set is the same as tuning. Anyway you have some good points there..
 
The reason that fuzzy logic can be more tolerant of parameter changes in a closed loop system is due to the nature of the controller

PID originated as an analog control method, since it was relatively simple to generate the required Proportional, Integral, and Differential functions with op amp circuits. If you do PID with a digital processor than you basically must emulate the analog PID functions in software. This can require a fair amount of processing power, particularly if you need a high frequency loop response.

PID requires that the various parameters in the system (inertia, friction, springs, damping, etc.) be linear and known, so the proper PID terms can be determined to provide compensation for each term, and thus form a stable, responsive control loop. If these parameters are unknown, change over time and temperature, or are non-linear, then it may be difficult to maintain a stable loop, and some form of auto-tuning would be required. Many process control parameters are non-linear and that can be a problem for PID.

Fuzzy logic is designed to be readily done by a digital processor and does not have the particular limitations of PID (although it's no cure all). With a proper selection of the Fuzzy rule set, the control system can be made stable for a larger variation of, and non-linearity in, system parameters than a standard PID loop can tolerate. And, since the rule set is typically just a series of If-Then-Else statements it's relatively easy to understand how the loop is working and usually fairly obvious which rules may need to be empirically tweaked to get a stable system. That's generally not so true for the PID parameters. Here's one discussion of Fuzzy logic design with non-linear parameters.
 
Last edited:
Ok.. so this was just a confusion over terms. To me choosing a (fuzzy) rule set is the same as tuning.

I see your point. There are two aspects to developing the control system. One aspect is the determination of the overall method and structure, and the other is the setting values to the parameters in that structure. Both aspects are present in either classical/modern control or fuzzy control.

I think of tuning as the setting of parameters, but some aspects of a fuzzy logic rule base can be described as parameters that are tuned in the design process. Sometimes this is not as obvious as (for example) setting a gain in a PID structure, but (for example) the number of membership functions and the range settings for an input in a fuzzy controller can justly be called parameters that are tuned.

So, perhaps a better way to say what I was trying to say is that the fuzzy controller can avoid the need for "retuning" if designed well, and the establishment of a good design that does not require retuning might be easier with fuzzy control than with classical/modern techniques.

I'm not saying any of these things with absolute certainty, but only as a suggestion based on what I've generally observed. The "proof of the pudding is in the eating" and it is only possible to compare actual implementations, not the entire range of possible implementations. That's what I find interesting about the situation the OP will be in if he takes my suggestion. Two students competing to achieve the same goal with the two different approaches is an ideal way to demonstrate the strengths and weaknesses of each approach and hence it is a great learning opportunity for the students and the teacher as well (and us, if the OP eventually shares the results with us).
 
I was in a course once where we had to make a fuzzy controller behave like a PID controller.. turned out that it was very easy. I was surprised by the results.
 
Status
Not open for further replies.

Latest threads

Back
Top