function [Gds22 Gdm22 Gdms22]=gmsd22(Gd22)

ztot=zero(Gd22); ptot=pole(Gd22);
z=ztot(find(ztot>0)); p=ptot(find(ptot>0));

nz=length(z); np=length(p);

s=tf('s');
b=1;a=1;     
for i = 1:np
    b=b*(s-p(i))/(s+p(i));
end;
for i = 1:nz
    a=a*(s+z(i))/(s-z(i));
end    

Gds22=minreal(tf(b*Gd22));Gdm22=minreal(tf(Gd22*a)); Gdms22=minreal(tf(b*Gd22*a));