Thursday, 29 August 2013

inline and ezplot functions elaborated

You can simply plot the function by using inline and ezplot command in the following way:





> fcn = inline('exp(-0.2*t).*sin(200*t+pi/20)','t')

fcn =

     Inline function:
     fcn(t) = exp(-0.2*t).*sin(200*t+pi/20)

>> fcn(0:10e-4:0.4);

>> ezplot(fcn)

time t array can be varied and again a new c=plot can be achieved

Wednesday, 28 August 2013

Matlab code for switch case function: Conversion of units of length

% Matlab program to demonstrate switch case function

x = 3.0;               % numeric variable for length
units = 'cm';         % string variable for unit
switch     units
    case    {'in','inch'}      % case 1 if unit is inch
           y = 2.54*x;        % converts to centimeters
          disp  ([num2str(x)  '   ' units ' converted to cm is :' num2str(y)])
            %  disp is used to print pretty in the command window
            %  in the above a string vector is being printed
     case   {'m','meter'}    % case 2 unit is meter
           y = x*100;        % converts to centimeters
           disp  ([num2str(x)  '   ' units ' converted to cm is :' num2str(y)])
     case   { 'millimeter','mm'} % case 3 unit is millimeter
           y = x/10;
          disp  ([num2str(x)  '   ' units ' converted to cm is :' num2str(y)])
    case {'cm','centimeter'}     % case 4 unit is centimeter
          y = x;
          disp  ([num2str(x)  '   ' units ' converted to cm is :' num2str(y)])
    otherwise                    % for all other cases
         disp    (['unknown units:' units])
         y = nan;  % not a number
end

Sunday, 18 August 2013

Prosthetic hands for manipulating objects for disabled

In this project, students learn how prostheses that use robotic technology can improve the lives of people with disabilities. In the laboratory, the students can use Lego Mindstorms NXT kits to create an artificial arm or hand that can lift small objects, such as a coffee cup. In the process, students discover and explore the following concepts and ideas: Hooke's Law, hysteresis, Newton's Second Law, accuracy and precision, rapid prototyping, and the relationship between the voltage applied to a motor and its speed.

Ant Colony Optimization (ACO) for engineering research and projects

Ant colonies, and more generally social insect societies, are distributed systems that, in spite of the simplicity of their individuals, present a highly structured social organization. As a result of this organization, ant colonies can accomplish complex tasks that in some cases far exceed the individual capabilities of a single ant. The field of ‘‘ant algorithms’’ studies models derived from the observation of real ants’ behavior, and uses these models as a source of inspiration for the design of novel algorithms for the solution of optimization and distributed control problems. The main idea is that the self-organizing principles which allow the highly coordinated behavior of real ants can be exploited to coordinate populations of artificial agents that collaborate to solve computational problems. Several different aspects of the behavior of ant colonies have inspired different kinds of ant algorithms. Examples are foraging, division of labor, brood sorting, and cooperative transport. In all these examples, ants coordinate their activities via stigmergy, a form of indirect communication mediated by modifications of the environment. For example, a foraging ant deposits a chemical on the ground which increases the probability that other ants will follow the same path. Biologists have shown that many colony-level behaviors observed in social insects can be explained via rather simple models in which only stigmergic communication is present. In other words, biologists have shown that it is often su‰cient to consider stigmergic, indirect communication to explain how social insects can achieve self-organization. The idea behind ant algorithms is then to use a form of artificial stigmergy to coordinate societies of artificial agents.


This technique of ant communication for finding the shortest available path between their nest and the food source by depositing pheromones can be applied for optimization various engineering problems and there comparison with other conventional techniques. 

Induction motor drive by 3-level PWM inverter by v/f method

