Skip to main content

Overview of PID Control Terms

     PID လို့​ပြောလိုက်တာနဲ့ Theory ​တွေ Mathematic Equation ​တွေကို အရင်ဆုံး​ပြေးမြင်ကြမိမယ်လို့ထင်ပါတယ်။ဒီ​ခေါင်းစဥ်​အောက်မှာ PID အ​ကြောင်းကို မိမိနားလည်သ​လောက်နဲ့ နားလည်​လွယ်​အောင်နဲ့ အကျဥ်းချုပ်ပုံစံမျိုးနဲ့ပဲတင်​ပေးပါမယ်။
    PID အ​ကြောင်းစ​ပြောရရင် အရင်ဆုံး Control Theroy ရဲ့ အ​ခြေခံအကျဆုံး Concept ဖြစ်တဲ့ Open Loop နဲ့ Close Loop အ​​ကြောင်းကိုအရင်​ပြောပြပါမယ်။ Open Loop ဆိုတာက Feedback Signal မပါပဲ Process တစ်ခုလုပ်​ဆောင်တာပါ။ Close Loopက​တော့ Feedback Signal ကို Controller ထဲက​နေပို့​ပေးပြီ သူလိုချင်တဲ့ Target မ​ရောက်မချင်း Control လုပ်​ပေးတာပါ။ 
    ဥပမာ​ပေးရရင် ထမင်းအိုးတည်ဖို့ မီးဖိုတစ်ခုရှိတယ်ဆိုပါ​တော့။ မီးဖိုနဲ့ မီးခလုတ်ပဲရှိတယ် ​နောက်ပြီး​တော့ ခလုတ်အဖွင့်အပိတ်ပဲ အလုပ်လုပ်တယ်ဆိုရင် ဒါဟာ Open Loop System တစ်ခုဖြစ်တယ်။ အကယ်၍ မီးဖိုနဲ့ခလုတ်သာမကပဲ Thermostat သို့မဟုတ် Temperature Sensor တစ်ခုထက်ထည့်မယ် ပြီးရင် ကိုယ်လိုချင်တဲ့ အပူချိန်ဟာ 100°C အထက် ​ရောက်ရင် ခလုတ်ပိတ်မယ်  100°C ​​အောက်​ရောက်ရင် ခလုတ်ဖွင့်မယ် စသည်ဖြင့် Feedback Signal ပါလာပြီဆိုရင် Close Loop System လို့​ခေါ်ပါတယ်။ အပြင်မှာက တကယ်တမ်း​တော့ ထမင်းအိုးမီးဖို တည်သ​လောက်ပုံစံနဲ့ PID Control ​တွေကို တည်​ဆောက်ထားတာမဟုတ်ပါဘူး။ ​ပြောရရင် အပူချိန် 100°C ဟာ On ပြီး Offထားလို့တစ်ချိန်တည်းမှာပဲ 100°C ရှိ​နေမှာမဟုတ်ပါဘူး။ကြိမ်း​သေ​ပေါက်ကို အပူချိန်ပြန်ကျမှာပါ။အဲ့လိုမျိုးတတ်လိုက်ကျလိုက်နဲ့ ခဏခဏဖြစ်​နေမှာပါ။အဲ့လိုအချိန်မျိုးဆိုရင် PID Controller​ ကိုသုံးဖို့လိုအပ်လာပါပြီ။

What is PID?

    PID ဆိုတဲ့အရှည်က​တော့ Propotional (P), Integral (I) နဲ့ Derivative (D) လို့​ခေါ်တာပါ။ အပြင်မှာဆိုရင် P တစ်မျိုးတည်းသုံးတဲ့ Controller ရှိသလို PI နှစ်မျိုးတည်းသုံးတဲ့ Controller ရှိပါတယ်။ သို့​သော်လည်း မည်သို့ပင်ရှိ​​စေကာမူ ကိုယ်ဖြစ်ချင်တဲ့ Model အမျိုးအစား​ပေါ်လိုက်ပြီးမှ မိမိ ကြိုက်နှစ်သက်ရာ Controller ​တွေကို အသုံးပြုတာက ပိုပြီး​ကောင်းပါတယ်။
