0% found this document useful (0 votes)
0 views59 pages

MATLAB AND INTERFACING LAB

The document outlines a MATLAB Interfacing Lab course for B.Tech students at Andhra University, detailing various experiments related to electrical engineering principles such as Ohm's Law, Kirchhoff's Laws, and Thevenin's Theorem. Each experiment includes objectives, apparatus, theoretical background, MATLAB scripts, and results. The lab aims to enhance students' practical skills in using MATLAB for circuit analysis and simulation.

Uploaded by

cv9506819
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views59 pages

MATLAB AND INTERFACING LAB

The document outlines a MATLAB Interfacing Lab course for B.Tech students at Andhra University, detailing various experiments related to electrical engineering principles such as Ohm's Law, Kirchhoff's Laws, and Thevenin's Theorem. Each experiment includes objectives, apparatus, theoretical background, MATLAB scripts, and results. The lab aims to enhance students' practical skills in using MATLAB for circuit analysis and simulation.

Uploaded by

cv9506819
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Andhra University

Department of Electrical Engineering


[Link] Degree Semester III
MATLAB INTERFACING LAB
[Link]. LIST OF EXPERIMENTS

1. Introduction to MAT LAB Programming

2. Verification of Ohm’s Law

3. Verification of Kirchhoff’s Laws

4. Verification of Superposition Theorem

5. Verification of Reciprocity Theorem

6. Verification of Thevenin’s Theorem

7. Verification of Norton’s Theorem

8. Verification of Maximum Power Transfer Theorem

9. Introduction to MAT LAB Simulink

10. Load and No-load characteristics of separately excited DC generator


using MATLAB Simulink
11. Open circuit and short circuit test on 1-phase transformer Using
MATLAB Simulink
12 Load and No-load characteristics of self-excited DC shunt generator
using MATLAB Simulink
13 D.C -Series Motor Using MATLAB Simulink

14 Full and Half Wave Bridge Rectifier


Andhra University Dept of EE
INTRODUCTION TO MATLAB

[Link]: DATE:
—-----------------------------------------------------------------------------------------------------------------------------
AIM: Introduction to MATLAB.

APPARATUS: Personal Computer, MATLAB Software.

THEORY:

Matlab (Matrix laboratory) is a high Level Programming language and environment designed
for numerical computing, data analysis and visualisation. Its rich set of built in function and tool
boxes makes it an indispensable tool for engineers particularly in the fields of engineering.
MATLAB's ability to solve complex mathematical problems, simulate systems and analyse large
data sets has made it a cornerstone of modern engineering education and practice.
Matlab has diverse applications in electrical engineering, including circuit analysis and
design where it calculates electrical parameters and simulates circuits. Matlab supports power
system modelling, renewable energy simulations and embedded system design integrating with
microcontrollers and IOT devices. Additionally used in machine learning and AI for predictive
analysis for fault detection and system development. Overall matlab and powerful tool in the field
of engineering.

MATLAB SCRIPT:

%Multiplication of Materices by Scalar


Q = [22 69 27;28 91 29;19 84 26];
R = 2*Q

% Multiplication of two Materices


A = [1 0 0;0 1 0;0 0 1] ;
B = [1 2 3;4 5 6;7 8 9];
C = A*B

% Inverse of a Matrix
H = [1 2:3 4]
I = inv (H)

% Solving System of Linear equations.


J=[4 1 2;0 3 1;0 1 2];

Matlab and Interfacing


Andhra University Dept of EE

K = [17, 19, 13];


L= inv (J)*k

% Graph Plot
a = [ 0 : 0.5 : 5 ];
b = 2*a^2 + 3a - 5;

plot (a, b, tor', 'Marker Face Color', 'g', 'LineWidth', 2)


xlabel ('TIME');
ylabel ('MAGNITUDE');
legend ('curve_1', 'Location', 'SOUTH');

% Complex numbers.
Z = 2* Sqrt (2) *exp((pi/4)*j)
% Complex Matrices

W = [ 1+j1 2-2j ]
[ 3+2j 4+3j ]

GRAPHS:

Matlab and Interfacing


Matlab and Interfacing
Andhra University Dept of EE

OUTPUT:

R = 44 138 54
56 182 58
38 168 52

C=1 2 3
4 5 6
7 8 9

I = -2.00 1.00
1.50 -0.50

L=1
5
4

Z = 2.0000 + 2.0000j

W = 10000+1.0000 i 3.0000 +2.0000 i


2:0000-2.0000 i 4.0000+3.0000 i

RESULT: Basic Matlab Programs are compiled and verified.

Matlab and Interfacing

Matlab and Interfacing


Andhra University Dept of EE

Verification Kirchhoff Voltage Law (KVL) and Kirchhoff Current Law (KCL)
Ex no: Date:
--------------------------------------------------------------------------------------------------------------------------------
AIM: To Verify Kirchhoff Voltage Law (KVL) and Kirchhoff Current Law (KCL) in MAT lab/
Simulink.

APPARATUS: Personal Computer, MAT Lab software.

PROCEDURE:

[Link] On computer and double click on MAT LAB icon, then MATLAB window will be opened.

[Link] on Simulink tool from tool bar. Then Simulink library browser window will be opened.

[Link] on new model, then new untitled workspace of Simulink window will be opened.

4. Make the connections as shown in the circuit diagram by using MATLAB Simulink.
5. Run the simulation models and verify with theoretical values of KVL and KCL.

Circuit diagram for Verification of KVL:

Circuit diagram for Verification of KCL:

Simulink Model for Verification of KVL:

MAT lab Interfacing


Andhra University Dept of EE

Simulink Model for Verification of KCL:

RESULT:

MAT lab Interfacing


Andhra university Dept of EEE

VERIFICATION OF OHM’S LAW

Ex no : Date:
-------------------------------------------------------------------------------------------------------------------------------------

AIM : To verify ohm’s law by using matlab programming.

Apparatus :
1) Personal computer
2) Matlab software

STATEMENT :
Ohm’s law states that the voltage across a conductor is directly proportional to the
current flowing through it, as long as the temperature and other physical conditions remains
constant.

THEORY :
Ohm’s law is a relationship between voltage, current and resistance in an electric
circuit.
In MATLAB the potential difference between two points (V) is equal to the current
flowing through the resistance(I) multiplied by the resistance(R) or V= IR.
To verify the ohm’s law, vary the voltage applied across a resistor and record the
corresponding current values.
When plotted on a graph, the relationship between voltage and current is a straight line, with
the slope equal to 1/R.
(We can use the MATLAB Simulink to implement ohm’s law).

MATLAB SCRIPT :
Diaryex1_1.dat
CLC;
clear all;
%diary causes output to be written into file ex1_1.dat
%current and power calculation
R = 145; %Resistance value
Andhra university Dept of EEE

V = (0:40:200); %Generated voltage value


