SlideShare a Scribd company logo
Simulation of
Rectifier through
MATLAB &
SIMULINK
by
Mrs.K.S.Pavithra,
Assistant Professor/EEE
Sri Venkateswara college of
engineering(Autonomous)
What is MATLAB & SIMULINK?
MATLAB is an interactive computational
environment for mathematical
calculation as well as to solve
engineering problems through
programming.
SIMULINK an associate of MATLAB which
uses graphical programming approach
to simulate dynamical systems
How to start MATLAB?
Double click on the MATLAB icon. First time MATLAB opens with several windows. Close all windows except
Command window. Yes keep only command window.
Click on layout tab and from the dropdown menu select
Command window only. So you will see only command
Window.
This is the MATLAB command prompt >> where you will enter MATLAB command(s) and press enter key
MATLAB program
>>edit an editor window appears either separately or at the upper part of
command window depending on the version you use.
Press ctrl+S keys. Save as dialog
Appears.In that enter file name
To run the program enter file
name at command prompt and
press enter key to get result
Simulink –A basic introduction
Simulink can be thought of as a graphical programming approach. In Simulink you
use block diagram format to formulate the simulation.
You get the blocks from various Simulink libraries and toolboxes , connect them as
a pattern , set simulation parameters , run the simulation and get the graphical
result
To get Simulink type simulink at command prompt >>simulink [PEK]
Simulink library browser appears. In that click as shown
A model window appears. In that we create your
Simulink simulation.
To connect the blocks click
the outport of first block
drag the mouse with left
mouse button and join at the
Inport of second block. These
two blocks will be connected
by a straight line as shown
To simulate press the run button
.After run double click the
Scope block to view output
Elementary MATLAB & SIMULINK A demonstration
To simulate power electronic circuits we have to use
components in the Simpowersytems library. For this type
>> powerlib at the command prompt
Next we will Simulate a Half wave Rectifier in Simulink using
powerlib components
Simulation of a simple half wave rectifier with simulink
As said earlier first you should know which component is available from which Library. For this simulation we use
the following components.
Component Library Path to get and icon
AC voltage source Electrical sources
Powerlib Electrical sources AC voltage source
Diode Power electronics PowerlibPower electronicsdiode
Voltage
measurement
Measurements PowerlibMeasurementsVoltage measurement
Resistance-series
RLC branch
Scope
Elements
sinks
PowerlibElementsseries RLC branch in that choose only R
Elementary MATLAB & SIMULINK A demonstration
Elementary MATLAB & SIMULINK A demonstration
Elementary MATLAB & SIMULINK A demonstration
After connection
Set the time to 0.1
After that press the simulation
Button to start simulation
Press Ctrl+S buttons and save
After simulation double click on
scope block. Click the sixth button
from left to get the proper output
In latest version this may differ little
bit which I have shown next
You can drag at the corner to
Increase the size of scope
Right click and choose
or
GENERAL PLOT COMMANDS
• Plot(x,y) x – x variable as a row vector y- y variable as a row vector
• xlabel(‘ label name’) x- axis name with the name within single quote
• ylabel(‘ label name’) y- axis name with the name within single quote
• title(‘ title name’) – Graph title with the title within single quote
• axis([xmin xmax ymin ymax]) – To define x and y axis limits
• legend(‘graph1’,’graph 2’,’graph 3’) – to show legend on multiple graphs
• gtext(‘ curve name’) – To indicate curves through mouse click
• grid – To add grid lines to the graph
Subplots
In one big graph you
show
Small graphs
The syntax is
subplot(m,n,r)
m= number of rows
n=number of columns
r= picture number
counted from
Top to bottom with
scanning from left to
right in Z manner
The subplot is followed
by usual plot commands
Your Simulink model and the driving program should reside in the same folder which is your current working folder
1. First create a Simulink model and save by a suitable name
2. Next drag and drop a subsystem block form port & subsystems library
3. Double click on the scope block and click on second icon
4. Scope parameters dialog appears. In that click the History tab. Remove the top tick mark and put the tick mark in the
second.
5. Give a suitable name to variable here We have given as x and for format choose as Array
6. Click Apply and then OK button
Create the following MATLAB program to run simulation and get graph
% Simulation of damped sinusoidal oscillator
%
% File name :dsoscs.m
%
sim('dsosc'); % This is the Simulink simulation command with the Simulink file name
%
plot(x(:,1),x(:,2)),xlabel('t(s)'),ylabel('x(t)=5.e^{-0.2t}.sin(omegat-pi/2)')
title('Damped Signal Generator'),grid
Save the file as dsoscs . The first column of x is time while second column is actual values
That’s all my dear
Folks! Thank you for your
patient Listening.
Practice! Practice! Practice!

