0% found this document useful (0 votes)
241 views

Matlab Getting Started

Start Matlab and click on Simulink to start. Select File->New to bring up a new.mdl file. Double click on powergui and change Configure parameters->Simulation type from Continuous to Descrete. Set peak amplitude to 5mA and frequency to 1kHz. Add capacitor, inductor and resistor. Click on SimPowerSystems->Elements and add series RLC branch.

Uploaded by

Shishir Shekhar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
241 views

Matlab Getting Started

Start Matlab and click on Simulink to start. Select File->New to bring up a new.mdl file. Double click on powergui and change Configure parameters->Simulation type from Continuous to Descrete. Set peak amplitude to 5mA and frequency to 1kHz. Add capacitor, inductor and resistor. Click on SimPowerSystems->Elements and add series RLC branch.

Uploaded by

Shishir Shekhar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Matlab/Simulink SimPowerSystem toolbox Setup

EECE5698 Energy harvesting

Start Matlab and click on Simulink to start. Simulink

Fig.1 Simulink

Powergui
Start Simulink and select File->New to bring up a new .mdl file.

Fig.2 Simulink Environment


Click on SimPowerSystem library, add powergui to untitled.mdl.

Fig.3 untitled.mdl

Double click on powergui and change Configure parameters->Simulation type from Continuous to
Descrete.

Fig.4 powergui configuration

Add Electrical Sources


Add AC current source in Electrical Source to untitled.mdl (Fig.5 and Fig.6).

Fig.5 AC current source

Fig.6 Add AC current source to .mdl file

Double click on AC Current Source, set peak amplitude to 5mA and Frequency to 1kHz (Fig. 7).
Fig.7 AC current source parameter

Add capacitor, inductor and resistor


Click on SimPowerSystems->Elements and add Series RLC Branch to the .mdl file. Double click on it.

Fig.8 series RLC branch


Fig.9 Add branch to the .mdl file

Change Branch type to C and connect it to AC Current Source (Fig.10 and Fig.11). Similarly, add Resistor
and Inductors to the diagram (Fig. 12 and Fig. 13).

Fig. 10 Capacitor configuration


Fig.11 Connect current source to the capacitor

Fig.12 Inductor parameter


Fig.13 Resistor parameter

Add MOSFET and Diode

Select SimPowerSystem->Power Electronics, add Diode and Mosfet to the diagram. Set Diode Forward
Voltage to 0.4V and snubber capacitance to inf(Fig.15).Because the MOSFET in the topology is
unidirectional, set Mosfet Internal diode forward voltage to 20V(or even larger as you like) and the
snubber capacitance to inf (Fig.16)

Fig.14 MOSFET and Diode


Fig.15 Diode parameter

Fig.15 Mosfet Parameter


Add Pulse
Click on Simulink->Source and select Pulse Generator. Set the Period to 1e-3sec (Piezoelectric frequency
is 1kHz, thus the period is 1e-3). Pulse Width is calculated according to the resonant frequency (Pulse
Width=pi*sqrt(L*C)).

Fig. 16 Pulse generator

Fig.17 Pulse generator parameter


Add measurements
Click on SimPowerSystem->Measurements, current and voltage measurements can be added to the
diagram.

Fig.18 Current and Voltage measurement

In order to get the plot, a scope should also be connected to the measurements. Click on Simulink-
>Sinks, add Scope to the diagram.

Fig.19 Scope
Connect Scope to the current and voltage measurements.

Fig.20 Connect Scope to Current and Voltage source

Click on SimPowerSystem->Extra Library->Measurements, select RMS. Connect it to Current and Voltage


measurements (Fig.)

Fig.21 RMS
Fig.22 Connect RMS to the current and voltage source

Simulation Click here to run the simulation

Fig.23 Run the simulation

Double click on Scope to see the simulation result.

Fig.24 Simulation result

You might also like