Code Monkey home page Code Monkey logo

jash-2000 / computational-control-system-lab Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.62 MB

PID Controlled Arm as the term project and various other projects for Control System's courses EEE F245( Computational Control System Lab) and INSTR F242 (Control System Design )

MATLAB 4.06% C++ 38.38% HTML 18.28% Python 25.83% C 13.45%
controller bode-plot stability-analysis block-diagram fuzzy-logic genetic-algorithm pid-control robotic-arm

computational-control-system-lab's Introduction

Computational Control System Lab

The repository contains my assignment solutions and term project of the Control Systems course and Computational Control System Lab course and BITS Pilani.

The term project details are as follows

The Term project deals with developement of an propeller controlled arm design using a microcontroller. The final model developed can be seen in the following image :

Final Picture

The hardware schematic for the same is shown below :

Schematic

Here, we are using Teensy 3.2 along with Arduino Uno board for controlling the propellers.

The Soltware component is divided into following 3 parts

*Microcontroller Code: This is the code uploaded to the Arduino (the .ino file). It sets the Arduino up for listening to and controlling the electronics as well as taking in parameters and reporting values to your computer over serial (the USB cable). It is written in Arduino's C/C++ type language.

*Server Code: This is a Python script that talks with the Arduino over serial, does some calculations, and then talks with the GUI code in your browser. It is the "middle-person" of our software stack.

*GUI Code: Your GUI (Graphical User Interface) is basically just a web-page that is hosted on your machine. It is written in standard html/css/javascript. Don't worry, it is locally hosted and only you have access to it! It lives at localhost:3000 in your browser url field when the server script is running.

The controller GUI would look like this GUI

I have also attempted to build a flask server for developing a GUI version for the outputs of Arduino (for testing purpose). There are many bugs with the GUI currently, and I am open to any pull requests. The requirements for the project are present in req.txt file.

The Control Model of the System

The controller of the system is designed using a simple PD controller with an steady state offset.

    // calculating the motor command signal here:
  req = kp*errorV + kd*andleVderv + directV;
  float motorCmd = req;

Individual folders contains readme files for improved explianations. Also the file parameter_derivation.md contains the model derivation.

Final Results


The projects are briefed below.

  1. Control of Motors - Fuzzy PID controller design for a closed loop system of a DC shunt motor. The block diagram developed looks like this

DC Motor Block Diagram

Fuzzy PID

  1. Root Locus and Nyquist Plot Development for Stability analysis - This assignment involved choosing of appropriate Nyquist contour for an open loop system and determine the values of static gain for which the system's closed loop reains stable. Later the same is done using plotting the root locus of the system. The hand written solution with the matlab code for the same is available here - 2018A8PS0507P.pdf.

Developed Plots

Nyquist Plot Root Locus

  1. Development of customized PD Controller - Designing an Cascaded PD controller, with the desired settling time and peak overshoot is a very important task in any design algorithm. The hand written solution is present here.

  2. Using Root Locus to control a 2nd Order closed loop P-only controller - This involved the use of above 2 techniques to develop a customized controller. You can see the code present in the folder .The result obtained is as follows

Root Locus based P-only controller

Step Response

  1. Inveted Pendulum Control using intelligent Control Schemes - This project contains the tuned versions of inverted pendulum using Fuzzy Genetic PID controllers. I have dedicated an entire repository on this topic, the link for which is present here : Pole-Balance-Control-Algorithms. Please do star the repository if it helped you.

  2. Bode Plotting and Block Reduction Technique - Experimeted with various functions of MATLAB to develop bode plots and examine the system dynamics. A complex block diagram was also reduced to a simple transfer function.

Complex Block Diagram

BD

The resolved transfer function was

  c = [1 , 3];
  r = [1 , 9 , 131 , 850 , 2142 , 1820];

  sys = tf(c,r);

Resources

P.S - The write Ups and the codes for some of these group assignments are present with Akshit Patel.

computational-control-system-lab's People

Contributors

jash-2000 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.