integral square error calculation

i want to calculate ise of a transfer function for which i have to claculate inverse laplace
this is my code...
num=[3 2]
den=[155.0388 33.5652 2]
R2=tf(num,den)
num1=[1 8 20 16 3 2]
den1=[1 18.3 102.4 209.5 155.9 33.6 2]
G6=tf(num1,den1)
E=G6-R2
et=ilaplace(E)
gives an error
please help me out in calculation of ise for E

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 1 月 7 日
編集済み: Walter Roberson 2021 年 1 月 7 日

0 投票

3 件のコメント

apoorv srivastava
apoorv srivastava 2021 年 1 月 7 日
Thanks for answering but again an error occured as my final aim is to find ise
this is my new code.......
clc;
clear all;
close all;
num=[3 2]
den=[155.0388 33.5652 2]
R2=tf(num,den)
num1=[1 8 20 16 3 2]
den1=[1 18.3 102.4 209.5 155.9 33.6 2]
G6=tf(num1,den1)
E=G6-R2
Enum=[152 1217 3027 2335 155.5 30.17 -0.0696] %numerator of E
Eden=[155 2871 1.649e04 3.595e04 3.141e04 1.086e04 1750 134.3 4] %denominator of E
syms s t
snum = poly2sym(Enum, s)
sden = poly2sym(Eden, s)
FT_time_domain = ilaplace(snum/sden)
FT_time_domain = simplify(FT_time_domain, 'Steps',10)
FT_time_domain = collect(FT_time_domain, exp(-t))
ise=trapz(0.1,FT_time_domain.^2)
after running this code an error comes which says.....
Dimension argument must be a positive integer scalar within indexing range.
please help me out
thank you.
Walter Roberson
Walter Roberson 2021 年 1 月 7 日
FT_time_domain is going to be symbolic -- in particular a symbolic sum of 8 roots of a polynomial is used multiple times in the expression.
collect() on it is not going to have any useful effect as there are no exp(-t) terms -- the terms are exp(something*t) and collect() is not smart enough to collect those. But doing the collect() does not hurt.
Either way the result of the collect() is going to be symbolic in the variable t .
You cannot trapz() a symbolic expression.
You could, however,
endtime = 1; %as appropriate
ise = trapz(0.1, subs(FT_time_domain, t, 0:0.1:endtime).^2)
apoorv srivastava
apoorv srivastava 2021 年 1 月 7 日
is there any other simplified way to solve this problem.
i just want to find ise of
Error = 152 s^7 + 1217 s^6 + 3027 s^5 + 2335 s^4 + 155.5 s^3 + 30.17 s^2 - 0.0696 s
--------------------------------------------------------------------------------------------------------------------------------------------
155 s^8 + 2871 s^7 + 1.649e04 s^6 + 3.595e04 s^5 + 3.141e04 s^4 + 1.086e04 s^3 + 1750 s^2 +
134.3 s + 4
please help me out..

サインインしてコメントする。

カテゴリ

タグ

質問済み:

2021 年 1 月 7 日

コメント済み:

2021 年 1 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by