Function: VRFT2_ry_dy


 

[Cr,Cy] = VRFT2_ry_dy(u,y,Mr,Md,Br,By,Wr,Wd,fIA,k,optFilt)

Design a 2 d.o.f. linear controller so as to match the r(t) to y(t) transfer function and the d(t) to y(t) transfer function (see figure below). (see Figure 1).

Figure 1: 2 degree of freedom control scheme.


Inputs (compulsory)

- u: column vector (Nx1) that contains the INPUT data collected from the plant.

- y: column vector (Nx1) that contains the OUTPUT data collected from the plant. If y is a Nx2 matrix, the two columns contain the output data collected in 2 different experiments (both experiments are made with the same input u(t); the two noise realizations must be uncorrelated).

- Mr: tf-object that represents the discrete transfer function of the reference model. The reference model Mr(z) describes the desired closed loop behaviour from the reference r(t) to the output y(t).

- Md: tf-object that represents the discrete transfer function of the reference model. The reference model Md(z) describes the desired closed loop behaviour from the signal d(t) to the output y(t) (output sensitivity).

- Mu: tf-object that represents the discrete trasfer function Mu(z) that describes the desired dynamical relationship from d(t) to u(t) (input sensitivity).

- Br: column vector of tf-objects. The linear controller Cr has the following structure: Cr(z,θr)= Br'*θr, where Br is a column vector of transfer functions, and θr is the vector of parameters.

- By: column vector of tf-objects. The linear controller Cy has the following structure: Cy(z,θy)= By'*θy, where By is a column vector of transfer functions, and θy is the vector of parameters.

 


Inputs (optional)

- Wr: tf-object of the weighting function Wr(z). If this parameter is empty [], the function automatically sets Wr(z) = 1.

- Wd: tf-object of the weighting function Wd(z). If this parameter is empty [], the function automatically sets Wd(z) = 1.

- fIA: this parameter must be use only if an integral action is inclused in both control structures Br and By. Otherwise this parameter must be empty: []. If: fIA = 'y' the constraint on the fixed integral action is enabled in order to have null tracking error (Mr(1) = 1) and perfect disturbance rejection (Md(1) = 0); fIA = 'n' the constraint on the fixed integral action is disabled (Mr(1) = Cr(1)/Cy(1)).

- k: this parameter must be used only if the measured output y is noisy, and a single experiment is available; in this case this parameter sets the order of an ARX(k,k) model used to make an approximate model of the plant. Otherwise this parameter must be empty: [].

- optFilt: if this parameter is set to 'n', the optimal filter is disabled, and the filter Lr(z) and Ly(z) are set to 1. If this parameter is empty ([]) the function uses the optimal VRFT filter.

 


Outputs

- Cr: tf-object, which represents the transfer function of the designed controller Cr(z,θr).

- Cy: tf-object, which represents the transfer function of the designed controller Cy(z,θy).