Showing posts with label Experimentation. Show all posts
Showing posts with label Experimentation. Show all posts

Sunday, March 3, 2013

A Blend of Theory and Practice: A Control Systems Example


My last article states the importance of having a blend of theory and practical exposure in your engineering education. I would like to give you an example of how actually you can go about developing it.

We all have control systems as one of the compulsory courses that we need to pass before we get an engineering degree.  It’s a very important course.  Be it any system in any field, you will, at some point, have to control it to achieve certain objectives. The course that we study during our undergrad spans the following aspects of control systems
  1. What is a system and representing a system in a block diagram.
  2. Mathematical representations of any system by transfer functions and state space (If your professor does not teach state space, go ahead and learn it by yourself. It’s super important in industry). You lean about deriving transfer functions on paper. 
  3. Time and frequency response of that system. Comparison of such responses with higher order systems (You learn big mathematical formulae and derivations to represent different parameters like settling time, overshoot, gain frequency, phase margin etc etc). 
  4. Root Locus, Bode plots, Nyquist plots. You learn all the rules and learn how to sketch these on a graph paper by following the rules.
  5. PID Controller design: You learn about the structure of PID controller and if there is sufficient time in the semester you will learn how to implement it on paper.

So, after giving your final exam, you are proficient in drawing block diagrams, root loci, bode plots on paper, deriving settling time, overshoot numbers given a particular system, changing a system from transfer function form to state space form etc.

This is important to understand the math behind controls. Is it sufficient for the industry?  What else should you do??

  1. Software Implementation: You can do each and every thing mentioned above in MATLAB. When you learn a certain concept, say root locus, in the class, try to plot the same locus using MATLAB. Try to plot a step response and see if it matches to what you sketched in the class. Analyze the system properties (settling time, overshoot etc) by interactively moving the poles and zeros and see the effect. You will have derived relations between the system properties and pole positions in the class. Try to replicate them in MATLAB. 
  2. Take a transfer function change it into state space and vice versa using MATLAB. Design a PID controller and see how the system properties are affected when you change the proportional, integral and derivative gains. 
  3. Get comfortable in plotting and analyzing root loci and bode plots using SISOTOOL in MATLAB.

This skill set with develop an understanding of quickly analyzing the system and coming up with a set of controllers that will satisfy your requirements on settling time, overshoot, steady state errors etc.

Hardware Implementation: If more interested you can also use micro controllers to actually see your controller in action on say a DC motor. Implement DC motor speed control. It’s a classic example to try out and is explained in every single control’s book.

Why I am telling this?
In industry no one will ask you to derive expressions, or ask you a proof of how you did what you did. They will want to see results, see your controllers in action. And 99% of the time it’s about designing a PID controller and tweaking the three gains to achieve the system performance.
All you will do ità Model the system in MATLAB, design a PID controller, tweak the gains and check for a) stability, b) system properties (settling time, overshot etc) and c) tracking (steady state error) and d) robustness. So be sure before you call it a day for control systems, you are comfortable in the above mentioned aspects of the system and controller.

To sum up: Be sure to go one step ahead than a textbook oriented course and get familiar with MATLAB tools (tf(), ss(), pid(), rlocus(), sisotool(), bode() etc commands) to be able to use MATLAB to do what you would otherwise spend time on doing by hand. This one subject will then open arenas like controls, mechatronics, robotics, instrumentation, modeling & development and much more which you can focus if you go for higher studies.

Good Books you can refer for the basics:
Feedback Control Systems by Franklin Powell


Hope these links help you.

(If you are interested in controls/ mechatronics I have designed few projects that I can share with you. Let me know via email at bits2world@gmail.com and I will email them to you)

Wednesday, February 27, 2013

A Blend Of Theory And Practice


This article briefly compares what we study and what is required in industry! In a couple other articles I will try to give a few examples on how you can acquire best of both the worlds so that you have a better picture of it and try to work towards it.

What’s our education system like
Compulsory Disciplinary Courses (CDCs) are the mandatory courses that you will have to do in your 3rd and 4th years of engineering to get a bachelor’s degree. I was in your shoes a few years back and it’s sad but true that most of us memorize formulae and get good grades in these CDCs. Indian education system is very textbook oriented. Be it any university, we have a certain prescribed textbook and the professor teaches exactly from that textbook. If that textbook- professor combination is good, you like that subject and you explore more, otherwise you bunk classes.

Good thing about our education system is the fact that we are molded fairly strongly in the mathematical aspect of any subject. We can analyze any particular engineering system optimally in a theoretical manner. But when it comes to building that system, we lack in experience and the tools. In the west what I experienced is something different. An undergraduate student may not be very proficient in calculus or differential equations or matrices (which are basically building blocks of engineering) but when it comes to building a working prototype of any phenomenon, they have the required tools.

What’s in the western education system?
The reason behind this is the western education system for engineering. They have something called as design projects/ semester long course projects in most of the courses. These either include a part of a research problem the course instructor is working on or any relevant project that students choose. Teams of students constitute MEs, EEs and CS guys and the work is divided accordingly. Each project has biweekly/ monthly design reviews by the professor where the teams present their progress in front of the class. During every design review, the professor gives guidelines for the next few weeks. Basically students learn a theoretical concept in class and in parallel apply that concept in their design project. At the end of the semester, every team comes up with a working prototype of the theory that they learnt in the class.

My personal experience
I can give you one example of such project I was involved in. In our mechatronics course we had to design a nano-positioning system which will position a certain object in all three co-ordinates. My team constituted of one doctoral (PhD) student working in the nano-positioning research area of the course instructor, one mechanical engineer, one hardware engineer and me. The PhD student contributed in the physical design of the system, the math/ physics behind it and how to model the system on paper. I was responsible for developing a controller that would control the system. The mechanical engineer was responsible for solid modeling and machining/manufacturing the system prototype and then the hardware engineer was in charge of deploying my controller on the actual hardware and interfacing it with the sensors and actuators! ….Result: We got a cool working mechatronic system by applying all the interdisciplinary knowledge that we learnt from the course, and we as a team learnt different aspects of engineering from each other.  Here is the link of the research if you are interested.


What you can do to take the best of both worlds!
So the giveaway is: Try to explore tools and try to get hands on experience in the CDCs that you like, or that you want to do your career in. Don’t waste your spare time in fetching new reference books and solving problems behind the chapters. Spend time in learning softwares relevant to the course (it could be softwares like MATLAB/ Simulink, Octave, Solid Works/ProE,  EagleCAD, Labview etc) or programming languages like C/ C++. Try to find interested people on campus and tag along with them to build something cool. Have simple tools like soldering iron, screws, hammers, pliers/ strippers, an arduino board, some resistors, capacitors, some wires handy. Make use of your campus workshop facility. It’s exciting to try out small things that your learn in your courses, even if it’s just blinking an LED, or using a mosfet to switch high loads: that will give you immense satisfaction and enthusiasm to build more. As you dive more and more into your discipline during your engineering years, you will develop a good blend in formulating any system on paper and then building a small prototype of it!

So.. good luck! Get your hands dirty! :) ..A combination of strong mathematical background and hands on experience will do wonders when you go into the industry!