Example 7 Find the minimum perimeter of a convex pentagon with vertices at lattice points in the Cartesian coordinate plane.

 untranslated text retained the original line breaks and format.
Let the five vertices of this convex pentagon be $A_{1}, A_{2}, A_{3}, A_{4}$, and $A_{5}$. The coordinates are $A_{j}\left(x_{j}, y_{j}\right)$, and the vertices are represented by complex numbers: $A_{j}=x_{j}+i y_{j}, j=1,2,3,4,5$. Here, $\mathrm{i}$ is the imaginary unit.

Let $Z_{j}=A_{j+1}-A_{j}, j=1,2,3,4,5$. Let $A_{6}=A_{1}$, then we have:
(1) The real and imaginary parts of $Z_{j}$ are integers, and $\left|Z_{j}\right| \neq 0$ (thus $\left|Z_{j}\right| \geqslant 1$);
(2) $Z_{1}+Z_{2}+Z_{3}+Z_{4}+Z_{5}=0$;
(3) The perimeter of the convex pentagon $A_{1} A_{2} \cdots A_{5}$ is $\left|Z_{1}\right|+\left|Z_{2}\right|+\cdots+\left|Z_{5}\right|$.
By convexity, any two $Z_{j}, Z_{k} (j \neq k)$ do not have the same direction. From (1), if some $Z_{j}$ has $\left|Z_{j}\right| \neq 1$, then $Z_{j}$ can only be $\sqrt{2}, 2, \sqrt{5}, \cdots$.
The number of $Z_{1}, Z_{2}, \cdots, Z_{5}$ with modulus 1 is at most 4: $\pm 1, \pm \mathrm{i}$.
If $\left|Z_{1}\right|,\left|Z_{2}\right|, \cdots,\left|Z_{5}\right|$ have exactly 4 ones, by (2), the remaining one is 0, which contradicts (1).
If $\left|Z_{1}\right|,\left|Z_{2}\right|, \cdots,\left|Z_{5}\right|$ have exactly 3 ones, (if the remaining two have modulus $\sqrt{2}$, note that the modulus $\sqrt{2}$ can have at most 4: $1 \pm \mathrm{i}, -1 \pm \mathrm{i}$, then they will not satisfy (2)), in this case, the perimeter is $\geqslant 1+1+1+\sqrt{2}+2=5+\sqrt{2}$.

If $\left|Z_{1}\right|,\left|Z_{2}\right|, \cdots,\left|Z_{5}\right|$ have exactly two ones, and the remaining three are $\sqrt{2}$, the perimeter is $1+1+\sqrt{2}+\sqrt{2}+\sqrt{2}=2+3 \sqrt{2}$.
In other cases, the perimeter is not less than $1+4 \sqrt{2}$.
And $2+3 \sqrt{2}$ can be achieved:
Take $A_{1}(0,0), A_{2}(1,0), A_{3}(2,1), A_{4}(1,2), A_{5}(0,1)$ (as shown in Figure 7-7), then the perimeter of the convex pentagon $A_{1} A_{2} A_{3} A_{4} A_{5}$ is $2+3 \sqrt{2}$.
In summary, the minimum perimeter of a lattice convex pentagon is $2+3 \sqrt{2}$.