I = V * inv(R); %array division to be obtain current
fprintf('R = %.2f ohm\n',R)
fprintf('V = %.2f volt\n',V)
fprintf('I = %.2f amp\n',I)
plot(V,I,'-or')
xlabel('voltage');
ylabel('current');

CIRCUIT DIAGRAM :

V = 230volts
R1 = 300ohms
R2 = 145ohms
Andhra university Dept of EEE

Graph:

OUTPUT :

R = 145.00Oohms
V = 0.00v
V = 40.00v
V = 80.00v
V = 100.00v
V = 120.00v
V= 160.00v
V = 200.00v
I = 0.00A
I = 0.27A
I = 0.55A
I = 0.82A
I = 1.01A
I = 1.37A

RESULT :
Therefore the ohm’s law is verified through matlab programming.
Andhra University Dept of EE

Andhra University Dept of EE


Verification of Reciprocity Theorem

[Link] Date:
—-----------------------------------------------------------------------------------------------------------------------------
AIM: To verify Reciprocity Theorem using Matlab.

APPARATUS: Personal Computer. Matlab Software.

CIRCUIT DIAGRAM:

THEORETICAL CALCULATIONS:

Req = (R2 x R3) / (R2 + R3) + R1


Req = (50 x 29) / (50 + 29) + 50 = 68.35Ω
I = V/Req = 24/68.35 = 0.35 A
Ratio - 1 = V/I = 24/68.35 = 187.5
Matlab and Interfacing
Andhra University Dept of EE

Matlab and Interfacing


Andhra University Dept of EE

Req = (R1 x R3) / (R1 + R3) + R2


Req = (50 x 29) / (50 + 29) + 50 = 68.35Ω
I = V/Req = 24/68.35 = 0.35 A
Ratio - 2 = V/I = 24/68.35 = 187.5

Therefore, Ratio - 1 = Ratio - 2


Hence, Reciprocity Theorem is verified.

THEORY:
Statement: Reciprocity Theorem states that the ratio of response transfer function to excitation transfer
function is invariant to an interchange of the position of the excitation and response.

Syntaxes:
1. fprintf (‘format’,variables)
format: A string specifying the format of the output including text and placeholders for variables
eg: %i for integers, %f for floating point numbers, %s for strings
variables: The variables to be printed in the positions defined by the placeholders in format.

2. disp(x)
x:The variable or expression you want to display. This can be a string, a number, a matrix or an array.

3. <strong> and </strong>


They are placed at the start and end of a string to make the string bold in the command window

4. If statement:
if expression
Matlab and Interfacing
Andhra University Dept of EE

statements
else
statements
end

Matlab and Interfacing


Andhra University Dept of EE

5. abs(x)
x:This can be a scalar, a vector or a matrix of any dimension. It can be real or complex.
abs(x):This is the output which will be the absolute value of input x.

PROGRAM:
%Given
V1 = 24;
V2 = 24;
R1 = 50;
R2 = 50;
R3 = 29;

%Response before interchanging Excitation and Response


R_V2 = [-(R1 + R3), R3; R3, -(R3 + R2)];
V_V2 = [0; 24];
I_V2 = inv(R_V2)*V_V2;
I1 = -I_V2(1);
Ratio_1 = V1/I1;

%Response after interchanging Excitation and Response


R_V1 = [-(R1 + R3), R3; R3, -(R3 + R2)];
V_V1 = [-24; 0];
I_V1 = inv(R_V1)*V_V1;
I2 = -I_V1(1);
Ratio_2 = V2/I2;

%Display section
fprintf(‘Response before interchanging (I1) = %.2f A\n’,-I_V2(1))
fprintf(‘Ratio of Excitation to Response before interchanging (Ratio_1) = %.2f\n’,Ratio_1)
fprintf(‘Response after interchanging (I2) = %.2f A\n’,I_V1(2))
fprintf(‘Ratio of Excitation to Response after interchanging (Ratio_2) = %.2f\n’,Ratio_2)

Matlab and Interfacing


Andhra University Dept of EE

%Verification
if abs(Ratio_1 - Ratio_2) < 10e6
disp(‘Reciprocity Theorem is verified.’)
else
disp(‘Reciprocity Theorem is not verified.’)
end
OUTPUT:
Response before interchanging (I1) = 0.13A
Ratio of Excitation to Response before interchanging (Ratio_1) = 186.21
Response after interchanging (I2) = 0.13A
Ratio of Excitation to Response after interchanging (Ratio_2) = 186.21
Reciprocity Theorem is verified.

RESULT: Hence Reciprocity Theorem is verified using Matlab.

Matlab and Interfacing


Andhra University Dept of EE

Matlab and Interfacing

Matlab and Interfacing


Andhra University Dept of EE

Verification of Super Position Theorem


Ex no: Date:
--------------------------------------------------------------------------------------------------------------------------------
AIM: To Verify Super Position Theorem in MAT Lab/ Simulink.

APPARATUS: Personal Computer, MAT Lab software.

SUPERPOSITION THEOREM:
“In a linear network with several independent sources which include equivalent sources due to initial

conditions, and linear dependent sources, the overall response in any part of the network is equal to the sum

of individual responses due to each independent source, considered separately, with all other independent

sources reduced to zero”.

PROCEDURE:

[Link] On computer and double click on MAT LAB icon, then MATLAB window will be opened.

[Link] on Simulink tool from tool bar. Then Simulink library browser window will be opened.

[Link] on new model, then new untitled workspace of Simulink window will be opened.

4. Make the connections as shown in the circuit diagram by using MATLAB Simulink.

Step 1:
1. Make the connections as shown in the circuit diagram by using MATLAB Simulink.

2. Measure the response ‘I’ in the load resistor by considering all the sources 100Vand 150V in the
network.

Step 2:
1. Replace the sources 150V with their internal impedance (short circuited).

2. Measure the response ‘I1’ in the load resistor by considering 100V source in the network.

Step 3:
1. Replace the sources 100V with their internal impedance (short circuited).

2. Measure the response ‘I2’ in the load resistor by considering 150V source in the network.

1
MAT LAB Interfacing
Andhra University Dept of EE

The responses obtained in step 1 should be equal to the sum of the responses obtained in step 2 and 3 .
I=I1+I2

5. Run the simulation models and verify with theoretical values of Super position Theorem.

Circuit diagram for Super Position Theorem:

Simulink circuit diagram:

2
MAT LAB Interfacing
Andhra University Dept of EE

RESULT:

3
MAT LAB Interfacing
Andhra University Dept of EEE

VERIFICATION OF THEVENIN’S THEOREM


Exp. no.: Date:

AIM: To verify Thevenin’s Theorem using MATLAB.


