|
FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with data types and subroutines for coupled modal analysis. More...
Data Types | |
| type | structsensorgradtype |
| Data type representing a control input gradient. More... | |
| type | forcecontrolgradtype |
| Data type representing a control output gradient. More... | |
| type | controlstructtype |
| Data type representing the control-system/structure coupling. More... | |
| interface | writeobject |
| Standard routine for writing an object to file. More... | |
Functions/Subroutines | |
| subroutine | writecontrolstructtype (pCS, io, complexity) |
| Standard routine for writing an object to io. More... | |
| subroutine | initiatecontrolstruct (pCS, inputs, triads, joints, forces, numVreg, numNod, ierr) |
| Initializes the control struct data type. More... | |
| subroutine | getctrlparamswithstructsensors (ctrlParams, numStructCtrlParams, ctrlParamsWithStructSensors) |
| Finds all control input parameters coupled to structural DOFs. More... | |
| subroutine | getctrloutforces (forces, numCtrlOutForces, ctrlOutForces) |
| Finds all control out forces. More... | |
| subroutine | buildstructcontroljacobi (pCS, ctrl, sys, msim, ierr) |
| Computes the gradient matrices of forces w.r.t. controller inputs. More... | |
| subroutine | estimatecontrollerproperties01 (sys, ctrl, msim, whichVregIn, whichVregOut, ctrlProps, ierr) |
| Estimates the controller gradient properties by perturbation. More... | |
| subroutine | estimatecontrollerproperties02 (sys, ctrl, msim, whichVregIn, whichVregOut, ctrlProps, ierr) |
| subroutine | estimatecontrollerproperties03 (sys, ctrl, msim, whichVregIn, whichVregOut, ctrlProps, ierr) |
| subroutine | estimatecontrollerproperties04 (sys, ctrl, msim, whichVregIn, whichVregOut, nStep, ctrlProps, ierr) |
| subroutine | estimatecontrollerproperties500 (sys, ctrl, msim, whichVregIn, whichVregOut, ctrlProps, ierr) |
| Perturbation method without initial perturbation. More... | |
| subroutine | perturbcontroller (sys, ctrl, msim, iPert, dt, dy, numVregOut, whichVregOut, uy, ierr) |
| Perturbs one of the inputs of the control system. More... | |
| subroutine | deallocatectrlcopy (ctrl) |
| Deallocates a control system copy. More... | |
Module with data types and subroutines for coupled modal analysis.
This module contains some data types and associated subroutines for conducting coupled modal analysis of mechanim models with control systems.
| subroutine controlstructmodule::buildstructcontroljacobi | ( | type(controlstructtype), intent(inout) | pCS, |
| type(controltype), intent(in) | ctrl, | ||
| type(systemtype), intent(inout) | sys, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, intent(out) | ierr | ||
| ) |
Computes the gradient matrices of forces w.r.t. controller inputs.
| subroutine controlstructmodule::deallocatectrlcopy | ( | type(controltype), pointer | ctrl | ) |
Deallocates a control system copy.
| ctrl | Pointer to controltypemodule::controltype object to deallocate. |

| subroutine controlstructmodule::estimatecontrollerproperties01 | ( | type(systemtype), intent(inout) | sys, |
| type(controltype), intent(in) | ctrl, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, dimension(:), intent(in) | whichVregIn, | ||
| integer, dimension(:), intent(in) | whichVregOut, | ||
| real(dp), dimension(:,:,:), intent(out) | ctrlProps, | ||
| integer, intent(out) | ierr | ||
| ) |
Estimates the controller gradient properties by perturbation.
| sys | System level model data | |
| ctrl | Control system data | |
| [in] | msim | Matrix of simulation parameters |
| [in] | whichVregIn | Which vreg inputs to perturb |
| [in] | whichVregout | Which vreg outputs to read variation from |
| [out] | ctrlProps | 3D table for storing controller properties (no. of outputs, no. of controller properties, no. of inputs)
|
| [out] | ierr | Error flag |
We use a perturbation method, simular to the Matrix Stiffness Method / (Virtual) Displacement Method / Unit Load Method to find the equivalent mechanical properties of the controller. These controller properties will be added to existing matrices when conducting modal/eigenvalue analysis.
In this routine, the controller is limited to be of type PID. The equation for the system is:
M*x'' + C*x' + K*x + Q*int(x)dt = F
or
M*(d2x/dt2) + C*(dx/dt) + K*x + Q*int(x)dt = F
where M is the mass, C is the damping, K is the stiffness, and Q is the steady state error elimination.
Controller input = y, controller output = u.
The values of interest are:
Working order:


