메뉴 건너뛰기

TSKit

fan rpm control with pid

조회 수 6729 추천 수 0 2017.09.13 13:49:45

avi:

https://youtu.be/rOfQqpVKuSg



20170905_150721[2017-09-13-13-48-27].JPG

PID_Compensation_Animated.gif

차후에 상수를 맞추기 위해 웹 그래픽을 이용할 예정임.

아래는 활용한 소스임.

0.5초 마다 제어하고 dt는 0.5초로함.

===============================================================

#define Kp(2)// configurable value.

#define Ki(1)// configurable value.

#define Kd(1)// configurable value.

#define dt   0.01



double pid_con(double val_in)

{

 static double P_err_prv;// Prev P error to get D_err.

 double P_err, I_err, D_err;// Basic Error values.



 P_err = AIM - val_in;

 I_err += P_err * dt;

 D_err = (P_err - P_err_prv) / dt;


 P_err_prv = P_err;// backup P_err.

 val_out = (Kp * P_err) + (Ki * I_err) + (Kd * D_err);

 return val_out;// Calculated.

}

출처: 키에 있는 내용임.

 

serial oscilloscope를 이용하여

p=0.6을 선택함.

팬의 전원은 처음에 제어를 안하므로 처음값은 무시함.

초록색은 제어량임.

p-value.jpg


아래테이블방식으로 일반성능이라면,

실험에의해 pu=0.5주기

ku = 0.6 / 0.2=3로 정함.

kp = 0.25 x 3=0.75

ki =  0.5 x 0.5 =0.25

kd = 0.12x0.5=0.06

result.jpg


여전히 과도응답있슴.

팬이 굉장히 센서티브함.

Ziegler-Nichols 폐루프/주파수 응답 방법

다음 테이블은 비례 컨트롤에서의 여러 타입의 루프 성능에 대한 튜닝 식을 보여줍니다. 여기서 Ku는 컨트롤러 게인이고, Tu 진동 주기입니다.

빠른 성능
컨트롤러 Kc Ti Td
P 0.5Ku
PI 0.4Ku 0.8Tu
PID 0.6Ku 0.5Tu 0.12Tu



일반 성능
컨트롤러 Kc Ti Td
P 0.2Ku
PI 0.18Ku 0.8Tu
PID 0.25Ku 0.5Tu 0.12Tu



느린 성능
컨트롤러 Kc Ti Td
P 0.13Ku
PI 0.13Ku 0.8Tu
PID 0.15Ku 0.5Tu 0.12Tu

 

 

List of Articles
번호 제목 글쓴이 날짜 조회 수

lace keeper diy file

  • tskit
  • 2026-02-21
  • 조회 수 62

P1S 2.4inch xtouch upgrade file [1]

  • tskit
  • 2025-11-04
  • 조회 수 116

바토세라 게임기 제작 -바탑 file

  • tskit
  • 2025-07-20
  • 조회 수 212

kingroon 3d printer chamber diy file

  • tskit
  • 2024-11-05
  • 조회 수 361

조이스틱 개조 file

  • tskit
  • 2024-08-24
  • 조회 수 351

Batocera on RPI B file

  • tskit
  • 2024-01-06
  • 조회 수 391

손목시계 배터리 교체 file

  • tskit
  • 2023-09-04
  • 조회 수 492

리모콘 수리(재생) file

  • tskit
  • 2023-08-07
  • 조회 수 489

Nuvoton n76e003 series file

  • tskit
  • 2019-03-03
  • 조회 수 3822

esp8266 arduino ntp clock file

  • tskit
  • 2018-03-05
  • 조회 수 6655

fan rpm control with pid file

  • tskit
  • 2017-09-13
  • 조회 수 6729

Car flasher file

  • tskit
  • 2017-01-02
  • 조회 수 7144

레이저 가공,절곡 도전기 file

  • tskit
  • 2016-05-14
  • 조회 수 72618

car 2wd body by china file

  • tskit
  • 2016-05-01
  • 조회 수 6530

Cheap hexpod robot file

  • tskit
  • 2016-01-24
  • 조회 수 6386

iphone5 housing change file

  • tskit
  • 2015-12-24
  • 조회 수 5977

Laser-clock test file

  • tskit
  • 2015-12-23
  • 조회 수 6647

arduino micro hwb file

  • tskit
  • 2015-06-23
  • 조회 수 16388

cactus micro module(arduino scope) file

  • tskit
  • 2015-05-05
  • 조회 수 7790

ACS712 test file

  • tskit
  • 2015-03-26
  • 조회 수 7449