From 2270d2c0bf8d3fab2a9289978900cc3885766512 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Mon, 9 Jun 2025 16:21:25 +0200 Subject: [PATCH 1/2] balance before norm computations --- src/descriptor.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/descriptor.jl b/src/descriptor.jl index 28346fb7..ebd4cd8d 100644 --- a/src/descriptor.jl +++ b/src/descriptor.jl @@ -30,10 +30,12 @@ For keyword arguments, see the docstring of `DescriptorSystems.ghinfnorm`, repro $(@doc(DescriptorSystems.ghinfnorm)) """ function hinfnorm2(sys::LTISystem; kwargs...) + sys, _ = balance_statespace(sys) DescriptorSystems.ghinfnorm(dss(ss(sys)); kwargs...) end function linfnorm2(sys::LTISystem; kwargs...) + sys, _ = balance_statespace(sys) DescriptorSystems.glinfnorm(dss(ss(sys)); kwargs...) end From e3f3d113466a9740b1b898c17d1b6707c11d4fa6 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Mon, 9 Jun 2025 18:40:30 +0200 Subject: [PATCH 2/2] add method for `downsample` with particles --- src/uncertainty_interface.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/uncertainty_interface.jl b/src/uncertainty_interface.jl index e07133bd..41829679 100644 --- a/src/uncertainty_interface.jl +++ b/src/uncertainty_interface.jl @@ -766,4 +766,9 @@ Version that constructs from initial guess # end # end # BlockDiagonal(D) -# end \ No newline at end of file +# end + + +function ControlSystemsBase.downsample(t,y::AbstractArray{<: MonteCarloMeasurements.AbstractParticles},detail_th) + ControlSystemsBase.downsample(t, pmean.(y), pmean(detail_th)/10) +end \ No newline at end of file