APPARATUS:
• Hardware: Personal Computer
• Software: MATLAB R2024 (24.1.0.2537033)
STATEMENT: Thevenin 's theorem states that a linear, bilateral active network having
active and passive elements across two accessible terminals can be
replaced with or reduced to an equivalent network consisting of only one
voltage source ‘Vth’ in series with one equivalent resistance ‘Rth’ across
the same terminals.
CIRCUIT DIAGRAM:

SYNTAXES:

1. Thevenin’s Voltage (Vth):


o Syntax: Vth = Vs * (R3 / (R1 + R3));
o Use: Calculates the Thevenin’s equivalent voltage using voltage division.
2. Thevenin’s Resistance (Rth):
o Syntax: Rth = R3 + (R1 * R2) / (R1 + R2);
o Use: Calculates the Thevenin’s equivalent resistance by finding total
resistance.
3. Load Current (I_load):
o Syntax: I_load = Vth / (Rth + RL);
o Use: Calculates the current flowing through the load.
4. Voltage across Load (V_load):
o Syntax: V_load = I_load * Rl;
o Use: Calculates the current across the load.
5. Original circuit total current (I_total):
o Syntax: I_total = Vs / R_total;
o Use: Calculates the total current flowing in the circuit.
6. Voltage across load in the original circuit (V_load_original):
Andhra University Dept of EEE

o Syntax: V_load_original = I_total * RL;


o Use: Calculates the voltage across load in the original circuit.
7. disp(x):
o Use: Used to display the results.

THEORETICAL CALCULATION:

Thevenin’s Voltage (𝑽th):


Andhra University Dept of EEE

𝑅3
𝑉th = 𝑉𝑠 ⋅ 𝑅
1 +𝑅3
110 110
𝑉th = 230(230+110) = 230(340) = 74.41 V

Thevenin’s Resistance (𝑹th ):


𝑅 𝑅
𝑅th = 𝑅3 + (𝑅 1⋅+𝑅2 )
1 2

230(110) 25300
𝑅th = 110 + = 110 + = 110 + 74.41 = 184.41 Ω
230 + 110 340

Load Current (𝑰load ):


𝑉th
𝐼load = 𝑅
th +𝑅𝐿

74.41 74.41
𝐼load = 184.41+29 = 213.41 = 0.3487 A

Load Voltage (𝑽load):

𝑉load = 𝐼load ⋅ 𝑅𝐿

𝑉load = 0.3487(29) = 10.11 V

Total Resistance(𝑹total ):
𝑅 𝑅
𝑅total = 𝑅3 + (𝑅 1⋅+𝑅2 ) + 𝑅𝐿
1 2
230×110
𝑅total = 110 + (230+110) + 29 = 110 + 74.41 + 29 = 213.41 Ω

Original Load Voltage(𝑽load_original ):

𝑉load_original = 𝐼total ⋅ 𝑅𝐿
𝑉load_original = 1.078 × 29 = 31.26 V

MATLAB SCRIPT:
clc;

clear all;

% Given data

Vs = 230; % Source voltage in volts

R1 = 230; % Resistance R1 in ohms

R2 = 110; % Resistance R2 in ohms

R3 = 110; % Resistance R3 in ohms

RL = 29; % Load resistance in ohms

% Step 1: Find Thevenin’s Equivalent Voltage (Vth)


Andhra University Dept of EEE

% Using voltage division to find Vth across R2 and R3 (open circuit)

Vth = Vs * (R3 / (R1 + R3)); % Thevenin’s Voltage

% Step 2: Find Thevenin’s Equivalent Resistance (Rth)

% Remove the source and find the equivalent resistance seen from load

Rth = R3 + (R1 * R2) / (R1 + R2); % Thevenin’s Resistance

% Step 3: Calculate the load current and voltage using Thevenin's equivalent
circuit

I_load = Vth / (Rth + RL); % Load current

V_load = I_load * RL; % Voltage across the load

% Display the results

disp(['Thevenin''s Equivalent Voltage (Vth): ', '<strong>',num2str(Vth, '%0.2f'),


' V','</strong>']);

disp(['Thevenin''s Equivalent Resistance (Rth): ','<strong>', num2str(Rth,


'%0.2f'), ' ohms','</strong>']);