အခုပုံမှာ P,I,D သုံးခုရှိပါတယ်။ အဲ့ဒီ Control ကို P က​နေ D အထိ ပစ္စုပန်,အတိတ်နဲ့ အနာဂတ်ဆိုပြီးတွဲမှတ်ထားလိုက်ပါ။ ဘာလို့လည်းဆိုရင် Proportional ဟာ လက်ရှိဖြစ်ပျက်​နေတဲ့ အရာ​ပေါ်မှုတည်ပြီး လုပ်​ဆောင်​နေတာပါ။ Intergral က Memory နဲ့ပုံစံတူပါတယ်။ အတိတ်က လုပ်​ဆောင်ခဲ့သမျှအရာနဲ့ နှိုင်းယှဥ်ပြီးလုပ်​ဆောင်တာပါ။ Derivative ဟာ အနာဂါတ်အတွက် ခန့်မှန်းချက်လိုပုံစံမျိုးနဲ့အလုပ်လုပ်တာပါ။

Proportional Control Mode (P)

    Proportional ကို Gain သို့မဟုတ် Sensitivity လို့လည်း​​ခေါ်ပါ​သေးတယ်။ Proportinal Controller ဟာ Input နဲ့ လိုချင်တဲ့ Output ​ပေါ် မူတည်ပြီး​တော့ သူ့ရဲ့တန်ဖိုး​တွေ​ပြောင်းလဲတာပါ။
    Mathematically အရ​တော့ Proportional Action က Output Change နဲ့ Input Change ကို Ratio လုပ်ထားတာပါ။ သူ့ကို Quotient Of Differences သို့မဟုတ် ( A rate of Change, using Calculus Notation) အ​နေနဲ့​ဖော်ပြပါတယ်။ Equationကို ပြန်ပြင်​ရေးရင်​တော့ Errorနဲ့ Gain နဲ့​မြှောက်ပြီး Output ကိုထွက်​စေတယ်ဆိုတဲ့သ​ဘောမျိုးပါပဲ။ (Error ဆိုတာက​တော့ Set Variable လိုချင်တဲ့ တန်ဖိုးက​နေ Process Variable ကိုနှုတ်လိုက်တဲ့သ​ဘောပါပဲ)
    ဥပမာ​ပြောပြရရင်, ကျွန်​တော် Drone တစ်ခုကို  100 rpm နဲ့ Meter 50 ​ရောက်​အောင်တင်မယ်ဆိုပါ​တော့။
             Error × Gain  = Output
  0 m,      50   ×    2    = 100
30 m,      20   ×   5     = 100
40 m,       10  ×   10   = 100
 50 m,        1  ×  100  =  100

    ဒီ​နေရာမှာ Error ကို 1 လို့သုံးတာဟာ Error ဟာ 0 ဖြစ်သွားမှာမဟုတ်ပါဘူး။ Error တန်ဖိုးက ​သေးသွားတာပဲရှိတာပါ။
    ​နောက်တစ်ခုက Propotional Band လို့လည်း​ခေါ်တယ်။ အတူတူပဲသုံးတာက။ ကွဲသွားတာဆိုလို့ သူရဲ့ Output Unit ကို Percentage နဲ့ပဲပြတာပါ။
Integral Control Mode (I)

    Integral Control Mode ကို Reset သို့မဟုတ် Floating Control လို့လည်း​ခေါ်ပါတယ်။ သူက Input နဲ့ လိုချင်တဲ့ Output ရဲ့အချိန်အတိုင်းအတာ​တစ်ခု​ပေါ်မူတည်ပြီးလုပ်​ဆောင်တာပါ။
    အကယ်၍ Proportional (P) ဟာ Error နဲ့ Output မှာ ဘယ်​လောက်ကွာ​ဝေးသလဲ အ​​ခြေအ​နေကို​​ဖော်ပြ​​ပေးတယ်ဆိုရင်, Integral (I) ဟာ Error နဲ့ Output မှာ ဘယ်​လောက်အချိန်ကြာကြာ Output ကို​ရောက်​အောင်သွား​နေသလဲဆိုတဲ့အချိန်ကို​ဖော်ပြတာပါ။ခုနက​ပြောခဲ့သလို P ဟာ ပစ္စုပန်ကို ​​ဖော်ပြတာဖြစ်ပြီး I ဟာ အတိတ်ကို ​ဖော်ပြတာဖြစ်ပါတယ်။ Integral ဟာ Error Over time ရဲ့ အရင် History ​ပေါ်မူတည်ပြီး​တော့ Integral Actionနဲ့ Output Signal ကို ဘယ်​လောက်မြန်မြန်တုံ့ပြန်မလဲဆိုတာပြပါတယ်။
    Math သ​ဘောအရ​ပြောရရင်, Output Velocity နဲ့ Input Error ကို Ratio ချထားတာပါ။
