You are on page 1of 11

Linear Control System Lab Lab 4

Utilizing Simulink for Implementation of Electrical Networks


Differential Equations

Objectives

To explore the use of SIMULINK in the Simulation of Electrical Circuits using Differential
Equation.

List of equipment/Software

1) MATLAB
2) Computer

Procedure

Example 1:- Let us solve simple RC circuit, as shown below, on Simulink. Initial capacitor
voltage Vc(0) = 0.

Figure 4.1: Simple RC Circuit

Solution:

To find current in the circuit write down the differential equation. The equation will be of first
dI
order. (Hint: Find c )
dt

Page | 1
Linear Control System Lab Lab 4

Page | 2
Linear Control System Lab Lab 4
Find out initial current in the circuit. To simulate in Simulink, connect circuit as given below.

Figure 4.2: Simulink Model for differential equation of current

Make the following adjustments in the model in order to get the response as shown in the Figure
4.4.
 Make simulation time 0.005
 Enter initial current value (5e-3) in the initial condition parameter of Integrator block.
 Set gain to -1/RC ( -1/1e-3)
 Press Crtl+E to get configuration parameters and enter 0.0001 at Max. Step size.
Now scope will show following graph.

Figure 4.3: Current in Simple RC Circuit

Now that we have successfully plotted the current in the circuit, let us change our model, as
shown in Figure 4.4, to get the capacitor voltage.
Page | 3
Linear Control System Lab Lab 4

Figure 4.4: Simulink model to get capacitor voltage.

This change has been made owing to the following relation in the current and voltage of the
capacitor.

1
V c= i dt
C∫ c (1)

Simulate the circuit and scope1 will show the following waveform for the capacitor voltage.
Remember to set initial condition of Integrator 1 to zero (Vc=0 at t=0) and gain to 1/C (1/1e-3).

Figure 4.5: Capacitor Voltage

Go to the circuit of figure 4.1 and write differential equation in terms of capacitor voltage. You
should get following differential equation.

Page | 4
Linear Control System Lab Lab 4

Now to simulate in the Simulink connect as given below.

Page | 5
Linear Control System Lab Lab 4

Figure 4.6: Model to get Capacitor Voltage

Remember to make following adjustments.


 Make simulation time 0.005
 Enter initial voltage value (0) in the initial condition parameter of Integrator block.
 Set gain to -1/RC ( -1/1e-3)
 Set gain1 to 1/RC (1/1e-3)
 Press Crtl+E to get configuration parameters and enter 0.0001 at Max. Step size.
The scope waveform will be as below.

Figure 4.7: Capacitor voltage

Obviously, it is same as in figure 4.5. Can you find out capacitor current from this model? No
doubt the following equation will provide some help.

dV c (2)
i c =C
dt
Page | 6
Linear Control System Lab Lab 4
Make the following adjustment in the model of figure 4.6.

Figure 4.8: Refurbished model to get capacitor current.

Scope1 will show the current in the model.

Figure 4.9: Capacitor Current

Do I need to say it is same as we obtained in figure 4.3?

Ans: Yes, the Waveform we got in the figure4.3 is same as we got in 4.9.

Page | 7
Linear Control System Lab Lab 4
Now you should be now able to adjust the model to get current and voltage across resistor of
figure 4.1. This completes our analysis for simple RC circuit.

Exercise 01

Solve the following circuit. You are required to solve both differential equations related to the
circuit. Show that current and voltage obtained by both methods match.

Figure 4.10: Simple RL Circuit

Page | 8
Linear Control System Lab Lab 4

Page | 9
Linear Control System Lab Lab 4

Laboratory Rubrics
Sr. Performance Exemplary Satisfactory Developing Unsatisfactory (0 Marks)
# Indicator (5 Marks) (4-3 Marks) (2-1 Marks)
Individual and Respectful to one another Collaborative effort Need training and Unsupportive attitude
teamwork while providing timely of a group with support to work with no interest towards
1 and helpful feedback and delayed feedback to effectively in a team individual or common
(PLO-09, allow healthy conflict. achieve a common and individually. goal.
Affective goal in a less efficient
Domain) way.

Scale
Data Analyse and interprets Analyse and Analyse and Analyse and interprets
exploration and data correctly and interprets data interprets data incorrect data with wrong
2 analysis precisely, draws correct correctly most of the correctly conclusions.
and useful conclusions time with correct and occasionally with
(PLO-04, by keenly observing useful conclusion. some incorrect
Cognitive theoretical and conclusion.
Domain) experimental results.

Scale
Skill to Quite able to conduct the Able to conduct Able to conduct Unable to conduct
perform test entire experiment with experiment with experiment with a experiment on his own
3 experiment negligible help from the some help from the lot of help from the and lab instructor
(PLO-04, lab instructor. lab instructor. lab instructor. provides help in almost
Psychomotor every step of the
Domain) experiment.

Scale
Table 1: Lab Performance

Sr.# Performance Exemplary Satisfactory Developing Unsatisfactory (0 Marks)


Indicator (5 Marks) (4-3 Marks) (2-1 Marks)
1 Depth of Demonstration of full At ease with content Only basic concepts Clearly no knowledge of
relevant knowledge of the and able to elaborate are demonstrated and subject matter, no
Information subject with and explain to some interpreted. questions are answered,
(PLO-04, explanations and degree. and no interpretation
Cognitive elaboration. made.
Domain)
Scale
Table 2: Viva Voce

Instructor Signature: ___________________________

Page | 10
Linear Control System Lab Lab 4

Page | 11

You might also like