Example1.Analysis.LinearAnalysis

Shows how to linearize the model, simulate the obtained linear model and compare it against the nonlinear model's response.

Information

To perform automated analysis the following function is provided: LinearizeAndCompare

Package Content

Name Description
Example1.Analysis.LinearAnalysis.CustomFunctions CustomFunctions Custom functions for automated analysis, including linearization and simulation, and their comparison
Example1.Analysis.LinearAnalysis.NonlinModel_for_Linearization NonlinModel_for_Linearization Non-linear model for linearization
Example1.Analysis.LinearAnalysis.NonlinModel_for_NonlinExperiment NonlinModel_for_NonlinExperiment Non-linear model for simulation
Example1.Analysis.LinearAnalysis.LinearModelGeneral LinearModelGeneral Generic linear model for simulation, is simulated by running the function "LinearizeAndCompare".
Example1.Analysis.LinearAnalysis.Figures Figures These models are not to be used for any purpose other than presenting figures in documentation.

Example1.Analysis.LinearAnalysis.NonlinModel_for_Linearization Example1.Analysis.LinearAnalysis.NonlinModel_for_Linearization

Non-linear model for linearization

Information

This is a model is used to perform linearization using the inputs and outputs defined in the top layer.

In automated analysis, it is used by the following functions:

Individual Usage:

To use this model on its own to perform linearization, enter the following command in the "Commands" window:

Modelica_LinearSystems2.ModelAnalysis.Linearize("Example1.Analysis.LinearAnalysis.NonlinModel_for_Linearization");

Alternatively, right click on the model and select "Simulation Model". Then go to Tools > Linear Analysis > Linearize and select "OK".


To obtain linearizations at different power flow conditions, go to the "Plant" component within the model, click on the "Power Flow Scenario" and select the data for a different scneario.


After running the command, the results should be obtained using default settings:

ss.A = 

                        Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.av             Plant.G1.av             Plant.G1.av             Plant.G1.ps             Plant.G1.ps             Plant.G1.ps

            Plant.G1.ma  0                       376.991118389           0                       0                       0                       0                       0                       0                       0                       0                       0                       0                      

            Plant.G1.ma -0.176108793576          0                       0                       0                      -0.195861482328          0.0551541639775         0                       0                       0                       0                       0                       0                      

            Plant.G1.ma -0.255877828569          0                      -0.125000000027          0                      -0.266763048065         -0.0011594921127         0                       0                       0.125000000002          0                       0                       0                      

            Plant.G1.ma  0.426590454939          0                       0                      -0.99999999994           0.00788324318104       -1.49010437572           0                       0                       0                       0                       0                       0                      

            Plant.G1.ma -3.36902858341           0                       33.3333333324           0                      -36.845682718           -0.0152665123009         0                       0                       0                       0                       0                       0                      

            Plant.G1.ma  2.42546406571           0                       0                       14.2857142849           0.0448217322083        -22.7579962497           0                       0                       0                       0                       0                       0                      

            Plant.G1.av -8.93488653992           0                       0                       0                       29.3032553076           33.1230756059          -66.6666666672           0                       0                       0                       0                       0                      

            Plant.G1.av  0                       0                       0                       0                       0                       0                       0                      -1                       0                       0                       0                       0                      

            Plant.G1.av  0                       18999999.9962           0                       0                       0                       0                      -2000000.00001           10000.0008274          -10000.0000002           0                       0                      -18999999.9962          

            Plant.G1.ps  0                       0.00949999999812        0                       0                       0                       0                       0                       0                       0                      -0.001                   0                      -0.00949999999812       

            Plant.G1.ps  0                       0.00949999999812        0                       0                       0                       0                       0                       0                       0                       0                      -0.001                  -0.00949999999812       

            Plant.G1.ps  0                       0.709219858078          0                       0                       0                       0                       0                       0                       0                       0                       0                      -0.709219858078         

 

