How to check if two transfer functions are the same?

Illustration
Sebastian - 2020-11-18T10:56:42+00:00
Question: How to check if two transfer functions are the same?

I want to verify that two transfer functions are equal.   For example:   Kc = 0.4262; Ti=1.35; C1 = pidstd(Kc,Ti); tf(C1) s = tf('s'); Gc1 = Kc*(1+1/(Ti*s)) assert(tf(C1) == Gc1) Raises:   Undefined operator '==' for input arguments of type 'tf'.   Also note: Gc1 tf(C1) Gc1 - tf(C1) Gc1 =   0.5754 s + 0.4262 ----------------- 1.35 s   Continuous-time transfer function.     ans =   0.4262 s + 0.3157 ----------------- s   Continuous-time transfer function.     ans =   0   Static gain.

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

isequal(tfdata(tf(C1) - Gc1), {[0]})

This will probably fail if there are delays in the tf.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!