Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor VBR models #75

Open
9 of 12 tasks
dinkelbachjan opened this issue Feb 6, 2022 · 0 comments
Open
9 of 12 tasks

Refactor VBR models #75

dinkelbachjan opened this issue Feb 6, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dinkelbachjan
Copy link
Contributor

dinkelbachjan commented Feb 6, 2022

  • Reuse the order-specific auxiliar constants in the domain specific VBR models

    • Example 4th order:
    • Instantiate and calculate the order-specific auxiliar constants already in Base_ReducedOrderSynchronGenerator
    • Same goes for 3rd and 6th order
    • Stick for 3rd/4th order model to nomenclature for auxiliar constants introduced in 6th order model, i.e. use _t as subscript e.g. mAd_t
  • Specify and reuse the order-specific resistance matrix constants in the domain specific VBR models

    • Example 4th order
    • Instantiate and calculate the order-specific resistance matrix constants already in Base_ReducedOrderSynchronGenerator
    • Same goes for 3rd and 6th order
  • Remove Ef from auxiliar constants

  • Rename Cq to Dq

  • Reconsider zero component in EMT_Ph3 models

  • Use resistance matrix constants A and B in EMT_Ph3_SynchronGenerator4OrderVBR

  • Simplify the DP-DQ interface to obtain armature voltage (and armature current), which currently looks as follows

    // convert armature voltage into dq reference frame
    Matrix parkTransform = get_parkTransformMatrix();
    MatrixComp Vabc_ = mIntfVoltage(0, 0) * mShiftVector * Complex(cos(mNomOmega * mSimTime), sin(mNomOmega * mSimTime));
    Matrix Vabc = Matrix(3,1);
    Vabc << Vabc_(0,0).real(), Vabc_(1,0).real(), Vabc_(2,0).real();
    mVdq = parkTransform * Vabc / mBase_V_RMS;

    Instead of applying DP-EMT and EMT-DQ transformation, directly apply DP-DQ transformation, as e.g. done for the voltage behind the reactance
    mEvbr = (mKvbr * mEh_vbr * mBase_V_RMS)(0,0);

    using
    mKvbr = Matrix::Zero(1,2);
    mKvbr(0,0) = Complex(cos(mThetaMech - mBase_OmMech * mSimTime), sin(mThetaMech - mBase_OmMech * mSimTime));
    mKvbr(0,1) = -Complex(cos(mThetaMech - mBase_OmMech * mSimTime - PI/2.), sin(mThetaMech - mBase_OmMech * mSimTime - PI/2.));

  • Harmonize implementation of DQ-DP and DQ-SP interface implementation

    dqToComplexA <<
    cos(mThetaMech - mBase_OmMech * mSimTime), -sin(mThetaMech - mBase_OmMech * mSimTime),
    sin(mThetaMech - mBase_OmMech * mSimTime), cos(mThetaMech - mBase_OmMech * mSimTime);

  • Simplify definition of VBR resistance matrix in DP_Ph1 models according to equivalent derivation

    resistanceMatrix(0,0) = mR_const_1ph.real() + mKa_1ph.real() + mKb_1ph.real();
    resistanceMatrix(0,1) = -mR_const_1ph.imag() - mKa_1ph.imag() + mKb_1ph.imag();
    resistanceMatrix(1,0) = mR_const_1ph.imag() + mKa_1ph.imag() + mKb_1ph.imag();
    resistanceMatrix(1,1) = mR_const_1ph.real() + mKa_1ph.real() - mKb_1ph.real();

  • Rename DP_Ph1_SynchronGeneratorVBR and SP_Ph1_SynchronGeneratorVBR to be consistent with EMT_Ph3_ReducedOrderSynchronGeneratorVBR

  • Make SGModel of type String. Then you can use '6a' and '6b' instead of 6 and 7, which can become confusing in particular if we have models 6c, 6d etc. in the future

  • We can add another case distinction during calculation of constants in Base::ReducedOrderSynchronGenerator, since mAd_t and mBd_t are only used within the fourth-order model.

    mAd_t = mTimeStep * Zd_t / (2 * mTq0_t + mTimeStep);
    mBd_t = (2 * mTq0_t - mTimeStep) / (2 * mTq0_t + mTimeStep);

@martinmoraga martinmoraga added the enhancement New feature or request label Sep 7, 2022
@stv0g stv0g changed the title Refactor VBR Models Refactor VBR models Jan 18, 2023
dinkelbachjan added a commit that referenced this issue Jan 19, 2023
…r VBR models (#120)

- fixes implementation of exciter DC1A model 
- adds new turbine governor TGOV1 (Ref: Milano, Power system modelling
and scripting p. 358)
- adds new validation notebook for controllers:
[SP_Validation_ReducedOrderSG_VBR_SMIB_Fault_withControllers.ipynb](https://github.com/sogno-platform/dpsim/blob/SG_VBR_CurrentSource/examples/Notebooks/Circuits/SP_Validation_ReducedOrderSG_VBR_SMIB_Fault_withControllers.ipynb)
- partially solves points of #75 
- enables choice between thevenin and norton representation of VBR
models, default is norton now
- adds reduced order SG models, exciter and turbine governor to dpsimpy
dinkelbachjan added a commit that referenced this issue Jul 4, 2023
This PR covers the implementation of iterative reduced-order synchronous
generator models, namely the PCM and TPM models. Besides, it removes the
DCIM implementations, which are covered now by PCM models with zero
iterations in the DP domain. It also refactors the VBR model
implementations and involves a new DP-DQ interface, which is used by all
DP reduced-order synchronous generator models (PCM, TPM, VBR) and shall
be reused by other DQ based components in the future. Furthermore, it
adds several validation notebooks to compare the different reduced-order
models against each other and to compare the results of the 4th order
VBR model in the WSCC benchmark system against results from PSAT.

Based on #199 
Rebase of #207  
Related to #75, #221 and #225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants