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 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Aditya Srikar
2023 年 5 月 26 日
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 件のコメント
Aditya Srikar
2023 年 5 月 29 日
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.
参考
カテゴリ
Help Center および File Exchange で Tires and Vehicles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!