How can I solve this simple Simulink discrete time solver problem?

Hi Everyone
I have an easy looking problem and I will describe it as simple as possible with pictures. I want to solve my simulink model in discrete time with 0.005 sample time and created a simulink model (in Picture 1). In Picture 2, you can see the inside of step and ramp input blocks. According to these inputs, they need to become zero until Second 3, and then follow the ramp input. When we look at the Picture 3, it seems okay but when we zoom at the signal (in Picture 4), we can see that multiplication starts at second 2.995 and with a linear line reaches to result at second 3. Step Input is zero at second 2.995 , I don't know why it is starting multiplication from there and why rising with a linear line ? I want this multiplication to be exactly at second 3 with a straight line from 0 to multiplication value.
What mistake have I done to turn this simple simulation into a nightmare?
Is problem related with the solver type? I also uploaded picture of discrete time solver in Picture 5
Helps would be much appreciated.
Thank You
PICTURE 1
PICTURE 2
PICTURE 3
PICTURE 4
PICTURE 5

 채택된 답변

Jonas
Jonas 2020년 1월 20일

1 개 추천

The simulation is behaving exactly as how you want it. The plotter is just putting linear lines in between discrete data points. You should go to the scope settings and remove the line and enable markers.

추가 답변 (1개)

Mete Soylu
Mete Soylu 2020년 1월 20일

0 개 추천

I thought at first, I was making something weird. Now I see, thanks a lot.

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

질문:

2020년 1월 19일

답변:

2020년 1월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by