သူနဲ့အပြိုင်Integral Action ကို "Minutes per Repeat" နဲ့ Reciprocal Unit အ​နေနဲ့​ပြောင်းသုံးလို့ရပါတယ်။
    ဥပမာ​ပြောရရင်, 3 repeats per minute ရှိတဲ့ Integral-Only Process Controller ဟာ SV နဲ့ PV ကြားမှာ 5% Error ရှိခဲ့ရင် Output ကို 15% per minute( dm/dt = Integral Value × e , or dm/dt = e/Ti) နဲ့ချဥ်းကပ်သွားပါမယ်။
    Relation မှာရှိတဲ့ Ramping ရဲ့ Direction နဲ့  Error ရဲ့ Direction (Sign) ဟာ Controller က Direct သို့မဟုတ် Reverse Action​ပေါ်မူတည်ပါတယ်။

Derivative Control Mode (D)

    Derivative ကို rate သိုမဟုတ် per-act လို့လည်း​ခေါ်ပါတယ်။ Derivative က​တော့ အနာဂါတ် အချိန်တစ်ခုမှာ Stable ဖြစ်ဖို့အတွက် တွက်ချက်ပြီး​တော့ Control လုပ်တာပါ။
    Proportional (P) ဟာ Output မှာဘယ်​လောက် Error ပမာဏ ရှိတာလည်း​ပြောတာဖြစ်တယ်။ Integral (I) ဆိုတာ Error က​နေ Output ကို ဘယ်​လောက်အချိန်မှာ ချဥ်းကပ်​နေတာလည်း​ပြောတာဖြစ်တယ်။ Derivative (D) ဆိုတာ အနာဂါတ်မှာဖြစ်မယ့်အရာကိုဘယ်​လောက်အရှိန်နဲ့သွားမှာလဲဆိုတာ ခန့်မှန်းပြီး Output ကိုထုတ်တာပါ။
    သူ့ရဲ့  Mathematic က​​တော့ Output Offset ကို Input Velocity ကို Ratio ချထားတာပါ။
    ဥပမာ, PV signal ဟာ 5% per minute rate ကို rampingလုပ်​နေပြီး process controller က 4 mintues constant ရှိတယ်ဆိုပါ​တော့, Output ဟာ ရုတ်တရက်ပဲ 20% offset ဖြစ်လာလိမ့်မယ်။ (Output = Derivative × de/dt)
    Relation မှာရှိတဲ့ Offset ရဲ့ Direction နဲ့  Input Ramping ရဲ့ Direction (Sign) ဟာ Controller က Direct သို့မဟုတ် Reverse Action​ပေါ်မူတည်ပါတယ်။

Reference : 
Service Engineer တစ်​ယောက်ရဲ့မှတ်စုများ
Instrumentationtools' "Overview of PID Control Terms"

Comments

Popular posts from this blog

IPv4 Vs IPv6 - What's the difference between IP Addresses

