I want to envelope the damped curve with an exponential function passing through the peak points. Can someone please help?

조회 수: 4 (최근 30일)
X = A1(exp(-alpha*t)).*cos(wd*t)+ A2*(exp(-alpha*t)).*sin(wd*t)* is the equation of the damped curve.
The parameters are t=0:0.000050:0.1; A1 = 12.87701558; A2 = -12.70012814; alpha = 67.91641; wd = 4770.680551
The equation of the enveloping curve is I = Io * exp(-67.91641*t)
where Io is the peak values of the damped curve
I am attaching the image of damped curve as well as its enveloping curve through peak points.

채택된 답변

Ameer Hamza
Ameer Hamza 2018년 6월 21일
Since it is a second-order system, the envelop parameter Io can be analytically expressed as a function of A1 and A2. The following function follows from the trigonometric identities.
Io = sqrt(A1^2+A2^2);
Try the following code,
t=0:0.000050:0.1;
A1 = 12.87701558;
A2 = -12.70012814;
alpha = 67.91641;
wd = 4770.680551;
X = A1*(exp(-alpha*t)).*cos(wd*t)+ A2*(exp(-alpha*t)).*sin(wd*t);
Io = sqrt(A1^2+A2^2);
I = Io * exp(-67.91641*t);
plot(X);
hold on;
plot(I, 'Color', 'r')
plot(-I, 'Color', 'r')
  댓글 수: 6
Neha Sinha
Neha Sinha 2018년 6월 25일
envelop = @(parameter, t) parameter(1)*exp(-parameter(2)*tPeak);
envelopErrorFcn = @(parameter) sum(abs((envelop(parameter, t) - peakValues)));
solution = fmincon(envelopErrorFcn, [0 0], [], []);
plot(t, i, tPeak, envelop(solution, tPeak), 'r-+', tPeak, -envelop(solution, tPeak), 'r-+')
Can you please explain me what's parameter here and how are these codes working?
Ameer Hamza
Ameer Hamza 2018년 6월 25일
The line
envelop = @(parameter, t) parameter(1)*exp(-parameter(2)*tPeak);
define the equation you want the data to fit. The parameters are the constant values of your model. Compare it with your equation of I to see what are parameter(1) and parameter(2).
The next line defines an error function,
envelopErrorFcn = @(parameter) sum(abs((envelop(parameter, t) - peakValues)));
We want such values of parameters which minimize the difference between predicted and actual values. In the next step, we can use a numerical optimizer (fmincon) to find the values of parameter.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by