Nilpotency class of a certain finite 2-group Let $G_d$ be the group with the following presentation
$$\langle x,y \mid x^{2^{d+1}}=1, x^4=y^2, [x,y,x]=x^{2^{d}}, [x,y,y]=1\rangle,$$
where $d>2$ is an integer.
It is clear that $G_d$ is a finite $2$-group of nilpotency class at most $3$.
It is easy to see that $[x,y]^2=1$ and since the quaternion group $Q_8$ of order $8$ is a quotient of $G_d$,  $[x,y]$ has order $2$. So the nilpotency class of $G_d$ is $2$ or $3$. 
The computation with GAP shows that $G_d$ is nilpotent of class exactly $3$, whenever $d=3,4,5,6,7,8,9$. 
Question: Is the nilpotency class of $G$ $3$?
 A: To show $w$ is nontrivial in Max's presentation, note first that the group $H_d$ formed by the "subpresentation" $\langle y,z,w \mid y^{2^{d-1}} = w, w^2=z^2=1, z^y=z, w^z=w \rangle$
is equal to the abelian group $\langle y \rangle \times \langle z \rangle$ of order $2^{d+1}$, and $w$ is certainly a nontrivial element of $H_d$.
Now note that the map $y \to yz$, $z \to zw$ defines an automorphism of $H_d$ of order 4. Let $X = \langle x \rangle$ be cyclic of order $2^{d+1}$. Then we can form the semidirect product $X \ltimes H_d$ where conjugation by $x$ induces this automorphism. So $y^x=yz$, $z^x = zw$. In this semidirect product, $x^4$ and $y^2$ are both central elements of order $2^{d-1}$. So we can factor out the cyclic subgroup
$\langle x^4y^{-2} \rangle$, which intersects $H_d$ trivially, and hence gives the group with Max's presentation in which $w$ is nontrivial.
A: The nilpotency class of $G_d$ is indeed always 3. One way to see this is to rewrite the presentation of $G_d$ in such a way to exhibit that it is a polycyclic group. For this purpose, let $z:=[x,y]$ and $w:=y^{2^{d-1}}=x^{2^d}$. Clearly $w$ lies in the center of $G_d$. With a little more effort we see that
$$ G_d \cong \langle x, y, z, w\mid x^4 = y^2, y^{2^{d-1}} = w, z^2 = w^2 = 1 ; y^x = yz, z^x = zw, z^y = z, w^x=w^y=w^z=w \rangle $$
This is indeed a polycyclic presentation, with relative order $4, 2^{d-1}, 2, 2$. (Thus the group has order $4* 2^{d-1}* 2* 2=2^{d+3}$).
But now it is easy to read off that $[G_d,G_d] = \langle z, w\rangle$, and thus $[[G_d,G_d],G_d]=\langle w \rangle$, which is central. Hence the nilpotency class is 3.
A: If the nilpotency class is $2$, then we must have $[a,b,c]=1$ for all $a,b,c\in G_d$. But 
we have $[x,y,x]=x^{2^d}\neq 1$ from the presentation.
