Documentation

Three-Phase Custom Simplified Synchronous Machine

This example shows how simplify the custom Simscape™ synchronous machine model.

Detailed Machine Equations

Detailed per-unit stator voltage equations include the effect of rate of change of magnetic flux linkage, and the effect of speed variation:

Simplified Machine Equations

Large-scale studies are simulations that include more than 10 generators or motors. To reduce computational requirements of large-scale studies, simplifications are necessary. Simplifications for large-scale studies, include neglecting the following:

  • The transformer voltage terms, and

  • The effect of speed variations. is set to 1.

These simplifications yield the following per-unit stator voltage equations:

Simscape Component Comparison

You can use the Comparison Tool to see the differences between the detailed and simplified Simscape components. Type visdiff( 'ThreePhaseExamples.sm', 'ThreePhaseExamples.sm_simplified' ) at the MATLAB® command line to open the Comparison Tool to see the detailed differences on lines 165 and 166 of the files. The detailed Synchronous Machine component is on the left side, and the simplified Synchronous Machine component is on the right side.

Open Model

Open the model.

open_system( 'pe_custom_sm_simplified' );

Define Initial Conditions

Specify values of initial conditions.

pu_psid0 = 0.7850;
pu_psiq0 = -0.6216;
pu_psifd0 = 0.9553;
pu_psi1d0 = 0.8269;
pu_psi1q0 = -0.5686;
pu_psi2q0 = -0.5686;
Efd0 = 1.2803;
torque0 = 0.4610;

Define Variants

The example model, pe_custom_sm_simplified, has been configured using Simulink® Variants. To execute the detailed model, set the variable isSimplified to false. To execute the simplified model, set the variable isSimplified to true.

synchronousMachineVariant = Simulink.Variant;
synchronousMachineVariant.Condition = 'isSimplified==false';
synchronousMachineSimplifiedVariant = Simulink.Variant;
synchronousMachineSimplifiedVariant.Condition = 'isSimplified==true';

Execute Simulations and Collect Results

Simulate detailed model.

isSimplified = false; %#ok<NASGU>
sim( 'pe_custom_sm_simplified' );
t1 = pe_custom_sm_simplified_simlog.Synchronous_Machine_Variant.Synchronous_Machine.Synchronous_Machine.pu_voltage.series.time;
v1 = pe_custom_sm_simplified_simlog.Synchronous_Machine_Variant.Synchronous_Machine.Synchronous_Machine.pu_voltage.series.values;
w1 = pe_custom_sm_simplified_simlog.Synchronous_Machine_Variant.Synchronous_Machine.Synchronous_Machine.pu_velocity.series.values;

Simulate simplified model.

isSimplified = true;
sim( 'pe_custom_sm_simplified' );
t2 = pe_custom_sm_simplified_simlog.Synchronous_Machine_Variant.Synchronous_Machine_simplified.Synchronous_Machine_simplified.pu_voltage.series.time;
v2 = pe_custom_sm_simplified_simlog.Synchronous_Machine_Variant.Synchronous_Machine_simplified.Synchronous_Machine_simplified.pu_voltage.series.values;
w2 = pe_custom_sm_simplified_simlog.Synchronous_Machine_Variant.Synchronous_Machine_simplified.Synchronous_Machine_simplified.pu_velocity.series.values;

Plot Results

The voltage and rotor velocity traces can be overlaid to directly compare differences.

figure;
subplot(2,1,1);
plot( t1, v1, t2, v2 );
ylim( [ 0.95 1.05 ] );
legend( 'Detailed', 'Simplified' );
title( 'Terminal voltage, pu' );
subplot(2,1,2);
plot( t1, w1, t2, w2 );
ylim( [ 0.95 1.05 ] );
title( 'Rotor velocity, pu' );

Conclusion

This example shows:

  • How to simplify the custom synchronous machine model

  • A comparison of Simscape component source code

  • A comparison of model simulation outputs

Was this topic helpful?