disp(['Load current (I_load): ', '<strong>',num2str(I_load, '%0.4f'), '


A','</strong>']);

disp(['Voltage across load (V_load): ', '<strong>',num2str(V_load, '%0.2f'), '


V','</strong>']);

% Additional outputs

disp('Verification using original circuit:');

% Calculate total resistance of the network with the load connected

R_total = R2 + (R1 * R2 / (R1 + R2)) + RL;

% Calculate total current in the original circuit

I_total = Vs / R_total;

% Calculate voltage across the load in the original circuit

V_load_original = I_total * RL;

% Display the original circuit results for verification


Andhra University Dept of EEE

disp(['Original circuit total current (I_total): ', '<strong>',num2str(I_total,


'%0.4f'), ' A','</strong>']);

disp(['Voltage across load in original Circuit (V_load_original): ','<strong>',


num2str(V_load_original, '%0.2f'), ' V','</strong>']);

OUTPUT:
Thevenin's Equivalent Voltage (Vth): 74.41 V
Thevenin's Equivalent Resistance (Rth): 184.41 ohms
Load current (I_load): 0.3487 A
Voltage across load (V_load): 10.11 V
Verification using original circuit:
Original circuit total current (I_total): 1.0777 A
Voltage across load in original Circuit (V_load_original): 31.25 V

RESULT: Hence Thevenin’s Theorem is verified using MATLAB.


Andhra University Department of EEE

VERIFICATION OF NORTON’S THEOREM

Experiment number: Date:

Aim: To verify Norton’s Theorem using Matlab programming


Apparatus:
• Hardware: Personal Computer
• Software: MATLAB R2024(24.1.0.2537033)
Statement: Norton's theorem states that all linear circuits can be simplified to
an equivalent circuit with a single current source in parallel with a single
resistor connected to a load.
Circuit diagram:

Theory:

1. Total Current
o Syntax: I_total = Vs / (R1 + (R2 * R3) / (R2 + R3));
o Use: Calculates the total current supplied by the source.
2. Norton’s Current
o Syntax: I_n = I_total * R3 / (R2 + R3);
o Use: Determines the Norton’s equivalent current using current
division.
3. Norton’s Resistance
o Syntax: R_n: R3 + (R2 * R1) / (R1 + R2);
o Use: Calculates the Norton’s equivalent resistance by finding total
resistance seen
4. Formatted Printing (fprintf)
o Syntax: fprintf (‘Text: %.xf units \n’,value);
o Example: fprintf (‘Norton’s equivalent resistance (R_n): %.2f
Ohms \n’, R_n);
o Use: Displays the results in a structured format.
5. Display the Results
o The Norton’s equivalent current, Norton’s equivalent resistance,
Load Current and Voltage across Load are displayed in the
MATLAB console.

Theoretical Calculation

Total Current : I_total = Vs / (R1 + ((R2 * R3) / (R2 + R3)))

= 230 / (230+55) = 0.80 A

Norton’s Current : I_n = I_total * R2(R2+R3)

= 0.807 * 0.5 = 0.4035 A


Norton’s Resistance: R_n = R3 + (( R1 * R2) / (R1+R2))

= 110 + ((230 * 110) / (230 + 110)) = 184.41 Ohms

Load Current : I_load = I_n * (R_n / (R_n + Rl))

= 0.4035 (184.41 / 184.41 + 29)) = 0.3486 A

Voltage across load: V_load = I_load * Rl = 0.3486 * 29 = 10.11 V

Matlab Script:
clc;
clear all;

%Given Values
Vs=230;
R1=230;
R2=110;
R3=110;
Rl=29;
%Step 1: Find Norton's equivalent current (I_n)
%Short-circuiting the load (Rl) and calculating current
%Calculate the current through R2 and R3 in parallel
I_total=Vs/(R1+(R2*R3)/(R2+R3));
I_n=I_total*R3/(R2+R3);

%Step 2: Find Norton's equivalent resistance (R_n)


%Norton's resistance is equal to Thevenin's resistance
R_n=R3+(R2*R1)/(R1+R2);

%Step 3: Calculate the load current and voltage using


Norton's equivalent circuit
I_load=I_n*(R_n)/(R_n+Rl);
V_load=I_load*Rl;

%Display the results


fprintf('Norton’s equivalent current (I_n): %.4famps
\n',I_n);
fprintf('Norton’s equivalent resistence (R_n): %.2fOhms
\n',R_n);
fprintf('Load Current(I_load): %.4famps \n',I_load);
fprintf('Voltage across load(V_load): %.2fV\n',V_load);

Output:
Norton’s equivalent current (I_n) :0.4035amps
Norton’s equivalent resistence (R_n) :184.41Ohms
Load Current (I_load) :0.3487amps
Voltage across load (V_load) :10.11V

Result: Hence Norton’s Theorem is verified using Matlab programming.


Andhra University Department of EEE

VERIFICATION OF MAXIMUM POWER TRANSFER THEOREM

Experiment number: Date:

Aim: To verify Maximum power transfer theorem using Matlab programming


Apparatus:
• Hardware: Personal Computer
• Software: MATLAB R2024(24.1.0.2537033)
Statement: Maximum power transfer theorem states that in any linear circuit,
maximum power will be transferred to the variable load or maximum power
will be absorbed by the variable load from the source when the load resistance
value Rl* is equal to source value Rs.
Circuit diagram:

Theory:

1. Calculate Thevenin Parameters:


o Compute the parallel resistance R12 between R1 and R2.
o Calculate the total Thevenin resistance Rth by adding R3 in series
with R12.
o Compute the Thevenin voltage Vth using the voltage divider
formula.
2. Simulate Power Delivered to the Load:
o For a range of load resistances (Rl_min to Rl_max), the power
delivered to the load (P_load) is calculated using the formula
above.
3. Plot Power vs. Load Resistance:
o The code generates a plot showing how the power delivered to the
load varies with the load resistance. This typically shows a curve
Andhra University Department of EEE

that rises to a maximum and then falls off as the load resistance
increases.
4. Find Maximum Power and Optimal Load Resistance:
o The code uses the max() function to find the maximum power
value and the corresponding load resistance (Rl) where this
maximum occurs. The result is the load resistance that would
deliver the maximum power, and this is the point where Rl equals
Rth.
5. Display and Label the Results:
o The Thevenin resistance, voltage, optimal load resistance, and
maximum power are displayed in the MATLAB console.
o The plot is annotated using gtext() to label the point of maximum
power on the graph.

Matlab Script:
clc;
%Given values
R1 = 145;
R2 = 55;
R3 =29;
Vs = 230;
Rl_min = 0;
Rl_max = 300;
step_size = 1;

%Range of load resistances


Rl = Rl_min:step_size:Rl_max;

%Calculate R12(parallel combination of R1 and R2)


R12 = (R1*R2)/(R1+R2);

%Calculate thevenin’s resistance (Rth)


Rth = R12+R3;

%Calculate thevenin’s voltage (Vth)


Vth = Vs*(R2/(R1+R2));

%Calculate power delivered to the load for each Rl


P_load = (Vth.^2)./((Rl+Rth).^2).*Rl;

%Plot power delivered to the load against load resistance


Andhra University Department of EEE

plot(Rl,P_load,'k','LineWidth',2);
xlabel('Load Resistance(ohms)');
ylabel('Power delivered to load(watts)');
grid on;

%Find maximum power and corresponding load resistance


[max_power,max_power_idx] = max(P_load);
optimal_Rl = Rl(max_power_idx);

%Display results
fprintf('Thevenin’s equivalent resistance (Rth): %.2f ohms\n',Rth);
fprintf('Thevenin’s equivalent voltage (Vth): %.2f volts\n',Vth);
fprintf('Load resistance (Rl) for maximum power transfer: %.2f
ohms\n',optimal_Rl);
fprintf('Maximum power delivered: %.2f watts\n',max_power);

%Use gtext to label maximum power on plot


gtext(sprintf('Max power:%.2fW at Rl =%.2f ohms', max_power, optimal_Rl));

Output:
Thevenin’s equivalent resistance (Rth): 68.88 ohms
Thevenin’s equivalent voltage (Vth): 63.25 volts
Load resistance (Rl) for maximum power transfer: 69.00 ohms
Maximum power delivered: 14.52 watts

Result: Hence Maximum power transfer theorem is verified using matlab


programming.
Andhra university Department of EEE

INTRODUCTION TO MATLAB SIMULINK


Experiment No: Date:
Aim: Introduction to Matlab Simulink
Apparatus:
● Hardware: Personal computer
● Software: Matlab Simulink
Simulink:
Simulink, which is created by MathWorks, is one of the most dynamic and
resourceful applications. It is basically a simulation platform that incorporates
MATLAB and a model design system. It features a fantastic environment for
programming, simulation, and modelling. Multi-domain dynamical systems can
be analysed with this software by a variety of professions. Its principal interface
consists of a graphical block diagramming tool and a collection of block libraries
that may be customised. Moreover, it has amazing features such as product style
control, traceability criteria, and application coverage analysis, among others.
Uses of Matlab Simulink
Simulink has already been used to simulate numerous dynamic systems. Simulink
includes a variety of features to meet your needs, whether they are basic or
sophisticated. For example, you may imitate a bouncing ball, a single hydraulic
cylinder, a thermal house, and so on.
Another popular application of Simulink is to model and simulate a wide range
of automobile systems. You may model and simulate the car and its surroundings,
as well as create control algorithms for automotive applications. The Powertrain
Blockset contains completely completed reference application models of
automobile powertrains such as gasoline, diesel, hybrid, and electric systems. The
Vehicle Dynamics Blockset includes completely constructed reference
application models that replicate driving motions in 3D.
Matlab Simulink Basics
Learning how to start utilising Simulink is one of the fundamental concepts.
Follow the steps mentioned below:
● Step 1: To begin, choose the Simulink icon from the MATLAB toolbar.
Andhra university Department of EEE

● Step 2: Next, at the MATLAB prompt, type 'Simulink' followed by a


carriage return.
● Step 3: You should now see the Simulink Library Browser. Next, in the
Library Browser, choose New and then Model from the File pull-down
menu.
● Step 4: A blank window, commonly known as the model window, will
appear. Models are mostly drawn and altered in this model window using
mouse-driven commands.
Simulink's elements are divided into two categories: Lines and Blocks.
Signals are generated, modified, combined, outputted, and displayed using
blocks. Lines, on the other hand, are used to sending data from one block to
another.

How to Build a Matlab Simulink Model

1. First, you'll need to create a new model by selecting New from the File menu.
You will be presented with a blank model window. Then, in the Library
Browser, pick the Sources icon. This will open the Sources window, which
contains the Sources block library. These sources are mostly utilised to create
signals.
2. From the Sources window, drag the Clock blocks and Sine Wave to the left
side of your model window.
3. Once you have clicked the Sinks symbol in the Library Browser, drag the
Scope and To Workspace blocks into your model window.
4. To open the Signal Routing window, click the Signal Routing icon in the
Library Browser.
5. Drag the Mux block into the model window, then open the Math Operations
window by clicking on the Math Operations icon in the Library Browser.
6. Add the Gain block to your model window by dragging it there.
7. Select the blocks by clicking the left mouse button while the cursor is on
the block. Place the pointer on one of the corners, then push and hold
down the left mouse button. When the block has reached the required
size, move the mouse and release the mouse button.
Andhra university Department of EEE

8. To move a block, you must first pick it. Then, with the cursor inside the
block, press and hold the left mouse button. Release the mouse button
after dragging the block to its new location.
9. You may now utilise a branch line to link the Sine Wave output to the
Mux block input. However, keep in mind that if you intend to design a
branch line, the process will be slightly different in that the branch line
must first be welded to an existing line.
[Link] your cursor on the line that links the Sine Wave block to the Gain
block. Without moving the mouse, press and hold the CTRL key,
followed by the left mouse button. Release the mouse button after
dragging the cursor to the Mux block's input port.

PowerGUI:

Libraries:

Simscape / Electrical / Specialized Power Systems

The Power GUI block in MATLAB Simulink is an essential tool for simulating
and analyzing electrical power systems, particularly when working with
Simulink models that include Simscape Electrical Specialized Power Systems.
Below is a theoretical overview of its purpose and functionality:

The powergui block also opens tools for steady-state and simulation results
analysis and for advanced parameter design.

You need the powergui block to simulate any Simulink model


containing Simscape Electrical™ Specialized Power Systems blocks. It stores
the equivalent Simulink circuit that represents the state-space equations of the
model.

When using one powergui block in a model:

● Place the powergui block in the top-level diagram for optimal


performance.
● Make sure that the block is named powergui.
Andhra university Department of EEE

Note: The powergui block becomes disabled during model update. To ensure
proper model execution, do not restore the library link for the powergui
block.

You can use multiple powergui blocks in a system that contains two or more
independent electrical circuits that you want to simulate with different powergui
solvers.
To do so, put each circuit in a different subsystem, and then add
a powergui block inside each subsystem.
When you use more than one powergui block in a model:
● Do not place a powergui block in the top-level diagram.
● Place every independent model in a different subsystem.

● Place a single powergui block in the top level diagram of every subsystem.
Example: Differential Equation using Simulink
Aim: To solve and represent the graphs for the equation d2y/dx2+4dy/dx+5=1
Block and Parameters:
● Powergui
● Contsant
● Sum
● Integrator
● Gain
● Scope
Circuit Diagram:
Andhra university Department of EEE

Procedure:
1. Drag needed blocks into the model region
– Integrator block from the Continuous group;
– Sum block from the Math Operations group,
– Gain block from the Math Operations group,
– Scope block from the Sink group.
[Link] the output of the Sum block to the input of the Integrator block.
[Link] the Integrator to the Scope by clicking on the Integrator output and
dragging to the Scope until they are connected. In more recent versions it is easier
to double-click the unattached arrow to get a connection.
4. Right-click the Gain control and choose Flip Block under Rotate & Flip.
Double-click the Gain block and change the Gain block value from 1 to 4. It
should change on the control.
[Link]-click the Sum control to bring up Block Parameters as shown and
change from |++ to |+- in order to set addition/subtraction nodes. [Note that the
symbol ‘|’ is a blank node. Also, one can change the block to rectangular form.
6. One can annotate the diagram by clicking near where labels are needed and
typing in the text box. In more current versions the default is to hide block names.
7. Save the file under a useable file name. This file can be called in MATLAB, or
one can use the run button to run the simulation.
[Link]-click the Scope to see the solution. Figure below shows the Scope plot
after using the autoscale () feature to rescale the scope view.
9. Also, one can make further changes to the system by checking the
Configuration Parameters under the Simulation menu item. In particular,
changing the Refine Factor can lead to smoother solutions.
Andhra university Department of EEE

Graph:
Result:
Hence solution and graph for the given differential equation is obtained and
verified.
Example :-2
Aim: To verify Thevenin’s theorem using matlab Simulink
Blocks and parameters:
● Series RLC branch- Resistance values:
R1 = 230
R2 = 110
R3 = 110
Rl = 29
● DC voltage source:
230V
● Voltage measurement
● Current measurement
● Impedance measurement
● Scope
● Display
● Power gui

Circuit Diagram:
Andhra university Department of EEE
Andhra university Department of EEE

Procedure:
1. Open the Matlab Software and click on the Simulink icon.
2. Choose a blank model and Click on the library browser.
3. Drag and drop all the required blocks into the workspace.
4. Make the connections as per the circuit diagram.
5. Give the values to each block as required.
6. Add power gui block to the work space for simulation.
7. Save the program using the save file option and run it.
8. The output values are shown on the Display block.
Graphs:

Result:
Thevenin's theorem is Verified using Matlab Simulink
Andhra University Dept of EE

Load and No-load characteristics of separately excited DC generator


using MATLAB Simulink
Experiment number: Date:
---------------------------------------------------------------------------------------------------------
AIM: To determine the load and no load characteristics of separately excited DC generator in
matlab simulation
APPARATUS:
Personal computer, MatLabsoftware,Simulink .
THEORY:
A separately excited DC generator is a type of direct current generator where the field
windings (which create the magnetic field necessary for inducing voltage) are supplied with
external power rather than from the generator’s own armature. This design allows for greater
control over the field current, and therefore, the output voltage of the generator.
A separately excited DC generator offers precise control over the output voltage,
making it ideal for specific applications requiring regulated DC power. However, it is more
complex and costly compared to self-excited generators, limiting its use to applications where
such features are essential.
LIST OF PARAMETERS:
1) Dc machine :
- Represents the dc series motor
- This block is parameterised to include the motors specifications like
the armature resistance , field resistance ,and its inductance .
- It outputs critical parameters like speed , torque and current .
- Present model – 01:5HP 240V 1750 RPM Feld:300V
- Mechanical input :speed w
2) Dc voltage source :
- Provides the required input voltage to drive dc motor.
- This block represents a constant voltage source supply or can be adjusted to simulate
varying supply conditions
- Amplitude: 230V
3) Ramp :
- Represents a ramp signal that gradually increases or decreases over time .
- This block can be used to simulate load variation changes in voltage to study transient
and steady state behaviours.
- Slope:1
- Start time:0
- Initial output:300
4) Bus selector:
- In the simulation , the block is used to separate and monitor various outputs from the
dc machine block , such as speed torque and current .
- Elements : speed wm(rad/s), armature current ia(A) ,and electric torque Te(nm)
5) Gain:
Andhra University Dept of EE

- Used to adjust signal magnitudes such as converting one unit of the measurement to
another or fine – tuning system responses
- Value: 30/pi
6) Voltage and current measurement :
- Measures voltage and current at specified points in the circuit .
- These blocks help in analysing the electrical characteristics of the motor , such as
input voltage and armature current .
7) Display :
- Shows real-time values of specific parameters during simulation .
- This block is helpful for monitoring speed, torque ,and current during the simulation
process .
8) Product :
- Multiplies two or more input signals.
- Used to calculate power in the circuit given .
9) Powergui:
- Essential for simulation involving power systems.
- Allows the user to configure simulation parameters and solve electrical circuit . its
enables the use of steady state and dynamic modes for the better accuracy

