Hello, can someone please help me understand this error?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示

I'm particularly confused about the part which says '... and the phase delay parameters of this block need to be integer multiples of the fixed step size.
1 件のコメント
Danikha Shyken
2023 年 9 月 25 日

this is the Simulink model
採用された回答
Fangjun Jiang
2023 年 9 月 25 日
編集済み: Fangjun Jiang
2023 年 9 月 25 日
If the pulse width is 87.85%, then the gap of the pulses will be 12.15%. Then you have to be able to distinguish at least 0.05% of the period to be able to make the 87.85% pulse and the 12.15% gap.
0.05% of the period (5e-7) is 2.5e-10, the number in the error message.
In other words, the simulation program has to be able to increase the simulation time every 2.5e-10 to be able to make the pulse. Your simulation step size (0.2) is way more bigger than that. Changing the simulation step size to be 2.5e-10 will fix the problem.
Feeding the Pulse Generator to the control port of the Multiport Switch block doesn't make sense. The value of the control port should be 1, or 2, or 3, to pass the 1st, or the 2nd, or the 3rd input, just like the icon of the block indicates.
Constant value [0.3:0.4] or [0.4:1.2] or [1.2:2] don't make sense either.
[0.3:0.4]
ans = 0.3000
[0.4:1.2]
ans = 0.4000
[1.2:2]
ans = 1.2000
10 件のコメント
Danikha Shyken
2023 年 9 月 26 日
How can I determine the gap between the pulses?
I'm trying to create an input selector with three inputs. I thought I'd use constant blocks with specific input source ranges, such as [0.3:0.4] for TEG, [0.4:1.2] for PV, or [1.2:2] for PZT. Can you suggest ways to correct this?
Fangjun Jiang
2023 年 9 月 26 日
編集済み: Fangjun Jiang
2023 年 9 月 26 日
I am not clear what you are trying to do. Is there only "one" input which ranges from 0.3 to 2? You can use a Lookup Table block to generate an output which value is 1 or 2 or 3, then use this output to control a Switch.
Danikha Shyken
2023 年 9 月 26 日
編集済み: Danikha Shyken
2023 年 9 月 26 日
No, we have three input sources. TEG source is from 0.3 to 0.4V, PV source is from 0.4 to 1.2V, and PZT source is from 1.2-2V; with a 1.8V battery. The available voltage sources among the three will be used to power up a buck-boost converter.
If the available source is TEG, the system will operate in boost mode; if the available source is PV, then the system will operate in boost mode, and the system will operate in buck mode if PZT is available. Battery is selected when all three sources aren't available.
Fangjun Jiang
2023 年 9 月 26 日
Which is the control variable? How do you determine which source to use?
Danikha Shyken
2023 年 9 月 27 日

this is the entire simulink model
Fangjun Jiang
2023 年 9 月 27 日
You have 4 inputs (4 manual switches) and one output ("mode"). The 4 inputs need to be prioritized because there could be more than one switches turned On at the same time. You can use 4 Switch blocks in series to implement the logic. The order of the Switch block will reflect the priority.
The logic can also be implemented using a simple "if-elseif" statement, which you can do in a MATLAB Function block.
Danikha Shyken
2023 年 9 月 27 日

This is what's inside the input selector.
Danikha Shyken
2023 年 9 月 27 日
編集済み: Danikha Shyken
2023 年 9 月 27 日

And yes, we already have the"if-elseif" statement in a MATLAB Function block.
Fangjun Jiang
2023 年 9 月 27 日
Your logic is all mixed up. This is my final comment on this topic.
- Use a MATLAB Function block with "if-elseif" statement to process 4 manual switch inputs to create an interim output. The value of the interim output could be 1, 2, 3 or 4.
- Use this interim output to control that Multi-port Switch to pass through 4 possible voltage source. You got a single voltage output signal. The range of this signal is from 0.3 to 2.
- Use another MATLAB Function block to read the value of this single voltage signal to generate the output signal "mode". You seem to have this function already.
- There is other simpler way to do this. But at least, this approach should be able to generate the desirable output signal "mode".
Danikha Shyken
2023 年 9 月 27 日
I understand. Thank you so much for your time and insights; your assistance has been valuable.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Functions についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