Be it domestic application or industry, motion control is required everywhere. The systems that are employed for this purpose are called drives. Such a system, if makes use of electric motors is known as an electrical drive. In electrical drives, use of various sensors and control algorithms is done to control the speed of the motor using suitable speed control methods. Earlier only dc motors were employed for drives requiring variable speeds due to ease of their speed control methods. The conventional methods of speed control of an induction motor were either too expensive or too inefficient thus restricting their application to only constant speed drives. However, modern trends and development of speed control methods of an induction motor have increased the use of induction motors in electrical drives extensively. In this project, we will study the various methods of speed control of a 3-ph induction motor and compared them using their Torque-Speed characteristics. Also the transients during the starting of a 3-ph induction motor will be studied using MATLAB Simulink and the effects of various parameters such as rotor and stator resistances and inductances well be analyzed

Project: Matlab/Simulink modeling of PV cell and their comparative study

Solar energy has a major role in renewable energy resources. Solar Cell as a basement of solar system has attracted lots of research. To conduct a study about solar energy system, an authenticated model is required. Diode base PV models are widely used by researchers. These models are classified based on the number of diodes used in them. Single and two-diode models are well studied. Single-diode models may have two, three or four elements. In this project, these solar cell models are examined and the simulation results are compared to each other. All PV models are re-designed in the Matlab/Simulink software and they examined by certain test conditions and parameters. This project will provide comparative studies of these models and it tries to compare the simulation results with manufacturer’s data sheet to investigate model validity and accuracy.

Thursday, 15 August 2013

MATLAB & Simulink Based Books - Optical Wireless Communications: System and Channel Modelling with MATLAB - MathWorks India

Written for undergraduate and graduate students as well as researchers and professional engineers,Optical Wireless Communications: System and Channel Modelling with MATLAB provides comprehensive coverage of optical wireless communications. The book discusses both indoor and outdoor environments and the different factors affecting system performance. Topics include optical wireless communication systems, optical sources and detectors, channel modeling and modulation techniques. 

MATLAB & Simulink Based Books - Optical Wireless Communications: System and Channel Modelling with MATLAB - MathWorks India

Project ideas: Design and analysis of three phase cycloconverter for variable load


The objective of this study is to observe the correlations between variable operating conditions and power quality parameters for a three-phase to single-phase cycloconverter. The cycloconverter is examined in its most straightforward form without additional output filters or elaborate control methods. Variable operating conditions include input frequency, output frequency, and resistive load size. The power quality parameters of interest are power factor, input current total harmonic distortion (THD), output voltage THD, and efficiency. The scope of the project includes analytical calculations, Matlab/Simulink simulations, and /or hardware implementation. The results show that output frequency has minimal effect on power quality. Total harmonic distortion undesirably peaks at a combination of low input frequency and high output frequency. Extrapolations can be made for the cycloconverter operating at different frequencies and loads based on the trends observed within the test matrix. This can be a good design and innovative exercise to perform.

Student Project: Power Quality Improvement by DC Drives


Power Quality (PQ) has become an important topic of discussion and research, especially in a deregulated environment. As per IEEE 519 std. these parameters of power quality measurement, are four in number, of which Total Harmonic Distortion is most widely used. Semiconductor switching devices in Power Electronics which are generally used in converter circuits produce significant harmonic voltages as they chop voltage waveforms during the transition between the conducting and cutoff stages. The diode bridge rectifiers/converters are considered as a major contributor to the power system harmonics and the consequences are varying from components overheating to communication

interference. This project links the field of electrical power conversion and electrical drives (DC), where these power converters find applications. Electric drives play an important role in industry as well as our day-to-day life. They are use the electrical power input and provide mechanical work as output. This project can be well designed and simulated in MATLAB environment. 

Student Project: Energy generation by excercise

In this project, students learn about the energy generation and usage. Emphasis is placed on potential sources of renewable energy, and on how power demands vary from country to country. The students learn how energy is measured, and experiment with generating and storing energy themselves, using an AC or DC generator connected to a bicycle and lead-acid batteries. They can measure how long common household appliances can be run on the stored energy, and in the process gain a better understanding of their own personal energy usage. Design of different energy efficient converters can be undertaken in this project. 

Wednesday, 14 August 2013

Student Project: Energy Efficient Electric Vechile