NO LOAD PARAMETERS:
DC machine configuration
mechanical input= speed w
constant: 315
LOAD CONDITION PARAMETERS:
DC machine
mechanical input = speed w
field type : wound
constant: 315
gain : 9.55
Circuit diagram:
No load condition:
Andhra University Dept of EE

Load condition:

PROCEDURE:

1) Open the MATLAB software .


2) Click on the Simulink icon .choose blank model and provide name to it .
3) Click on library browser and choose all the necessary block and drag them to the
space.
4) Make the connections as shown in the diagram .
5) Provide the necessary value to the block required .
6) Powergui should be present in the circuit designed . It is used for the analysis and
measurement of the parameters like current, voltage.
7) Save the program and run it. Display block will show necessary values and to get
graphical information, click on required scope or XY graph.
MatLab code:
For no load condition:

clc;
If=[0.125 0.25 0.375 0.5 0.625];
TV=[70.88 141.8 212.6 283.5 354.4];
plot(If,TV)
xlabel("Field current in amps")
ylabel("Generated volted EMF in volts")
title("Open circuit characteristics")

For load condition:

clc;
IL=[0.1161 ];
Andhra University Dept of EE

TV=[70.79 141.6 212.4 283.2 354];


plot(IL,TV)
xlabel("load current in amps")
ylabel("terminal voltage in volts")
title("External charecteristics")

