function ZPKData = zpk(PID)
% Conversion to @zpkdata.

%   Author(s): Rong Chen
%   Copyright 1986-2010 The MathWorks, Inc.
%   $Revision $  

% Compute zeros, poles and gain from iodynamics
[Num1,Num2,P1,P2] = getTF(PID);
Z1 = roots(Num1);
K1 = Num1(end-length(Z1));
Z2 = roots(Num2);
K2 = Num2(end-length(Z2));
ZPKData = ltipack.zpkdata({Z1,Z2},{P1,P2},[K1 K2],PID.Ts);
