Virtual Reference Feedback Tuning
Virtual Reference Feedback Tuning is a data driven method used to design a controller for an unknown plant based on input/output measurements. The method uses a single set of input/output data generated by the plant without the need for specific experiments or model identification.
This is the first post in a series of posts detailing the method and explaining how to use it in MATLAB.
- Virtual Reference Feedback Tuning (this post)
- VRFT in MATLAB - Coming Soon
How Does It Work ?
The general idea behind VRFT is to transform the control problem of designing the controller into an identification problem. To use the VRFT method we need:
- A reference Model. This is a model that describes the ideal behaviour of the closed loop system.
- One set of input-output data on the plant. The input does not need to have any special characteristics.
Block diagram showing the closed loop control system and the reference model.
The output of the plant is the known from the I/O data that was previously collected. If we consider these measurements as the output of the reference model then we can build an input signal \(r(t)\) such that:
This signal is the virtual reference. We want to make the closed loop behaviour of the system as close as possible to the reference model so we use this virtual reference as the set-point for the control loop. The output of the controller is the plant input \(u(t)\). This is the other known signal.
The input of the controller can easily be calculated:
Now that both the input and the output (\(u(t)\)) of the controller are known the control problem can be reduced to an identification problem.
A More Rigorous approach
It is assumed that the plant is a linear SISO discrete-time dynamical system described by a rational transfer function (\(P(z)\)).
We choose a reference model \(M_R(z)\) that describes the desired behaviour of the closed loop control system.
We determine a class of controllers \(C(z; \theta)\) that depend linearly on the parameter vector \(\theta\) such that:
Where:
- \(\beta = [\beta_1(z), \beta_2(z), ..., \beta_n(z)]^T\) is a vector of linear transfer functions
- \(\theta = [\theta_1, \theta_2, ... \theta_n]^T\) is the vector of parameters
The control objective is the minimisation of the following criterion:
which is equivalent to minimising the difference between the closed loop system and the reference model scaled by an appropriate weighting function. The choice of this weighting function \(W(z)\) is up to the system designer and can be chosen to emphasize or de-emphasize performance in certain frequency bands.
An optimal choice of \(C(z; \theta)\) will produce a closed loop system whose transfer function is \(M(z)\). Thus, if the closed-loop system is fed a reference signal \(r(t)\) its output will be :
The VRFT method works by using the measured output (\(y(t)\)) to generate a reference signal \(\bar{r}(t)\) such that:
This is our so-called virtual reference, it does not exist in the physical world and is only used a tool to generate the optimal controller. The input of the controller is:
The optimal controller must be such that when fed the virtual reference it produces the measured input (\(u(t)\)). Thus:
Where \(\hat{\theta}\) is the optimal parameter vector.
To calculate the optimal parameter vector we can start by attempting to solve a slightly easier problem.
We apply a filter \(L(t)\) to the data. I will explain the reason for this filter and it's form soon but bear with me in the meantime.
Now, consider the following performance index:
Since this equation is quadratic in \(\theta\) the optimal value \(\hat{\theta}_N\) is an explicit function of the data:
However, this doesn't seem to bring us any closer to solving our original problem of minimising \(J_{MR}\). This method though is useful because it is based purely on the data and is relatively easy to compute.
Before continuing we need to make a digression. Let's rewrite \(J_{MR}\) in the frequency domain:
We can now go back to \(J_{VR}\).
If \(u(t)\) and \(y(t)\) can be considered realisations of stationary stochastic processes then as the amount of data grows (\(N \rightarrow \infty\)) the following holds:
And:
We would like to get rid of \(e(t)\) in the equation to make it depend only on our initial data:
And since:
We can rewrite the criterion as:
We also know that, by definition, \(M_R\) is:
Which brings us to:
By substituting this result back into \(J_{VR}\) we obtain:
The frequency-domain representation of this criterion is:
Where, \(\Phi_u\) is the power density of \(u(t)\).
If \(C_0(z) \in C(z; \theta)\) and \(J_{VR}(\theta)\) has a unique minimum then minimizing \(J_{VR}(\theta)\) will always yield \({C_0(z)}\) independently of the value of \(L(z)\).
Notice the similarity between the expressions of \(J_{MR}\) and \(J_{VR}\). With a proper choice of the pre-filter \(L(z)\) we can make them equal.
If:
Then,
Unfortunately this pre-filter is not practical since it depends on knowing the plant model \(P\). However, if \(C(z; \theta)\) is a good approximation of \(C_0(z)\) then:
Thus, \(L(z)\) can be written as:
This formulation of the pre-filter is completely known. This proves that \(J_{MR}\) and \(J_{VR}\) are equivalent and that by solving the simpler problem (\(J_{VR}\)) we also solve the original problem (\(J_{MR}\)).
Recap
In conclusion, the VRFT method can be broken down into a set of relatively simple steps:
- Choose a reference model \(M_R\) and class of controllers \(C(z; \theta)\)
- Calculate the pre-filter \(L(z)\)
- Compute the optimal parameter vector \(\hat{\theta}_N\)
The VRFT method can be extended to cases where the signal is noisy, we will discuss this in a later post. The VRFT method has also been extended to cascade control systems. This too will be the subject of a later post.