MATLAB/Simulink Power Systems Analysis Lab

Telechargé par leonscovisch
POWER SYSTEMS ANALYSIS AND CONTROL (ER66) A. GAILLARD
UTBM Pôle Energie & Informatique FISE Énergie et Génie Électrique 1
TP 1 : INITIATION TO MATLAB / SIMULINK - SPECIALIZED POWER
SYSTEMS
1. OBJECTIVES
- Get familiar with Matlab/Simulink and the Simscape / Specialized Power Systems
library.
- Study and model the exchange of active and reactive power between two voltage
sources using Matlab.
- Study, model, and simulate a three-phase installation with linear loads using Simulink
and the Simscape / Specialized Power Systems library.
- Analyze the results obtained and compare them with theoretical calculations.
2. INITIATION TO MATLAB/SIMULINK - SPECIALIZED POWER SYSTEMS
Simscape and Specialized Power Systems provides component libraries and analysis
tools for modeling and simulating electrotechnical and power electronics systems. The libraries
include models of three-phase machines, electrical controls, and application-specific
components such as Flexible AC Transmission Systems (FACTS) and renewable energy
systems. Harmonic analysis, total harmonic distortion (THD) calculation, load flow analysis,
and other key analyses of electric power systems are automated.
Specialized Power Systems models can be used to develop control systems and test
system-level performance. You can parameterize your models using Matlab variables and
expressions, and design control systems for your electrical system within the Simulink
environment. You can add mechanical, hydraulic, pneumatic, and other components to the
model using Simscape, then test the entire system within a unified simulation environment. To
deploy models in other simulation environments, including Hardware-In-the-Loop (HIL)
systems, Specialized Power Systems supports C code generation.
Specialized Power Systems was developed in collaboration with Hydro-Québec,
Montréal. (https://fr.mathworks.com/products/simscape-electrical.html).
2.1. Getting started with Matlab
2.1.1. Preparing the Workspace in Matlab/Simulink
1) Launch the Matlab R2023a software.
2) Identify the different areas: Current Folder, Command Window, Workspace, and
Command History.
3) Create a new folder for in the path: U:\ER66-Name.
POWER SYSTEMS ANALYSIS AND CONTROL (ER66) A. GAILLARD
UTBM Pôle Energie & Informatique FISE Énergie et Génie Électrique 2
Then, inside your working folder, create another folder corresponding to each lab session:
U:\ER66-Name\TPx.
To prepare the workspace, run the following commands:
>> clear
>> clc
Warning: The folder ER66-Name will be your personal working directory for the ER66 course
throughout the semester.
Important: Do not use spaces, accents, or special characters in the folder structure or
filenames related to Matlab/Simulink.
2.1.2. Creating Matlab Scripts and Reviewing Useful Functions
This case study was covered in the documents (Chapter 0: basics in electrical engineering) on
electrotechnical fundamentals available on Moodle, in the Lectures and Exercises sections.
In this part, you will create a Matlab script to graphically represent the evolution of active and
reactive powers between two sources connected in parallel to an electrical network (Figure 1),
as a function of the variation of one parameter of either source (phase or amplitude of source 1
or 2).
V1
I12 Z = R+jX
V2
Figure 1
Case study :
Two ideal single-phase voltage sources
  and   are
interconnected through a line with an impedance of    as shown in Figure 1.
Preliminary calculations :
1) Determine analytical expressions of the complex apparent power of each source and identify
which one supplies or absorbs active or reactive power.
Determine analytical expressions of the active and reactive losses in the line.
POWER SYSTEMS ANALYSIS AND CONTROL (ER66) A. GAILLARD
UTBM Pôle Energie & Informatique FISE Énergie et Génie Électrique 3
Matlab Scripts : An incomplete script will be provided by the instructor.
1) Create a first Matlab script to graphically visualize the exchange of active and reactive
powers between the two sources, knowing that the phase angle of source 1 varies by ±30°
around its initial value in 5° increments. The RMS voltages of both sources, as well as the
phase angle of source 2, remain constant. Once executed, the script must calculate the
different complex powers, display in the Matlab Command Window a results table of the
active and reactive powers as a function of the phase angle of source 1, plot two figures
showing the variation of active power, on the one hand, and reactive power, on the other
hand, as a function of the phase angle of source 1.
2) Create a second Matlab script, but this time by varying the RMS voltage of source 1 from
75% to 100% of its initial value, in 1 V increments. The RMS voltage of source 2 and the
phase angles of both sources remain constant. Once executed, the script must calculate the
different complex powers, display in the Matlab Command Window a results table of the
active and reactive powers as a function of the RMS voltage of source 1, plot two figures
showing the variation of active power, on the one hand, and reactive power, on the other
hand, as a function of the RMS voltage of source 1.
3) Comment on and analyze in detail the results displayed for both scripts.
2.2. Initiation to Matlab/Simulink - Specialized Power Systems
2.2.1. Introduction to Specialized Power Systems
Before starting the introduction to Specialized Power Systems and to have a clean workspace
in Matlab, type the commands clear and clc in the Matlab Command Window.
Next, click on the Simulink button in the Home tab of Matlab (Figure 2).
Figure 2
A Simulink page will open. Click on Simscape Electrical, and then on Specialized Power
Systems (Figure 3).
POWER SYSTEMS ANALYSIS AND CONTROL (ER66) A. GAILLARD
UTBM Pôle Energie & Informatique FISE Énergie et Génie Électrique 4
Figure 3
Click on the Specialized Power Systems tab, then on Create Model. A file will open in the
Simulink environment with a few default blocks. Carefully read the instructions provided in the
Simscape Specialized Power Systems Resources block and click on the links to explore all the
features offered by this library (Figure 4).
Figure 4
POWER SYSTEMS ANALYSIS AND CONTROL (ER66) A. GAILLARD
UTBM Pôle Energie & Informatique FISE Énergie et Génie Électrique 5
In the left-hand column (Figure 4), under Specialized Power Systems, carefully explore the
different subcategories to familiarize yourself with the available components, devices, and
models. Take the time to go into the Simulation and Analysis subcategory and read the
different sections in detail by clicking on the provided links.
2.2.2. Examples in Specialized Power Systems
The Specialized Power Systems library contains many interesting examples to explore before
creating your own models.
Go back to the page shown in Figure 4. Click on the Examples tab, then on Specialized Power
Systems. Under the Electrical Sources and Elements section, you will work on and analyze the
three example models in the following simulations. Feel free to examine all parameters,
especially those related to the simulation (in Model Configuration Parameters) and the features
provided by the powergui block.
The tutorial-style examples to complete are listed below:
- Switching an Inductive Circuit Using a Breaker With no Snubber
- Steady-State Analysis of a Linear Circuit
- Transient Analysis of a Linear Circuit
Feel free to examine all the parameters, especially those related to the simulation in Simulation
/ Model Configuration Parameters (Solver, Simulation Time, Max Step Size, etc.) and the
features offered by the powergui block (FFT, Steady State, etc.).
3. SIMULATIONS TO DO IN MATLAB/SIMULINK - SPECIALIZED POWER SYSTEMS
All components used for your simulations in your lab sessions/projects should be taken from
the Simulink and Simscape/Electrical/Specialized Power Systems libraries, as shown in Figure
5.
1 / 7 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans l'interface ou les textes ? Ou savez-vous comment améliorer l'interface utilisateur de StudyLib ? N'hésitez pas à envoyer vos suggestions. C'est très important pour nous!