how to compute energy and power of discrete-time signal using symbolic calculations
54 ビュー (過去 30 日間)
古いコメントを表示
I would like to get some parameters of continous and discrete-time signals i.a. the total energy and the mean power using symbolic calculations. I do not have problem to do this for a continous signal:
syms t
A = 10; %[1]
B = 5;
f = 10; %[Hz]
s = A*sin(2*pi*f*t) + B;
Et = int(s.^2,t,-inf,inf)
Pt = limit((int(s.^2,t,-t,t))/(2*t),t,inf)
but I do not have any idea how to do this for the signal which is discrete in time. I have tried, unsaccessfully, the symsym function
En = symsum(s.^2,t,-inf,inf)
Pn = limit((symsum(s.^2,t,-t,t))/(2*t),t,inf)
I expect the energy to be infinite and this my cause some problems, but the power should be a finite number.
Does anybody have an idea how to solve this problem?
0 件のコメント
回答 (1 件)
Swetha Polemoni
2020 年 10 月 15 日
Hi,
I have tried your code and power is finite for discrete signal also. Use "simplify" to get limit value instead of limit expression. Following code is for better understanding.
syms t
A = 10; %[1]
B = 5;
f = 1; %[Hz]
s = A*sin(2*pi*f*t) + B;
En = simplify(symsum(s.^2,t,-inf,inf))
Pn =simplify( limit((symsum(s.^2,t,-t,t))/(2*t),t,inf))
Here Pn = 25. Analyzing it step by step
-> Consider the summation.
->Here Sin(200*pi*t) is always zero since it is being calculated at integer multiplies of 2*pi. So the summation results in 25*2t
->Now dividing the summation with 2t and applying limit t->infinite results in 25*2*t/2*t => Pn =25
Though Pn is not equal to Pt here, Pn=25 is correct. Pn and Pt are different, may be, because not every time discrete signal has same power/energy as continuos signal.
3 件のコメント
Swetha Polemoni
2020 年 10 月 15 日
編集済み: Swetha Polemoni
2020 年 10 月 15 日
Hi,
- "sumS1sqr" and "sum10S1" is always zero for any t(only integers) value since the summation is discrete. So the total summation in discrete,
S_discrete =sumS1sqr+sum10S1+sumS5sqr=50t+25
When Limit is applied to S_dis after dividing with 2*t, it would result in 25.
- In integration, it is not equal to zero because it is continuos and non integers(i.e., whole sine curve) are also considered. Consider the following code with basic example where limt value is 5
syms t
A = 10;
B = 5;
f = 100;
s = A*sin(2*pi*f*t) ;
%% WITH LIMIT %%
Using_Integration = limit((int(s.^2,t,-t,t)),t,5) % Output:Using_Integration= 500
Using_Summation = simplify(limit((symsum(s.^2,t,-t,t)),t,5))%Output: Using_Summation=0
%% WITHOUT LIMIT %%
Integration = ((int(s.^2,t,-10,10))) %Output:Integration=700
Summation= simplify(symsum(s.^2,t,-10,10)) %Output: Summation=0
% Here though the same signal is considered and sum is calculated within same
%limits, both outputs differ.
- I think it is not always possible to calculate energy or power in time domain. The same happend for the signal s2.
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!