MATLAB AND INTERFACING LAB
MATLAB AND INTERFACING LAB
[Link]: DATE:
—-----------------------------------------------------------------------------------------------------------------------------
AIM: Introduction to MATLAB.
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:
% Inverse of a Matrix
H = [1 2:3 4]
I = inv (H)
% Graph Plot
a = [ 0 : 0.5 : 5 ];
b = 2*a^2 + 3a - 5;
% Complex numbers.
Z = 2* Sqrt (2) *exp((pi/4)*j)
% Complex Matrices
W = [ 1+j1 2-2j ]
[ 3+2j 4+3j ]
GRAPHS:
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
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.
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.
RESULT:
Ex no : Date:
-------------------------------------------------------------------------------------------------------------------------------------
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
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
[Link] Date:
—-----------------------------------------------------------------------------------------------------------------------------
AIM: To verify Reciprocity Theorem using Matlab.
CIRCUIT DIAGRAM:
THEORETICAL CALCULATIONS:
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.
4. If statement:
if expression
Matlab and Interfacing
Andhra University Dept of EE
statements
else
statements
end
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;
%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)
%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.
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
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.
2
MAT LAB Interfacing
Andhra University Dept of EE
RESULT:
3
MAT LAB Interfacing
Andhra University Dept of EEE
SYNTAXES:
THEORETICAL CALCULATION:
𝑅3
𝑉th = 𝑉𝑠 ⋅ 𝑅
1 +𝑅3
110 110
𝑉th = 230(230+110) = 230(340) = 74.41 V
230(110) 25300
𝑅th = 110 + = 110 + = 110 + 74.41 = 184.41 Ω
230 + 110 340
74.41 74.41
𝐼load = 184.41+29 = 213.41 = 0.3487 A
𝑉load = 𝐼load ⋅ 𝑅𝐿
Total Resistance(𝑹total ):
𝑅 𝑅
𝑅total = 𝑅3 + (𝑅 1⋅+𝑅2 ) + 𝑅𝐿
1 2
230×110
𝑅total = 110 + (230+110) + 29 = 110 + 74.41 + 29 = 213.41 Ω
𝑉load_original = 𝐼total ⋅ 𝑅𝐿
𝑉load_original = 1.078 × 29 = 31.26 V
MATLAB SCRIPT:
clc;
clear all;
% Given data
% Remove the source and find the equivalent resistance seen from load
% Step 3: Calculate the load current and voltage using Thevenin's equivalent
circuit
% Additional outputs
I_total = Vs / R_total;
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
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
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);
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
Theory:
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;
plot(Rl,P_load,'k','LineWidth',2);
xlabel('Load Resistance(ohms)');
ylabel('Power delivered to load(watts)');
grid on;
%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);
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
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:
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.
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
- 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:
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")
clc;
IL=[0.1161 ];
Andhra University Dept of EE
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
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:
- 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.
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.
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:
MATLAB CODE:
● For no load condition plot between emf measurement - field current(V vs If):
clc;
clear all;
● 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:
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.
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.
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.
[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] assign desired parameters to the blocks like amplitude of Source Voltage at 230volts.
SCOPE
Graph:
Graph:
Result: Hence , Input signal has been Rectified by using Half wave and Bridge wave rectifier in Simulink.