[Simulink] Create chirp signal in trigger subsystem block
Show older comments
Hello everybody
I want to create a chirp signal that only run when I press the push button like this:

In the link above, the signal is the sine signal, therefore the file can run smoothly. However, when I change to chirp signal, this can not run because the sample time of chirp signal is not inherited:

I want to ask how can I create a chirp signal that only run when I want?
Thank you very much
Edit 1: Sorry for the confusion, I want to replace the Enabled Subsystem by the Triggered Subsystem.
I have attached the file. The Matlab release is 2022b.
Edit 2: The reason I want to use the Triggered Subsystem is because I want the signal starting to run when I press the button (ON). If I use the Enabled Subsystem, the signal will start to run at the begining of the simulation and will show on the scope when I press ON. Please correct me if I wrong. Thank you very much.
Edit 3: I have put the 3 blocks: Enabled Subsystem_sine, Enabled Subsystem_chirp and Triggered Subsystem_chirp for you to compare.
Edit 4: I have put the 4 blocks: Enabled Subsystem_sine, Enabled Subsystem_chirp, Triggered Subsystem_chirp, Enabled Subsystem_Signal_builder for you to compare.
Edit 5: I have updated the file so that it's easier to understand. I will use the signal builder to build a more specific signal so that it's easier to see what I want.

First, I run the simulation for 3s when the swich is OFF:

After 3s, I press the button to ON:

You can see the result in the picture below:

What I want is the signal start rising at 3s as the red line in the picture below:

I hope it's more clarify.
7 Comments
Angelo Yeo
on 8 Jan 2024
Edited: Angelo Yeo
on 8 Jan 2024
Can you share your model and tell us which release you used? It's best to reproduce the issue with the model.
madhan ravi
on 8 Jan 2024
Edited: madhan ravi
on 8 Jan 2024
Like @Angelo Yeo mentions it"s better to know the release. I had no problems running the model in 2023b from the link and replacing it with chirp signal block, didn"t check it for Enabled Subsystem. Note: in the link Enabled Subsystem was used and you are using Triggered Subsytem.
Nguyen Ngoc
on 8 Jan 2024
madhan ravi
on 8 Jan 2024
Moved: madhan ravi
on 8 Jan 2024


Enabled subsytem should suffice your use case.
By the way, you are using r2021b not r2022b.
Nguyen Ngoc
on 8 Jan 2024
Moved: madhan ravi
on 8 Jan 2024
madhan ravi
on 8 Jan 2024
Moved: madhan ravi
on 8 Jan 2024
I am not sure what you are referring to. You can hold your states or reset it in the Enabled subsytem.

Nguyen Ngoc
on 8 Jan 2024
Moved: madhan ravi
on 8 Jan 2024
Accepted Answer
More Answers (0)
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




