servo motor,fuzzy,pic

Can anyone direct me to any links on how to implement a fuzzy controller for a servo drive in dsPIC.

Reply to
Incubus
Loading thread data ...

Not particular to dsPIC, but check out Walter Bank's stuff:

formatting link
He has a fuzzy PID controller on that page.

Reply to
Freelance Embedded Systems Eng

"The easiest way to describe Fuzzy Logic is as a tool that helps describe complex algorithms in an intuitive way."

PID algorithms aren't complex, and their behavior is often severely counter-intuitive until you've understood the math and flogged it a _lot_.

As near as I can tell fuzzy logic is for problems that are severely nonlinear, difficult or impossible to analyze, and for which an 'intuitive' solution exists.

_After_ you know traditional control inside and out is the time to go mucking around in fuzzy controllers, for those corner cases that can't be addressed the 'normal' way.

Reply to
Tim Wescott

I agree that fuzzy logic is for those that want an intuitive solution but as Tim suggested the best solution may not be the intuitive one. I don't agree that fuzzy logic always the best for MIMO or non-linear solutions. If you are going to tweak parameters then fuzzy logic probably is best for those that don't want to truly understand their system. One can fine tune a fuzzy system by using a minimizing or optimizing routine. At that point I think fuzzy logic becomes more competitive with other methods that do the same. Are you prepared to writing an auto tuning system for the fuzzy logic? Most servo controllers have auto tuning. Servo motor systems are usually easily modeled and therefore easy to understand so some form of PID with feed forwards is usually the preferred method of control. I certainly don't think fuzzy logic is the best solution for a servo motor controller.

The real trick to a servo motor controller is the motion profile generator. The closed loop control is insignificant to the motion profile generator.

Peter Nachtwey.

Reply to
pnachtwey

I agree that fuzzy logic is for those that want an intuitive solution but as Tim suggested the best solution may not be the intuitive one. I don't agree that fuzzy logic always the best for MIMO or non-linear solutions. If you are going to tweak parameters then fuzzy logic probably is best for those that don't want to truly understand their system. One can fine tune a fuzzy system by using a minimizing or optimizing routine. At that point I think fuzzy logic becomes more competitive with other methods that do the same. Are you prepared to writing an auto tuning system for the fuzzy logic? Most servo controllers have auto tuning. Servo motor systems are usually easily modeled and therefore easy to understand so some form of PID with feed forwards is usually the preferred method of control. I certainly don't think fuzzy logic is the best solution for a servo motor controller.

The real trick to a servo motor controller is the motion profile generator. The closed loop control is insignificant to the motion profile generator.

Peter Nachtwey.

Thank you for a detailed answer. Can you explain a little more about motion profile generator. I dont know what that is.

Reply to
Incubus

Most servo systems are divided into a more or less linear PID controller and a motion profile generator. The reason is that a linear PID controller doesn't 'understand' that there's a limited output available. This means that if you just tell the PID controller to go from point A to point B it'll 'put on the brakes' way too late, because it 'thinks' that it can ask for 100 (or 1000) times more acceleration than the motor is actually capable of.

A motion profile generator 'understands' the motor's limited acceleration and other system limits. It takes the "move to B" command and generates a vector of intermediate targets for the PID controller that will bring the motor to a stop without exceeding the motor's acceleration capability, and often without exceeding some desired jerk parameter.

Do a web search on "trapezoidal velocity profile" and you'll get the basics.

Note that for about the same overall software complexity, but potentially higher processor loading and _definitely_ higher requirements on the guy analyzing the software, you can build an awareness of the motor's acceleration and jerk limits into your PID controller. This has a number of advantages, particularly if you are concerned about the mechanism partially binding in the middle of a move or if you are constantly updating the position target before the previous move has finished.

Reply to
Tim Wescott

I general that is true but there are tricks. I have used them many times in my example .pdf files. A good motion controller should be able to handle the step change in position. You never know what the user is going to try to do.

'Understands' is OK but actually most controllers expect you to specify the acceleration and deceleration in the command and the target generator uses that information to compute a motion profile.

A second order motion or trapezoidal velocity profile has infinite jerk at the end of the motion segments. A third order motion profile allows one to specify the jerk limit. The jerk should never exceed this limit.

I consider 3rd order to be the bare minimum. A third order motion profile is much more difficult than a second order motion profile.

formatting link

Tim, you are not being clear here. Are you talking about limiting the control output, feed forwards, what? If I were to guess you make sure the control output doesn't go above the feed forward output plus a percentage.

If you have a proper target generator then one can quickly detect problems by monitoring the following error and the control output. The control will normally do this for you automatically.

Incubus, is going to have a lot of fun with this.

Peter Nachtwey

Reply to
pnachtwey

Fuzzy logic and other rule based controls are best for multi input multi output problems in which there are many "partial scenarios" which need to be recognized and controlled for. They are great if you have several inputs because the "partial cases" can span the inputs. The basic algorithm examines which partial cases are active, and the extent that they are active, then controls to that. It is possible to have very different responses in different areas of the operating space.

Michael

Reply to
Herman Family

"Incubus" schrieb im Newsbeitrag news:g0ngcb$54b$ snipped-for-privacy@ss408.t-com.hr...

?I like Fuzzy Logic as an alternative to probability theory, especially in applications involving man-machine interactions ?Fuzzy feedback control methods represent inferior engineering practice, often by people that never bothered to learn control theory and design ?Fuzzy feedback control is a vacuous technology for the design of high-performance control systems ?Fuzzy control methods are ?parasitic;? they simply implement trivial interpolations of control strategies obtained by other means ?Theological arguments about ?fuzzification?, ?defuzzification?, nonlinear control, and inherent robustness are simply nonsense ?Fuzzy feedback control has failed to capture and utilize alternative means in dealing with uncertainty using Fuzzy Sets and Fuzzy Logic ?Prof. Zadeh should communicate to his disciples the sorry state of affairs in fuzzy feedback control and tell them to ?shape-up?

formatting link

Reply to
JCH

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.