Sunday, May 19, 2013

Service-Learning Model: An Example

This article is a follow-up of the previous "A Service Learning Model" post. The model suggests interdisciplinary engineering students working on real-life projects that benefit the communities.

Earlier we talked about how this model is useful in three ways:
1. BITSians learn to work on real-life projects that have customer requirements, deadlines and the most essential aspect of engineering: design, build and test.
2. The needy communities benefit from the delivered products, so BITSians help the society around them.
3. BITSians make industry connections so that they share a great relationship at the time of internships, placements.

As an added advantage, such project provides a great platform to strengthen students' skills and resumes. This model, truly has an enormous potential to become one-of-its-kind in India to be implemented exclusively by BITS, just like our renowned Practice School program.

Now, let's consider an example of such a project:
   
Primary/High school children learn basics of physics, biology and solar system roughly in their 1st to 7th standard. It'll be an interesting exercise to create models to teach them basic concepts through interactive mechanical models with which they can play around. To take an example, one project can be to demonstrate operations of a biological cell with the help of a workshop-fabricated model with microcontroller-based sound system, LCD displays and rotation mechanism. This model can be an excellent exhibit in a local science museum. This will benefit the children around BITS campus.
  
 Let's break it down to see what the project components are. Firstly, this project has a great interdisciplinary aspect to it. BITSians from various engineering and science major can contribute. The mechanical subteam can handle: the choice of material, fabrication of the model, fitting various parts to it and mechanical movement capabilities. The electrical subteam can take up microcontroller programming, motor and LCD interfacing and power management. The biology subteam can help with the biological processes within a cell and help draw a skeleton of the model and its intended functionalities. Folks interested in project management can work on the plan, timeline, keeping everyone on track and community/industry communication. They can also apply for industry grants and gather support from local administration.

----There are tons of exciting tasks with each project and each task cultivates a skill that is very useful in post-graduation (industry) life.

More on this model with some more examples in future posts.... Stay tuned!


 

Monday, May 13, 2013

The Electric Motor


Hey Guys,
The third most important part of an electric vehicle is the electric motor. There are tons of books and online material on electric motors and hence I will not go into the mathematical details of it. You guys will learn the basics of electric machines in your ES2 (Electrical Sciences 2) course and I urge you to do that sincerely (even if you do not like the text book! :))

Today I will try to give you some pointers on electric motors so that we can  directly jump into modeling of all these components

You may want to be conversant with the following if you want to excel in this field
  1. AC Induction Motors (3ph, Single phase)
  2. Brushed DC motors and Brushless DC motors
  3. Permanent magnet motors
  4. Differences between the above three
  5. Theory of Induction (stator/ rotor construction, importance of air gap, winding patterns etc)
  6. Equivalent circuits of induction motors (very important)
  7. Finite Element analysis of Motors (to calculate fundamental parameters like resistances and inductance which are used in motor control)
  8. Motor Control Basics


A few of the good resources that I know are:
  1. MIT Open course ware for Electric machines:
  2. NPTEL: Electrical Machines 1, 2,3courses: 


     Books:
  1. Electric Motors and Drives by Austin Hughes
  2. Induction Motor Control Design by Riccardo Marino et al. (advanced book)
  3. Motors and Drives (A practical Technology Guide) by Dave Polka  


I would say this should get you started on electric motors. Your aim should not be memorizing equations and solving problems, but to understand the induction concept and modeling a motor in MATLAB. I will briefly go over MATLAB modeling later

Sunday, May 5, 2013

The Motor Controller


Before we looked why electric vehicles are important, the architecture of an electric vehicle and started looking at the components of the electric powertrain. Last time we saw the battery management controller and its functions. Today we will glance over the motor controller.

