Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Feb 15, 2024
1 parent 50b6aa7 commit f03f44c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/src/api/stateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For further information on this topic, please see the [AC State Estimation](@ref
* [`dcStateEstimation`](@ref dcStateEstimation)

###### Solve DC State Estimation
* [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS))
* [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS}))

###### Bad Data Analysis
* [`residualTest!`](@ref residualTest!)
Expand All @@ -39,7 +39,7 @@ dcStateEstimation

## Solve DC State Estimation
```@docs
solve!(::PowerSystem, ::DCStateEstimationWLS)
solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})
```

---
Expand Down
12 changes: 6 additions & 6 deletions docs/src/manual/dcStateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ To perform the DC power flow, you first need to have the `PowerSystem` composite
* [`dcStateEstimation`](@ref dcStateEstimation).

For resolving the DC state estimation problem employing either the weighted least-squares (WLS) or the least absolute value (LAV) approach and obtaining bus voltage angles, utilize the following function:
* [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)).
* [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})).

After obtaining the solution for DC state estimation, JuliaGrid offers a post-processing analysis function to compute active powers associated with buses and branches:
* [`power!`](@ref power!(::PowerSystem, ::DCStateEstimation)).
Expand All @@ -19,7 +19,7 @@ Furthermore, users can initiate observability analysis to detect observable isla
* [`islandTopological`](@ref islandTopological(::PowerSystem, ::Wattmeter)),
* [`restorationGram!`](@ref restorationGram!(::PowerSystem, ::Measurement, ::Measurement, ::IslandWatt)).

Finally, after executing the function [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)), where the user employs the WLS method, the user has the ability to check if the measurement set contains outliers throughout bad data analysis and remove those measurements using:
Finally, after executing the function [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})), where the user employs the WLS method, the user has the ability to check if the measurement set contains outliers throughout bad data analysis and remove those measurements using:
* [`residualTest!`](@ref residualTest!).

---
Expand Down Expand Up @@ -170,7 +170,7 @@ nothing # hide
!!! tip "Tip"
Here, the user triggers LU factorization as the default method for solving the DC state estimation problem. However, the user also has the option to select alternative factorization methods such as `LDLt` or `QR`, for instance.

To obtain the bus voltage angles, the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)) function can be invoked as shown:
To obtain the bus voltage angles, the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})) function can be invoked as shown:
```@example WLSDCStateEstimationSolution
solve!(system, analysis)
nothing # hide
Expand Down Expand Up @@ -200,7 +200,7 @@ nothing # hide
---

## [Bad Data Detection](@id DCBadDataDetectionManual)
After acquiring the WLS solution using the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)) function, users can conduct bad data analysis employing the largest normalized residual test. Continuing with our defined power system and measurement set, let us introduce a new wattmeter. Upon proceeding to find the solution for this updated state:
After acquiring the WLS solution using the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})) function, users can conduct bad data analysis employing the largest normalized residual test. Continuing with our defined power system and measurement set, let us introduce a new wattmeter. Upon proceeding to find the solution for this updated state:
```@example WLSDCStateEstimationSolution
addWattmeter!(system, device; from = "Branch 2", active = 4.1, variance = 1e-4)
Expand Down Expand Up @@ -254,11 +254,11 @@ nothing # hide
---

##### Setup Starting Primal Values
In JuliaGrid, the assignment of starting primal values for optimization variables takes place when the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)) function is executed. Starting primal values are determined based on the `voltage` fields within the `DCStateEstimation` type. By default, these values are initially established using the the initial bus voltage angles from `PowerSystem` type:
In JuliaGrid, the assignment of starting primal values for optimization variables takes place when the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})) function is executed. Starting primal values are determined based on the `voltage` fields within the `DCStateEstimation` type. By default, these values are initially established using the the initial bus voltage angles from `PowerSystem` type:
```@repl WLSDCStateEstimationSolution
print(system.bus.label, analysis.voltage.angle)
```
You have the flexibility to adjust these values to your specifications, and they will be utilized as the starting primal values when you run the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)) function.
You have the flexibility to adjust these values to your specifications, and they will be utilized as the starting primal values when you run the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})) function.

---

Expand Down
4 changes: 2 additions & 2 deletions docs/src/tutorials/dcStateEstimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Once the model is established, we solve the WLS equation to derive the estimate
\hat{\bm {\Theta}} = [\mathbf H^{T} \bm \Sigma^{-1} \mathbf H]^{-1} \mathbf H^{T} \bm \Sigma^{-1} (\mathbf z - \mathbf{c}).
```

This process is executed using the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)) function:
This process is executed using the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})) function:
```@example DCSETutorial
solve!(system, analysis)
```
Expand Down Expand Up @@ -289,7 +289,7 @@ At this point, QR factorization is performed on the rectangular matrix:
\bar{\mathbf{H}} = {\mathbf W^{1/2}} \mathbf H = \mathbf{Q}\mathbf{R}.
```

Executing this procedure involves the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS)) function:
Executing this procedure involves the [`solve!`](@ref solve!(::PowerSystem, ::DCStateEstimationWLS{LinearWLS})) function:
```@example DCSETutorial
solve!(system, analysis)
nothing # hide
Expand Down
2 changes: 1 addition & 1 deletion src/definition/analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export NewtonRaphson, FastNewtonRaphson, GaussSeidel, DCPowerFlow
export DCOptimalPowerFlow, ACOptimalPowerFlow
export DCStateEstimation, DCStateEstimationWLS, DCStateEstimationLAV
export PMUStateEstimation, PMUStateEstimationWLS, PMUStateEstimationLAV
export LU, QR, LDLt, Factorization, Orthogonal
export LU, QR, LDLt, Factorization, Orthogonal, LinearWLS, LinearOrthogonal
export Island, IslandWatt, IslandVar
export PlacementPMU

Expand Down

0 comments on commit f03f44c

Please sign in to comment.