Example 2 Given the quadratic function
$$
f(x)=4 x^{2}-4 a x+\left(a^{2}-2 a+2\right)
$$

the minimum value on $0 \leqslant x \leqslant 1$ is 2. Find the value of $a$.
(2001, Hunan Province High School Mathematics Olympiad Selection Contest)
Notice that
$$
f(x)=4\left(x-\frac{a}{2}\right)^{2}-2 a+2 \text {. }
$$

It is easy to see that the graph opens upwards, and the axis of symmetry is $x=\frac{a}{2}$. Therefore, we can solve the problem by classifying it according to the three possible positions of the axis of symmetry $x=\frac{a}{2}$ relative to the closed interval $x \in [0,1]$.
(1) When $\frac{a}{2} > 1$, i.e., $a > 2$, by the problem statement,
$$
f(x)_{\text {min }}=f(1)=4-4 a+a^{2}-2 a+2=2 \text {. }
$$

Solving this, we get $a=3 \pm \sqrt{5}$.
Since $a > 2$, we have $a=3+\sqrt{5}$.
In summary, $a=0$ or $3+\sqrt{5}$.