[Simulink] Introduction to simulink simulation environment and power system module (PSB)

Table of contents

1.simulink overview

2. Basic use of simulink

3. Power system module


1.simulink overview

      Simulink is an important part of MATLAB, it has relatively independent functions and usage methods. The main function of simulink is to realize the simulation and analysis of dynamic system modeling. Mathworks began to apply simulink from version 4.0 of matlab, and put it in the matlab execution file at that time. In matlab4.2 and later versions, simulink appears separately as a toolkit in matlab, that is, it needs to be installed separately. In version 5.0 of matlab, Simulink has been upgraded to version 2.0, and in version 5.3 of matlab, Simulink has been upgraded to version 3.0. Currently, simulink has been greatly improved over previous versions.
        The file type for Simulink is .mdl. Simulink supports continuous and discrete systems, as well as linear and nonlinear systems. Simulink includes some control toolboxes, such as control system toolbox, fuzzy logic toolbox, nonlinear control design module and so on. Users can also create and customize their own functional modules, instead of only using the standard modules provided by the simulink system software. In this way, users can expand the scope of use of the software by themselves.
          Simulink provides users with a graphical window for system modeling with a block diagram. According to the specific composition of the control system in the actual project, the user only needs to use the click-drag function of the mouse to copy various standard links provided in the module library to the graphical window. In the window, use the Simulink connection method to connect into a complete simulink dynamic structure diagram, and each link can be changed or set its parameters according to simulink-specific methods to correspond to the actual control system. When building a model for a larger system, Simulink provides the function of hierarchical arrangement of the system. Simulink can divide the system into several layers from high-level to low-level, and each layer can be divided into several small parts; after the system model of each layer is created, it can be connected to form a complete system.


2. Basic use of simulink

1. Sources signal source module group:
         input port module (In): used to reflect the input terminals of the entire system, such settings are necessary for model linearization and command line simulation.
       Signal generator: It can generate several commonly used signals, such as square wave signal, sine wave signal, sawtooth wave signal, etc., and the user can adjust its amplitude and phase.
       Band-limited white noise (band-limited white noise): Generally used for white noise signal input of continuous or mixed systems. In addition to white noise signals, there are general random number generation modules, such as normal random number module (random number) and uniform distribution random number module (uniform random number), etc. Note that these two modules cannot be directly used to simulate continuous systems .
        Read file module (From file) and read workspace module (From workspace): Two modules allow reading signals from files or matlab workspaces as input signals.

1. Sources signal source module group:
    time signal module (clock): generate the current simulation clock, which is very meaningful in the calculation of time-related indicators.
Constant input module (constant): This module takes constants as input.
Ground wire module (grand): It is generally used to indicate a zero-input module. If the input terminal of a module is not connected to any other module, simulink will often give an error signal.
Various other types of signal inputs, such as step input (step), ramp input (ramp), pulse signal (pulse generator), sine wave (sine wave), etc., also allow repeatable input signals to be constructed by the repeating sequence module.


2. 
Integrator of the continuous system module (Integrator): This module integrates the input signal numerically and directly reflects it at the output.
Derivative link (Derivative): This module outputs the input terminal signal through the first-order numerical differentiation at the output terminal.
The state equation (state-space), transfer function (Transfer fcn), and zero-pole model (Zero-pole) of a linear system can all be used to describe a linear system.
      Time delay (Transport delay or variable transport delay): Delay the input signal by a given time.
Memory link (memory): output the input value of the previous step of this module.
, Discrete discrete system module zero-order hold (zero-order hold) and first-order hold (first-order hold): the former keeps the output value at the same value within a calculation step, and the latter follows the first-order The method of interpolation calculates the output value under the step size. Discrete transfer function (discrete Transfer fcn), state equation (discrete state-space), zero-pole model (discrete Zero – pole): a discrete system model can be established. Unit delay: Hold the sampled signal and delay it by one sampling period. Discrete filter: Create a discrete filter.
 

Math mathematical operation module
Abs: find the absolute value or modulo (complex number);
Algebraic Constraint: force the input signal to be zero;
Complex to Magnitude-Angle: find the amplitude and phase angle of the complex number;
Complex to Real-Imag: find the real value of the complex number Part and imaginary part;
Dot Product: Find the dot product (inner product);
Gain: Multiply the input signal by a constant gain;
Logical Operator: Logical operator;
Magnitude-Angle to Complex: Find complex numbers from the amplitude and phase angle;
Math Function: mathematical operation function;
Product: quadrature or quotient of input signal;
Relational Operator: comparison operator;
Rounding Function: rounding function;
Sign: sign function
Slider Gain: change gain in sliding form;
Sum: algebraic calculation of input signal And;
Trigonometric Function: trigonometric function
Bitwise Logical Operator: bit logic operator, logic operation on unsigned integer input signal.
 