More Related Content

PPT
Simulink Presentation.ppt
PDF
Using matlab simulink
PDF
Using matlab simulink
PDF
Simulink
PDF
Magazine awr-ims-3
PPTX
Summer training matlab
PDF
Summer training matlab
Simulink Presentation.ppt
Using matlab simulink
Using matlab simulink
Simulink
Magazine awr-ims-3
Summer training matlab
Summer training matlab

Similar to Elementary MATLAB & SIMULINK A demonstration (20)

DOCX
Mmc manual
PPT
Simulink
PDF
DOCX
KEVIN MERCHANT DOCUMENT
DOCX
Kevin merchantss
PDF
ADVANCED WORKSHOP IN MATLAB
PDF
sol43.pdf
PPT
Project_PPT_Presentation.ppt
DOCX
PPT
matlabchapter1.ppt
PDF
EE6711 Power System Simulation Lab manual
PDF
Addison Wesley - Modern Control Systems Analysis and Design Using Matlab, Bis...
DOCX
Pengenalan Simulink
DOCX
simulink
DOCX
MATLAB BASICS
PPTX
Matlab simulink introduction
PPTX
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
PPTX
matlab basics and Simulink for beginners
PDF
MATLAB Linear Algebra 1st Edition Cesar Lopez
PPT
Control chap9
Mmc manual
Simulink
KEVIN MERCHANT DOCUMENT
Kevin merchantss
ADVANCED WORKSHOP IN MATLAB
sol43.pdf
Project_PPT_Presentation.ppt
matlabchapter1.ppt
EE6711 Power System Simulation Lab manual
Addison Wesley - Modern Control Systems Analysis and Design Using Matlab, Bis...
Pengenalan Simulink
simulink
MATLAB BASICS
Matlab simulink introduction
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
matlab basics and Simulink for beginners
MATLAB Linear Algebra 1st Edition Cesar Lopez
Control chap9
Ad

Recently uploaded (20)

PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
Soil Improvement Techniques Note - Rabbi
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
Module 8- Technological and Communication Skills.pptx
PPTX
Artificial Intelligence
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
Feature types and data preprocessing steps
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPT
Occupational Health and Safety Management System
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
Categorization of Factors Affecting Classification Algorithms Selection
Automation-in-Manufacturing-Chapter-Introduction.pdf
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Soil Improvement Techniques Note - Rabbi
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Module 8- Technological and Communication Skills.pptx
Artificial Intelligence
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Fundamentals of safety and accident prevention -final (1).pptx
Feature types and data preprocessing steps
Visual Aids for Exploratory Data Analysis.pdf
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Exploratory_Data_Analysis_Fundamentals.pdf
Occupational Health and Safety Management System
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Abrasive, erosive and cavitation wear.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Categorization of Factors Affecting Classification Algorithms Selection
Ad

