MATLAB: Am i receiving “Conversion to double from tf is not possible.”

transfer function

Ke = 9.55; % back emf constant (V*s/rad) Ct = 0.0048; % Thrust constant Jm = 5*10^-6; % motor inertia (lb*ft*s^2) Df = 2*10^-4; % motor damping (Nm*s/rad) Tf = 4*10^-2; % motor friction (lb*ft/rad/s) Tl = 1; % load friction (lb*ft/rad/s) R = 0.2; % armature resistance (ohms) L = 0; % armature inductance (Henry) Nb = 4; % blade number Mb = 0.0055; % blade mass r = 0.12; % blade radius P = 1.225; % air density Cq = Ct*(Ct/2)^.5; % torque constant Jl = .25*Nb*Mb*r^2; % load inertia (lb*ft*s^2) Kt = Cq*P*pi*r^2; % motor constant (lb*ft/A)
t = [0:0.5:200]; num = [R*(Jm+Jl) R*(Tl+Df)+Ke R*Tf]; den = Kt; sys = tf(num, den); plot(sys)

Best Answer

The output returned by tf is a structure of cell arrays. If you want to get the numerator and denominator from the transfer function, you need to access them as such.
Example
TFNum = sys.Numerator{:};
TFDen = sys.Denominator{:};
Those will be returned as double-precision vectors.