35
Electric Circuit Analysis using Simulink Bikramjit Goswami Department of EEE Assam Don Bosco University

Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Electric Circuit Analysis using

Simulink

Bikramjit Goswami

Department of EEE

Assam Don Bosco University

Page 2: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

To start with

Simulate the simple DC circuit shown below in Simulink

and calculate the voltage, current & power in it.

100 V10 Ω

3/22/2018 2STC on MATLAB for EE

Page 3: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Steps

1) Find the required components- (i) DC Voltage

Source and (ii) Resistance.

2) Go to Simulink Library.

3) Choose SimPowerSystems in Simulink library.3) Choose SimPowerSystems in Simulink library.

4) Choose Electrical Sources in SimPowerSystems.

5) Choose DC Voltage Source and bring it to the

Simulink Workspace.

6) Change the voltage to 100 V if required.

3/22/2018 STC on MATLAB for EE 3

Page 4: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 4

Page 5: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 5

Page 6: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 6

Page 7: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Steps

7) Choose Elements in SimPowerSystems.

8) Choose Series RLC branch from Elements.

9) Double click on the RLC branch and change the

block parameter to R.block parameter to R.

10)Give it a value of 10 ohms.

3/22/2018 STC on MATLAB for EE 7

Page 8: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 8

Page 9: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 9

Page 10: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 10

Page 11: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Measure the current and voltage

1) Simulink library browser SimPowerSystems Measurements Current Measurement block.

2) Connect it in series in the circuit.2) Connect it in series in the circuit.

3) Simulink library browser SimPowerSystems Measurements Voltage Measurement block.

4) Connect it in parallel to the resistance in the circuit.

3/22/2018 STC on MATLAB for EE 11

Page 12: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 12

Page 13: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Viewing the results

1) Simulink Commonly used blocks Scope

2) Scope Parameters No. of axes 2

3) Connect the inputs to Current & Voltage

measurement block outputsmeasurement block outputs

3/22/2018 STC on MATLAB for EE 13

Page 14: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 14

Page 15: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 15

Page 16: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Bring powergui block to the workspace

3/22/2018 STC on MATLAB for EE 16

Page 17: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Steps for observing the output

Run the simulink model

Double click on the Scope

Observe the graphs

Use Autoscale option if required

3/22/2018 STC on MATLAB for EE 17

Page 18: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 18

Page 19: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Measure the Power

1) P=VI

2) Simulink Math Operations Product

3) Connect the inputs to Current & Voltage

measurement block outputsmeasurement block outputs

3/22/2018 STC on MATLAB for EE 19

Page 20: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 20

Page 21: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 21

Voltage, Current and Power Outputs

Page 22: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Use Display block to observe the

values of V, I and P

3/22/2018 STC on MATLAB for EE 22

Page 23: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Simulation of the same circuit using

another method in Simulink

3/22/2018 STC on MATLAB for EE 23

100 V10 Ω

Page 24: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Corresponding equations of the circuit

R

VI

IRV

=

=

3/22/2018 STC on MATLAB for EE 24

RIR

VP

RI

22

==

=

Page 25: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Steps

Simulink Commonly used blocks

Constant Change the value of the block to

100 by double clicking (Corresponding to 100

V of the source)V of the source)

Bring Fcn block from Simulink library

Double click Change the function to u/10

(Corresponding to V/R, as R= 10 Ω)

3/22/2018 STC on MATLAB for EE 25

Page 26: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 26

Page 27: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Scope connected to the output of the

Fcn block will show the current

3/22/2018 STC on MATLAB for EE 27

Page 28: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 28

Page 29: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

For measurement of Power

Use another Fcn block.

Change its expression to (u*u/10), corresponding to

V2/R).V2/R).

Connect its input to Constant voltage block output.

Connect its output to a display.

3/22/2018 STC on MATLAB for EE 29

Page 30: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 30

Page 31: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Simulation of R-L Series Circuit

Hands-on:

Please follow the steps as shown on the screen.

3/22/2018 STC on MATLAB for EE 31

Page 32: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 32

Page 33: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

3/22/2018 STC on MATLAB for EE 33

Page 34: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

Questions please ?????

3/22/2018 STC on MATLAB for EE 34

Page 35: Electric Circuit Analysis using Simulink · 2) Connect it in series in the circuit. 3) Simulinklibrary browser SimPowerSystems Measurements Voltage Measurement block. 4) Connect it

End of Day-2 Session-2

Thank YouThank You

3/22/2018 STC on MATLAB for EE 35