【Practical Exercise】Ship Electrical System Modeling and Simulation Based on MATLAB_Simulink
发布时间: 2024-09-14 04:55:24 阅读量: 36 订阅数: 39
MPPT_Modeling_INC-simulation_matlab_matlabsimulink_mpptmatlab_
# 2.1 Generator Modeling
### 2.1.1 Mathematical Model of Generators
The mathematical model of a generator set describes its electromagnetic and mechanical characteristics. Synchronous generators are the most commonly used type for ship power generation, and their mathematical model can be represented as:
```
U = E' - RI
```
Where:
- U is the terminal voltage
- E' is the excitation electromotive force
- R is the stator resistance
- I is the stator current
### 2.1.2 Building a Generator Simulink Model
To build a generator model in Simulink, one can use the Synchronous Generator block available in MATLAB/Simulink. This block encompasses the mathematical model of the generator and offers options to configure excitation control and mechanical characteristics parameters.
```
% Generator Simulink Model Parameters
RatedPower = 1000; % Rated power (kVA)
RatedVoltage = 400; % Rated voltage (V)
RatedSpeed = 1800; % Rated speed (rpm)
Xd = 1.5; % d-axis reactance (pu)
Xq = 1.0; % q-axis reactance (pu)
H = 2; % Inertia constant (s)
D = 0.1; % Damping coefficient (pu)
% Creating a synchronous generator module
Generator = simulink.Electrical.Machines.SynchronousGenerator('RatedPower', RatedPower, 'RatedVoltage', RatedVoltage, 'RatedSpeed', RatedSpeed, 'Xd', Xd, 'Xq', Xq, 'H', H, 'D', D);
```
# 2. Practical Modeling of Marine Power Systems
### 2.1 Generator Modeling
#### 2.1.1 Mathematical Model of Gener***
***mon generator models include:
- **Cylindrical Model:** Simplifies the generator stator windings into a sinusoidal distributed uniform distribution, ignoring end effects.
- **Two-Axis Model:** Considers the electromagnetic and mechanical transients of the rotor windings, suitable for dynamic simulation.
- **Saturation Model:** Takes into account the effects of magnetic saturation on generator characteristics, increasing the accuracy of the model.
#### 2.1.2 Building a Generator Simulink Model
Building a generator model in Simulink involves the following steps:
1. **Choose a Generator Model:** Select an appropriate mathematical model of the generator based on simulation requirements.
2. **Set Parameters:** Input the generator's rated parameters, such as rated voltage, rated current, inertia, etc.
3. **Connect Terminals:** Connect the terminals of the generator model to other system components.
4. **Set Up the Excitation System:** Add an excitation system model to the generator, such as an Automatic Voltage Regulator (AVR).
```
% Two-axis generator model
gen_model = 'TwoAxis';
% Set generator parameters
gen_params = struct(...
'Sbase', 10000, ... % Base apparent power
'Rs', 0.01, ... % Stator resistance
'Xs', 0.1, ... % Stator inductance
'Xd', 1.5, ... % d-axis inductance
'Xq', 1.2, ... % q-axis inductance
'H', 2, ... % Inertia
'D', 0.01 ... % Damping coefficient
);
% Create generator model
gen = ***oAxisInductionMachine(...
'Generator', gen_model, ...
'Parameters', gen_params ...
);
% Set up generator excitation system
exciter = simulink.Electrical.Machines.ExcitationSystems.IEEEAC1(...
'Generator', gen ...
);
```
### 2.2 Distribution Network Modeling
#### 2.2.1 Topology of the Distribution Network
Shipboard distribution networks typically use radial or ring topology structures. The radial structure is simple but has lower reliability, while the ring structure has high reliability but is more complex.
#### 2.2.2 Building a Distribution Network Simulink Model
Building a distribution network model in Simulink involves the following steps:
1. **Create Buses:** Use the Bus Creator module in Simulink to create the buses of the distribution network.
2. **Connect Branches:** Use the Line module in Simulink to connect the buses, forming the topology of the distribution network.
3. **Set Branch Parameters:** Input parameters such as impedance and capacitance for the branches.
4. **Add Transformers:** If transformers are present in the distribution network, add transformer models.
```
% Create buses
bus1 = simulink.Electrical.ElectricalBus('Bus1');
bus2 = simulink.Electrical.ElectricalBus('Bus2');
bus3 = simulink.Electrical.ElectricalBus('Bus3');
% Connect branches
line12 = simulink.Electrical.LinearSystems.Line(...
'From', bus1, ...
'To', bus2, ...
'Length', 100, ... % Branch length
'Resistance', 0.1, ... % Branch resistance
'Inductance', 0.01 ... % Branch inductance
);
lin
```
0
0