Skip to content

Instantly share code, notes, and snippets.

View KillerWhale12345's full-sized avatar

KillerWhale12345

View GitHub Profile
@KillerWhale12345
KillerWhale12345 / rc-pi.c
Created February 20, 2017 15:38
RC回路のPI制御
/*
Vi(t) = RC*Vo(t)' + Vo(t)
*/
#include<stdio.h>
#include<math.h>
#define GAIN_P 1.0 //比例ゲイン
#define GAIN_I 1.0 //積分ゲイン
@KillerWhale12345
KillerWhale12345 / rc-feed.c
Created February 12, 2017 06:05
RC回路のP制御
/*
Vi(t) = RC*Vo(t)' + Vo(t)
*/
#include<stdio.h>
#include<stdlib.h>
#define GAIN_P 1.0 //比例ゲイン
#define R 1.0
@KillerWhale12345
KillerWhale12345 / rc-step.c
Last active February 11, 2017 17:00
RC回路のステップ応答
/*
Vi(t) = RC*Vo(t)' + Vo(t)
*/
#include<stdio.h>
#include<stdlib.h>
#define R 1.0
#define C 1.0
#define INT_TIME 0.1