-
Notifications
You must be signed in to change notification settings - Fork 4
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
Working Example of Solving RLCircuit and Microgrid with Jacobians #1
Conversation
reid-g
commented
Feb 26, 2024
- Added Jacobian Composing
- Added IDA solving with Jacobians using KLU
- Added basic circuit components
- Added resistor, capacitor, voltage source, and inductor
- Residuals and jacobians for each
- Added components for microgrid:
- Added Microgrid DiscreteGenerate, line, load, and bus
- Residuals and jacobians for each
- Working examples with verifications
The branch
The library is there on the build line, but there are also flags like
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix build issue with SuiteSparse libraries.
@balos1, it seems to me this issue is coming somewhere from SUNDIALS configuration. I am linking GridKit to SUNDIALS v6.1.1 on my Macbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work and many helpful tests added to verify implementations.
There are a few things that need to be done before composer-dev
branch is ready to merge:
- The branch needs to be rebased with respect to
develop
. - Indentation in the code does not follow the GridKit coding style. I suggest fixing the indentation first, because this will make rebasing easier.
- Bug in CMake that affects linking to KLU needs fixing.
- Adjoint sensitivity test fails. Needs investigating.
- Might be good to rename classes named "discrete generator" to "distributed generator".
- It seems that finding Ipopt is broken in this branch. Needs fixing.
I stand corrected, this issue originates in GridKit. See above. |
Parse load data from the input file. Check load data when testing Matpower parser. Do not store load data in bus data structure. Changed names and order of template parameters in power system data structures. More intuitieve data structures names Changed names of data structures to distinguish Matpower specific data and general power system description data. Pass correct scalar and real types to derived bus classes. Add generator base and slack classes. Classes compile correctly, not tested yet. Infrastructure for adding buses and generators to power flow models Add steady-state generator models and factory. Constructors now read directly from GenData and BusData structures. Updated Bus classes accordingly. Usage example provided in Grid3BusSys app. Supporting infrastructure for Loads and Branches Expanded methods for adding components to the power system grid. Includes new constructors for loads and branches, as well as methods for accessing buses through their IDs. Updated Parsing Example Fixed Memory Errors in KinSol and SystemSteadyStateModel +Clean valgrind output Prototype Example of Creating a RL Circuit +Add hypergraph representation +Added Model form with appropiate indexing +Added Resistors, Capacitor, Inductor, and VoltageSource Component Models Add capability to build power flow models from Matpower input files Use more realistic test passing criterion Release 0.0.7 updates
+Added InductionMotor, Linear Transformer, and SynchronousMachine +Changes to PowerElectronicsModel
+ Basic COO Sparse Matrix Implmentation + Discrete Generator Component + Resistor Jacobian + Capacitor Jacobian + Voltage Source Jacobian + Inductor Jacobian + Testing for Sparse Jacobian and Discrete Generator
…rices +Matrix Assembly +Refactored COO Matrix +COO can return CSR Data format
+ Cmake configurations for Sundials and SuiteSparse + Jacobian Assembly for components + Working RL Circuit example utilizing assembly techniques
- Added MicrogridBusDQ - Added MicrogridLine - Added MicrogridLoad - Updated DiscreteGenerator - Added Output Testing for DG - Added Microgrid Assmebly Example - Updated Capacitor, Inductor, and Voltage residuals - Updated RLCircuit Example
- "grounded" the rotor difference in reference - Comparing agianst reference from MATLAB
Co-authored-by: pelesh <[email protected]>
- Updated name of generator - Some formatting updates
- Fixed SpMatTest - Updates on rebase
- Intalized Pg data
Fix max number of backward steps in IDA solver.
* Merge Ida Fix * Fixed Whitespace Editor Changes * Tabs to Spaces Ida.cpp
+ Basic COO Sparse Matrix Implmentation + Discrete Generator Component + Resistor Jacobian + Capacitor Jacobian + Voltage Source Jacobian + Inductor Jacobian + Testing for Sparse Jacobian and Discrete Generator
…rices +Matrix Assembly +Refactored COO Matrix +COO can return CSR Data format
+ Cmake configurations for Sundials and SuiteSparse + Jacobian Assembly for components + Working RL Circuit example utilizing assembly techniques
- Added MicrogridBusDQ - Added MicrogridLine - Added MicrogridLoad - Updated DiscreteGenerator - Added Output Testing for DG - Added Microgrid Assmebly Example - Updated Capacitor, Inductor, and Voltage residuals - Updated RLCircuit Example
- "grounded" the rotor difference in reference - Comparing agianst reference from MATLAB
Co-authored-by: pelesh <[email protected]>
- Updated name of generator - Some formatting updates
- Fixed SpMatTest - Updates on rebase
- Intalized Pg data
* Merge Ida Fix * Fixed Whitespace Editor Changes * Tabs to Spaces Ida.cpp
- Update format - Fixed casting warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is partial review flagging some minor issues in the code just to move them out of way. A more detailed code review is needed to check models.
ComponentLib/PowerElectronicsComponents/Capacitor/Capacitor.cpp
Outdated
Show resolved
Hide resolved
ComponentLib/PowerElectronicsComponents/Capacitor/Capacitor.cpp
Outdated
Show resolved
Hide resolved
ComponentLib/PowerElectronicsComponents/SynchronousMachine/SynchronousMachine.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Reid <[email protected]>
- Updated Comments to respect current models - Fixed valgrind errors in ida.cpp. Note: there is still more but seg faults are happening from frees
- Removed this-> with usings for formatting - Added using for Jac to components which did not have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major issues addressed, all tests pass.