Use Simulation Time of Simulink in Matlab function when threshold is exceeded
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello everybody,
I am currently having a problem with a matlab function which I want to implement in my Simulink Project. In this Matlab function, I want to create some sort of pulse train. Here, the incoming signal has to be compared to a threshold value (here 10000) at a specific time (here 1.7µs). If the incoming signal exceeds the threshold at the reference time of 1.7µs, a pulse train has to be created. This pulse train outputs a 1 every 0.8µs starting at 1.7µs. The pulse width is not of importance as I want to use this signal as a trigger for a sample and hold block afterwards. If the incoming signal does not exceed the threshold at 1.7µs, the output has to stay at 0. The problem now is that I dont know how to implement this.
Thank you in advance,
Thomas
0 Commenti
Risposte (1)
Fangjun Jiang
il 20 Ott 2020
Use Step block to specify time and value. This is your threshhold.
Use Comparator block to compare your incoming signal with this threshold. Use the output to control a Switch block.
Switch between whatever value and 'simulink/Discontinuities/PWM' block.
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!