Graphs:
No load condition:

Load condition:

PRECAUTIONS:
1) Avoid red dashed lines, i.e, improper connections before running the program.
2) Recheck and make sure all the values have been applied before running the program.
RESULT: The open circuit characteristics and external characteristics of separately excited
DC generator are obtained by using simulink successfully.
Andhra University Dept of EE
Open circuit and Short circuit test on 1-phase transformer Using MATLAB
Simulink
Experiment number: Date:
-------------------------------------------------------------------------------------------------------------------------------
AIM:
To conduct open circuit and short circuit test on a 1-phase transformer and to predict the performance
characteristics of the transformer experimentally.
APPARATUS:
Personal computer, MatLab software, Simulink.
THEORY:
To evaluate the performance of a single-phase transformer, two important tests are usually carried
out: the short-circuit test and the open-circuit test.

Short-Circuit Test: In this test, a low voltage is applied to the primary winding, and the secondary
winding is shorted. The voltage is gradually increased until the transformer reaches its rated current. This
helps measure the copper losses and figure out the impedance (resistance and reactance) of the transformer.
In Simulink, this test can be simulated by short-circuiting the secondary side and applying a low voltage to
the primary side.

Open-Circuit Test: Here, the rated voltage is applied to the primary winding, while the secondary
side remains open (no load). This test is used to measure core losses and determine the magnetizing
reactance of the transformer. In Simulink, this can be modeled by applying the rated voltage to the primary
while leaving the secondary open, and then measuring the no-load current and voltage.

To simulate and analyze the performance of a single-phase transformer through open and short
circuit tests in Simulink, various blocks are used. Each block plays an important role in modeling the
transformer and its related electrical components.
LIST OF PARAMETERS AND BLOCKS:
1) Transformer:
a) provides primary and secondary windings
a) open circuit [160 0.18175 0.000250477] primary
[400 1.1718 0.0015652] secondary
b) short circuit [400 1.1718 0.0015652] primary
[160 0.18175 0.000250477] secondary
c) magnetization [800 0.2560]
2) AC voltage source:
b) Provides the required input voltage to transformer.
c) This block represents a constant voltage source supply or can be adjusted to simulate
varying supply conditions
d) Amplitude: 160*(sqrt(2)) open circuit
14.2*(sqrt(2)) short circuit
e) Frequency 50 hz
3) Voltage and current measurement:
a) Measures voltage and current at specified points in the circuit.
b) These blocks help in analysing the electrical characteristics of the motor, such as input
voltage and armature current.
Andhra University Dept of EE
4) Display:
a) Shows real-time values of specific parameters during simulation.
b) This block is helpful for monitoring speed, torque and current during the simulation
process.
5) Powergui:
a) Essential for simulation involving power systems.
b) Allows the user to configure simulation parameters and solve electrical circuit .its enables
the use of steady state and dynamic modes for the better accuracy.
6) RMS block:
a) Measures the true root mean square value of the input
b) Fundamental frequency 50 Hz
Circuit diagram:
Open Circuit:

Short Circuit:

PROCEDURE:
Andhra University Dept of EE
1) Open MATLAB and launch Simulink.
2) Create a new model by selecting File > New > Model and save it with a name.
3) Open the Library browser, drag necessary blocks (meters, powergui, etc.) into the workspace.
4) Make connections between blocks by dragging from one block's output to another's input.
5) Calculate the values by using a equivalent circuit and from the rated transformer values
6) Set block parameters by clicking on each block and entering required values (e.g., voltage,
resistance).
7) Add Powergui from Simscape > Electrical > Specialized Power Systems for power system analysis.
8) Save the model and run the simulation by clicking the Run button.
9) View results on the Display blocks to check the simulation output and compare with the lab reported
values in a separate table.
PRECAUTIONS:
1) Make sure the connections are correct and connected proper accordingly.
2) Check the parameters are given and entered correctly.

