Do source blocks in Simulink have an implicit unit step function built into them?
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm trying to understand some confusing behavior in Simulink and I'm not sure if the problem is my understanding of how Simulink works or if its about my understanding of linear systems more fundamentally.
I'm trying to set up a basic simulation that shows linearity by comparing results from two systems. The first system has numerator dynamics (a single s in the numerator) applied to a cosine input, and the second has no numerator dynamics (unity in the numerator) but the input to the system has already been differentiated analytically. I expect that both systems should output identical results.
However, what I am finding is that the system with numerator dynamics also includes a unit impulse response. The minimal example in the screen grab below shows my source of confusion. The only explanation I can come up with is that there is a hidden step function in the cosine source block, so that when differentiated we see something like:
.
댓글 수: 0
채택된 답변
Paul
2024년 2월 15일
For the top path:
Y(s) = s/(s+1)*X(s) = 1/(s+1) * (s*X(s))
The differentation rule for the one-sided Laplace transform is:
L(dx(t)/dt) = s*X(s) - x(0) (or x(0-) if we want to be precise).
So: s*X(s) = L(dx(t)/dt) + x(0).
x(t) = cos(t) and dx(t)/dt = -sin(t).
The output of the top path is then:
Y(s) = 1/(s+1) * ( L(dx(t)/dt) + x(0) )
Y(s) = 1/(s+1) * ( L(-sin(t)) + x(0) )
Y(s) = 1/(s+1)*L(-sin(t)) + x(0)/(s + 1)
Y(s) = Bottompath(s) + x(0)/(s + 1)
x(0) = 1 (x(t) = cos(t)
y(t) = Bottompath(t) + exp(-t);
댓글 수: 2
Paul
2024년 2월 16일
No, the bold part is
( L(-sin(t)) + x(0) )
or (removing the outer parentheses)
L(-sin(t)) + x(0)
The Laplace operator does not operate on x(0).
I think I see your thought process, which is to assume that the input signals are formally multiplied by a unit step function. In this view (which I don't disagree with) the same result obtains.
Again, focusing on the top:
x(t) = cos(t)*u(t)
dx(t)/dt = delta(t)*cos(t) - sin(t)*u(t)
Using the equivalence principal:
dx(t)/dt = delta(t) - sin(t)*u(t)
Going to the frequency domain, using the deifnition of the unilateral Laplace transform with lower bound at 0-
L(dx(t)/dt) = s*X(s) - x(0-).
Because x(t) includes the unit step, we have
x(0-) = 0 -> L(dx(t)/dt) = s*X(s) (for this problem)
Returning to the original equation implemented in Simulink:
Y(s) = 1/(s+1) * s*X(s) = 1/(s+1) * L(dx(t)/dt)
L(dx(t)/dt) = L(delta(t) - sin(t)*u(t)) = 1 + L(-sin(t)*u(t))
which is the bold equation we started (with x(0) = 1 as was the case when x(t) = cos(t) )
so
Y(s) = 1/(s+1) * L(-sin(t)*u(t)) + 1/(s+1)
y(t) = bottompath(t) + exp(-t)*u(t)
which is the same as the previous result, with the subtle assumption that we define u(t) s.t., u(0) = 1.
추가 답변 (1개)
Fangjun Jiang
2024년 2월 15일
The answer is no.
Maybe this will help
s/(s+1)=(s+1-1)/(s+1)=1-1/(s+1)
댓글 수: 3
Fangjun Jiang
2024년 2월 15일
That is true. The difference could be explained by setting different initial value.
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!