frequency_response Interface

public interface frequency_response

Computes the frequency response functions for a system of ODE's.


Module Procedures

private function frf_modal_prop_damp(mass, stiff, alpha, beta, freq, frc, modes, modeshapes, args) result(rst)

Computes the frequency response functions for a multi-degree-of-freedom system that uses proportional damping such that the damping matrix is related to the stiffness an mass matrices by proportional damping coefficients and by .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: mass

The N-by-N mass matrix for the system. This matrix must be symmetric.

real(kind=real64), intent(in), dimension(:,:) :: stiff

The N-by-N stiffness matrix for the system. This matrix must be symmetric.

real(kind=real64), intent(in) :: alpha

The mass damping factor, .

real(kind=real64), intent(in) :: beta

The stiffness damping factor, .

real(kind=real64), intent(in), dimension(:) :: freq

An M-element array of frequency values at which to evaluate the frequency response functions, in units of rad/s.

procedure(modal_excite), intent(in), pointer :: frc

A pointer to a routine used to compute the modal forcing function.

real(kind=real64), intent(out), optional, allocatable, dimension(:) :: modes

An optional N-element allocatable array that, if supplied, will be used to retrieve the modal frequencies, in units of rad/s.

real(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: modeshapes

An optional N-by-N allocatable matrix that, if supplied, will be used to retrieve the N mode shapes with each vector occupying its own column.

class(*), intent(inout), optional :: args

An optional argument that can be used to communicate with the outside world.

Return Value type(frf)

The resulting frequency responses.

private function frf_modal_prop_damp_sparse(mass, stiff, alpha, beta, nmodes, freq, frc, modes, modeshapes, args) result(rst)

Computes a modal-truncated frequency response for a system with proportional damping using CSR sparse mass and stiffness matrices. The damping matrix is defined by .

Arguments

Type IntentOptional Attributes Name
type(csr_matrix), intent(in) :: mass

The N-by-N symmetric positive-definite mass matrix.

type(csr_matrix), intent(in) :: stiff

The N-by-N symmetric stiffness matrix.

real(kind=real64), intent(in) :: alpha

The mass damping factor, .

real(kind=real64), intent(in) :: beta

The stiffness damping factor, .

integer(kind=int32), intent(in) :: nmodes

The number of lowest-frequency modes to retain. This value must be greater than zero and less than N.

real(kind=real64), intent(in), dimension(:) :: freq

An M-element array of frequency values in units of rad/s.

procedure(modal_excite), intent(in), pointer :: frc

A pointer to the physical forcing function.

real(kind=real64), intent(out), optional, allocatable, dimension(:) :: modes

An optional NMODES-element array containing the retained modal frequencies in units of rad/s.

real(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: modeshapes

An optional N-by-NMODES matrix containing the mass-normalized retained mode shapes.

class(*), intent(inout), optional :: args

An optional argument passed to the forcing function.

Return Value type(frf)

The modal-truncated frequency responses.

private function frf_modal_prop_damp_2(mass, stiff, alpha, beta, nfreq, freq1, freq2, frc, modes, modeshapes, args) result(rst)

Computes the frequency response functions for a multi-degree-of-freedom system that uses proportional damping such that the damping matrix is related to the stiffness an mass matrices by proportional damping coefficients and In modal coordinates, each mode has denominator and the physical response is reconstructed from the mode shapes. by .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: mass

The N-by-N mass matrix for the system. This matrix must be symmetric.

real(kind=real64), intent(in), dimension(:,:) :: stiff

The N-by-N stiffness matrix for the system. This matrix must be symmetric.

real(kind=real64), intent(in) :: alpha

The mass damping factor, .

real(kind=real64), intent(in) :: beta

The stiffness damping factor, .

integer(kind=int32), intent(in) :: nfreq

The number of frequency values to analyze. This value must be at least 2.

real(kind=real64), intent(in) :: freq1

The starting frequency, in units of rad/s.

real(kind=real64), intent(in) :: freq2

The ending frequency, in units of rad/s.

procedure(modal_excite), intent(in), pointer :: frc

A pointer to a routine used to compute the modal forcing function.

real(kind=real64), intent(out), optional, allocatable, dimension(:) :: modes

An optional N-element allocatable array that, if supplied, will be used to retrieve the modal frequencies, in units of rad/s.

real(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: modeshapes

An optional N-by-N allocatable matrix that, if supplied, will be used to retrieve the N mode shapes with each vector occupying its own column.

class(*), intent(inout), optional :: args

An optional argument that can be used to communicate with the outside world.

Return Value type(frf)

The resulting frequency responses.

private function frf_modal_prop_damp_sparse_2(mass, stiff, alpha, beta, nmodes, nfreq, freq1, freq2, frc, modes, modeshapes, args) result(rst)

Computes a modal-truncated frequency response for a system with proportional damping using CSR sparse mass and stiffness matrices. The damping matrix is defined by .

Arguments

Type IntentOptional Attributes Name
type(csr_matrix), intent(in) :: mass

The N-by-N symmetric positive-definite mass matrix.

type(csr_matrix), intent(in) :: stiff

The N-by-N symmetric stiffness matrix.

real(kind=real64), intent(in) :: alpha

The mass damping factor, .

real(kind=real64), intent(in) :: beta

The stiffness damping factor, .

integer(kind=int32), intent(in) :: nmodes

The number of lowest-frequency modes to retain. This value must be greater than zero and less than N.

integer(kind=int32), intent(in) :: nfreq

The number of frequency values to analyze. This value must be at least 2.

real(kind=real64), intent(in) :: freq1

The starting frequency, in units of rad/s.

real(kind=real64), intent(in) :: freq2

The ending frequency, in units of rad/s.

procedure(modal_excite), intent(in), pointer :: frc

A pointer to the physical forcing function.

real(kind=real64), intent(out), optional, allocatable, dimension(:) :: modes

An optional NMODES-element array containing the retained modal frequencies in units of rad/s.

real(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: modeshapes

An optional N-by-NMODES matrix containing the mass-normalized retained mode shapes.

class(*), intent(inout), optional :: args

An optional argument passed to the forcing function.

Return Value type(frf)

The modal-truncated frequency responses.

private function frf_general_damp_1(mass, damp, stiff, freq, frc, ranks, args) result(rst)

Computes the frequency response functions for a multi-degree-of-freedom system that has a general damping matrix, and is not necessarily symmetric. The problem is treated as the solution to the linear system .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: mass

The N-by-N mass matrix.

real(kind=real64), intent(in), dimension(:,:) :: damp

The N-by-N damping matrix.

real(kind=real64), intent(in), dimension(:,:) :: stiff

The N-by-N stiffness matrix.

real(kind=real64), intent(in), dimension(:) :: freq

An M-element array of frequency values at which to evaluate the frequency response functions, in units of rad/s.

procedure(modal_excite), intent(in), pointer :: frc

A pointer to a routine used to compute the modal forcing function.

integer(kind=int32), intent(out), optional, dimension(:) :: ranks

Provides information on the rank of the dynamic stiffness matrix for each frequency. If provided, this array must be the same length as freq.

class(*), intent(inout), optional :: args

An optional argument that can be used to communicate with the outside world.

Return Value type(frf)

The resulting frequency responses.

private function frf_general_damp_2(mass, damp, stiff, nfreq, freq1, freq2, frc, ranks, args) result(rst)

Computes the frequency response functions for a multi-degree-of-freedom system that has a general damping matrix, and is not necessarily symmetric. The problem is treated as the solution to the linear system .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: mass

The N-by-N mass matrix.

real(kind=real64), intent(in), dimension(:,:) :: damp

The N-by-N damping matrix.

real(kind=real64), intent(in), dimension(:,:) :: stiff

The N-by-N stiffness matrix.

integer(kind=int32), intent(in) :: nfreq

The number of frequency values to analyze. This value must be at least 2.

real(kind=real64), intent(in) :: freq1

The starting frequency, in units of rad/s.

real(kind=real64), intent(in) :: freq2

The ending frequency, in units of rad/s.

procedure(modal_excite), intent(in), pointer :: frc

A pointer to a routine used to compute the modal forcing function.

integer(kind=int32), intent(out), optional, dimension(:) :: ranks

Provides information on the rank of the dynamic stiffness matrix for each frequency. If provided, this array must be the same length as freq.

class(*), intent(inout), optional :: args

An optional argument that can be used to communicate with the outside world.

Return Value type(frf)

The resulting frequency responses.

private function siso_freqres(x, y, fs, win, method) result(rst)

Estimates the frequency response of a single-input, single-output (SISO) system.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

An N-element array containing the excitation signal.

real(kind=real64), intent(in), dimension(:) :: y

An N-element array containing the response signal.

real(kind=real64), intent(in) :: fs

The sampling frequency, in Hz.

class(window), intent(in), optional, target :: win

The window to apply to the data. If nothing is supplied, no window is applied.

integer(kind=int32), intent(in), optional :: method

Enter 1 to utilize an H1 estimator; else, enter 2 to utilize an H2 estimator. The default is an H1 estimator.

An H1 estimator is defined as the cross-spectrum of the input and response signals divided by the energy spectral density of the input. An H2 estimator is defined as the energy spectral density of the response divided by the cross-spectrum of the input and response signals.

Return Value type(frf)

The resulting frequency response function.

private function mimo_freqres(x, y, fs, win, method) result(rst)

Estimates the frequency responses of a multiple-input, multiple-output (MIMO) system.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: x

An N-by-P array containing the P inputs to the system.

real(kind=real64), intent(in), dimension(:,:) :: y

An N-by-M array containing the M outputs from the system.

real(kind=real64), intent(in) :: fs

The sampling frequency, in Hz.

class(window), intent(in), optional, target :: win

The window to apply to the data. If nothing is supplied, no window is applied.

integer(kind=int32), intent(in), optional :: method

Enter 1 to utilize an H1 estimator; else, enter 2 to utilize an H2 estimator. The default is an H1 estimator.

An H1 estimator is defined as the cross-spectrum of the input and response signals divided by the energy spectral density of the input. An H2 estimator is defined as the energy spectral density of the response divided by the cross-spectrum of the input and response signals.

Return Value type(mimo_frf)

The resulting frequency response functions.