Similar to the BMS (Battery management system) which manages the interaction of the battery with various other components of the powertrain, the motor controller manages the interaction of the motor with the battery and rest of the vehicle. In most of the electric vehicles the motor used is 3ph AC induction motor. You should be studying this in your ES2 (Electric sciences 2) course in second year. AC motor is used because it has many advantages, the most important being high efficiency and low maintenance. Now this being a “3ph-AC” motor, it requires 3ph AC current whereas the battery outputs DC current. Hence there is a need of an “Inverter” in between the battery and the motor which converts DC current into AC current and the role of the motor controller is to control the functionality of this inverter.

The control action
The most important function of the motor controller is the 3ph AC current generation. Without going into detail mathematics, I would say that this is achieved by transforming the  current vector by a series of transformations, controlling their magnitudes by tuned controller gains and feeding them to the IGBTs of the inverter to convert them in 3ph-AC. 

So to be more specific the motor controller does the following things
  1. It measures the fed back current and the speed (RPM) of the motor via appropriate sensors. 
  2. It takes in these values and applies a few transformations transform these quantities into quantities that are easy to control. The controller uses Clarke and Park transformations.
  3. The PI (proportional-Integral) controller compares these values with the ideal values which are generated from the pedal position. (More the pedal is pressed, more velocity/ power is requested and hence more magnitude of AC current is needed). 
  4. This controller outputs corresponding voltages that would be required to generate appropriate PWMs for the 3 phases. 
  5. These voltages are then passed in a SVPWM (Space vector PWM) algorithm coded inside this controller which gives out the 3 ph PWM signals, which are in turn fed to the IGBTs with the DC current from the battery to generate the correct 3ph AC currents. This current is then fed to the motor windings to generate torque.

Hence the motor controller is a closed loop controller which ensures the correct 3ph currents are generated to achieve the requested torque and power levels.

If you guys want to go deeper into the design of motor controller you should be aware of the following things
  1. Clarke/ Park transformations
  2. Feedback controller design (PI, LQR)
  3. Space Vector PWM techniques
  4. Inverter (IGBT) Electronics
  5. Field Weakening algorithms etc.

I will try to give you brief information on these to give you a head start for the intereseted. Tons of information is available on motor control techniques online. This is a very well developed area and it should not be difficult to find research papers on this. I think Texas A&M university in the US has a good research lab on motor controls.

Monday, April 29, 2013

April Recap!


Hello Again!

We have come to the end of April and from this month I will try to give you a recap of what we saw in the current month and a sneak peak of what’s coming in the month ahead. In this case it will be easy for you to browse through the blog and pick only the right articles you need :) and filter out the rest!

We would like to provide you guys some insights on whats going outside and some handy tools which could help you. Hence your feedback is certainly appreciated. You can email us or just comment on the blog about the things you would like to see on it and anything specific you would appreciate. And even those things that are boring! We will try our best to keep the variety and answer to all of you that communicated with us. ...and its free! :)

You all can get in touch with me on bits2world@gmail.com.

So, in the month of April we focused on variety of areas:
  1. Electric Vehicle Infrastructure: We looked at how electric vehicles are going to become important in future. We glanced over the basic architecture of an electric powertrain and its components (link) and then looked at the functions of the most critical component a.k.a the battery management system (link). For you guys, it will be definitely beneficial to be aware of the latest developments in this domain as this will be an important area in future where companies will be moving. 
  2. We looked at some random stuff on electronics and how various courses from EE can help in various fields in electronics. Mandar also gave a general advice on how you should consciously build your profile in electronics and what are the good-to-have tools with you (link). We also linked you to a tool which could come handy in circuit simulations for all you EE guys out there (link). 
  3. Service Learning Model (link) was something different and peculiar in the sense that interested students can take up engineering projects for community welfare. This happens in US and a profile in such things could be a gateway to a research lab.. who knows! :)

Lot of stuff. So what’s coming next! Let’s have a sneak peek into the month of May.

I plan to continue giving you inputs on various components of electric vehicle. We will look at the motor, the inverter and its controls. We may also look at modeling such components using industry standard tools and techniques.

Neeraj will try to give you a few more inputs on the Service Learning Model and may be a few project ideas that you can carry out.