Elementary MATLAB & SIMULINK A demonstration

  • 1. Simulation of Rectifier through MATLAB & SIMULINK by Mrs.K.S.Pavithra, Assistant Professor/EEE Sri Venkateswara college of engineering(Autonomous)
  • 2. What is MATLAB & SIMULINK? MATLAB is an interactive computational environment for mathematical calculation as well as to solve engineering problems through programming. SIMULINK an associate of MATLAB which uses graphical programming approach to simulate dynamical systems
  • 3. How to start MATLAB? Double click on the MATLAB icon. First time MATLAB opens with several windows. Close all windows except Command window. Yes keep only command window.
  • 4. Click on layout tab and from the dropdown menu select Command window only. So you will see only command Window. This is the MATLAB command prompt >> where you will enter MATLAB command(s) and press enter key
  • 5. MATLAB program >>edit an editor window appears either separately or at the upper part of command window depending on the version you use. Press ctrl+S keys. Save as dialog Appears.In that enter file name To run the program enter file name at command prompt and press enter key to get result
  • 6. Simulink –A basic introduction Simulink can be thought of as a graphical programming approach. In Simulink you use block diagram format to formulate the simulation. You get the blocks from various Simulink libraries and toolboxes , connect them as a pattern , set simulation parameters , run the simulation and get the graphical result To get Simulink type simulink at command prompt >>simulink [PEK] Simulink library browser appears. In that click as shown A model window appears. In that we create your Simulink simulation.
  • 7. To connect the blocks click the outport of first block drag the mouse with left mouse button and join at the Inport of second block. These two blocks will be connected by a straight line as shown To simulate press the run button .After run double click the Scope block to view output
  • 9. To simulate power electronic circuits we have to use components in the Simpowersytems library. For this type >> powerlib at the command prompt Next we will Simulate a Half wave Rectifier in Simulink using powerlib components
  • 10. Simulation of a simple half wave rectifier with simulink As said earlier first you should know which component is available from which Library. For this simulation we use the following components. Component Library Path to get and icon AC voltage source Electrical sources Powerlib Electrical sources AC voltage source Diode Power electronics PowerlibPower electronicsdiode Voltage measurement Measurements PowerlibMeasurementsVoltage measurement Resistance-series RLC branch Scope Elements sinks PowerlibElementsseries RLC branch in that choose only R
  • 14. After connection Set the time to 0.1 After that press the simulation Button to start simulation Press Ctrl+S buttons and save After simulation double click on scope block. Click the sixth button from left to get the proper output In latest version this may differ little bit which I have shown next You can drag at the corner to Increase the size of scope
  • 15. Right click and choose or
  • 16. GENERAL PLOT COMMANDS • Plot(x,y) x – x variable as a row vector y- y variable as a row vector • xlabel(‘ label name’) x- axis name with the name within single quote • ylabel(‘ label name’) y- axis name with the name within single quote • title(‘ title name’) – Graph title with the title within single quote • axis([xmin xmax ymin ymax]) – To define x and y axis limits • legend(‘graph1’,’graph 2’,’graph 3’) – to show legend on multiple graphs • gtext(‘ curve name’) – To indicate curves through mouse click • grid – To add grid lines to the graph
  • 17. Subplots In one big graph you show Small graphs The syntax is subplot(m,n,r) m= number of rows n=number of columns r= picture number counted from Top to bottom with scanning from left to right in Z manner The subplot is followed by usual plot commands
  • 18. Your Simulink model and the driving program should reside in the same folder which is your current working folder 1. First create a Simulink model and save by a suitable name 2. Next drag and drop a subsystem block form port & subsystems library 3. Double click on the scope block and click on second icon 4. Scope parameters dialog appears. In that click the History tab. Remove the top tick mark and put the tick mark in the second. 5. Give a suitable name to variable here We have given as x and for format choose as Array 6. Click Apply and then OK button
  • 19. Create the following MATLAB program to run simulation and get graph % Simulation of damped sinusoidal oscillator % % File name :dsoscs.m % sim('dsosc'); % This is the Simulink simulation command with the Simulink file name % plot(x(:,1),x(:,2)),xlabel('t(s)'),ylabel('x(t)=5.e^{-0.2t}.sin(omegat-pi/2)') title('Damped Signal Generator'),grid Save the file as dsoscs . The first column of x is time while second column is actual values
  • 20. That’s all my dear Folks! Thank you for your patient Listening. Practice! Practice! Practice!