ss.B = 

                        uPSS                    uPm                     uPload                  uvsAVR

            Plant.G1.ma  0                       0                       0                       0                      

            Plant.G1.ma  0                       0.142857154677         -0.0316071454723         0                      

            Plant.G1.ma  0                       0                      -0.0404287159306         0                      

            Plant.G1.ma  0                       0                       0.100932817659          0                      

            Plant.G1.ma  0                       0                      -0.532307068794          0                      

            Plant.G1.ma  0                       0                       0.573873488412          0                      

            Plant.G1.av  0                       0                      -1.02476545768           0                      

            Plant.G1.av  0                       0                       0                       0                      

            Plant.G1.av  18999998.0194           0                       0                       2000000.16548          

            Plant.G1.ps  0.00949999900968        0                       0                       0                      

            Plant.G1.ps  0.00949999900968        0                       0                       0                      

            Plant.G1.ps  0.709219916837          0                       0                       0                      

 

ss.C = 

                        Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.ma             Plant.G1.av             Plant.G1.av             Plant.G1.av             Plant.G1.ps             Plant.G1.ps             Plant.G1.ps

                     Vt -0.134023298099          0                       0                       0                       0.439548829614          0.496846134088          0                       0                       0                       0                       0                       0                      

                      Q  0.304306680099          0                       0                       0                       1.45372599861           0.766588787789          0                       0                       0                       0                       0                       0                      

                      P  1.22532664533           0                       0                       0                       1.36432443251          -0.382542875478          0                       0                       0                       0                       0                       0                      

                      w  0                       0.99999999989           0                       0                       0                       0                       0                       0                       0                       0                       0                       0                      

                  delta  0.999999999938          0                       0                       0                       0                       0                       0                       0                       0                       0                       0                       0                      

                  AVRin  0                       9.49999999812           0                       0                       0                       0                       0                       0                       0                       0                       0                      -9.49999999812          

                 AVRout  0                       0                       0                       0                       0                       0                       0                       0                       1.00000000002           0                       0                       0                      

 

ss.D = 

                        uPSS                    uPm                     uPload                  uvsAVR

                     Vt  0                       0                      -0.0153714818651         0                      

                      Q  0                       0                       0.0212035111691         0                      

                      P  0                       0                       0.219995022199          0                      

                      w  0                       0                       0                       0                      

                  delta  0                       0                       0                       0                      

                  AVRin  9.49999900968           0                       0                       1                      

                 AVRout  0                       0                       0                       0     

Extends from Example1.Utilities.Icons.ModelForLinearization (This model is used for linearization.).

Connectors

NameDescription
Vt 
Q 
P 
w 
delta 
uPSS 
uPm 
uPload 
uvsAVR 
AVRin 
AVRout 

Example1.Analysis.LinearAnalysis.NonlinModel_for_NonlinExperiment Example1.Analysis.LinearAnalysis.NonlinModel_for_NonlinExperiment

Non-linear model for simulation

Information

This is a model is used to perform nonlinear time-simulations by specifying a change in the inputs through sources. The default simulation is a load change modeled with a step source called Ploadchange.

In automated analysis, it is used by the following function: Example1.Analysis.LinearAnalysis.CustomFunctions.LinearizeAndCompare. The function will use this model and the Example1.Analysis.LinearAnalysis.NonlinModel_for_Linearization model to automatically perform linearization, simulation and comparison of the linear and non-linear models.

Individual Usage:

To use this model on its own to perform a simulation, right click on the model and select "Simulation Model". Then go to the Simulation tab and click on "Simulate".

Extends from Modelica.Icons.Example (Icon for runnable examples).

Connectors

NameDescription
Vt 
Q 
P 
w 
delta 
AVRin 
AVRout 

Example1.Analysis.LinearAnalysis.LinearModelGeneral Example1.Analysis.LinearAnalysis.LinearModelGeneral

Generic linear model for simulation, is simulated by running the function "LinearizeAndCompare".

Information

This is a generic linear model who's

DO NOT try to run this model on it's own!

Models with this icon will not simulate on their own, instead they work together with a function that populates certain parameters in the model and perform other operations.


See the associated function to run: "LinearizeAndCompare".

Extends from Example1.Utilities.Icons.FunctionDependentExample (f+m = for this model, a function drives the simulation of the model), Example1.Interfaces.OutputsInterfaceWEfdAndAVRout.

Parameters

NameDescription
y0[:] 
ss 
ny 

Connectors

NameDescription
Vt 
Q 
P 
w 
delta 
AVRin 
AVRout 
Automatically generated Wed Mar 13 11:30:38 2024.