Output with higher sampling rate in simulink
Afficher commentaires plus anciens
Dear All,
I am facing some problems, while using simulink to sample the output at higher rate.
I am trying to simulate the simple simulink file, say a sine wave with frequency of 10 Hz. I am using the fixed-step ode4 solver with step size of say 0.1 seconds. I am strugulling to get the output (Input(sine wave)--> Scope (output)) at different (higher) rate i.e at 0.05 seconds.
I have used the most available options say resample, interp, upsample, zoh, rate transition etc with no sucess!
I can understand that all sample times in your simulink must be an integer multiple of the fixed-step size. But there must be some solution for this, which i dont know :(
Could any of you please help me to solve this issue?
Many thanks Bhachku
Réponses (1)
Fangjun Jiang
le 6 Août 2011
0 votes
10Hz sine wave signal means the period is 0.1 second. I would say your step size shall be at least one tenth of it to be meaningful (there are 10 points to represent a complete period of a sine wave). So set the fixed step size to be no larger than 0.01. Ideally, I would recommend 0.005 or less.
2 commentaires
bhachku
le 6 Août 2011
Fangjun Jiang
le 6 Août 2011
I am not sure what is your sampling problem. If you run your simulation at 0.001 seconds. Your output will have 1000 samples of data per second. If that output is a 1Hz sine wave signal, you have 1000 samples.
Catégories
En savoir plus sur Signal Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!