We may introduce you guys to management! :) I know.. half of you don’t give a crap about engineering, but have tremendous ability to manage and schedule projects and events..to make the engineers work!..haa!. Let’s have some inputs on that side too from some managers working in the industry.

Looking forward to hear from you!

Saturday, April 20, 2013

The Battery Management System Design


I will try to glance upon the different important controllers of the electric powertrain system. Let's start with the battery controller a.k.a battery management system.

The brain of a pure electric vehicle is its battery management system. I will briefly go over the responsibilities of this controller in this article so as to give you an idea of what all this battery management system (or BMS) constitutes of. This could prove as a background in case you dive into this field in future.

As described in my previous article the battery constitutes of cells in parallel and series. There could be thousands of cells in a car battery which together produce hundreds of volts and a significant amount of current. Critical parameters of each cell are its voltage, current and temperature. Any one of these if goes out of control, can lead to a thermal runaway which can lead to an explosion. The entire battery is kept in control by its battery management system. The BMS is responsible for variety of function some of which are mentioned below.

State of Charge Estimation:
The BMS is responsible for estimating the charge remaining in the battery and hence the range. Hence the more effective the BMS estimates the range (taking into account factors like terrain, temperature, weather etc) lesser will be the range anxiety of the customer! There are various techniques used to calculate the state of charge in a battery (like coulomb counting etc)

Temperature/ Voltage/ Current Sensors:
It is very critical to measure voltages, currents and temperatures of all these cells. How these three quantities are measured depends on each manufacturer of the battery pack. Usually there is one current sensor measuring the current that the battery consumes or delivers. There are multiple voltage and temperature sensors at various locations to measure these cell variables at throughout the battery. All these are inputs to the battery management system (BMS) and the control logic in the BMS makes sure that these stay in bounds.

Battery Cooling Circuit:
It is also critical to sufficiently cool the battery. In an electric vehicle, batteries are generally cooled by separate pumps or via the radiator. The inlet and outlet temperatures are measured by two thermistors and are fed to the BMS which in turn controls the cooling fluid.

Contactors:
Contactors are nothing but switches that connect the battery to the motor/inverter or charger. Battery contains high voltage all the time. But when a car is not being driven, it’s not necessary to supply this voltage and hence current to the inverter. When a person puts the car into a state where he wants to drive it or charge it (where either the battery outputs or consumes current), these switches close and the loop (battery-charger or battery-motor) is complete. BMS decides when to close the contactors and let the battery drive or charge the car

Safety Monitoring:
BMS is also responsible for keeping the battery in safe condition. In any unsafe condition the BMS will not close the contactors and hence the high voltage will remain contained in the battery itself. Unsafe conditions can include any of the following
  1. Over heating of the battery, over/under voltage and over current conditions: BMS open the contactors and isolates the battery from the car if any of the voltage/current/temperature sensors report the above mentioned conditions. 
  2. Over charging: BMS stops charging if it detects an over charged cell. Overcharging can significantly reduce the battery health and lifespan. 
  3. Unequal charging of the cells: BMS throws appropriate alerts if different cells are charging at different rates. It is also responsible for discharging/ bleeding the over charged cells (if any) and maintain the charge of all the cells to same level. 
  4. Over discharging of cells: Over discharging cells also create problems for battery health. BMS prevents that. 
  5. Grounding/ Isolation problems: BMS always keeps checking if the battery is properly isolated from the vehicle of not. In case of a short/ thermal runaway BMS makes sure that the damage is contained in the battery and does not propagate into the car. In case of a crash (head on collision) the BMS has provisions to cut the current supply from the inverter and isolate the battery.
For each bullet mentioned above, BMS has its own state machine and probably one person dedicated for its design in the industry! 


So what’s there for you guys here: Mechanical engineers play a crucial role in conceptualizing and modeling the BMS. EE, E/I engineers are generally responsible for designing a PCB that functions as a BMS controller while software engineers write the firmware that does the control. Hence it’s a super interdisciplinary board in an electric car.

I will finish with an interesting video clip explaining the BMS in short. Hope you like it :)

  

