Report
Report
1
Chapter-1
INTRODUCTION
MATLAB (matrix laboratory) is a fourth-generation high-level programming language
and interactive environment for numerical computation, visualization and programming.
MATLAB is developed by MathWorks. It allows matrix manipulations; plotting of
functions and data; implementation of algorithms; creation of user interfaces; interfacing
with programs written in other languages, including C, C++, Java, and FORTRAN;
analyze data; develop algorithms; and create models and applications. It has numerous
built-in commands and math functions that help you in mathematical calculations,
generating plots, and performing numerical methods.
2
Control Systems
Computational Finance
Computational Biology
The idea behind these tutorials is that you can view them in one window while running
MATLAB in another window. You should be able to re-do all of the plots and
calculations in the tutorials by cutting and pasting text from the tutorials into the
MATLAB Command Window or an m-file.
Solar energy is radiant light and heat from the Sun that is harnessed using a range of
technologies such as solar power to generate electricity, solar thermal
energy (including solar water heating), and solar architecture.
The large magnitude of solar energy available makes it a highly appealing source of
electricity. In 2020 solar energy has been the cheapest source of Electricity. In Saudi
Arabia a power purchase agreement (ppa) have been signed in April 2021 for a new solar
power plant in Al-Faisaliah. The project has recorded the world’s lowest cost for Solar
PV electricity production of USD 1.04 cents/ kWh.
In 2011, the International Energy Agency said that "the development of affordable,
inexhaustible and clean solar energy technologies will have huge longer-term benefits. It
3
will increase countries' energy security through reliance on an indigenous, inexhaustible,
and mostly import-independent resource, enhance sustainability, reduce pollution, lower
the costs of mitigating global warming These advantages are global."
Electric Vehicle is one of the most talkative inventions in recent globe. It gives a good
challenge to fuel vehicles. Now the World want to complete shift towards the electric
vehicle. Electric vehicle runs by the electric power. It is the recent technology on vehicle
industry. Fully electric vehicles nowadays lead the world transportation system.
Dependency on electric vehicle nowadays increases on commercial and personal use.
An electric vehicle (EV) is a vehicle that uses one or more electric motors for propulsion.
It can be powered by a collector system, with electricity from extravehicular sources, or
it can be powered autonomously by a battery (sometimes charged by solar panels, or by
converting fuel to electricity using fuel cells or a generator). EVs include, but are not
limited to, road and rail vehicles, surface and underwater vessels, electric
aircraft and electric spacecraft.
EVs first came into existence in the late 19th century, when electricity was among the
preferred methods for motor vehicle propulsion, providing a level of comfort and ease of
operation that could not be achieved by the gasoline cars of the time. Internal combustion
engines were the dominant propulsion method for cars and trucks for about 100 years,
but electric power remained commonplace in other vehicle types, such as trains and
smaller vehicles of all types.
In the 21st century, EVs have seen a resurgence due to technological developments, and
an increased focus on renewable energy and the potential reduction of transportation's
impact on climate change, air pollution, and other environmental issues. Project
Drawdown describes electric vehicles as one of the 100 best contemporary solutions
for addressing climate change.
Government incentives to increase adoption were first introduced in the late 2000s,
including in the United States and the European Union, leading to a growing market for
the vehicles in the 2010s. Increasing public interest and awareness and structural
incentives, such as those being built into the green recovery from the COVID-19
pandemic, is expected to greatly increase the electric vehicle market. During the COVID-
19 pandemic, lockdowns have reduced the amount of greenhouse gases from gasoline or
diesel vehicles. The International Energy Agency said in 2021 that governments should
do more to meet climate goals, including policies for heavy electric vehicles. Electric
vehicle sales may increase from 2% of global share in 2016 to 30% by 2030.
4
Chapter-2
MATLAB will execute the above statement and return the following result −
x=3
It creates a 1-by-1 matrix named x and stores the value 3 in its element. Let us
Check another
Example:
MATLAB will execute the above statement and return the following result −
x=4
2.2 VECTOR
Let's start off by creating something simple, like a vector. Enter each element of the
vector (separated by a space) between brackets, and set it equal to a variable. For
example, to create the vector a, enter the following into the MATLAB command window
(you can Copy and Paste from your browser into MATLAB to make it easy) and
a = [1 2 3 4 5 6 9 8 7]
a=
123456987
Let's say you want to create a vector with elements between 0 and 20 evenly spaced in
increments of two (this method is frequently used to create a time vector):
t = 0:2:20
5
t=
0 2 4 6 8 10 12 14 16 18 20
· Manipulating vectors is almost as easy as creating them. First, suppose you would like
to add 2 to each of the elements in the vector a. The equation for that looks like:
b=a+2
b=
3 4 5 6 7 8 11 10 9
Now suppose, you would like to add two vectors together. If the two vectors are the
same length, it is easy. Simply add the two as shown below:
c=a+b
c=
4 6 8 10 12 14 20 18 16
Subtraction of vectors of the same length works exactly the same way
There are some commands which are very useful for vector calculations and time saving
advantages also-
Commands 6. Uses
Length To find the no of values in vector.
Sum To find out the addition of values in vector.
Mean To find out the average of values of a particular vector.
Median To find out the median value of a particular vector.
Min To find out the minimum value of a particular vector
Max To find out the maximum value of a particular vector
Rand Used to create random new vector.
Randperm This gives non repeating values in a vector.
Ones This gives a vector contains same element.
Zeros This gives a vector contains all ‘0’ element.
6
2.3 FUNCTIONS
To make life easier, MATLAB includes many standard functions. Each function is a
block of code that accomplishes a specific task.
Functions Uses
Fact To find out the factorial value of any non-zero number.
Sqrt To find out the square root value of any non-zero number.
Nthroot To find out the nth root of any non-zero number.
sin,cos,tan To find out the sin, cos, tan values.
asin,acos,atan To find out the inverse values of sin, cos, tan.
sinh,cosh,tanh To find out the hyperbolic sin, cos, tan values.
Exp To find out the exponential value of a number.
Example:-
sin(pi/4)
ans=
0.7071
Note: - Commonly used constants such as pi, and i or j for the square root of -1, are also
incorporated into MATLAB.
7
Chapter-3
Entering matrices into MATLAB is the same as entering a vector, except each row of
elements is separated by a semicolon (;) or a return:
A = [1 2 3 4; 5 6 7 8; 5 10 15 20]
A=[1234
5678
5 10 15 20 ]
+ Matrix addition
- Matrix subtraction
* Dot product
‘ Take a transpose of a matrix
Inv Take the inverse of a matrix
Eig Computes the eigen values of a square matrix
Det Computes the determinents of a matrix
Example:-
B = [1 2 3 4; 5 6 7 8; 9 10 11 12]
8
B=[1234
5678
9 10 11 12 ]
B=1234
5678
9 10 11 12
C = B‘
C=1592
6 10 3 7
11 4 8 12
D=B*C
D=C*B
D = 30 70 110
70 174 278
Another option for matrix manipulation is that you can multiply the corresponding
elements of two matrices using the .* operator (the matrices must be the same size to do
this).
E = [1 2; 3 4]
F = [2 3; 4 5]
G = E .* F
9
E=12
34
F=23
45
G=26
12 20
If you have a square matrix, like E, you can also multiply it by itself as many times as
you like by raising it to a given power.
E^3
ans =
37 54
81 11
X = inv(E)
X=
-2.0000 1.0000
1.5000 -0.5000
or its eigenvalues:
eig(E)
ans =
-0.3723 5.3723
10
3.2 GRAPH PLOTTING WITH MATLAB
MATLAB provides numerous commands for plotting graphs. The following table shows
some of the commonly used commands for plotting –
Command Purpose
Axis Sets axis limits
Plot Generates xy plot.
Print Prints plot or saves plot to a file.
Title Puts text at top of plot.
Xlabel Puts text at top of plot.
Ylabel Adds text label to y-axis.
Figure Opens a new figure window.
Subplot Creates plots in subwindows
Grid Displays gridlines.
It is also easy to create plots in MATLAB. Suppose you wanted to plot a sine wave as a
function of time. First, make a time vector (the semicolon after each statement tells
MATLAB we don't want to see all the values) and then compute the sin value at each
time.
t = 0:0.25:7;
y = sin(t);
plot(t,y)
xlabel('Time (secs)')
ylabel('Amplitude')
11
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 50 100 150 200 250 300 350
t = 0:0.25:7;
y = cos(t);
plot(t,y)
xlabel(‘Time(secs)’)
ylabel(‘Amplitude’)
12
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 50 100 150 200 250 300 350
t=0:pi/90:2*pi;
subplot(2,2,1)
plot(t,sin(x))
title(‘sine graph’)
xlabel(‘Time’)
ylabel(‘Amplitude’)
subplot(2,1,1)
plot(t,cos(t))
13
title(‘cos graph’)
xlabel(‘Time’)
ylabel(‘Amplitude’)
Amplitu0d.5e Amplitu0d.5e
0 0
-0.5 -0.5
-1 -1
0 50 100 150 200 250 300 0 50 100 150 200 250 300 350
350
Time
Time
14
Chapter-4
A system is a collection of things that are put together with the intention to perform a
specific task. When we excite a system with an input, we get a certain response. A
resistor, a capacitor, an air conditioner, an automobile are some examples of systems.
Sometimes a system is referred to as a “plant.”
A control system is a mechanism that directs the input it receives through the systems
and regulates their output.
Control system engineers use MATLAB® and Simulink® at all stages of development –
from plant modeling to designing and tuning control algorithms and supervisory logic,
all the way to deployment with automatic code generation and system verification,
validation, and test. MATLAB and Simulink offer:
Q.1 find out the pole zero plot of following transfer function
Solution:
>> n4=[1 1 0 2 1]
n4 =
1 1 0 2 1
>> d4=[1 5 0]
d4 =
1 5 0
Transfer function:
16
s^4 + s^3 + 2 s + 1
s^2 + 5 s
>> pzmap(sys4)
Pole-Zero Map
1.5
0.5
Imaginary
0
Axis
-0.5
-1
-1.5
-5 -4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
Real Axis
Q.2 find out the pole zero plot of following transfer function
Solution:
>> n5=[1 10 0 0]
n5 =
17
1 10 0 0
>> d5=[1 0 3 0 5 0]
d5 =
1 0 3 0 5 0
Transfer function:
s^3 + 10 s^2
s^5 + 3 s^3 + 5 s
>> pzmap(sys5)
18
Pole-Zero Map
1.5
0.5
Imaginary
0
Axis
-0.5
-1
-1.5
-10 -8 -6 -4 -2 0 2
Real Axis
Q.3 A control system is shown in the figure determine the transfer function where
G(s) is equal to 4 divided by S(S+1)& feedback is –ve unity .
n7 =
>> d7=[1 1 0]
d7 =
1 1 0
19
>> printsys(n7,d7)
num/den =
s^2 + s
>> [n8,d8]=cloop(n7,d7,-1)
n8 =
0 0 4
d8 =
1 1 4
>> printsys(n8,d8)
num/den =
20
s^2 + s + 4
Q.4 A control system is given the fig Find out the transfer function given
4
s(s+1)
-1
Solution:
>> n1=[4]
n1 =
>> d1=[1 1 0]
d1 =
1 1 0
21
>> printsys(n1,d1)
num/den =
s^2 + s
>> n2=[1 0]
n2 =
1 0
>> d2=[0 1]
d2 =
0 1
>> printsys(n2,d2)
num/den =
1
22
>> [n3,d3]=feedback(n1,d1,n2,d2,-1)
n3 =
0 0 0 4
d3 =
0 1 5 0
>> printsys(n3,d3)
num/den =
s^2 + 5 s
23
Q.5 A control system given in the figure, find out the transfer function
4/s(s+1)
- -
+
S+1.2
+
Solution:
S+0.8
>> n1=[4]
n1 =
>> d1=[1 4 0]
d1 =
1 4 0
>> printsys(n1,d1)
num/den =
24
4
s^2 + 4 s
>> [n2,d2]=cloop(n1,d1,-1)
n2 =
0 0 4
d2 =
1 4 4
>> printsys(n2,d2)
num/den =
s^2 + 4 s + 4
n3 =
25
1.0000 1.2000
>> d3=[0 1]
d3 =
0 1
n4 =
1.0000 0.8000
>> d4=[0 1]
d4 =
0 1
>> [n5,d5]=parallel(n3,d3,n4,d4)
n5 =
0 2 2
26
d5 =
0 0 1
>> printsys(n5,d5)
num/den =
2s+2 2s+2
1
>> [n6,d6]=feedback(n2,d2,n5,d5,-1)
n6 =
0 0 0 0 4
d6 =
0 0 1 12 12
27
>> printsys(n6,d6)
num/den =
s^2 + 12 s + 12
28
Chapter-5
MATLAB SIMULINK
5.1 WHAT IS SIMULINK
29
5.3 SOLVED PROBLEMS
Fig.5.1
Ans:
Fig.5.2
30
Q2.Find out the current in fig.3
Fig.5.3
Ans:
Fig.5.4
31
Q3. Find out the current and voltage in graphical mode in fig5.5
Fig.5.5
Ans:
Fig.5.6
32
Q.4 Find out the current and voltage in graphical mode in fig.5.7
Fig.5.7
Ans:
Fig.5.8
33
Q5.Find out the current and voltage in graphical mode in fig5.9
Fig
Fig.5.9
Ans:
Fig.5.10
34
Q6 Find out the current and voltage in graphical mode in fig.5.11
Fig.5.11
Ans:
Fig.5.1
35
Q7. Find out the values of current and voltage in fig.5.13
Fig.5.13
Ans:
Fig.5.14
36
Chapter-6
SOLAR POWER
6.1 WHAT IS SOLAR POWER
Solar energy is radiant light and heat from the Sun that is harnessed using a range of
technologies such as solar power to generate electricity, solar thermal
energy (including solar water heating), and solar architecture.
The photovoltaic effect is the generation of voltage and electric current in a material with
the presence of light.
This effect occurs in solar cells. The solar cells have two different types of
semiconductors – p-type and n-type. When light or sun ray strikes on solar cells, the
holes are driven to the downward direction in where electrons are present. And electroms
are gone to the upward direction i.e. to the holes. So, a motion of holes and electrons are
created. This helps to from a layer of positive holes and negative electrons. This creates a
voltage and current. This phenomenon is called photovoltaic effect.
37
6.3 TYPES OF SOLAR PANELS
There are three major types of solar panels: monocrystalline, polycrystalline. Each type
has its own unique advantages and disadvantages, and the solar panel type best suited for
your installation will depend on factors specific to your own property and desired system
characteristics.
Of all types of solar panels, monocrystalline panels are likely to be the most expensive
option. This is largely due to the manufacturing process – because the solar cells are
made from a single silicon crystal, manufacturers have to absorb the costs of creating
these crystals. This process, known as the Czochralski process, is energy-intensive and
results in wasted silicon (that can later be used to manufacture polycrystalline solar
cells).
38
6.3.2 POLYCRYSTALLINE SOLAR PANELS
Polycrystalline solar panels are typically cheaper than monocrystalline solar panels. This
is because the cells are produced from silicon fragments rather than a single, pure silicon
crystal. This allows for a much simpler cell manufacturing process, thus costing less for
manufacturers and eventually end-users.
Solar panels
Hybrid inverters
Battery
Grid line(if any)
39
6.4.2 DISTRIBUTION
For home purposes, we can install it on an area where maximum time of sun ray is
available like roof of a house. And generated energy will be distributed in home directly,
or store it in a battery and use it whenever required.
40
6.5 DISADVANTAGES OF SOLAR PANEL
DUST:-Dust is one of the important factor which effect on the solar power efficiency.
ANGLE:-We should keep in mind that the sun ray should directly strike on panel, so that
maximum efficiency can be obtained. So angle of panels should be adjustable.
SHADOW:-Some external objects shadow decrease and effect on the solar power
efficiency.
41
Chapter-7
ELECTRIC VEHICLE
7.1 WHAT IS ELECTRIC VEHICLE
Electric Vehicle is one of the most talkative inventions in recent globe. It gives a good
challenge to fuel vehicles. Now the World want to complete shift towards the electric
vehicle. Electric vehicle runs by the electric power. It is the recent technology on vehicle
industry. Fully electric vehicles nowadays lead the world transportation system.
Dependency on electric vehicle nowadays increases on commercial and personal use.
42
Controller: The main function of the controller is as a regulator of electrical
energy from batteries and inverters that will be distributed to electric motors.
While the controller itself gets the main input from the car pedal (which is set by
the driver). This pedal
Fig.7.2 Controller
setting will determine the frequency variation or voltage variation that will enter
the motor, and at the same time determine the car’s speed.
Electric Traction Motor: The controller provides electrical power from the
traction battery, the electric traction motors will work turning the transmission
and wheels. Some hybrid electric cars use a type of generator-motor that
performs the functions of propulsion and regeneration. In general, the type of
electric motor used is the BLDC (brushless DC) motor.
43
Charger: Charger is a battery charging device. Chargers get electricity from
outside sources, such as the utility grid or solar power plants. AC electricity is
converted into DC electricity and then stored in the battery.
DC/DC Converter: This one of electric car parts that to converts higher-voltage DC
power from the traction battery pack to the lower-voltage DC power needed to run
vehicle accessories and recharge the auxiliary battery.
44
Battery: In an electric drive vehicle, the auxiliary battery provides electricity to
power vehicle accessories.
Charge Port: The charge port allows the vehicle to connect to an external power
supply in order to charge the traction battery pack.
45
7.3 ELECTRIC VEHICLE POLICIES IN INDIA
To assist the acceptance of electric vehicles (EVs) in the country, the central government has
announced a number of promotional measures in the previous ten years, including tax
incentives for electric vehicle owners, public EV charging infrastructure development, and so
on.
Faster Adoption and Manufacturing of (Hybrid &) Electric Vehicles in India (FAME-
India) Scheme is launched under National Mission on Electric Mobility in 2011/
National Electric Mobility Mission Plan 2020, unveiled in 2013. The scheme aims to
encourage progressive induction of reliable, affordable and efficient electric and hybrid
vehicles (x EV). The First Phase of the scheme was initially approved for a period of 2
years, commencing from 1st April, 2015. The Scheme has been extended from time to
time, with the last extension allowed for a period up to 31st March 2019. It is under the
frame work of Demand Incentive Disbursement Mechanism. Incentive amount has been
determined for each category of vehicle like Mild Hybrid, Strong Hybrid, Plug-in Hybrid
and Pure Electric technologies and battery specification. It is implemented and monitored
by National Automotive Board under D/o Heavy Industry. It is one of the DBT schemes
categorized under in-kind mode.
The aim of the mission is to drive strategies for transformative mobility and Phased
Manufacturing Programmes for electric vehicles, electric vehicle Components and Batteries.
Following are the key roles, roadmap and anticipated impact envisaged under the mission:
Role:
Roadmap:
Phased battery manufacturing roadmap with initial focus on large-scale module and
pack assembly plants by 2019-20 and Gigascale integrated cell manufacturing by 2021-
22
Ensuring holistic and comprehensive growth of the battery manufacturing industry in
India through PMP
Preparing roadmap for enabling India to leverage its size and scale to produce
innovative, competitive multi-modal mobility solutions that can be deployed globally
in diverse contexts
Roadmap for transformative mobility in “New India” by introducing a sustainable
mobility ecosystem and fostering Make-in-India
Impact:
48
The Mission will lay down the strategy and roadmap which will enable India to
leverage upon its size and scale to develop a competitive domestic manufacturing
ecosystem for electric mobility
Benefit all citizens as the aim is to promote ‘Ease of Living’ and enhance the quality of
life of our citizens and also provide employment opportunities through ‘Makein-India’
across a range of skill sets
49