Why I need to use output rate transitions for an atomic subsystem to speed up simulations? Which is the correct use of rate transitions?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I'm currently using an atomic subsystem block combined with a simulink proteced model.
The atomic block is my attitude controller, while the protected model is the system attitude dynamics. I cannot modify the protected model.
The attitude controller is modeled with an atomic block, since I need to simulate the real frequency for wich the attitude control is running (which is 1 Hz). I use input rate transitions, as also suggested by simulink debugger, to adjust the rate of input signals, since the I'm using 1 Hz for the attitude controller and 20 Hz to propagate the system dynamics (computed by the protected model). Solver setup are fixed step ODE4 at 1/20 s.
If I start the simulation with this configuration, the simulation is extremely slow: for each simulink refresh, the simulation is propagated of 1.4 s each time.
Then, I added rate transition also for atomic block output signals, with a sample rate of 20 Hz, the same as the simulation sample time. According to this configuration, the simulation runs much faster: about 54 s for each simulink refresh.
The problem is that I obtain very different simulation results, depending by which configuration I'm using. Since the attitude control law is based on an LQR, I must use different weighting matrix Q dependig by the rate transition configuration I'm using in order to obtain good simulation results.
How it is possible?
Which is the correct use of input and/or output rate transitions for an atomic (and non-atomic) subsystems?
Than you all!
Matteo
0 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!