How to check if two transfer functions are the same?

S
Sebastian · Nov 18, 2020 · 2K views
Question
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 PhD Expert
Answered Aug 11, 2026
isequal(tfdata(tf(C1) - Gc1), {[0]})

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

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!