Question

Solve for H(s) and plot the magnitude and phase of that function in MATLAB. Make sure to use the freqs() command when doing so.

1Ω 1 F 1 H 1Ω 18

Please include all the steps and add comments to the code to help me understand the problem. Thank you

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hello,
       Please find the answer attached below. If the answer has helped you please give a thumbs up rating. Thank you and have a nice day!

********** Matlab Code************

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% transfer function derivation

s = tf([1 0],1);        % transfer function s
z1 = (1/s) + 1;         % impedance of R and C in series
z2 = 1/s;               % impedance of C
z = (z1*z2)/(z1+z2);    % z1 and z2 in parallel
clc;
h1 = z/(z+1)           % voltage division between R and z
num = [1 3 2 0 0 0 0 0];
den = [1 5 7 2 0 0 0 0 0];
w = logspace(-2,4);
freqs(num,den,w)
title('Frequency response for system 1');

%%%%%%%%%%%% sys 2
figure;
z1 = 1 + s;     % R + L in series
z2 = 1;         % R=1
z = (z1*z2)/(z1+z2);    % z1 and z2 in parallel
h2 = z/(s+z)           % voltage division between L and z
num = [1 3 2];
den = [1 5 7 2];
freqs(num,den,w)
title('Frequency response for system 2');

************** End of Code ************

Output:

h1 =

      s^7 + 3 s^6 + 2 s^5
---------------------------
s^8 + 5 s^7 + 7 s^6 + 2 s^5

Continuous-time transfer function.


h2 =

      s^2 + 3 s + 2
---------------------
s^3 + 5 s^2 + 7 s + 2

Continuous-time transfer function.

NOTE: You can see that both the transfer functions are the same (cancellation). Thus, we get two similar frequency responses:

Frequency response for system 1 10 10 10 10 10 10 -2 10 10 10 Frequency (rad/s) 2 -50 -100 10 10 -2 10 10 10 10 Frequency (ra

Frequency response for system 2 10 10 10 10 10 10 -2 10 10 10 Frequency (rad/s) 2 -50 -100 10 10 -2 10 10 10 10 Frequency (ra

**************************************************************

PS: Please do not forget the thumbs up!!

Add a comment
Know the answer?
Add Answer to:
Solve for H(s) and plot the magnitude and phase of that function in MATLAB. Make sure...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT