cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

PID from the download file

Highlighted
Newbie

PID from the download file

Modeling a PID Controller with Mathcad
By Mohamed Bendame
This article will show the characteristics of the proportional (P), the integral (I), and the derivative (D) controls of a PID controller, and how to use them to obtain a desired response.
_____________Something wrong in there !________
Mohamed, if you read the forum you can download the correct model. In your Xfr function with Laplace third, you must use the cubic solver. Otherwise you have what you did. Check the values P+I+D that I put in the system (in your sheet), your system goes hay wild pretty soon. Something wrong in the Matlab tutorial too !
Amazing: the pure model Xfr function has different mathematical form in your Mathcad 2001i than in mine ! Mine is confirmed from external sources many years previous to Mathcad.
Maybe nobody reads us anyway.
15 REPLIES 15
Highlighted

PID from the download file

Your work sheet PID_2 takes about 6 sec to calculate vs mine (PID_0) about 2.2 sec. The content and objective are the same, though mine looks more involved. The symbolic evaluation of your invlaplce is the cause.
Highlighted

PID from the download file

Few months ago, I mentioned about the standard form for InvLaplace. Here is an example. Mohamed if you read the collab, you may wish to adapt your technique to the standard form. This will allow to output results in literal equations to be reproduced for universal use instead of particular numerical results. In other words, in the literal form, the user just plug values for an easier view of the modeling.


Highlighted

PID from the download file

Thanks a lot for your feedback and suggestions regarding the PID controller Mathcad file. I must admit I don't visit the Mathcad collaboratory on a regular basis, and haven't seen a PID example in the past. However, it's great to see that there are Mathcad users out interested in this area (about 60 read the article), and I would like to see similar applications either posted to the collaboratory or to mbendame@mathsoft.com.

Highlighted

PID from the download file

Sometimes soon, I will be reposting same file.
There was a mistake in the previous one.
It's a very complicated business PID !
I'm adding the most essentials tutorial items in the file "mode".
If so desired, I can save down to 8. Unfortunately I can't check if working in that version, need a second computer
Highlighted

PID from the download file

Jean,

I'd like to look at your version 8 files, as I don't have 2000i.

I was only able to look at Bendame's file briefly, however, there seems to be a fundamental error in the file for all scenarios except the PID version. For example, the Proportional only(P), the Proportional-Derivative(PD), and the Proportionl-Integral(PI) scenarios did not perform the closed-loop response properly.

He should have generated a G/(1+G) for all (he did so in the PID though).

So, for example, in the P case, the closed loop response should have been
Kp(s^2+Bs+K)/[ 1+ Kp(s^2+Bs+K) ], which after cleaning up, I don't get his transform.

This seems to be the case for all except the PID.

Comments?

Fred
Highlighted

PID from the download file

Fred,
Be careful when you clean up a Laplace expression. We must admit few things:
1_ it pictures the real life as demo.
2_ it has no use for tuning discrete PID, these last one are very plain ... so many papers written on the subject.
3_ only P does not content imaginary part but for the PI, PD, PID when tuning is close enough, then the imaginary part becomes negligible. You will see on the graphs (just added for the proof).

The PI & PID are asymptotic to the unit step then have limit 1 (for unit step 1).

The PD is asymptotic to the "offset"

If you go deeper in the final equations (PD, PI, PID), you will notice Mathcad carries the complex variable all the way through all terms and at the end only the real part is significant ... pretty nice in there !
I have more material on that but before passing for use, better make sure it's not too far from true... is it. Very difficult subject.
Let me know if it opens OK in your 8. There should be no red, maybe except for the "minerr" recursive down the page.

Highlighted

PID from the download file

Jean,

thanks for the file. I was expecting 2 files, just as in the previous post. Is this the only one I need?

Also, I'll be extremely busy for the next 4 weeks, so I'll take me a while to digest your efforts.

However, I've been playing with the inverse laplace transforms, and I get the impression that it's 'sensitive' to the input format. For example, one form works fine, and then algebraically modify it slightly, and then it can't find the inverse. Interesting.

Fred
Highlighted

PID from the download file

Fred,

There are several methods of extracting the InvLaplace ... visit all the sites.
Commonly, if we expand in partial fractions it does the usual job. Could be that Mathematica uses a different engine than Mathcad. For our project, they both provide the same final graphs.
The site "detoolkit" is a general purpose solver. I noticed it uses Mathematica, but if my recollection is safe, I think it does all the necessary simplification ... better check.
Take it easy 4 weeks, in the mean time, I'm plugging holes in that cheese.
On your way back, you will have all.
Like Laplace said " why should I refuse my meal even if I don't understand digestion" ... well in tune with our project, indeed.

Jean

http://integrals.com/
http://www.nag.co.uk/numeric/fl/manual/html/indexes/kwic/inverse.html
http://www.ecs.fullerton.edu/~mathews/c2000/c11/Links/c11.2_lnk_22.html
http://mathworld.wolfram.com/LaplaceTransform.html
http://www.vibrationdata.com/Laplace.htm
http://mss.math.vanderbilt.edu/~pscrooke/detoolkit.html
http://rclsgi.eng.ohio-state.edu/~gnwashin/me481/Lap_ex6_1.html
http://pumpjack.tamu.edu/~valko/Nil/

Highlighted

PID from the download file

Hi Fred

Thanks for your time reading the Mathcad PID Controller worksheet, thanks also to Jean for his feedback and suggestions. I have realized that I made a mistake in the calculation of the closed-loop transfer function of the P, PD, and PI configurations, I should have used G/1+G as I did in the PID configuration.

Thanks again
Mohamed
Highlighted

PID from the download file

Mohamed,
This file is now in good and final shape about PID, but still missing related items. I replaced the Cardan cubic solver for the synthetic solver as posted few days ago. I have problems entering the collab, technical problems on my system. But if you replace the Cardan in your sheet, everything will then be OK. Let me know if you were able to open the file 4/5 days ago, because she was saved down to version 6 for all collabs !
Highlighted

Re: PID from the download file

Dear all,

I see no Mathcad file attached to any of these (rather old) posts.

Can anyone point me to a link to the model of the PID controller in Mathcad (v15) if available?

Thanks a lot for your help!

Best

Federico

 

Highlighted

Re: PID from the download file

You are right, this was posted in the collab, the forum that Mathsoft used for collabration. Since then PTC have taken over Mathcad and migrated the collab information twice, first to Jive, then to Lithium. In both transferrals information was lost and messed up.

It's PTC...

 

There is an extremely low probability that someone will have the file you are looking for AND is still active on this forum.

 

Success!
Luc

Highlighted

Re: PID from the download file

This might be it?

Highlighted

Re: PID from the download file

Many thanks for this! It is really useful.

Best

FP

 

Highlighted

Re: PID from the download file

Extremely low probability, but apparently not zero...

Announcements