Jump to content
Sign in to follow this  
khm

[Energia Library] PID library for MSP430F5438A, MSP430G2553

Recommended Posts

Hi,

Is there a ready library for PID control available for MSP430F5438A or G2553 controllers. Please help if an example is available for the same.

Thanks,

Tanmay

Share this post


Link to post
Share on other sites

If you are using Energia, try this one which I have used with success: http://playground.arduino.cc/Code/PIDLibrary

 

There are some very good links behind it on practical use and the derivation. Also do a search for PID on 43oh for posts on everything from balancing robots to sous-vide. Your implementation will depend on how fast the system you are trying to control reacts and how stable it is.

Share this post


Link to post
Share on other sites

I am building a code to control a heater with a PWM output connected to an SSR using the Arduino-PID-AutoTune-Library. There are two issues I am currently facing with the above library while using the normal mode(not simulating but using actual analog input of a thermocouple) of operation. https://github.com/br3ttb/Arduino-PID-AutoTune-Library

1> The temperature overshoots when I start the operation.

I tried several values for the constants(kp=2,ki=0.5,kd=2; kp=1,ki=0.8,kd=0.8; kp=1,ki=0.5,kd=0 etc), but still the temperature overshoots by a significant amount.

For eg, if the Setpoint is 100 C, the process value goes upto 130-140 C before coming back to stable state between 95 to 110 C.

2> When I use the Auto tuning feature, the Arduino enters the tuning mode, but the PWM output count just toggles between 50 and 150 and it never comes out of Autotune mode and the temperature goes on increasing continuously even beyond 200 C although the set point is 100 C.

Can you please help me rectify the problem?

Thanks

sketch_feb12a.ino

Share this post


Link to post
Share on other sites

These processes can be quite complex and the control is very dependent on the system.  Autotune doesn't always work and hand tuning is sometimes necessary.  It is impossible to guess what the constants should be without knowledge of the system and possibly experimentation.  Read the background material in the link I have given above for a better idea of how PID works.  If I remember correctly there is a very good link to a method for hand tuning when autotune fails.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...