| subroutine controlstructmodule::estimatecontrollerproperties02 | ( | type(systemtype), intent(inout) | sys, |
| type(controltype), intent(in) | ctrl, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, dimension(:), intent(in) | whichVregIn, | ||
| integer, dimension(:), intent(in) | whichVregOut, | ||
| real(dp), dimension(:,:,:), intent(out) | ctrlProps, | ||
| integer, intent(inout) | ierr | ||
| ) |
| subroutine controlstructmodule::estimatecontrollerproperties03 | ( | type(systemtype), intent(inout) | sys, |
| type(controltype), intent(in) | ctrl, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, dimension(:), intent(in) | whichVregIn, | ||
| integer, dimension(:), intent(in) | whichVregOut, | ||
| real(dp), dimension(:,:,:), intent(out) | ctrlProps, | ||
| integer, intent(inout) | ierr | ||
| ) |
| subroutine controlstructmodule::estimatecontrollerproperties04 | ( | type(systemtype), intent(inout) | sys, |
| type(controltype), intent(in) | ctrl, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, dimension(:), intent(in) | whichVregIn, | ||
| integer, dimension(:), intent(in) | whichVregOut, | ||
| integer, intent(in) | nStep, | ||
| real(dp), dimension(:,:,:), intent(out) | ctrlProps, | ||
| integer, intent(inout) | ierr | ||
| ) |
| subroutine controlstructmodule::estimatecontrollerproperties500 | ( | type(systemtype), intent(inout) | sys, |
| type(controltype), intent(in) | ctrl, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, dimension(:), intent(in) | whichVregIn, | ||
| integer, dimension(:), intent(in) | whichVregOut, | ||
| real(dp), dimension(:,:,:), intent(out) | ctrlProps, | ||
| integer, intent(inout) | ierr | ||
| ) |
Perturbation method without initial perturbation.
Perturbation w.r.t. a single integral. nPerturb = 1 in this subroutine, therefore no loop necessary.
| subroutine controlstructmodule::getctrloutforces | ( | type(forcetype), dimension(:), intent(in), target | forces, |
| integer, intent(out) | numCtrlOutForces, | ||
| integer, dimension(:), intent(out), pointer | ctrlOutForces | ||
| ) |
Finds all control out forces.
| subroutine controlstructmodule::getctrlparamswithstructsensors | ( | type(ctrlprm), dimension(:), intent(in), target | ctrlParams, |
| integer, intent(out) | numStructCtrlParams, | ||
| integer, dimension(:), intent(out), pointer | ctrlParamsWithStructSensors | ||
| ) |
Finds all control input parameters coupled to structural DOFs.
| subroutine controlstructmodule::initiatecontrolstruct | ( | type(controlstructtype), intent(out) | pCS, |
| type(ctrlprm), dimension(:), intent(in), target | inputs, | ||
| type(triadtype), dimension(:), intent(in), target | triads, | ||
| type(masterslavejointtype), dimension(:), intent(in), target | joints, | ||
| type(forcetype), dimension(:), intent(in), target | forces, | ||
| integer, intent(in) | numVreg, | ||
| integer, intent(in) | numNod, | ||
| integer, intent(out) | ierr | ||
| ) |
Initializes the control struct data type.
| subroutine controlstructmodule::perturbcontroller | ( | type(systemtype), intent(inout) | sys, |
| type(controltype), intent(inout) | ctrl, | ||
| integer, dimension(:), intent(in) | msim, | ||
| integer, intent(in) | iPert, | ||
| real(dp), intent(in) | dt, | ||
| real(dp), intent(in) | dy, | ||
| integer, intent(in) | numVregOut, | ||
| integer, dimension(:), intent(in) | whichVregOut, | ||
| real(dp), dimension(:), intent(out) | uy, | ||
| integer, intent(out) | ierr | ||
| ) |
Perturbs one of the inputs of the control system.
| sys | System level model data | |
| ctrl | Control system data | |
| [in] | msim | Matrix of simulation parameters |
| [in] | iPert | Which input to perturb |
| [in] | dt | Incremental time step |
| [in] | dy | Incremental step for use in du/dy |
| [in] | numVregOut | Number of outputs from the controller to read |
| [in] | whichVregOut | Which outputs from the controller to read |
| [out] | uy | Perturbed output from controller, u(y) = u(y0+dy) |
| [out] | ierr | Error flag |
This subroutine perturbs one of the control inputs and calculates the reaction in all of the control outputs.
Working order: 1) Change the input y for the controller from y0 to y = y0+dy, where dy is a small number. Change the time from t0 to t = t0+dt, where dt is a small number. 2) Run this new input through the controller to get the reaction (output) u(y) from the controller due to the change in the input.


| subroutine controlstructmodule::writecontrolstructtype | ( | type(controlstructtype), intent(in) | pCS, |
| integer, intent(in) | io, | ||
| integer, intent(in) | complexity | ||
| ) |
Standard routine for writing an object to io.
| [in] | pCS | Data for coupled control system and structure modal analysis |
| [in] | io | File unit number to write to |
| [in] | complexity | Indicates the amount of print |