In this project, the students learn how brushless DC motors have made personal electric vehicles (PEVs) possible, and calculate how much using a PEV instead of an automobile for some of their daily driving can impact their production of carbon dioxide, based on United States driving patterns. In the laboratory, students build a brushless DC motor using three different control methods, based on a reed switch, a Hall effect sensor, and optoelectronics, respectively. In the process, students learn about motors, and compare the components used for control in terms of their reliability. 

Monday, 12 August 2013

How to Solar Power Your Home / House #1 - On Grid vs Off Grid

Mc Murray inverter Simulation

Special Matrix plots! : Hibert, Magic, Pascal, Toeplitz, Vandermonde, Wilkinsons just enter command and view it





This just time pass to learn some of the special matrices of Algebra, code follows:
In linear algebra, a Hilbert matrix, introduced by Hilbert (1894), is a square matrix with entries being the unit fractions
For example, this is the 10 × 10 Hilbert matrix:

hilb(10); % Hibert Matrix
h = hilb(10);
plot(h)
title('Hilbert Matix')
axis off
hi = invhilb(10) % Inverse Hilbert matrix

hi =

   1.0e+12 *

    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000
   -0.0000    0.0000   -0.0000    0.0000   -0.0002    0.0005   -0.0008    0.0008   -0.0004    0.0001
    0.0000   -0.0000    0.0001   -0.0010    0.0043   -0.0112    0.0178   -0.0166    0.0085   -0.0018
   -0.0000    0.0000   -0.0010    0.0082   -0.0379    0.1010   -0.1616    0.1529   -0.0788    0.0171
    0.0000   -0.0002    0.0043   -0.0379    0.1768   -0.4772    0.7713   -0.7359    0.3821   -0.0832
   -0.0000    0.0005   -0.0112    0.1010   -0.4772    1.3015   -2.1210    2.0378   -1.0644    0.2330
    0.0000   -0.0008    0.0178   -0.1616    0.7713   -2.1210    3.4807   -3.3640    1.7661   -0.3884
   -0.0000    0.0008   -0.0166    0.1529   -0.7359    2.0378   -3.3640    3.2679   -1.7233    0.3804
    0.0000   -0.0004    0.0085   -0.0788    0.3821   -1.0644    1.7661   -1.7233    0.9123   -0.2021
   -0.0000    0.0001   -0.0018    0.0171   -0.0832    0.2330   -0.3884    0.3804   -0.2021    0.0449

plot(hi)
title('Inverse Hilbert Matix')
axis off

%In recreational mathematics, a magic square is an arrangement of numbers (usually integers) in %a square grid, where the numbers in each row, and in each column, and the numbers in the forward %and backward main diagonals, all add up to the same number. A magic square has the same number %of rows as it has columns, and in conventional math notation, "n" stands for the number of rows (and %columns) it has. Thus, a magic square always contains n2 numbers, and its size (the number of rows %[and columns] it has) is described as being "of order n". A magic square that contains the integers %from 1 to n2 is called a normal magic square.

m = magic(10)% Magic Matrix

m =

    92    99     1     8    15    67    74    51    58    40
    98    80     7    14    16    73    55    57    64    41
     4    81    88    20    22    54    56    63    70    47
    85    87    19    21     3    60    62    69    71    28
    86    93    25     2     9    61    68    75    52    34
    17    24    76    83    90    42    49    26    33    65
    23     5    82    89    91    48    30    32    39    66
    79     6    13    95    97    29    31    38    45    72
    10    12    94    96    78    35    37    44    46    53
    11    18   100    77    84    36    43    50    27    59

plot(m)
plot(m)
title('Magic Matrix')
axis off

In mathematics, particularly matrix theory and combinatory, the Pascal matrix is an infinite matrix containing the binomial coefficients as its elements. There are three ways to achieve this: as either an upper-triangular matrix, a lower-triangular matrix, or asymmetric matrix

pascal(10) % Pascal Matrix

ans =

           1           1           1           1           1           1           1           1           1           1
           1           2           3           4           5           6           7           8           9          10
           1           3           6          10          15          21          28          36          45          55
           1           4          10          20          35          56          84         120         165         220
           1           5          15          35          70         126         210         330         495         715
           1           6          21          56         126         252         462         792        1287        2002
           1           7          28          84         210         462         924        1716        3003        5005
           1           8          36         120         330         792        1716        3432        6435       11440
           1           9          45         165         495        1287        3003        6435       12870       24310
           1          10          55         220         715        2002        5005       11440       24310       48620

