Unable to get how to solve for mutltivariable function while calculating DTFT

Hi ,
I have the frequency response of a system given as:
H(e^(iθ))=1/(1-0.9*e^(-iθ))
and i am struggling to get the response of the above system when the input is
x(n)=0.5*cos((pi*n)/4)
.What i have tried and stucked at is how do i give the x(n) as a input to the function 'H' . . Can anybody help me out with this or other way ?

 Accepted Answer

Hi Rohit,
I understand that you are trying to find the response of a system for a given input whose frequency response has been given already.
To do this, since the input is sinusoidal, you can use one of its property that the output will be just an amplified and phase differentiated version of itself when passed through the system.
Refer to the below code snippet for better understanding.
clc;
n = -25:1:25;
%system response at w=pi/4
w = pi/4;
H = 1/(1-0.9*exp(-1i*w));
mag = abs(H);
ang = angle(H);
%ouput=mag*sin(wt+ang) for sinosuidal input
output = 1/2*mag*cos((n*pi/4)+ang).*(n>=0);
stem(n,output);
You may refer to these documentation links for better understanding:

7 Comments

Are you sure that it is correct to show that the output is non-zero for n < 0?
Yes , i understand your concern Paul but since nothing was mentioned about the causility of the system , i mentioned the nagative part as well .Thanks for the comment.
Is there any assumption about the causality of the system, and/or of the input, that would result in that output, even as a steady state output?
Hi paul , yes the assumption i made was output may be non-zero even when n<0 .Changed to the causility condition now assuming output=0 for n<0 to avoid any confusion .
I think that the code should be multiplying by (n >= 0), with the understanding that the output as shown is the steady state output of the system. Also, why does n take on non-integer values?
Yes ,(n>=0) done already in the code and the second was a typing error. Thanks for pointing out and your time .
Last thing: the stem plot needs to be redone based on the updated code.

Sign in to comment.

More Answers (1)

[Are you sure that is exactly how the frequency repsonse and the input funtion are defined?]
The frequency response is a function of θ. Let's assume .
The input x is a function of n. Let's assume n=t, so we have . Then we can write x(t) as , where . Now we recall that .
(assuming linearity)
If you continue the algebra and deal with the complex numbers, you should find that Y is real.

3 Comments

[edit: correct typos]
the trouble with my answer above is that, because I have taken your original expression literally, it means H(x) is not a linear function of x. As a result, if you follow through with the algebraic simplification to which I alluded at the end of my answer above, you get:
which is not a sinusoid, as you will see when you plot it. In other words, a sinusoid in does not give sinusoid out. I suspect such a nonlinear transform is not what is intended. Therefore consider an alternative interpretation of the transfer function which you specified as H(e^(iθ))=1/(1-0.9*e^(-iθ)).
For example, consider , and assume your x(n)=0.5*cos((pi*n)/4) can be written as
where . Then
(Euler's eqn)
and
Simplify the equation above, applying Euler's equation.
where and . And so on. I think you will get a real sinusoidal signal for y(t).
Good luck!
What is the advantage in changing the independent variable from n to t?
This solution is only the steady state solution, which might or might not meet the intent of the question.
@Paul,
Good point. I coud have, I should have kept n as n.
ALso a good point about steady state. The question has a transfer function and a sinusoidal input, so I assume that the "steady state" sinusoidal output is what is desired. If a transient solution were desired, then the initial condition of the output would need to be specified, and it is not.

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Tags

Asked:

on 28 Jun 2023

Commented:

on 14 Jul 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!