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?

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?

Answers (1)

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 Comments

Thanks for your answer.
but how can I connect the output of the Lookup Table block to the Rolling Resistance constant input of the Tire (Magic Formula) Simscape block? As there is no port to provide constant coefficient block.
Also, to connect these goto, from and data store memory block we cant use.
You can connect the output of the Lookup Table block to a Simulink Signal Builder block and customize the input signal to control the variations of Rolling Resistance constant. Then, you can use the Simulink-PS Converter block to convert the signal to a physical signal and connect its output to the Rolling Resistance constant port of the Tire (Magic Formula) Simscape block. Note that the range of the Lookup Table output signal should match the limitations of the Rolling Resistance constant inputs.
Thanks for reply.
but still I have lot of doubts in that.
1. How can I connect output of lookup table to signal builder block?
2. How to connect signal builder output to the Rolling Resistance constant port of the Tire (Magic Formula) Simscape block? As there is no provision for that.
1. You can connect the output of the Lookup Table to a Simulink Signal Builder block by connecting the output port of the Lookup Table block to the input port of the Signal Builder block.
2. You can connect the output of the Signal Builder block to the Tire (Magic Formula) Simscape block's Rolling Resistance constant port by using a PS-Simulink Converter block in between. Connect the output port of the Signal Builder block to the input port of the PS-Simulink Converter, and connect the output port of the PS-Simulink Converter block to the Rolling Resistance constant port of the Tire (Magic Formula) Simscape block.
Thanks for reply.
just want to know 2 things:
  1. How can I add inout port to the signal builder block?
  2. How can I connect the connect the output port of the PS-Simulink Converter block to the Rolling Resistance constant port of the Tire (Magic Formula) Simscape block? As tire (magic formula) block only accepts constant coefficient in it. Can you please tell the steps in detail?
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.
Thanks for reply.
  1. I tried but I didnt find the input tab in block parameters window of signal builder block.
  2. My query about rolling resistance output port still remain same. I am not getting how can i connect the rolling resistance signal to Tire (Magic Formula) Simscape block as there is no input port for this signal. In Tire (Magic Formula) Simscape block only N and A are input ports.
  3. I dont think signal builder block is need here , I just want to connect output of Lookup table block which is varying rolling resistance coefficient to the input port of Tire (Magic Formula).

Sign in to comment.

Products

Release

R2022b

Asked:

on 15 May 2023

Commented:

on 29 May 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!