Provide Duty Signal delay

1 回表示 (過去 30 日間)
Muhammad Hammad Uddin
Muhammad Hammad Uddin 2019 年 8 月 26 日
コメント済み: Renato SL 2019 年 8 月 29 日
Hello,
I am trying to give three duty signal to a block. Such as D1+D2+D3=1. So what ever the combination of these duty is the total answer should be 1. I have used transport delay but it is not giving me accurate delay. You can see in screenshort.
My objective is to have variable duty (like it can be changed instaneously through a controller) and as soon as D1 end D2 should start which is then folled by D3=1-D1-D2
Can you please help me with this model. I am attaching model too. In screenshot the delay D3 is giving a slant which is not desireable. It should be like D1.

採用された回答

Renato SL
Renato SL 2019 年 8 月 27 日
I would do something like this (.slx file is attached).
threedelay.png
So the signals will be generated by each Pulse Generator. At each period, signal 1 will not be delayed, signal 2 will be present as signal 1 dies, and signal 3 will be present as signal 2 dies.
In the model, I put these blocks as a subsystem and put a mask over it. I hope that helps. Anyway, please check the output signal and the implementation under the mask to see if this is suitable for you.

その他の回答 (2 件)

Muhammad Hammad Uddin
Muhammad Hammad Uddin 2019 年 8 月 27 日
Hello Sir Renato SL
Thank you for your time and solution. indeed this is the easiest method to do it. Now, i want these duty cycles values to be changed during simulaiton such as D1=40, D2=40 andD3=20. at the second cycle it can be different like D1=30 D2= 40 D3=30. etc.
Can uou please help in it
  3 件のコメント
Renato SL
Renato SL 2019 年 8 月 28 日
編集済み: Renato SL 2019 年 8 月 28 日
Previously, I was thinking of using the Stair Generator or Repeating Sequence Stair to feed values to the Pulse Generator block.
Then I checked this post. The explanation there is very clear. Please read it.
[TL;DR] : To have the duty cycles change through time, you cannot use only Pulse Generator.
I believe you need to define your own signal generator, using MATLAB Function block or Simulink Function block, that can take into account the fact that the duty cycle will change. I imagine you should take into account the simulation time and relate it to a predefined set of possible values to determine the value of duty cycle and therefore, the form of the signals.
Or use another block.
Muhammad Hammad Uddin
Muhammad Hammad Uddin 2019 年 8 月 28 日
Thank you for your assistance. I will lok into it. If stuck somewhere i will bother you again. Thanks for being so helpful sir Renato SL

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


Muhammad Hammad Uddin
Muhammad Hammad Uddin 2019 年 8 月 28 日
Hello sir,
Sorry for confusion. Let me rephrase my question which i am having trouble with. I have attached one drawing here to explain my point. What i need to have delay in a pulse signal. However, the provblem is that the delay is not a fixed value. It can be changed by any controller let say one time the delay is 10 and suddenly it become 15 or 12 or any value.
what i need to have is any function or block which can handle the delay of the value which are randomly generated. I have no previous knowledge of incoming delay say the value of 'a' in the drawing. a can be one time 10 or 12 0r 20 anything.
My question is can we have something like this in simulink?
Thank you
  2 件のコメント
sasikanth chandana
sasikanth chandana 2019 年 8 月 29 日
As time period of input signal is constant. You can create variable delay using random generator code in MATLAB Ex: Delay range=(0,1)*T T time period of signal
(0+(1-0)*rand(1,10))*T
This will create required delay in terms of time T and feed it to transportation delay
Renato SL
Renato SL 2019 年 8 月 29 日
So to be clear (Sasikanth mentioned it above), is the period of the input signal constant ( is the duty cycle constant) and your concern is only the variable delay? Variation of duty cycle is not the issue?
I saw that you have asked it in a new question, so if I have something that might help, I will answer there.

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

コミュニティ

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by