How to convert Simscape (Hydraulic) blocks to discrete time to reduce computational time?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
DB
il 13 Giu 2023
Commentato: Nikhil Baishkiyar
il 16 Giu 2023
My model currently has a high computation time because half of it is using continueous time hydraulic blocks from the Simscape Hydraulics package. As I do not need continueous time signals, (in real life these measurements are taken every 1 sec) I want to switch the whole model to discrete time. Is this possible, and if so, how?
Explicitly, I'm modeling a centrifugal pump with a tank and some other blocks such as pipes and a flow rate source from the isothermal liquid (IL) library. These blocks do not clearly offer the option to switch to discrete time.
0 Commenti
Risposta accettata
Nikhil Baishkiyar
il 14 Giu 2023
If you want to run a Simscape model in discrete model, you can attach a Solver Configuration block to your system and use a local solver with your sample time.
I tried it out on the example model for Simscape Hydraulic and I was able to get a discrete output
Note: I also had to change the sample time of blocks (not any Simscape block in this case) to match the sample time of solver configuration.
4 Commenti
Nikhil Baishkiyar
il 16 Giu 2023
All simulink solvers employ numerical integration to find out answers. You can see which method they use in the Configuration parameters. Trapezoidal Rule is an approximation but that is the best you can get with limited data points. Continuous solvers usually employ a variable time step to improve accuracy but discrete solvers do not.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Upgrading Hydraulic Models to Use Isothermal Liquid Blocks in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!