Saturday, April 13, 2013

Of Negative Frequencies

A question is often (well at least once in each DSP course) asked by DSP students. (Quoting from Quora).

What negative frequencies actually mean physically?  Considering the fact that bandwidth is specified by the positive part only, do negative frequencies exist or are they just a mathematical side effect?

Here's my answer, with some edits.

Consider a sine wave. What is its Fourier transform?

Fig. 1  A sine wave and its Fourier transform (Image source)

A negative ordinary frequency of $-10$ does not mean a sine wave oscillating at $-10$ cycles per second. It refers to a complex exponential $e^{-j2 \pi 10t}$ When we add another exponential with positive exponent $+10$ we get a real sinusoid which oscillates at $10$ cps. This also explains your bandwidth confusion ("Considering the fact that bandwidth is specified by the positive part only.."). If by some magic, the formula for addition of complex exponentials were $e^{j\omega t} + e^{-j \omega t} = 2 \cos \sqrt \omega t$  then bandwidth would have been specified by the "square root of the positive part".

For real signals, these "negative frequencies" do not occur alone and always are paired with a corresponding "positive frequency" so that the resultant signal is real. 
The impulse which you see on the negative X axis in the right hand figure does NOT represent a sinusoid but a complex exponential. This is what one may lose sight of while talking about negative frequency.

Friday, April 12, 2013

The Electric Vehicle Architecture


Hey Guys,
Last time we looked at the fall and rise of electric vehicles. I realized that there is a decent interest amongst the student community to learn more about electric vehicles. I am also very glad that there are groups in BITS-Pilani Goa campus working on electric car prototypes and I am sure other campuses would also be making such contribution. I strongly believe that such experience in college will definitely benefit students who are interested in pursuing career/ higher studies in this domain or even in fields like power electronics/ motor controls and firmware for automotive powertrain systems.

For the people out there who are not really up to speed but are super interested and would like to get into this, today I would like to give a brief architectural overview of electric vehicles. The major difference between gasoline and electric vehicles is that there is no internal combustion engine in electric vehicles. This is replaced by an electric motor (AC or DC) and this motor is charged by a battery on the car. So, as gasoline engine cars require petrol or diesel as a fuel, these cars need charge or current. People who know the complexity of an engine would instantly realize the simplicity of electric car.

As you can see in the figure below the electric car consists of 4 major components.


A Battery: A battery is the heart of the car. This is the energy storage device (analogous to fuel tank in normal car). This stores DC voltage when it’s charged. The voltage levels are generally in 100s of volts (~400V). This battery has certain number of cells in series and parallel. The number of cells in series and parallel is decided on how much voltage (~range) and how much current (~power) you want in your car respectively.

A Charger: (not shown in the figure) It is used to charge the battery up to the desired voltage. This takes in AC voltage from the wall, rectifies it and then charges the battery. The charger is rated at certain KW which determines how much current it can consume which in turn dictates how much time you will need to charge the battery. You will study the concepts used in charging in ES1.

A Motor: Usually a 3ph AC induction motor is used in electric cars (due to efficiency/ reliability reasons).It takes in 3ph AC current and produces torque due to magnetic induction across the stator and rotor. The shaft of the motor is connected to the halfshaft of the car through a reduction gear box. You guys generally study these in ES2.

An Inverter: Inverter is a power electronics device that is needed in between a battery and the motor to convert the DC current that the battery produces to AC current that the motor consumes. It has IGBTs as switches which switch at high frequencies like 10KHz while converting DC to AC.

Having said this there are a couple peculiarities of electric vehicles:

Regenerative Braking: When you apply brakes you are essentially applying negative torque to the motor to speed it down. That means the motor consumes negative current which you can visualize as a current going from motor to battery through the inverter. This results in charging the battery. This phenomenon makes electric vehicles very attractive in the sense that you can recharge the battery using the energy spent in braking.

