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

Single Phase System Model #50

Open
Webbah opened this issue Jul 9, 2020 · 7 comments
Open

Single Phase System Model #50

Webbah opened this issue Jul 9, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@Webbah
Copy link
Collaborator

Webbah commented Jul 9, 2020

  • Design simulation framework from scratch to figure out benefits concerning current simulation framework
  • If benefits: Automatically: transfer the component-oriented model and control structure from OMG

First example: two inverter droop (static?)

@Webbah Webbah added the enhancement New feature or request label Jul 9, 2020
@Webbah Webbah self-assigned this Jul 9, 2020
@Webbah
Copy link
Collaborator Author

Webbah commented Jul 15, 2020

Define states and actions:

states x: f, U, P, Q...?

  • global (net-wide)
  • component dependent

actions a:

  • change of the droop parameter (not implemented jet)

Planned: ODE, which contains f&U-calculations and droop-controller to calculate P&Q depending on f&U (before)

Later:

  • obs = env.step(action), with obs = f&U and action = P&Q, to replace droop controller by RL

@Webbah
Copy link
Collaborator Author

Webbah commented Jul 15, 2020

component power as state or input?

  • dw=sum(P)/(Jw) -> Input
  • P is depending on w (and droop params) -> state

@Webbah
Copy link
Collaborator Author

Webbah commented Aug 3, 2020

First example:

  • voltage considered as fixed
  • two inverters connected via an inductor, resistive load between inv1 & ground.
  • leads to B = [B12, -B12; -B12, B12] and G = [G_load, 0; 0, 0]

dtheta = f
df = sum(Pk)/(J*f)

While in Pk an offset can be considered and in f-ODE droop is inserted:
df = (p-droop_linear*(freqs-nomFreq))/(J*freqs)

Result for droop inverter 1 = 0, inverter 2 = 1000 W/Hz and no P-offset (standard solver):

grafik

@Webbah
Copy link
Collaborator Author

Webbah commented Aug 3, 2020

Unstable for longer simulations:
grafik

grafik

  • Change solver
  • Calculate sign in matrix by hand to double-check due to it is working with -G (p[k] += nomVolt * nomVolt * (-G[k][j]*np.cos(thetas[k] - thetas[j]) + \ B[k][j]*np.sin(thetas[k] - thetas[j])))

@h-bode h-bode self-assigned this Oct 22, 2020
@h-bode
Copy link
Member

h-bode commented Oct 22, 2020

Q-Droop and voltage implemented:

Observations:

  • Frequency at the load bus (f3, green) does not is not stable. Depending on the (p)-droop values, it slowly increases or decreases over time.
droop_linear = np.array([7689, 1000, 0])     # W/Hz
q_droop_linear = np.array([12000, 3000, 0])

When the first value is below 7689 (does not matter how much), the frequency rises, when its 7689 or above, it drops.

image

image

continues even for longer simulations. ignore the last value which goes to 0, this is just a programming issue.

image

  • voltage of the load bus goes to 0.

image

The other 2 voltages can be stabilized with the q-droop, but sinve it´s 0 for the load, it reaches 0.

I would have expected it to rise while adjusting (increasing) the load resistance, but this does not seem to have any effect on the resulting voltages?! Increasing it by the factor of 10 or 100 does nothing to it, while decreasing the line impedances results sometimes in numerical issues.

@h-bode
Copy link
Member

h-bode commented Oct 22, 2020

If anyone has a clue how to get a voltage at v3, which does not decrease that fast, feel free to share ideas :-)

@h-bode
Copy link
Member

h-bode commented Oct 22, 2020

Relevant parts of the code, basically equation 8 from Olivers paper:

for k in range(num_nodes):
        for j in range(num_nodes):  # l works, due to B is symmetric
            p[k] += voltages[k] * voltages[j] * (-G[k][j]*np.cos(thetas[k] - thetas[j]) + \
                                         B[k][j]*np.sin(thetas[k] - thetas[j]))
            q[k] += voltages[k] * voltages[j] * (-G[k][j]*np.sin(thetas[k] - thetas[j]) + \
                                         B[k][j]*np.cos(thetas[k] - thetas[j]))

Including equation 12 for the return, + an adjusted version for the voltage:

    df = (p-droop_linear*(freqs-nomFreq))/(J*freqs)
    dv = (q - q_droop_linear * (voltages - nomVolt)) / (J * voltages)
    dtheta = freqs * 2 * np.pi

h-bode pushed a commit that referenced this issue Dec 18, 2020
stheid pushed a commit that referenced this issue Dec 18, 2020
stheid pushed a commit that referenced this issue Dec 18, 2020
Creating Gekkofiles

Making gekko an SPM comparable

deleted fmu folder
created new experiment folder
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