In Tire (Magic Formula) simscape block, I want to give (vary) the Rolling Resistance constant coefficient value as an external input. How to do it?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
In Tire (Magic Formula) simscape block,
I want to give Rolling Resistance constant coefficient value as an external input from lookup table to vary it with the simulation time.
I tried it by modifying source code and gave it as an external input but the result of the newly created custom block not matching with the original one.
How can I achieve it?
0 commentaires
Réponses (1)
Aditya Srikar
le 26 Mai 2023
To vary the rolling resistance constant coefficient value with simulation time, rather than modifying the source code of the Tire (Magic Formula) Simscape block, you can use the existing Lookup Table block in Simulink. Here are the steps to achieve this:
1. Create a Lookup Table block and define the x-axis values as the simulation time and the y-axis values as the rolling resistance coefficient. You can also use the Time Source block in Simulink to provide the time input to the lookup table.
2. Connect the output of the Lookup Table block to the Rolling Resistance constant input of the Tire (Magic Formula) Simscape block.
3. To match the original block results, ensure that the Lookup Table block is using the same interpolation method as the original block for the rolling resistance coefficient.
7 commentaires
Aditya Srikar
le 29 Mai 2023
1. To add an input port to the Signal Builder block, right-click on the block and select "Block Parameters". In the "Block Parameters" window, navigate to the "Input" tab and then change the number of "Number" input ports to the desired number.
2. To connect the output port of the PS-Simulink Converter block to the Rolling Resistance constant port of the Tire (Magic Formula) Simscape block, pass the output signal to the value input terminal of a Physical Signal Converter block, and then use a signal line to connect the output port of the Physical Signal Converter block to the Rolling Resistance constant port of the Tire (Magic Formula) Simscape block. You may also need to adjust the output signal range to ensure that it falls within the valid range for the Rolling Resistance constant input.
Voir également
Catégories
En savoir plus sur Tires and Vehicles dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!