Max torque at zero speed: If you see the motor torque speed characteristic as shown below you will realize that we can extract maximum torque from the motor even at zero speeds. This means that we will not need a gear box to shift to the right gear to attain right amount of torque from the motor at various speeds (as we require in an engine). Hence you can achieve high amounts of accelerations/ power from the vehicle from dead stop positions.



Below is a very interesting link of a drag race between BMW M5 (known for its acceleration) and Tesla ModelS (electric sedan company that I work for :)). See how Tesla gets a head start due to full torque at zero speed!!


Saturday, April 6, 2013

BITSAA Talk on 7th March at BITS Goa

I have had a few requests for the slides from my talk on 7th March. For whatever it's worth, they're embedded here.

In short, the message of the lecture was supposed to be --
Try to make positive contributions in whatever research discipline on campus is nearest to your interests. Co-operate and help your fellow students. Most of all, don't let the small-mindedness, petty quarrels, and unnecessary one-upmanship which sometimes plague engineering campuses drag you down.

If that message reached five people out of the group that attended, I would consider it a success and a favour to me.


Friday, April 5, 2013

A cool web-based circuit simulator!

Here's a simple circuit simulator that is browser based. No need to download anything, just draw a circuit and it's ready for testing!

https://www.circuitlab.com/

Simple and quick, isn't it? 

A Service-Learning Model

A learning model that is increasingly becoming popular among educators, is service-learning based engineering education model. This model has a tremendous potential when applied to engineering curriculum in developing nations such as our country. Our nation has its own social and economic issues. A small percentage of people are both socially aware and financially capable so that they help communities in their humble ways.

How can we, engineering students, help solve such problems? How can we help underprivileged communities?

The answer comes from the fact that the communities are facing problems, some of which can be solved by applying smart engineering solutions designed by students as they learn with the guidance from people from academia and industry. 

To elaborate on this, let's discuss three critical elements of this model:

1. Community problems: These are public/private institutions that help communities with their services. Some examples are: public libraries, night schools, science museums, construction workers' associations etc. They face a number of problems and they have many agenda items to improve the quality of life of their members. We, as students, can identify problems that can be converted to small engineering problems and with the help of faculty, industry people, can  work on solving them. Some examples of such problems could be: designing a software database for library books to be accessed via the Internet (CS, IS), designing a solar power and storage system to be applied for night schools (EEE, EnI), building science/biology demonstration models for school children (ME/BIO),  building battery-operated chairs for handicapped (ME,ECE,EnI).

2. Engineering solutions: While solving such problems, we learn actual implementation of the theoretical ideas learned from the courses. Not only the technical knowledge, but we learn a great deal about team building, finances, public relations, and most importantly professional approach to solving problems. Applying such practical solutions to real problems makes this model an extremely powerful tool. We can take those projects as LOP,COP to get suitable credits for our work. When we deliver the product to communities, we actually contribute serving the communities!

3. Industry reviewers: Our industry is more than willing to donate money for social welfare. They need a proper established channel. Funding such projects can be an excellent way not only to empower the communities by the delivery of products, but to help engineering students learn practical tools along the way. Industry can send the reviewers to critique the design and monitor the progress. This relationship is extremely helpful in terms of getting funded projects, practice school stations and finally placements!

