Skip to content

Instantly share code, notes, and snippets.

View BTelsang's full-sized avatar

Bhagyashri Telsang BTelsang

  • TU Delft
  • Netherlands
View GitHub Profile
@BTelsang
BTelsang / Identification of a Nuclear Reactor
Last active August 29, 2015 14:12
Code for performing system identification of a nuclear reactor using the Least Squares Technique.
clc;
clear all;
close all;
%loading input and output data of the plant here
d1=load('');
%any dataset can be loaded here
%extracting the inputs and outputs from the loaded file
%select the appropriate columns from the loaded file to extract the input
@BTelsang
BTelsang / antenna_position_controller
Created January 7, 2015 21:01
C code for implementation of a controller for antenna positioning in Airborne SatCom Terminal.
float kp,ki,t,wf,K,K1,kdrive,kpc,kant,kpp,kip,zc,pc;
float m,m1,m2,m3,m4,m5,m6,m7,m8,m9;
float A1,B1,A2,B2,A3,B3,A4,B4,as,eb;
int i;
float pi(float kp,float ki,float t,float x,float y,float r)
{
float op1,op2,a,b;
int d;
a=(2*kp)+(ki*t);
@BTelsang
BTelsang / position_ctr.ino
Created January 28, 2016 13:30
Position control of a DC motor using Arduino micro. DC motor type: Faulhaber - Series 2607 ... SR IE2-16. Motor driver: L293DNE
#include <Encoder.h>
#define ENCODER_USE_INTERRUPTS
int driverEN = 11; //Enable input to the driver
int motorPWM1 = 8; //PWM signal to the motor pin of the driver
int motorPWM2 = 9;
Encoder myenc(3,7);
void setup(){
Serial.begin(9600);