RESULT:
Open circuit and Short circuit characteristics of 1-phase transformer are obtained using Simulink.
Andhra university Department of EE

Load and No-Load Characteristics of DC Shunt Generator using


MATLAB Simulink
Experiment number: Date:
----------------------------------------------------------------------------------------------------------------
AIM:
To determine the load and no load characteristics of self excited DC Shunt Generator using
MATLAB Simulink .
APPARATUS :
Personal computer, MatLab software,Simulink .
THEORY:
A self-excited DC shunt generator operates by utilizing its residual magnetism to initiate the
generation of voltage. When the armature begins to rotate, the residual magnetism in the field
poles produces a small magnetic flux, inducing a small EMF in the armature winding. This
induced EMF causes a current to flow through the field winding, which is connected in parallel
to the armature. The field current strengthens the magnetic flux, which in turn induces a higher
EMF in the armature. This cumulative process continues until the generator reaches its
saturation point, where further increase in flux is not possible due to magnetic saturation.
The output voltage of the generator depends on factors like the speed of rotation, field
resistance, and the load connected across the terminals. At no load, the terminal voltage is
maximum, but as the load increases, the voltage drops slightly due to armature reaction and
internal resistances. The output voltage can be regulated by adjusting a field rheostat to control
the current in the field winding. Proper residual magnetism, correct connections, and an
appropriate field resistance are essential for the generator to self-excite and achieve stable
operation.
LIST OF PARAMETERS:
1) Dc machine :
- Represents the dc shunt generator
- This block is parameterised to include the motors specifications like the armature
resistance , field resistance ,and its inductance .
- It outputs critical parameters like speed , torque and current .
- Present model – 5HP 240V 1750 RPM Feld:300V
- Mechanical input :speed w

2) Dc voltage source :
- Provides the required input voltage to drive dc motor.
- This block represents a constant voltage source supply or can be adjusted to
simulate varying supply conditions
- Amplitude: 230V
3) Ramp :
- Represents a ramp signal that gradually increases or decreases over time .

MAT LAB Interfacing


Andhra university Department of EE

- This block can be used to simulate load variation changes in voltage to study
transient and steady state behaviours.
- Slope:1
- Start time:0
- Initial output:300
4) Bus selector:
- Extracts specific signals from a bus system.
- In the simulation , the block is used to separate and monitor various outputs from
the dc machine block , such as speed torque and current .
- Elements : speed wm(rad/s), armature current ia(A) ,and electric torque Te(nm)
5) Gain:
- Amplifies or scales signals by a specific factor.
- Used to adjust signal magnitudes such as converting one unit of the measurement
to another or fine – tuning system responses
- Value: 30/pi
6) Voltage and current measurement :
- Measures voltage and current at specified points in the circuit .
- These blocks help in analysing the electrical characteristics of the motor , such as
input voltage and armature current .
7) Display :
- Shows real-time values of specific parameters during simulation .
- This block is helpful for monitoring speed, torque ,and current during the
simulation process .
8) Product :
- Multiplies two or more input signals.
- Used to calculate power in the circuit given .
9) Scope :
- Displays time-domain waveform of the signal .
- In the simulation , it Is used to observe parameters like speed,torque,and current
over time .
10) XY Graphs:
- Plots one variable against another , such as speed vs torque or current vs speed .
- This block helps visualize the motors characteristics , making it easier to analyse
the performances .
11) Powergui:
- Essential for simulation involving power systems.
- Allows the user to configure simulation parameters and solve electrical circuit . its
enables the use of steady state and dynamic modes for the better accuracy.

MAT LAB Interfacing


Andhra university Department of EE

Circuit diagram:
Load condition:

No Load condition:

PROCEDURE:
1) Open the MATLAB software .
2) Click on the Simulink icon . choose blank model and provide name to it .
3) Click on library browser and choose all the necessary block and drag them to the
space.
4) Make the connections as shown in the diagram for both load and no load conditions .
5) Provide the necessary value to the block required .
6) Powergui should be present in the circuit designed . It is used for the analysis and
measurement of the parameters like current , voltage.

MAT LAB Interfacing


Andhra university Department of EE

7) Save the program and run it . Display block will show necessary values and to get
graphical information , click on required scope or XY graph for load and no load
conditions respectively.

OBSERVATION:

● For Load conditions:

RESISTANCE Speed(N) Load Current(IL) Voltage


(Ohm)

2000 2913 0.1182 236.4

1000 2913 0.2328 232.8

400 2913 0.5559 222.3

200 2913 1.031 206.1

100 2913 1.774 177.1

60 2913 2.234 155.6

● For No Load conditions:

RESISTANCE Speed(N) Field current input current Emf(V)


(Ohm) (IF):

1000 3008 0.06991 0.2187 21.27

600 3008 0.1141 0.3422 34.66

400 3008 0.1666 0.4736 50.56

200 3008 0.3082 0.7344 93.14

100 3008 0.5306 0.8078 159.2

80 3008 0.6174 0.6923 184.6

60 3008 0.7339 0.3624 218.3

50 3008 0.8065 0.02234 237.9

MATLAB CODE:

● For no load condition plot between emf measurement - field current(V vs If):
clc;
clear all;

MAT LAB Interfacing


Andhra university Department of EE

emf = [21.27, 34.66, 50.56, 93.14, 159.2, 184.6, 218.3, 238.9];


If = [0.06991, 0.1141, 0.1666, 0.3082, 0.5306, 0.6175, 0.7339, 0.8065];
plot(If, emf, '-o');
xlabel('Field Current (If)');
ylabel('EMF Generated(emf)');
title('EMF vs Field Current');
grid on;

● For load condition plot between emf measurement - load current(V vs IL):
clc;
clear all;
v = [236.4,232.8, 222.3, 206.1, 177.1, 155.6];
i = [0.1182, 0.2328, 0.5559, 1.031, 1.774, 2.234];
plot(i, v, '-o');
xlabel('Load Current (i)');
ylabel('Terminal Voltage (v)');
title('Terminal Voltage vs Load Current');
grid on;
Graphs :
For load condition XY Plot between
(emf measured Vs field current) Emf vs If:

MAT LAB Interfacing


Andhra university Department of EE

For Load conditions plot between (terminal voltage and Load current) V vs IL:

PRECAUTIONS:
1) Avoid red dashed lines , i . e , improper connections before running the program.
2) Recheck and make sure all the values have been applied before running the program .

RESULT :
Hence, the load and no load characteristics of DC Shunt Generator using MATLAB
simulink is obtained.

MAT LAB Interfacing


Andhra university Department of EEE

D.C -Series Motor Using MATLAB