plot(ans)
title('Pascal Matrix')
axis off

%A matrix equation of the form
%
%is called a Toeplitz system if A is a Toeplitz matrix. If A is an   Toeplitz matrix, then the %system has only 2n−1 degrees of freedom, rather than n2. We might therefore expect that the %solution of a Toeplitz system would be easier, and indeed that is the case.

t = toeplitz(10) % Toeplitz Matrix

t =

    10


A Vandermonde matrix is a type of matrix that arises in the polynomial least squares fitting, Lagrange interpolating polynomials (Hoffman and Kunze p. 114), and the reconstruction of a statistical distribution from the distribution's moments

v = vander(10) % Vandermonde Matrix

v =

     1

In linear algebra, Wilkinson matrices are symmetric, tridiagonal, order-N matrices with pairs of nearly, but not exactly, equal eigenvalues. It is named after the British mathematician James H. Wilkinson

w = wilkinson(10) % Wilkinsons eigen value test matrix

w =

    4.5000    1.0000         0         0         0         0         0         0         0         0
    1.0000    3.5000    1.0000         0         0         0         0         0         0         0
         0    1.0000    2.5000    1.0000         0         0         0         0         0         0
         0         0    1.0000    1.5000    1.0000         0         0         0         0         0
         0         0         0    1.0000    0.5000    1.0000         0         0         0         0
         0         0         0         0    1.0000    0.5000    1.0000         0         0         0
         0         0         0         0         0    1.0000    1.5000    1.0000         0         0
         0         0         0         0         0         0    1.0000    2.5000    1.0000         0
         0         0         0         0         0         0         0    1.0000    3.5000    1.0000
         0         0         0         0         0         0         0         0    1.0000    4.5000

plot(w)
title('Wilkinson Matrix')

axis off

Wednesday, 7 August 2013

MTech projects titles for engineering students

1.     Modeling and Simulation of standalone Photovoltaic system for onsite power generation.
2.     Design and Simulation of Matrix Converter based PWM drive for aircraft actuator.
3.     Analysis and comparative performance study of matrix converter and three level inverter.
4.     Modeling and Simulation of Unified power controller for power quality improvement.
5.     Analysis and study of distributed generation system for different fault conditions using MATLAB.
6.     Analysis and design of passive filters for power quality improvement.
7.     Modeling and design of SVPWM based speed control of Induction Motor using V/F control.
8.     Modeling and design of solar panel for different irradiation pattern of sun using Matlab.
9.     Modeling and design of Wind based system to find the power response of a wind turbine for variable wind speeds.

10. Speed control of three phase Induction Motor.

Contact: 9557069448, tyagiagam@gmail.com


MATLAB and SIMULINK for Engineers - Paperback - Agam Kumar Tyagi - Oxford University Press

MATLAB and SIMULINK for Engineers - Paperback - Agam Kumar Tyagi - Oxford University Press

Symbolic Maths operations in MATLAB: Simple demonstration

Example of symbolic operations on Matlab

>> syms a x
>> y = a*sin(x)+2*sin(x)^2;
>> diff(y)   differentiation of y

ans = a*cos(x)+4*sin(x)*cos(x)


>> diff(ans) 

ans = -a*sin(x)+4*cos(x)^2-4*sin(x)^2


>> int(ans)         integration of ans

ans = a*cos(x)+4*sin(x)*cos(x)


>> int(ans)

ans = a*sin(x)+2*sin(x)^2

>> syms x y

>> z = sin(x)+cos(y)

z = sin(x)+cos(y)

 >> x = pi/2; y = pi/2;
>> z

z = sin(x)+cos(y) here you can see that x and y variables values are not considered while computing z.


Tuesday, 6 August 2013

What is a Doubly feed Electrical Machine or DFIG?

