FrequencyLimited

class sharpy.rom.balanced.FrequencyLimited[source]

Method for frequency limited balancing.

The Observability and controllability Gramians over the frequencies kv are solved in factorised form. Balanced modes are then obtained with a square-root method.

Details:

  • Observability and controllability Gramians are solved in factorised form through explicit integration. The number of integration points determines both the accuracy and the maximum size of the balanced model.

  • Stability over all (Nb) balanced states is achieved if:

    1. one of the Gramian is integrated through the full Nyquist range
    2. the integration points are enough.

Input:

  • DictBalFreq: dictionary specifying integration method with keys:

    • frequency: defines limit frequencies for balancing. The balanced
      model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the self.ScalingFacts dictionary.
    • method_low: ['gauss','trapz'] specifies whether to use gauss quadrature or trapezoidal rule in the low-frequency range [0,F].
    • options_low: options to use for integration in the low-frequencies. These depend on the integration scheme (See below).
    • method_high: method to use for integration in the range [F,F_N], where F_N is the Nyquist frequency. See ‘method_low’.
    • options_high: options to use for integration in the high-frequencies.
    • check_stability: if True, the balanced model is truncated to eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable. Note that this option is overridden if “”
    • get_frequency_response: if True, the function also returns the frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model.
Future options:
  • Ncpu: for parallel run
The following integration schemes are available:
  • trapz: performs integration over equally spaced points using trapezoidal rule. It accepts options dictionaries with keys:

    • points: number of integration points to use (including domain boundary)
  • gauss performs gauss-lobotto quadrature. The domain can be partitioned in Npart sub-domain in which the gauss-lobotto quadrature of order Ord can be applied. A total number of Npart*Ord points is required. It accepts options dictionaries of the form:

    • partitions: number of partitions
    • order: quadrature order.

Examples

The following dictionary

>>>   DictBalFreq={'frequency': 1.2,
>>>                'method_low': 'trapz',
>>>                'options_low': {'points': 12},
>>>                'method_high': 'gauss',
>>>                'options_high': {'partitions': 2, 'order': 8},
>>>                'check_stability': True }

balances the state-space model in the frequency range [0, 1.2] using:

  1. 12 equally-spaced points integration of the Gramians in the low-frequency range [0,1.2] and
  2. A 2 Gauss-Lobotto 8-th order quadratures of the controllability Gramian in the high-frequency range.

A total number of 28 integration points will be required, which will result into a balanced model with number of states

>>>    min{ 2*28* number_inputs, 2*28* number_outputs }

The model is finally truncated so as to retain only the first Ns stable modes.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name Type Description Default Options
frequency float defines limit frequencies for balancing. The balanced model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the in the self.ScalingFacts dictionary. 1.0  
method_low str Specifies whether to use gauss quadrature or trapezoidal rule in the low-frequency range [0,F] trapz gauss, trapz
options_low dict Settings for the low frequency integration. See Notes. {}  
method_high str Specifies whether to use gauss quadrature or trapezoidal rule in the high-frequency range [F,FN] trapz gauss, trapz
options_high dict Settings for the high frequency integration. See Notes. {}  
check_stability bool if True, the balanced model is truncated to eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable. True  
get_frequency_response bool if True, the function also returns the frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model. False  

The parameters of integration take the following options:

Name Type Description Default
points int Trapezoidal points of integration 12
partitions int Number of Gauss-Lobotto quadratures 2
order int Order of Gauss-Lobotto quadratures 2