Question

Exercise 1 (Transfer Function Analysis) MATLAB provides numerous commands for working with polynomials, ratios of polynomials

Please do part C only, thank you.

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

MATLAB:

clc;clear all;close all;
b=[1 0 0 0]%Numerator
a=[1 13/6 1/6 -1/3]%denominator

%Impulse response using residuez
[z,p,k]=residuez(b,a)

figure;
subplot(121)
h=impz(b,a,20)
stem([0:19],h,'r')
xlabel('n');ylabel('h(n)');title('Impulse response from partial fraction expansion')

%Impulse response from impz command
subplot(122)
n=0:1:19
%combine partial fraction coeffs and poles in the follwoing way
H=(z(1)*(p(1).^n)).+(z(2)*(p(2).^n)).+(z(3)*(p(3).^n))
%k is an empty vector. Hence its not included
stem(n,H,'b')
xlabel('n');ylabel('h(n)');title('Impulse response from impz command')

%TF in Z and interms of z^-1
sys1=tf(b,a,0.1)
sys2 = tf(b,a,0.1,'Variable','z^-1')
%To prove that H(z) in z and z^-1 are same.
figure;
bode(sys1);
figure;
bode(sys2);

Command window:

>> z
z =

0.057143
1.142857
-0.200000

>> p
p =

0.33333
-2.00000
-0.50000

>> k
k = [](0x0)

>>poly(p)
ans =

1.00000 2.16667 0.16667 -0.33333

Transfer function 'sys1' from input 'u1' to output ...

z^3
y1: -----------------------------------
z^3 + 2.167 z^2 + 0.1667 z - 0.3333

Sampling time: 0.1 s
Discrete-time model.

Transfer function 'sys2' from input 'u1' to output ...

1
y1: ------------------------------------------
1 + 2.167 z^-1 + 0.1667 z^-2 - 0.3333 z^-3

Sampling time: 0.1 s
Discrete-time model.

plots:

Impulse response from partial fraction expansion 400000 Impulse response from impz command 400000 200000 200000 -200000 -2000

Bode Diagram 4 2 -6 -8 -10 10 10 150 100 50 10 Frequency [rad/s]

Bode Diagram 2 -6 -8 -10 10 10 150 100 50 10 Frequency [rad/s]

Add a comment
Know the answer?
Add Answer to:
Exercise 1 (Transfer Function Analysis) MATLAB provides numerous commands for working with polyno...
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
  • Finally, we now mention MATLAB commands that can be used to help in the partial fraction...

    Finally, we now mention MATLAB commands that can be used to help in the partial fraction decomposition of rational functions. This can be used when we need to express the Laplace transform as a partial fraction and then using a table and uniqueness property of the Laplace transform derive the time function. First, lookup how the commands collect and expand work. Now, read up on the documentation of command [x,p,k]=residue (b, a) to answer the following questions. Lab Exercise 1....

  • Solve the following using MATLAB: 3. Consider the transfer function: H S ) = 6 2s2...

    Solve the following using MATLAB: 3. Consider the transfer function: H S ) = 6 2s2 + 6s 2s4 + 8 s +3 .4 L + 3 a) Write lines of code to find the zeros and poles of the above transfer function. b) Write lines of code to find a partial fraction expansion of the above transfer function.

  • 4s +1 2s2 +13s 20 H(s) = 1- Use MATLAB to plot the magnitude and phase...

    4s +1 2s2 +13s 20 H(s) = 1- Use MATLAB to plot the magnitude and phase responses of this filter. Label 2- What is the type of this filter type (lowpass, highpass, bandpass,.. .? Plcase 3- Derive the partial fraction expansion of H(s) using the residue command in 4- Determine the impulse response h(t) of the system and plot it using MATLAB. the axes completely. explain. MATLAB and write the expression.

  • 2. For the transfer functions in problem 1 (a)(d)(e), find the corresponding impulse response functions h(t) using par...

    2. For the transfer functions in problem 1 (a)(d)(e), find the corresponding impulse response functions h(t) using partial fraction expansion and determine the value of lim h(t) if the limit exists. Verify that lim- n(t)-0 for stable systems. (optional) After performing the partial fraction expansion by hand (required), yoiu are encouraged to use MATLAB to verify your results. MATLAB has a function called 'residue' that can calculate poles (pi) and residues (ci). For example, the following line will calculate the...

  • Using MATLAB 4) Consider the stable second-order continuous transfer function (in s domain): H = S...

    Using MATLAB 4) Consider the stable second-order continuous transfer function (in s domain): H = S +1 S2 + 3s + 2 Using the command Hd = c2d (H, Ts) with Ts = 0.1, convert H to the z domain. On the same Figure, plot the continuous impulse response of the system against the discrete one. Considering your work in problem 4, 5) Vary Ts (Ts = 0.7, 0.5, 0.3, 0.1) and observe the plot of the continuous impulse response...

  • 3. You are given a system transfer function belowl 20 points): 100 (1 +0.001 je) TF(a) a. Convert...

    3. You are given a system transfer function belowl 20 points): 100 (1 +0.001 je) TF(a) a. Convert TF(o) to transfer function H (s) of the system in polynomial ratio form. Draw a Bode plot using Matlab statements: tf and bode. List two commands to plot Bode chart. b. There are two cutoff frequencies at low and high from the poles. Estimate lower cut off frequencies (from 40 dB to 37db) from the Bode plot using "data cursor" icon in...

  • A classic second order system has transfer function the undamped natural frequency to be 10 rad/s throughout this exercise. Note, for the following MATLAB simulations you need to use format long defi...

    A classic second order system has transfer function the undamped natural frequency to be 10 rad/s throughout this exercise. Note, for the following MATLAB simulations you need to use format long defined at the top of the program to get full precision. a) Use MATLAB to plot the step response for three damping factors of ζ =0.5,1 and 1.5 respectively. step(g,tfinal)_ where tfinal is the max time you need to make it 2 secs and g is the b) Takeζ...

  • Consider a negative feedback system whose open-loop transfer function is: G(s)H(s)=K/(s(s+1)) Write a MATLAB program to...

    Consider a negative feedback system whose open-loop transfer function is: G(s)H(s)=K/(s(s+1)) Write a MATLAB program to obtain the root-locus plot of G(s)H(s). [2 marks] What are the locations of poles when K = 0.19. [2 marks] When K = 0.4, what are the locations of poles? [3 marks] Find values of the damping ratio, % overshoot and frequency when K = 0.4. [3 marks] Write a MATLAB program to obtain a bode plot of G(s)H(s) when K = 1. [2...

  • 2.6.1 Consider a causal continuous-time LTI system described by the differential equation u"(t) +...

    2.6.1-2.6.62.6.1 Consider a causal contimuous-time LTI system described by the differential equation$$ y^{\prime \prime}(t)+y(t)=x(t) $$(a) Find the transfer function \(H(s)\), its \(R O C\), and its poles.(b) Find the impulse response \(h(t)\).(c) Classify the system as stable/unstable.(d) Find the step response of the system.2.6.2 Given the impulse response of a continuous-time LTI system, find the transfer function \(H(s),\) the \(\mathrm{ROC}\) of \(H(s)\), and the poles of the system. Also find the differential equation describing each system.(a) \(h(t)=\sin (3 t) u(t)\)(b)...

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
ADVERTISEMENT