Electric machines are either Singly Fed with one winding set that actively participates in the energy conversion process or Doubly Fed with two active winding sets. Having two electrical ports, many confuse the singly-fed slip-energy recovery induction and the field-excited synchronous electric machines as doubly-fed; however, the port of only one winding set is actively excited while the port of the other winding set passes dissipative power for passive participation in the energy conversion process
Only practical with the evolution of control technology, there are now three varieties of doubly fed electric machine systems: 1) the Doubly Fed Induction Machine (DFIM), which is the conventional wound-rotor doubly fed electric machine with an active winding set on the rotor and stator, respectively, and flux vector controlled rotor excitation through a multiphase slip-ring assembly; 2) the Brushless Doubly-Fed Induction Machine (BDFIM), which is the brushless doubly fed induction (or reluctance) electric machine with cascaded active winding sets of unlike pole-pairs on the stator assembly of which one is flux vector controlled and a flux focusing rotor assembly; and 3) the Brushless Doubly-Fed Synchronous Machine (BDFSM), which has the traditional DFIM circuit topology with a rotor and stator active winding set but with a brushless real time control method replacing the slip ring assembly and rotor flux vector controller.
The symmetrical circuit topology and operational relationships of the wound-rotor doubly-fed electric machine core with active winding sets on the rotor and stator, respectively, become the classic study for all other electric machines by de-optimizing their symmetry with asymmetry; for instance, by replacing the symmetrical circuit topology provided by the rotor active winding set with the asymmetrical circuit topology provided by a passive permanent magnet assembly, which has no active power port and as a result, cannot actively participate in the energy conversion process. A true doubly-fed electric machine must have two active winding sets (ports) excited with bi-directional power for practical operation from sub-synchronous to super-synchronous speed without regions of discontinuity, such as about synchronous speed.
Doubly fed electrical machines are electric motors or electric generators that have windings on both stationary and rotating parts, where both windings transfer significant power between shaft and electrical system. Usually the stator winding is directly connected to the three-phase grid and the three-phase rotor winding is fed from the grid through a rotating or static frequency converter or AC to AC cycloconverter.
Doubly fed machines are typically used in applications that require varying speed of the machine's shaft in a limited range around the synchronous speed, for example ± 30%, because the power rating of the frequency converter is reduced similarly. Today doubly fed drives are the most common variable speed wind turbine concept.
The DFIM and BDFIM rely on speed-based asynchronism (or slip) between the rotor and stator windings to induce speed-synchronized current onto the rotor winding set. However at the low slip experienced about synchronous speed, the time critical measurement or excitation synthesis of shallow time-differential signals makes stability increasingly elusive. The BDFIM has eliminated the multiphase slip-ring assembly and partially improved stability by sacrificing size, cost, and efficiency. In contrast, the BDFSM without brushes propagates instantaneously derived speed-synchronized multiphase excitation to the rotor winding set without discontinuity and without relying on slip induction, although slip-induction is experience beyond synchronous speed as in all doubly-fed electric machines.



Useful MATLAB formats for data display

>> angle  = [pi/4 (180/pi)*(pi/4)]
angle =  0.7854   45.0000

>> format short
>> angle
angle =  0.7854   45.0000

>> format short e
>> angle
angle = 7.8540e-001  4.5000e+001

>> format short g
>> angle
angle = 0.7854           45

>> format long
>> angle
angle = 0.78539816339745  45.00000000000000

>> format long e
>> angle
angle = 7.853981633974483e-001    4.500000000000000e+001

>> format long g
>> angle
angle = 0.785398163397448                        45

>> format bank
>> angle
angle =  0.79         45.00

>> format rat
>> angle
angle = 355/452         45      

>> format hex
>> angle
angle = 3fe921fb54442d18   4046800000000000

>> format compact
>> angle

angle =     0.7854   45.0000

Monday, 5 August 2013

Matlab code for PWM generation

%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%
%                   Script file for PWM generation                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clc;
clear;

fs = 1000; % Frequency of samples
fc = 25; % Frequency of error or message signal

t = 0:1/fs:10; % Array of time

