To find the vertex, I can use the fact that it occurs at the average of the roots of the quadratic equation in each variable. For example, to find the value of $x$ that minimizes $z$, I can treat $y$ as a constant and look at $z$ as a function of $x$. Then I have $z=x^2+6x+(2y^2-4y+22)$, which is a quadratic equation in $x$. The average of these roots is $\frac{-6}{2}=-3$, so the value of $x$ that minimizes $z$ is $-3$. Similarly, to find the value of $y$ that minimizes $z$, I can treat $x$ as a constant and look at $z$ as a function of $y$. Then I have $z=2y^2-4y+(x^2+6x+22)$, which is a quadratic equation in $y$. The average of these roots is $\frac{4}{4}=1$, so the value of $y$ that minimizes $z$ is $1$. Therefore, the minimum value of $z$ occurs when $x=-3$ and $y=1$. To find the actual value of $z$ at this point, I can plug in these values into the original expression for $z$: $z=(-3)^2+2(1)^2+6(-3)-4(1)+22$. Simplifying, I get $z=9+2-18-4+22=11$. 
What is the minimum value of $z$ if $z=x^2+2y^2+6x-4y+22?$