Rectangular pulse coming as trapezoid

I have implemented a mechanism where I am feeding a rectangular pulsetrain to a multiport switch which should give a switcing sequence of rectangular pulses. However, I am getting the profile of the pulses as trapezoidal.
Solver Selection:
Is this because of the 'Fixed-Step' Solver (ode4-runge-Kutta)?
function block input:
output of function block:
(The code is written so V takes either 1 or 3 values)
Not sure why it's coming trapezoidal.
Output of Multiport switch:
Should be rectangular pulse, but coming trapezoidal.
What can be done in this case?

 採用された回答

Fangjun Jiang
Fangjun Jiang 2022 年 2 月 1 日
編集済み: Fangjun Jiang 2022 年 2 月 1 日

0 投票

This is normal. The ideal perfect rectangular pulse requires two values (1 and 3) at the exact same time (e.g. t=0.2895). The output can't achieve that. There will be a tiny time difference between two consuctive outputs, as small as the time step (10e-6). The output curve connects two output points. It will show as trapezoidal when zooming in enough.

1 件のコメント

Siddhi Kadam
Siddhi Kadam 2022 年 2 月 4 日
Okay Thank you for your answer.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimscape Electrical についてさらに検索

製品

リリース

R2020b

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by