frequency_response Interface

public interface frequency_response

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


Contents


Module Procedures

private function frf_modal_prop_damp(mass, stiff, alpha, beta, freq, frc, modes, modeshapes, args, err) 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.

class(errors), intent(inout), optional, target :: err

An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.

  • DYN_MEMORY_ERROR: Occurs if there are issues allocating memory.
  • DYN_MATRIX_SIZE_ERROR: Occurs if the mass or stiffness matrices are not square, or if the mass and stiffness matrices are different sized.
  • DYN_NULL_POINTER_ERROR: Occurs if the forcing function pointer is undefined.

Return Value type(frf)

The resulting frequency responses.

private function frf_modal_prop_damp_2(mass, stiff, alpha, beta, nfreq, freq1, freq2, frc, modes, modeshapes, args, err) 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, .

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.

class(errors), intent(inout), optional, target :: err

An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.

  • DYN_MEMORY_ERROR: Occurs if there are issues allocating memory.
  • DYN_MATRIX_SIZE_ERROR: Occurs if the mass or stiffness matrices are not square, or if the mass and stiffness matrices are different sized.
  • DYN_NULL_POINTER_ERROR: Occurs if the forcing function pointer is undefined.

Return Value type(frf)

The resulting frequency responses.

private function siso_freqres(x, y, fs, win, method, err) 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.

class(errors), intent(inout), optional, target :: err

An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.

  • DYN_MEMORY_ERROR: Occurs if there are issues allocating memory.

  • DYN_ARRAY_SIZE_ERROR: Occurs if x and y are not the same size.

Return Value type(frf)

The resulting frequency response function.

private function mimo_freqres(x, y, fs, win, method, err) 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.

class(errors), intent(inout), optional, target :: err

An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.

  • DYN_MEMORY_ERROR: Occurs if there are issues allocating memory.

  • DYN_ARRAY_SIZE_ERROR: Occurs if x and y do not have the same number of rows.

Return Value type(mimo_frf)

The resulting frequency response functions.