3. Power system module

        The power system blockset (PSB) is very powerful and can be used for the simulation of circuits, power electronic systems, motor systems, power transmission and other processes. It provides a method similar to circuit modeling for model drawing. In the simulation It will be automatically changed into the system form described by the state equation before it can be simulated and analyzed under simulink. Typing powerlib in the MATLAB command window will result in the set of modules shown in the figure below. You can also select the Simpowersystem sub-library from the Simulink module browser window to start. There are many sub-module sets in this module set, and double-clicking each icon will open a lower-level sub-module set.


        The Power Components library contains various components that generate electrical signals. As shown on the right. Including DC voltage source, AC voltage source, AC current source, controlled voltage source, controlled current source, three-phase power supply, three-phase programmable voltage source. The controlled source is a power supply controlled by an excitation signal. The excitation source selects a suitable signal source in the simulink model library. The output signal of the controlled source reproduces the signal of the signal source, but only converts the signal into a PSB signal, so the controlled source can be Realize the conversion of simulink signal to PSB signal. The parameters contained in the three-phase power module include phase voltage, phase angle of A phase, frequency, internal connection mode (Y neutral point is not grounded; Yn neutral point is grounded through arc suppression coil or resistance; Yg neutral point is directly grounded), Short-circuit impedance, three-phase source resistance, and three-phase source reactance. Programmable voltage sources allow time-varying programming of the amplitude, phase, and fundamental frequency components of the three-phase power supply. The power supply also provides two harmonic components, applied to the fundamental frequency signal, which can be used to control the controlled source.


          Contains various linear network circuit elements and nonlinear network circuit elements. The line component library contains 4 types of line components, which are branch circuit components (to realize various series and parallel branches or load components), power transmission and distribution line components (to realize centralized or distributed parameter transmission lines), circuit breaker components (analog circuit circuit breakers) and transformer components (simulating various transformers). There are no separate models for resistors, inductors and capacitors in the library, which can be achieved with series RLC and parallel RLC branch models. In order to delete the capacitor in the series branch, its value cannot be filled with 0, but needs to be written as inf. Refer to the next page for the parameter setting of a single resistor, inductor, and capacitor.


       The parameter setting method of a single resistance, inductance, and capacitance in the line element library is as follows:
RLC branch in series: resistance value inductance value capacitance value
           single resistor R 0 inf
           single inductor 0 L inf
           single capacitor 0 0 C
parallel RLC branch: resistance value inductance value Capacitance Value
           Single Resistor R inf 0
           Single Inductor inf L 0
           Single Capacitor inf inf C

3. Power electronic component library: contains various power electronic equipment components.
4. Motor component library: contains various motor model components.
5. Connector component library: contains components used to connect to each other under different conditions.
6. Circuit measuring component library: contains various current measuring components and voltage measuring components.
7. Additional component library: including special measuring equipment and control modules.
8. Demonstration tutorial: Contains various demonstration tutorials and learning examples.
9. Power graphic user interface: used for power steady-state analysis.
10. Type powerlib_models in the command window to start the power system component library model
, which contains simulation models of various nonlinear modules of the power system, and can be used to establish
equivalent simulation circuit models of power system circuits.
         Functionality for power electronics simulation is provided in PSB. Many commonly used power electronic device modules are provided in the power electronics submodule set. Each module has an m output terminal, from which the voltage and current signals inside the module can be measured, and the signal can be directly connected to the output module of SIMULINK.
        The figure below is an example of a power diode used as a rectifier, and the corresponding waveform can be obtained by setting the parameters reasonably.

         The Power Systems blockset also provides some commonly used electric machine simulation blocks. From the nameplate of a motor, the following parameters can be obtained: Pn=5.5kW, Vn=220V, fn=50Hz, stator winding resistance rs=0.0217 ohms, stator winding reactance Xs=0.039 ohms, rotor winding resistance rr=0.0329 ohms, rotor winding reactance xr= 0.0996 ohms, mutual inductance Lm=3.6494 ohms, torque J=11.4kg.m2, number of pole pairs P=2. Build a model called psbmachine.
 

 

Guess you like

Origin blog.csdn.net/Simuworld/article/details/129898911