This model is developed by educators in Purdue University, West Lafayette, IN, USA and is currently running successfully since last 10+ years (https://engineering.purdue.edu/EPICS). It has numerous imitations all over the world. If the BITS administration decided to apply this model, they will not only increase the level of engineering education, but help serving communities across the nation.

As students at BITS, we can go and talk to communities and take up small projects, work on it and make a difference as well. This will be our share of service to our nation while adding value to our own engineering education and opening doors of countless opportunities through industry contacts.  

Thursday, April 4, 2013

The Electric Vehicle Revolution



Technology is changing. Horses transformed into gasoline cars. After a century domination gasoline vehicles are now changing into hybrid vehicles and within few years a new era of pure electric vehicles will become mainstream. Hybrid vehicles consist of an additional prime mover along with the engine. It can be an electric motor or a fuel cell or even a CNG gas tank. Pure electric vehicles on the other hand completely replace the engines with an electric motor.

Who Killed the Electric Car?
Electric vehicles are not new. More than a decade back General Motors (GM) came up with a vehicle with an electric motor in it instead of an engine. They called it EV1. The technology was new, the market and people were not ready for it. GM saw the future. The EV1 was made available through limited lease-only agreements. This was more for the “early adopter” to “try out” this new technology. People liked it. Obviously they would.. zero emissions, good torque and a super silent car.. why wouldn’t anyone like it!

But then, what happened. You can see the picture below. GM said,  “Naah! This is a totally unprofitable niche of the auto segment. Not worth investing in it” And they literally crushed ALL the EV1s produced. To your surprise they even took away cars from the customers that wanted to keep them desperately (at any cost). All cars were crushed, stock piled and the program was closed!

The revenge of the Electric Car
So what happened back then? The market was not ready? The technology was not ready? The infrastructure was not ready? Or was it just the mentality of the automakers that were used to producing gasoline cars for nearly 100 years? There were many such reasons for the death of the electric car. But now emission restrictions are becoming more stringent. 2025 US emission restrictions would definitely force the auto OEMs to produce at least hybrids if not electrics. Electricity is getting cheaper. Electronics is encroaching in the auto industry in every segment, battery technology has improved from lead acid to lithium ion, motor controls have be thoroughly developed in last decade. All these small factors are gearing up and coming together for an electric revolution. Each auto OEM, if you look closely, has at least one hybrid variant (Toyota Prius, Ford Focus etc). A couple of them have pure electric variants (Nissan Leaf) and there are also pure electric companies getting built from ground up (Tesla Motors, Mahindra Reva etc) producing only pure electric cars.


So.. the future is electric. And you guys should gear towards it if you are inclined towards automotive.

What you need to be up to date!
Automobiles now, along with Mechanical engineering, are heavily dependent on Electronics and Electrical engineers. Good EE and ME background, solid conceptual understanding definitely helps. But to be specific for this domain you should be aware of basic powertrain components along with obviously the chassis (vehicle engineering) and the body (design and styling) of the car. Powertrain components here are the electric motor, the inverter and the battery pack. Decent understanding of modeling these components (systems and dynamics), controlling these components (control systems) coding firmware (Embeded software development) for operating these systems and diagnostic/ safety related point of view will be super helpful.

Thursday, March 14, 2013

Friendship With State Space

Last post we saw how to represent any system in a block diagram and barely touched upon mathematical representation of it called state space. Today I will try to make you believe how simple it is to convert any system into state space representation and give a few “Engineering Secrets” to you.

Best way is to go through an example and then generalize it. Let’s recall Newton (He has tortured us many times before! :-/). So (simplified) Newton’s second law is can be represented by 

Where “m” is the mass of the body, “a” is its acceleration and “F” is the force applied on it. We all have used this equation a million times before. We use this equation to answer the question “What force “F” is required to maintain/attain acceleration “a” of a mass “m”??) Now let’s try to convert this to the form I mentioned in the last post, which is

To do this we need values for “A”, “B” and “C”. Looking at this we can easily answer the question that we need an input “u” to maintain/ attain a state ([X]) ̇ where X is a vector of all the states of the system. So relating this to the answer mentioned above: We have Force (F) as an Input (u) and acceleration as an output (y)!! We can also represent the above equation as 


Engineering Secret 1!: “Generally the number of states in a state space representation is equal to the highest derivative in the differential equation of the system”

Hence in above equation (d^2 x)/(dt^2 ) suggests the highest derivative is second order. Hence the number of states (length of X vector) is 2!!

Engineering Secret 2!: List all the states X1…Xn. To guess the states, let the first state X1 be the original variable itself, in this case “x”. Let the second state, X2, be the derivative of first state, the third be the derivative of second state and so on!
So now we get 

Now computing LHS of the state space equation which is given by the matrix below is super easy!


We have all the ingredients! 
So,

