lhr-solar / Power-Generation-Eclipse-SW

Simulating Components of the Array Subsystem.
MIT License
0 stars 0 forks source link

Simulator Redesign #8

Open dimembermatt opened 3 years ago

dimembermatt commented 3 years ago

As we've added more complex components to the simulator (different simulation categories, different MPPT algorithms, different MPPT subalgorithms, etc), we've accrued a lot of technical debt in terms of the design of the simulator that limits our ability to debug problems and add new features.

This redesign should overhaul the existing simulator and make it more developer friendly and user friendly. Additionally, now that I (Matthew) am overhauling the TREL MCS, I can further integrate our UI with PyQT to make it a more visually engaging and useful sim.

Expected file and class structure:

Simulation: Manages control of both the PV simulation as well as the array simulation and overall program flow
    | - Source: Manages PV level modeling
    |       | - Cell: Manages cell level modeling
    |               | - Derived Cell model: Cell Model definition
    |               | - Derived Cell model
    |
    | - MPPT: Manages update of the MPPT
    |       | - MPPTAlgorithm: Mppt algorithm base class
    |       |       | - Derived MPPTAlgorithm: Implementation details for a specific algorithm
    |       |       | - Derived MPPTAlgorithm
    |       |
    |       | - MPPTComponent: Algorithm swappable component
    |       | - MPPTComponent
    |
    | - DC-DC Converter: "Converts" MPPT setpoint to an actual pulse width.
    | - Display: Manages updates to UI widgets
External files
    | - Cell Model lookup table: Nonideal Model lookup
    | - PV Simulation output .csv: Simulation data logging output for analysis.
    | - Source Models
    |        | - Source Model .json: PV Model definition
    |        | - Source Model .json
dimembermatt commented 3 years ago

First wiring of data to the UI after finishing many unit tests. image

Button choices are bad and I think the default behavior should be thought about a little more on what should actually be displayed. A textbox widget needs to be implemented in the Console class tied to buttons for us to define specific data ranges of input.

For the SourceView, we might want something like this: