- Configure the solver settings in Simulink to use a fixed-step solver with a step size of 1/350 seconds (approximately 2.86 ms). This ensures that the simulation runs at a consistent rate.
- Use the “Rate Transition” block in Simulink to control the rate at which signals are passed between different parts of your model. Set the sample time of the Rate Transition block to match the desired update frequency of 350Hz: https://www.mathworks.com/help/simulink/slref/ratetransition.html
match hardware update frequency in simulation
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am trying to tune my Simulink controller for a system I built. My communication speed is about 350Hz using Serial communication to my off board controller. What I want to do is design a simulation that replicated my hardware, I have design all the dynmic models but I am having trouble replicating my communication speed. How can I make sure that my controller updates at 350Hz? I cannot find a good Simulink block that does this. I can add delays but that seems incorrect.
0 comentarios
Respuestas (1)
Chetan
el 27 de Sept. de 2023
I understand that you are trying to tune a controller and trying to replicate the communication speed.
To ensure that your Simulink controller updates at a specific frequency, such as 350Hz, you can follow these steps:
By combining these techniques, you can control the timing and synchronization of your Simulink controller to match the desired update frequency of 350Hz.
I hope these suggestions help you resolve the issue you are facing.
0 comentarios
Ver también
Categorías
Más información sobre Modeling en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!