Q4) For the given question, the transfer function is :
So first we write a MATLAB code to create this transfer function and to convert it to the z domain for the given sampling time Ts = 0.1s. The code snippet to do the same is as follows:
clear
clc
close all
% create a polynomial vector that represents the numerator
% and the denominator of the polynomial
num = [1 1];
den = [1 3 2];
% the numerator and denominator are put together to get
% transfer function
H = tf(num,den)
% sampling time is considered as 0.1s
Ts = 0.1;
% continuous domain in s is converted into discrete domain in z
Hd = c2d(H,Ts)
The output of this section of code can be seen as the transfer functions being displayed on the command window of MATLAB:
\
The z domain transfer function obtained is as follows (as in the above image):
The impulse response of the two transfer functions can be plotted on the same figure in MATLAB using the following piece of code:
% impulse response of the original transfer function
% for a time of 3s
impulse(H,3)
hold on % command to make the next plot on the same figure
% impulse response of discrete time transfer function
impulse(Hd,'r')
legend('continuous time','Ts = 0.1')
The impulse response of obtained is as follows:
Here, we can see that the discrete domain impulse response behaves similar to the continuous domain impulse response and is a form of approximation of the continuous one. Thus, there is an error between the two.
Q5) Now, in the previous question we vary the sampling times and see the changes in the plots. We consider the sampling times as Ts = {0.1,0.3,0.5,0.7}.
The entire code for this is as follows:
clear
clc
close all
% create a polynomial vector that represents the numerator
% and the denominator of the polynomial
num = [1 1];
den = [1 3 2];
% the numerator and denominator are put together to get
% transfer function
H = tf(num,den)
% sampling time is considered as 0.1s
Ts = 0.1;
% continuous domain in s is converted into discrete domain in z
Hd = c2d(H,Ts)
% impulse response of the original transfer function
% for a time of 3s
impulse(H,3)
hold on % command to make the next plot on the same figure
% impulse response of discrete time transfer function
impulse(Hd,'r')
% plot for 0.3s sampling time
Ts = 0.3;
Hd = c2d(H,Ts)
impulse(Hd,'g')
% plot for 0.5s sampling time
Ts = 0.5;
Hd = c2d(H,Ts)
impulse(Hd,'m')
% plot for 0.7s sampling time
Ts = 0.7;
Hd = c2d(H,Ts)
impulse(Hd,'c')
legend('continuous time','Ts = 0.1','Ts = 0.3','Ts = 0.5','Ts = 0.7')
The output plot we obtain from this is as follows:
As can be remarked from the figure, the precision of the approximations of the impulse response obtained from discrete domain transfer functions decreases progressively as the sampling time Ts increases. The red one closely tracks the original blue one while the error is greater in the green which is largest in the one represented by cyan.
Thus, we can conclude that smaller the sampling time better the precision of the approximation.
Q6) A very large Ts as seen in the above solution can cause a great lack of precision and be far off from the original one. While the issue with a very small Ts is that the computational load on the device is increased. Thus, a tradeoff between precision and computational cost needs to be achieved. For example, a Ts = 0.01 produces a pretty precise plot as shown below:
Here we can see that the two plots almost coincide with only a marginal error. Thus, depending on the device performing this operation, we need to decide the sampling time. For example, if this operation is to be performed in a low-level digital controller, then the sampling time might be decided by some other circuit parameters and even if left on the designer's discretion, taking a very small value might be too tasking for the controller. While if the same is to be performed on a computer, it might be trivial and even smaller Ts values can be taken.
Using MATLAB 4) Consider the stable second-order continuous transfer function (in s domain): H = S...
Please do part C only, thank you. Exercise 1 (Transfer Function Analysis) MATLAB provides numerous commands for working with polynomials, ratios of polynomials, partial fraction expansions and transfer functions: see, for example, the commands roots, poly, conv, residue, zpk and tf (a) Use MATLAB to gener ate the continuous-time transfer function H5+15)( +26(s+72) s(s +56)2(s2 +5s +30) H(s) displaying the result in two forms: as (i) the given ratio of factors and (ii) a ratio of two polynomials. (b) Use...
Problem 11: Discretization of a Continuous-Time Filter Consider the continuous-time system with transfer function Hc(s) A discrete-time approximation to the system using the [16, -8 two's complement representation scheme is to be designed (A) Using Tustin's approximation, determine a discrete-time approximation with transfer function (B) Determine the poles and zeroes of Hd,Tustin(z), noting that the poles are complex conjugates (C) Plot the frequency responses of Hd,Tustin (2) and of Hd.eract (z) Hd, Tustin (z) using the sampling time 1 ms....
Question 1 (10 pts): Consider the continuous-time LTI system S whose unit impulse response h is given by Le., h consists of a unit impulse at time 0 followed by a unit impulse at time (a) (2pts) Obtain and plot the unit step response of S. (b) (2pts) Is S stable? Is it causal? Explain Two unrelated questions (c) (2pts) Is the ideal low-pass continuous-time filter (frequency response H(w) for H()0 otherwise) causal? Explain (d) (4 pts) Is the discrete-time...
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ζ...
the subject is in digital signal processing 5. Consider a CT system with transfer function This system is called an integrutor because t by he d to the ingent t y)-x(r)dr. Discretize the above system using the bilinear transform. (a) What is the transfer function H'(:) of the resulting DT system b) If xin] is the input and yin] is the output of the resulting DT system, write the (c) Obtain an expression for the frequency response H'(o) of the...
Consider the second-order system Y(s) R(s 2s +1 USE MATLAB ONLY PLEASE Obtain the Unit-Impulse response curves for S-0.1,0.3,0.5, 0.7, 1.0 and 4.0. All graphs should be displayed on single graph property label. Consider the second-order system Y(s) ko Assuming that ωη- 2 and K-2. Obtain the Unit-Impulse response curves for,-0.1, 0.3, 0.5, 0.7, 1.0 and 4.0. All graphs should be displayed on single graph property label. Describe for each system the Transient and steady state response. Remember the Natural...
4. (20 points) An ideal analog integrator is described by the system function: H(s) 1) Design a discrete-time "integrator" using the bilinear transformation with Ts 2 sec. t is the difference equation relating xin) to yin) thint: divide top and bottom of H(Z) by ) 3) Determine the unit sample (impulse) response of the digital fite. 4) Assuming a sampling frequency of 0.5 Hz, use the impulse invariance method to find an approximation for Hz). Hint: Inverse Laplace Transform of...
PROBLEM 1 Consider the transfer function T(S) =s5 +2s4 + 2s3 + 4s2 + s + 2 a) Using the Routh-Hurwitz method, determine whether the system is stable. If it is not stable, how many poles are in the right-half plane? b) Using MATLAB, compute the poles of T(s) and verify the result in part a) c) Plot the unit step response and discuss the results. (Report should include: Code, Figure 1.Unit step response, answers and conclusion) PROBLEM 1 Consider...
aliasing? A continuous-time system is given by the input/output differential equation 4. H(s) v(t) dy(t) dt dx(t) + 2 (+ x(t 2) dt (a) Determine its transfer function H(s)? (b) Determine its impulse response. (c) Determine its step response. (d) Is the stable? (a) Give two reasons why digital filters are favored over analog filters 5. (b) What is the main difference between IIR and FIR digital filters? (c) Give an example of a second order IIR filter and FIR...
can someone please help me with this, I'm really stuck. here a sample code provide for the matlab: clear all; close all; % ---------- (a) ---------- a = 0.7; % attenuation coef. D = 5; % digital time delay UnitImpulse = [1 zeros(1,???)]; % creat unit impulse, starting from n=0; x = UnitImpulse; y = filter(1, [1 zeros(1, D-1) -a], x); % help filter, do you know the usage of filter() now? n = 0:(length(y)-1); % check length of y[n]...