Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 11 additions & 26 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,24 @@
name: CI
on:
- pull_request
on: [push]
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
julia-version: ['1.10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
file: ./lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions src/canonical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ If `C1`, then an additional convention for SISO systems is used, that the `C`-ma

`E` is an eigen factorization of `A`.

The modal form makes apparent which modes are controllable from which inputs, and which are observable from which outputs. Non-minimal realizations may trigger singularity exceptions.

See also [`hess_form`](@ref) and [`schur_form`](@ref)
"""
function modal_form(sys; C1 = false)
Expand Down
2 changes: 1 addition & 1 deletion src/find_lft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function find_lft(sys::StateSpace{<:Any, <:AbstractParticles{<:Any, N}}, delta,
iterations = 40000,
allow_f_increases = true,
time_limit = 45,
x_tol = 1e-8,
x_abstol = 1e-8,
f_reltol = 0,
g_tol = 1e-16,
),
Expand Down
6 changes: 3 additions & 3 deletions src/mimo_diskmargin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function structured_singular_value(M::AbstractArray{T}; tol=1e-4, scalings=false
iterations = 1000,
allow_f_increases = false,
time_limit = 100,
x_tol = 0,
x_abstol = 0,
f_abstol = 0,
g_tol = tol,
f_calls_limit = 0,
Expand Down Expand Up @@ -400,7 +400,7 @@ function loop_scaling(M::Matrix, tol=1e-4)
iterations = 1000,
allow_f_increases = false,
time_limit = 100,
x_tol = 0,
x_abstol = 0,
f_abstol = 0,
g_tol = tol,
f_calls_limit = 0,
Expand Down Expand Up @@ -458,7 +458,7 @@ end
# iterations = 1000,
# allow_f_increases = false,
# time_limit = 100,
# x_tol = 0,
# x_abstol = 0,
# f_abstol = 0,
# g_tol = tol,
# f_calls_limit = 0,
Expand Down
4 changes: 4 additions & 0 deletions src/uncertainty_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ end
# Complex(StaticParticles(getfield.(parts, :re)), StaticParticles(getfield.(parts, :im)))
# end

function ControlSystemsBase.poles(G::TransferFunction{<:ControlSystemsBase.TimeEvolution, ControlSystemsBase.SisoRational{T}}) where T <: AbstractParticles
poles(ss(G))
end

function ControlSystemsBase.tzeros(A::AbstractMatrix{T}, B::AbstractMatrix{T}, C::AbstractMatrix{T}, D::AbstractMatrix{T}) where T <: AbstractParticles
bymap(tzeros, A, B, C, D)
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_hinfgrad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ v = vec(C)
# iterations = 1000,
# allow_f_increases = false,
# time_limit = 1,
# x_tol = 0,
# x_abstol = 0,
# f_abstol = 0,
# g_tol = 1e-8,
# f_calls_limit = 0,
Expand Down
17 changes: 15 additions & 2 deletions test/test_uncertainty.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using RobustAndOptimalControl, ControlSystemsBase, MonteCarloMeasurements, Test
using RobustAndOptimalControl, ControlSystemsBase, MonteCarloMeasurements, Test, LinearAlgebra

d = δr()
@test d.val == 0
Expand Down Expand Up @@ -387,4 +387,17 @@ using SparseArrays
@test MOP.nx == P.nx*N
@test MOP.nu == P.nu

@test MOP.A isa SparseMatrixCSC
@test MOP.A isa SparseMatrixCSC


## Poles and zeros of tf

ω = 4..12
ζ = 0.054..0.084

P = tf([2*ζ/ω, 1], [1/ω^2, 2*ζ/ω, 1, 0, 0])

C = 1.0 * tf([1, 1], [0.1, 1])
G = feedback(C*P, 1)
poles(G)
tzeros(G)
Loading