Initializes the state space model.
The output matrix is initialized to one, and the feedthrough matrix is initialized to zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | m |
The N-by-N mass matrix. |
|
| real(kind=real64), | intent(in), | dimension(size(m, 1), size(m, 2)) | :: | b |
The N-by-N damping matrix. |
|
| real(kind=real64), | intent(in), | dimension(size(m, 1), size(m, 2)) | :: | k |
The N-by-N stiffness matrix. |
|
| integer(kind=int32), | intent(in), | optional | :: | n_out |
The number of outputs. The default is 1. |
The [[state_space]] model.
Initializes the state space model.
The output matrix is initialized to one, and the feedthrough matrix is initialized to zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | m |
The mass. |
||
| real(kind=real64), | intent(in) | :: | b |
The damping. |
||
| real(kind=real64), | intent(in) | :: | k |
The stiffness. |
The [[state_space]] model.
Initializes the state space model.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | a |
The N-by-N dynamics matrix. |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | b |
The N-by-M input matrix. |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | c |
The P-by-N output matrix. |
|
| real(kind=real64), | intent(in), | dimension(:,:) | :: | d |
The P-by-M feedthrough matrix. |
The resulting [[state_space]] object.
Initializes a state-space model that employs a closed-loop PID controller.
The PID model is augmented into the plant model as follows.
Where the augmented matrices are as follows.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | kp |
The proportional gain term. |
||
| real(kind=real64), | intent(in) | :: | ki |
The integral gain term. |
||
| real(kind=real64), | intent(in) | :: | kd |
The derivative gain term. |
||
| real(kind=real64), | intent(in) | :: | tau |
The time constant of the first order derivative filter . |
||
| real(kind=real64), | intent(in), | dimension(:,:) | :: | a |
The N-by-N dynamics matrix for the plant. |
|
| real(kind=real64), | intent(in), | dimension(size(a, 1), 1) | :: | b |
The N-by-1 input matrix for the plant. |
|
| real(kind=real64), | intent(in), | dimension(1, size(a, 1)) | :: | c |
The 1-by-N output matrix for the plant. |
|
| real(kind=real64), | intent(in), | dimension(1, 1) | :: | d |
The 1-by-1 feedthrough matrix for the plant. |
The resulting [[state_space]] object.
Initializes a state-space model that employs a closed-loop PID controller.
The PID model is augmented into the plant model as follows.
Where the augmented matrices are as follows.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | kp |
The proportional gain term. |
||
| real(kind=real64), | intent(in) | :: | ki |
The integral gain term. |
||
| real(kind=real64), | intent(in) | :: | kd |
The derivative gain term. |
||
| real(kind=real64), | intent(in) | :: | tau |
The time constant of the first order derivative filter . |
||
| class(state_space), | intent(in) | :: | plant |
The plant model. |
The resulting [[state_space]] object.