TRANSIENT RESPONSE OF THE ELECTRICAL CIRUITS USING MATLAB
TRANSIENT RESPONSE OF THE ELECTRICAL CIRUITS USING MATLAB SIMULATION PREPARED BY, MR. A. VENKADESAN ASST PROF, DEPARTMENT OF EEE FACULTY OF ENGINEERING AND TECHNOLOGY SRM UNIVERSITY
OBJECTIVE To obtain the transient response of the given RL circuit using MATLAB simulation.
Procedure Open the MATLAB Then the window will be displayed as shown.
Procedure Go to file, then click the “model” as shown.
Procedure Then model window will be displayed as shown. The default name for this model window is “untitled”.
Procedure Open file in the model window, then save the model file using any name, say “RL” (user defined name)
Procedure After saving, the name untitled is now changed to “RL”
Components Required The components required to obtain the transient response of RL circuit in MATLAB are, Resistance Inductance DC Voltage Source Ground
Components Required Voltage measurement block (ammeter) To measure voltage Current measurement block (voltmeter) To measure current Scope To see the waveforms Breaker To act as a switch
Steps to take components To pick out the required components, click the “Library Browser”.
Steps to take components Then library browser window opens as shown.
Steps to take components To pick R, L and breaker go to “simpowersystems”. Then click “elements” Then click and drag “RLC series branch” Click and drag “breaker” to the model file which you have already created.
Steps to take components To pick dc source voltage, go to “simpowersystems”. Then click “electrical source” Then click and drag “DC voltage source” to the model file which you have already created.
Steps to take components To pick ground, go to “simpowersystems”. Then click “elements” Then click and drag “ground” to the model file which you have already created.
Steps to take components To pick voltage and current measurement block, go to “simpowersystems”. Then, click “measurement” Then click and drag “voltage and current measurement block” to the model file which you have already created.
Steps to take components Then to run file and make breaker to act as the ideal switch, the powergui block should be placed. To pick powergui block, Click simpowersystems, then click and drag powergui into the model file.
Steps to take components To pick scope, go to “simulink”. Then click “commonly used blocks” Then click and drag “scope” to the model file which you have already created.
Steps to take components After placing all the components on the model, the model file will look as shown.
To model R and L and Value Settings To model R and L, the common RLC series branch is used. To model R alone, double click on the RLC series branch. A window will open as shown Then select R as shown and value can be set say 30 ohm.
To model R and L and Value Settings Another copy of RLC branch is made and that can be modeled as L. The value can be set say 15 H.
To model R and L and Value Settings After doing this the window will look as shown. R and L are shown.
Procedure to rotate component Then place the inductor vertically. To do this, the command is “ctrl r”
Value Setting of DC Voltage Source To set the value of dc source, open it by double clicking and set the value say 60 V.
Procedure to Connect components Then make the series RL circuit by connecting all the components as shown. The connection can be done just by connecting ends of the components. The sample is shown.
Procedure to Connect components Similarly components connected. all the are
Settings of Powergui block Then set the settings of the powergui block to make the breaker to act as the ideal switch. To do this, double click the powergui block. A window will open as shown.
Settings of Powergui block Then click configure parameters A window will open as shown
Settings of Powergui block Then select “enable use of ideal switching device”. Another window opens as shown.
Settings of Powergui block Then select disable snubbers in switching devices and disable on resistance in switching devices.
Settings of Powergui block The powergui name is changed as shown.
Settings of breaker Open breaker by double clicking. A window shown. appears as
Settings of breaker Disable external switching and click apply. A window will appear as shown. Then the window shows the switching time of the breaker.
Settings of breaker Once the external switching time is disabled. The symbol for circuit breaker gets changed as shown.
Settings of breaker The breaker time is user defined. If one wishes to on the switch at 0 sec, then set the values to 0 after deleting the default switching time. After doing this, the window appears as shown.
Simulation settings Before start simulation, the simulation settings are done. To do this, click “simulation” in the model file and click configure parameters as shown.
Simulation settings When the configure parameters is clicked. A window appears as shown. Then set the initial step size as 0. 0001 Then select the solver as “ode 23 tb”
Scope Setting Open the scope by double clicking it. Then click parameters as shown. A window opens as shown. Disable “limit data points to last”.
Simulation simulation time is user defined. Set the simulation time. The default time 10 sec can be changed or it can be retained.
Simulation Click Start simulation icon which is triangular in shape as indicated in red color.
Procedure to see Waveforms The voltage drop across the resistance and inductance can be seen by opening the scope connected to the corresponding voltage measurement block. The current in the circuit can be seen by opening the scope connected to current measurement block.
Procedure to see result After opening the scope, click “auto scale”. The sample current curve is shown.
Voltage Across the Resistance
Voltage Across the Inductance
Steady state values The steady state current and voltages can be obtained using “display” as shown. To pick display, select library browser. Then select simulink. Then select sinks. Then click and drag the display. Connect display to the circuit. Then simulate again.
Display Showing the Steady State final values
Comparison between the Calculated Value and Simulated Value Current (A) Voltage Across the Time Taken for resistance Inductance RL circuit to reach (V) approximately steady state value (sec) Calculated Simulated 2 2 60 60 0 1. 1× 10 -7 2. 5
Conclusions From results obtained, it is clearly understood that the simulated values are exactly matching with the calculated value. Thus MATLAB is effectively used to study the transient response of the electrical circuits. The same procedure can be extended to study the response of RC and other electrical circuits.
Precaution Every time, save the model file.
Thank You
- Slides: 49