Engineering Secret 3! How do you know the dimensions of A and B???
Well.. we know LHS is 2*1 and is 2*1 hence if A is m*n then 2*1 = (m*n)X(2*1). So n should be equal to 2 (for a valid matrix multiplication) and m should be 2 for valid dimensionality.  Thus A is 2*2. Similarly if LHS is 2*1 and u is 1*1 then 2*1 = (m*p)X(1*1). Hence p = 1 and m =2. So B is 2*1 matrix.

Dimensions of C depend on dimensions of “y”. That means if you  are going to measure both the states the Y is 2X1 and hence C will be 2X2. If you are measuring only X1 (displacement) then C will be 1X2.


Engineering Secret 4!: To rearrange this into state space format  write the skeleton first (according to the dimensions you derived from the above trick!) and then fill in the values for A and B using matrix multiplication rules

And then filling in the values we get


Hence to Summarize:
  1. Determine highest order in the system equation (given to you by physics!). Your number of  states is equal to the highest order of derivative. 
  2. Let first state be the variable itself, second be its derivative, third be second’s derivative and so on.. Calculate values for all states. 
  3. Calculate LHS by taking first derivative of each state. And write all equations. 
  4. Derive the dimensions of A, B  and C matrices
  5. Write the SS skeleton and then fill in the numbers according to the equation coefficients you got from step3!



 So.. how does that feel? I will try to go over a more real life example in next post so that you may get more familiar to this. 



Saturday, March 9, 2013

The Basics of Controls and State Space Behavior



Hey Guys.. I will try to share some tools that I learnt during the course of my Masters and in the industry. In my last post I mentioned a few things related to controls that you will learn during your 3rd or 4th year. Today I will discuss a few things that are important and always needed in industry. These may or may not be covered in the class and hence I felt I could share these.

In this field you will be given a task of modeling a particular system and then designing a controller for it which will help you attain desired behavior. If you consider a black box model your entire work could be represented by the block diagram shown below. Let’s discuss the parts of this which will result as a perfect segway into state space (the most important tool to design systems).

Block Diagram

  1. The block “A” is called the plant. This is defined by the laws of physics and is the guy that we  have to control. E.g. This could be a car going uphill at constant speed, a tap filling water in a tank, a line follower robot, a hydro electric power plant etc. All you need to remember is.. the behavior of this plant is defined by physical laws and is constant. You don’t have any control over its definition.
  2. The block “B” is your controller. You design this so that you can control “A” as you want. E.g You will have a flexibility to design a controller “B” that will maintain the speed of your car going uphill at 50Km/Hr or maintain the robot on the black line all the time. 
  3. The block “C” is your output that you can measure or observe and then use it in your controller. E.g It can be the speed of the car or velocity of the line follower. 
  4. The signal “u” is the control. This is the signal that is generated from your controller which is fed to the plant to control it as you want. 
  5. And finally, this controller will be responsible to control a particular “state” of your system. Your system can have many states. One of these many states is your “output” that you observe/ measure with the help of block “C”.

So, the ingredients of the any damn system are: the Plant (A), the Controller (B),the control input (u), the state (x) and the output that you measure (y). And mathematically, any damn system can be represented as


Believe me, with this representation, it becomes super easy to analyze the system compared to writing huge differential equations by drawing free  body diagrams as we all learn in Math 3 and Physics! This representation is called state space and next time we will  see how we generate this state space from any given damn system.

State Space should be your friend and  you should be comfortable in playing with it!

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!

Saturday, February 23, 2013

BITS Top 10

This article is mainly for current and aspiring-to-be BITSians. After talking to many I realized that they made a decision to study at BITS based on its brand name and what it stands for. To understand "what it stands for" from outside is not that easy. To many, it stands for knowledge being power supreme. While a number of industries and universities consider it to be an equivalent to IITs, a few regard it being better in some aspects.

I've had a chance to work with BARC, Tensilica, Cisco, Qualcomm and Purdue so far. I believe this to be a varied set of institutions. I've engaged in many conversations with colleagues and friends and tried to form my opinion on "what makes BITS unique and special". Here's what I think about my Alma mater.

