Sunteți pe pagina 1din 6

Control Systems "1" Control Lab Manual

Dr. Ahmed Issa Eng. Ali Tubail

Lab "1 - Part B": Modelling Electrical


Systems

Introduction:
 The purpose of this lab is to learn how to model the electrical systems and how to express
the mathematical model by viewing the graphical representation of the system.

Objectives:
 Learn about Simulink and Simscape Library
 Learn how to model al electrical system.

Getting started:
 When you start MATLAB, the desktop appears in its default layout.
 Type Simulink on Matlab command window.

 Search in the library for Simscape.


 Finally, drag the required component to the model form.
Building a Model:
 Example: Parallel RLC circuit:

 The following steps will guide you to construct a system/model:


1. STEP 1: Select and place the Resistor, Inductor, Capacitor and Electrical
Reference elements from the Simscape>Foundation Library>Electrical>Electrical
Elements library.
2. STEP 2: Select and place the DC Current Source element from the
Simscape>Foundation Library>Electrical>Electrical Sources library.
3. STEP 3: Select and place the Voltage Sensor element from the
Simscape>Foundation Library>Electrical>Electrical Sensors library.
4. STEP 4: Connect the elements as shown below:

5. STEP 5: Select and place the PS-Simulink Converter from the Simscape>Utilities library.

 Note: PS-Simulink Converter converts the physical signal (PS) to a unit-less Simulink output
signal. Connect its input to the outer output port of the voltage sensor. This is the V port, where
V stands for “Voltage”.

6. STEP 6: Select and place the Scope block from the Simulink>Sinks library. The diagram
should now look like the one below.
7. STEP 7: Select and place the Solver Configuration block from the Simscape>Utilities
library. Connect it as shown in the figure below. The model is now complete except for
the parameter values.

 Note: The Solver Configuration block defines the solver settings for this Simscape physical network.
The Simulink solver for the entire model must be set separately. For this example, do not change
any of the parameters in this block (all three boxes should be unchecked).

 A Note About Solvers: The default solver is ode 45. It is strongly recommended that you change the
solver to a stiff solver (ode15s, ode23t, or ode14x). Do this by selecting “Configuration Parameters”
from the Simulation menu, selecting the solver pane from the list on the left, and changing the
“Solver” parameter to ode15s. Then click OK.
 Now let’s simulate the model. By double-clicking on the appropriate block, enter the following
values for the resistance, inductance, capacitor and current: R = 10, 𝐿 = 1, C=0.01 and i=2 (the units
are ohms, henrys, farad and ampere, respectively, which are the default units used in these property
boxes).
 Set the simulation time to 0.2 and run the model. You should see a plot like that shown in the scope
below.
Lab Work:

- Simulate and derive the Transfer Function for the following RC Circuit

Homework:

- Simulate and derive the Transfer Function for the RL Circuit.


- Draw output signal 𝐼(𝑠) Vs. input signal 𝑣(𝑠) on scope.
Let Voltage source = 1 volt, R = 2 Ohms, L = 1 Henry
𝐼(𝑠)
Hint: 𝐺(𝑠) = 𝑣(𝑠)

S-ar putea să vă placă și