Simulink
Experiment number: 9
Date:

AIM:
To conduct load test on dc- series motor and to obtain its performance characteristics using
MATLAB Simulink .

APPARATUS :
Personal computer, MatLab software,Simulink .

THEORY:
A dc series motor is a type of dc motor where the field windings are connected in series with
the armature . It is characterised by high starting torque and a speed that decreases with
increase in load . Simulating the behaviour in Simulink allows us to analyse its characteristics
, such as armature current-speed , armature current- torque and torque-speed relationship in a
controlled environment
To Simulink and observe the performances of the dc series motor, various
Simulink blocks are used . each block plays a vital role in modelling the motor and its
associated electrical components.

LIST OF PARAMETERS:
1) Dc machine :
- Represents the dc series motor
- This block is parameterised to include the motors specifications like the armature
resistance , field resistance ,and its inductance .
- It outputs critical parameters like speed , torque and current .
- Present model – 01:5HP 240V 1750 RPM Feld:300V
- Mechanical input :speed w

2) Dc voltage source :
- Provides the required input voltage to drive dc motor.
- This block represents a constant voltage source supply or can be adjusted to
simulate varying supply conditions
- Amplitude: 230V
3) Ramp :
- Represents a ramp signal that gradually increases or decreases over time .
- This block can be used to simulate load variation changes in voltage to study
transient and steady state behaviours.
Andhra university Department of EEE

- Slope:1
- Start time:0
- Initial output:300
4) Bus selector:
- Extracts specific signals from a bus system.
- In the simulation , the block is used to separate and monitor various outputs from
the dc machine block , such as speed torque and current .
- Elements : speed wm(rad/s), armature current ia(A) ,and electric torque Te(nm)
5) Gain:
- Amplifies or scales signals by a specific factor.
- Used to adjust signal magnitudes such as converting one unit of the measurement
to another or fine – tuning system responses
- Value: 30/pi
6) Voltage and current measurement :
- Measures voltage and current at specified points in the circuit .
- These blocks help in analysing the electrical characteristics of the motor , such as
input voltage and armature current .
7) Display :
- Shows real-time values of specific parameters during simulation .
- This block is helpful for monitoring speed, torque ,and current during the
simulation process .
8) Product :
- Multiplies two or more input signals.
- Used to calculate power in the circuit given .
9) Scope :
- Displays time-domain waveform of the signal .
- In the simulation , it Is used to observe parameters like speed,torque,and current
over time .
10) XY Graphs:
- Plots one variable against another , such as speed vs torque or current vs speed .
- This block helps visualize the motors characteristics , making it easier to analyse
the performances .
11) Powergui:
- Essential for simulation involving power systems.
- Allows the user to configure simulation parameters and solve electrical circuit . its
enables the use of steady state and dynamic modes for the better accuracy.
12) Ground:
- Acts as a zero-potential reference , completing the electrical circuit .
Andhra university Department of EEE

Circuit diagram:

PROCEDURE:
1) Open the MATLAB software .
2) Click on the Simulink icon . choose blank model and provide name to it .
3) Click on library browser and choose all the necessary block and drag them to the
space.
4) Make the connections as shown in the diagram .
5) Provide the necessary value to the block required .
6) Powergui should be present in the circuit designed . It is used for the analysis and
measurement of the parameters like current , voltage.
7) Save the program and run it . Display block will show necessary values and to get
graphical information , click on required scope or XY graph .

Graphs :
Andhra university Department of EEE
Andhra university Department of EEE

PRECAUTIONS:
1) Avoid red dashed lines, i . e, improper connections before running the program.
2) Recheck and make sure all the values have been applied before running the program.

RESULT :
DC - Series motor characteristics is obtained using Simulink.
Andhra University Dept of EE

Rectifiers
[Link]: Date:

AIM: To know working of Half wave Rectifier and Full wave Rectifier.

APPARATUS: Personal computer, MatLab Software.

THEORY:

[Link] Measurement block: The Current measurement block simulink (specifically in the Simscape
Electrical toolbox of MATLAB ) is used to measure the current flowing through a branch of an electrical circuit
in a model.

[Link] Measurement block: The Voltage Measurement block in Simulink (part of the Simscape Electrcal
toolbox) is used to measure the voltage difference between two nodes in an electrical circuit.

[Link] block: The From block in Simulink used to receive signals from a corresponding Goto block,
enabling data transfer between different parts of a model without the need to connect wires [Link] is
particularly useful for simplifying complex models by reducing visual clutter and avoiding long or overlapping
signal lines.

[Link] block: The Goto block in Simulink facilitates signal from one part of your model to another without
direct line connections. This approach helps declutter complex models by reducing the number of signal lines,
Enhancing readability and organization.

[Link] GUI block: The powergui block in Simulink is essential for simulating models that include Simscape
Electrical Specialized Power system components. It serves as the environment block for these models,
managing critical simulation parameters and providing tools for analysis.

[Link] block: The Diode serves as crucial component that converts alternating current (AC) into direct
current (DC).Its primary function is to allow current to pass through only during the positive half cycles of the
AC input, effectively blocking the negative half cycles.

[Link] block: The Scope block is a vital tool for visualizing and analying time-domain signals during
[Link] functions similarly to an oscilloscope, allowing you to monitor how signals evolve over time
within your model.

Matlab and Interfacing


Andhra University Dept of EE
8. AC Voltage Source block: A block that generates alternating Voltage with a described Amplitude (in volts)
and frequency (in Hz).

[Link] Wave Rectifier: A half-wave rectifier converts an AC signal to DC by passing either the negative or
positive half-cycle of the waveform and blocking the other. Half-wave rectifiers can be easily constructed using
only one diode, but are less efficient than full-wave rectifiers.

[Link] Wave Rectifier: We can define bridge rectifiers as a type of full-wave rectifier that uses four or
more diodes in a bridge circuit configuration to efficiently convert alternating (AC) current to a direct (DC)
current.

PROCEDURE:

[Link] On computer and double click on MAT LAB icon, then MATLAB window will be opened.

[Link] on Simulink tool from tool bar or type simulink in command window and press enter. Then Simulink
library browser window will be opened.

[Link] on new model, then new untitled workspace of Simulink window will be opened.

[Link] and drop all required Blocks from Simulink Library.

5. Now Make the connections as per the circuit diagram.

[Link] assign desired parameters to the blocks like amplitude of Source Voltage at 230volts.

[Link] press run button and let program compile.

[Link] the Graphs in the scope.


Circuit Diagram:
a) Half Wave Rectifer:

Matlab and Interfacing


Andhra University Dept of EE

SCOPE
Graph:

b)Bridge Wave Rectifier:

Matlab and Interfacing


Andhra University Dept of EE

Graph:

Result: Hence , Input signal has been Rectified by using Half wave and Bridge wave rectifier in Simulink.

Matlab and Interfacing

You might also like