Top 10 things that make BITS (and BITSians) special:

10. On-campus organizations: give many a chance to get involved in activities of their choice and cultivate extra-curricular interests.

9. BITSAT (admissions): is India's first online entrance test considered having a very low rate of acceptance and is reservation-free.     

8. Excellent textbook choices: provide (an opportunity to learn) state-of-the-art knowledge of a topic.

7. Diversity: among students and faculty ensures that we share a stronger bond of being a BITSian.

6. Hostel life: teaches how to manage one's own life.

5. Mini-tests: ensure we don't fall out of track and follow the same academic standards as that of any US/UK university or an MBA school.

4. International recognition: is not just a "feel-good" factor, but helps summarize your educational background in a few words to many across the world. 

3. Emphasis on basic sciences: helps one shape her ideas and get on to the basics.

2. The BITSian network: always reaches out to a fellow BITSian for guidance and help when needed.

1. Practice school: is the most important factor why industries and academia like us.

Interdisciplinary Skills - A Taste of Robotics and Bio-mechanics



So, as mentioned  in the previous article (dated Feb 17, 2013), let’s go over some of the varieties of Mechanical Engineering. I mentioned a few branches which you can explore (like MEMS, Energy Harvesting, Computational Mechanics etc).  All the fields I mentioned are very interdisciplinary. This means that you will see a confluence of many other disciplines along with mechanical engineering.

As an example, consider Mechatronics and Robotics. The applications of this branch spans from, say, spot welding robots in the auto industry, through the Da Vinci robot performing automated surgeries, through the Curiosity Mars rover that is exploring mars all by itself.
Here are some interesting links of such applications:


         
To design these systems you need decent knowledge various aspects of mechanical engineering like solid modeling, stress analysis, right tolerance and dimensional analysis,  actual manufacturing of the robot, material science to select right materials that would sustain external pressures, temperatures etc etc.. list is endless. But this is not sufficient. You need heavy electronics to make the robot do what you designed it for. Any mechatronic system will have sensors to sense the environment and actuators to do the action..which are nothing but electrical signals read by some electronic PCBs. In addition to electronics, you need computer science. You will need to add intelligence to the robot to do the task which it is designed for and for that you need good grasp on programming languages (embedded C, C++, python etc) that will talk to the electronic micro controllers inside the bot.

Ok Okay… well..you as a single entity need not be an expert in all these.. I mean..if you are.. Great! ..but if not.. That’s fine too.. usually there are teams of people doing such specialized tasks. But you as a Mechanical engineer..should be at least aware of all these (so that people don’t fool you around! :)).

Same is the case with other fields like say Bio Mechanics or medical instrumentation. What do you think is the basis of all the surgical tools? .. Mechanical Engineering! A good mechanical engineer will be able to design, model and manufacture various surgical tools for different surgeries. Some innovators invent tools which can be used in multiple ways. If you look at Intuitive Surgicals’ website you will realize how many Mechanical Engineers they want. Here are some of the professors at UM which are in Mechanical department and involved in Biomechanics and Bio systems engineering. ..and there are many such universities too.. I will leave that to you to do a research if you are really interested in this area.

So..my point is..being a mechanical engineer.. you need not constrain yourself to manufacturing or securing a job on an assembly line doing some QA crap! (that sucks L).. or switch to MBA! You can explore many things without shifting fields.. keep one thing in mind.. Mechanical engineering, now, is not just constrained to itself. Wherever you go, you will have to interact with people from electronics, people from computer science and people specializing in the application specific areas (like doctors if you are into medical instrumentation or physicists if you are in a team designing Mars rovers at NASA!)

So..make sure you develop that skill set too!

(In few articles I will try to go over some electronics/ electrical engineering and some tools that will help you in building an all-round personality around your respective discipline! Some of my other friends specialized in these disciples will also share  there experience with you guys!)

C u soon!
--Tejas