Function: VRFT1_ry_ru
C = VRFT1_ry_ru(u,y,Mr,Mu,B,Wr,Wu,lambda,k,optFilt)
Design a 1 d.o.f. linear controller so as to match the r(t) to y(t) closed-loop transfer function with the model reference Mr and the r(t) to u(t) input sensitivity with the model reference Mu (see Figure 1).
Figure 1: 1 degree of freedom control scheme.
Inputs (compulsory)- u: column vector (Nx1) that contains the INPUT data collected from the plant.
- y: matrix (Nx2) that contain the OUTPUT data collected from the plant: y(:,1) contains the output of the plant when it is fed by u; y(:,2) contains the output of the plant when it is fed by y(:,1). If y is a Nx4 matrix, the columns 1 and 2 contains the OUTPUT data collected in the first experiment and the columns 3 and 4 contains the OUTPUT data collected in the second experiments (the noise realizations in the two experiments 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).
- Mu: tf-object that represents the discrete trasfer function Mu(z) that describes the desired dynamical relationship from r(t) to u(t) (input sensitivity).
- B: column vector of tf-objects. The linear controller has the following structure: C(z,θ)= B'*θ, where B is a column vector of transfer functions, and θ 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.
- Wu: tf-object of the weighting function Wu(z). If this parameter is empty [], the function automatically sets Wu(z) = 1.
- lambda: this parameter is used to balance the emphasis on Mr (lambda close to 0) or on Mu (lambda close to 1). Note that 0<=lambda<=1. If this parameter is empty [], the function automatically sets lambda = 0.5.
- 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 L(z) is set to 1. If this parameter is empty ([]) the function uses the optimal VRFT filter.
Outputs
- C: tf-object, which represents the transfer function of the designed controller.