ကျွန်တော်တို့ IOT Project သို့မဟုတ် PLC တို့ HMIတို့ကို Ethernet နဲ့ချိတ်တဲ့အခါမှာ IP Address တို့ Subnet Mask တို့သတ်မှတ်ရတာတို့ကိုတွေ့ရမှာပါ။အခုကတော့ IP Addressအကြောင်းကိုမှ IPv4 နဲ့ IPv6 အကြောင်းကိုရေးမှာပါ။           IP Address ဆိုတာကတော့ ကျွန်တော်တို့ရဲ့အိမ်နံပါတ်လိုသဘောမျိုးလုပ်ထားပေးတဲ့ Internet Protocol တစ်ခုပါပဲ။ အိမ်တိုင်းအိမ်တိုင်းမှာသူရဲ့သက်ဆိုင်တဲ့နေရာလိပ်စာတွေရှိကြသလိုပဲ စက်တိုင်းမှာလည်းသူရဲ့ သက်ဆိုင်တဲ့ IP Address တွေရှိကြပါတယ်။ ဒါကတော့ IP Address အကြောင်းကိုရှင်းပြတဲ့ရိုးရှင်းတဲ့ ဥပမာတစ်ခုပါ။ ဒီမှာအဓိကထားပြီးရှင်းပြသွားမှာကတော့ IPv4 နဲ့ IPv6 ကိုရှင်းပြသွားမှာပါ။      What is IPv4 : simple meaning & features guide     ဒီ IPv4 မှာဘာတွေပါလဲဆိုတော့ Set Numbers လေးခုပါဝင်ပါတယ်။ ယေဘုယျအားဖြင့် ဘယ်လိုပုံစံနဲ့ရေးကြသလဲဆိုရင် 106.102.77.43 (ဒါကဥပမာပုံစံပါ။) လိုပုံစံမျိုးဖြစ်ပြီးတော့ မတူညီတဲ့ ကိန်းဂဏန်းလေးခုကို Cover လုပ်ပေးထားပါတယ်။ IPv4 ဘာကြောင့်ဖြစ်လာရလည်းဆိုရင် လွန်ခဲ့တဲ့ 1980 ဝန်းကျင်ကာလတွေမှာ I...

Indirect Addressing

Indirect Addressing      တကယ်တမ်း​တော့ ဒီစာကို​ရေးဖြစ်တာကလည်း ဆရာရဲ့ Project Problem တစ်ခုချ​ပေးပြီ ​ဖြေရှင်းရင်းနဲ့ ​တွေ့လာတာပါ။ အဲ့​တော့ အဲ့ဒီဟာက ဘယ်​နေရာမှာ ဘယ်လိုသုံးတာလဲ,ဘာ​တွေသုံးတယ်,ဘယ်လို Program နဲ့​ရေးတာလဲဆိုတာ အဓိကထားပြီး​တော့ ​ပြောပြ​ပေးသွားမှာမယ်။ သူ့အ​ကြောင်းသိဖို့အရင် Index Register ကိုအရင်​ပြောပါမယ်။ What is Index Register?     Index Register ဆိုတာက Process Register လို့လဲ​ခေါ်ပြီး​တော့ Program ကို Operand ​တွေရဲ့ Address ကို Program က Run ​နေတဲ့အချိန်မှာ Modify လုပ်တာပါ၊ PLC မှာရှိတဲ့ Register ​တွေက PLC ထုတ်တဲ့ Company အမျိုးအစား​ပေါ်မူတည်ပြီး​တော့ ​သုံးစွဲတာမတူကြ​ပေမယ့် သ​ဘောတရားက​တော့အတူတူပါပဲ။ အခု ဥပမာ​ပေးမှာက Delta PLC နဲ့ ဥပမာ​ပေးပါမယ်။     Delta မှာရှိတဲ့ Index Register က​တော့ E နဲ့ F ဆိုပြီးသတ်မှတ်ထားပါတယ်။ E နဲ့ F ကိုတစ်လုံးချင်း သုံးရင်​တော့ 16 bit အ​နေနဲ့သုံးလို့ရပါတယ်။ Eနဲ့F ဟာတွဲခဲ့ရင်​တော့ 32 bit ဖြစ်သွားပါပြီ။ E ဟာ Lower 32 bit ဖြစ်လာပြီး​တော့ F ဟာ Higher 32 bit ဖြစ်လာပါတယ်။     ဒုတိယပုံက...

Example of PLC ladder diagram for Filing and Heating Liquid in Tank

In the previous post, I wrote PLC program about Mixing and Heating process. Today, I'm going to write about Filling and Heating process in tank. It sounds like the same topic in previous post. Actually, it is different. We'll see the sequences and processes.  Here is the given sequences according to the Author : 1. Fill the tank up to 80%. When the tank is filled, turn ON the heater to raise the temperature up to 70 deg. 2. When this temperature is reached, turn OFF the heater & open the outlet valve. 3. When the level in the tank falls below 10%, close the output valve. In this situation, I do the ladder diagram via Sysmac Studio which is the product of Omron. I just remind you again, most of the control processes are used with Mitsubishi, Siemen and sometimes Delta's PLC due to cost effectively. I'm going to show you how it works with Sysmac Studio. In this case, I'm only using Name Tags. Before I'm talking about ladder diagram, I would like to tell about ...