Saw = sawtooth((fc/2)*2*pi*t);

Message = Saw/2+ range(Saw)./4;

figure(1)
plot(t,Message);

position_signal = sind(t*360); % Position signal in degrees

s11 = one

s(size(position_signal));
s11 = sign(diff(position_signal));% Comparision of signals

PWM_signal = zeros(size(position_signal)); %PWM Signal

for n = 1:length(position_signal)
   
    if Message(n)>abs(position_signal(n))&& s11(n)>0
        PWM_signal(n)=1;
    elseif Message(n)>abs(position_signal(n))&&s11(n)<0
        PWM_signal(n) = =-1;
    end
end

figure(2)
plot(t,position_signal,'g-')
hold on
plot(t,PWM_signal,'k--')
title('\fontsize{20}\color{black}\bfPWM pulse generation by MATLAB coding')
axis off



Matlab code to verify maximum power transfer theorem

%Program to plot power versus load resistance plot to verify maximum
%power transfer theorem

clc;
clear all;

Vm = 340;
Vrms = 340 / sqrt(2);
Rth = 100;
RL  = 50:1:200;
IL = Vrms./(Rth + RL);
PL = IL.^2 .* RL;

plot(RL,PL,'k*')
hold on 
title('\bf Maximum Power Transfer Theorem','FontSize',14);
xlabel('\bf Load Resistance','FontSize',10);
ylabel('\bf Power transferred to load','Fontsize',10);
gtext('Rth = RL = 100')
legend('PL')
grid on


Sunday, 4 August 2013

Why MATLAB? Advantages of learning it

MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming environment. Furthermore, MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-in editing and debugging tools, and supports object-oriented programming. These factors make MATLAB an excellent tool for teaching and research. MATLAB has many advantages compared to conventional computer languages (e.g. C, FORTRAN) for solving technical problems. MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. The software package has been commercially available since 1984 and is now considered as a standard tool at most universities and industries worldwide. It has powerful built-in routines that enable a very wide variety of computations. It also has easy to use graphics commands that make the visualization of results immediately available. Specific applications are collected in packages referred to as toolbox. There are toolboxes for signal processing, symbolic computation, control theory, simulation, power system engineering, optimization, and several other fields of applied science and engineering.

MATLAB allows you to focus on your course work and applications rather than on programming details. It enables you to solve many numerical problems in a fraction of the time it would take you to write a program in a lower level language. MATLAB helps you better understand and apply concepts in applications ranging from engineering and mathematics to chemistry, biology, and economics. MATLAB products are used in a broad range of industries, including automotive, aerospace, electronics, environmental, telecommunications, computer peripherals, finance, and medical. More than 500,000 technical professionals at the world’s most innovative technology companies, government research labs, financial institutions, and at more than 2,500 universities rely on MATLAB and Simulink as the fundamental tools for their engineering and scientific work.

Simulink, a companion program to MATLAB, is an interactive system for simulating nonlinear dynamic systems. It is a graphical mouse-driven program that allows you to model a system by drawing a block diagram on the screen and manipulating it dynamically. It can work with linear, nonlinear, continuous-time, discrete-time, multirate, and hybrid systems. Blocksets are add-ons to Simulink that provide additional libraries of blocks for specialized applications like communications, signal processing, and power systems. Often it is mistaken as a plug a play too be naive students but it this one is a excellent modeling and design tool. Learning and designing in Simulink itself is quite useful as well as resourceful in many ways.

This course of MATLAB for Engineering Students is a document for an introductory course in MATLAB and technical computing. This course does not provide a comprehensive introduction or a complete coverage of MATLAB. Instead, it focuses on the specific features of MATLAB that are useful for an engineer. The practice sessions are used with one main goal: to allow students to become familiar with computer software (e.g., MATLAB) to solve application problems. We assume that the students have no prior experience with MATLAB. The availability of technical computing environment such as MATLAB is now reshaping the role and applications of computer laboratory projects to involve students in more intense problem-solving experience. This availability also provides an opportunity to easily conduct numerical experiments and to tackle realistic and more complicated engineering problems.