Exploring Variable Inputs and Runtime Configuration in Simscape
Learn to model real-world systems with variable inputs and runtime configuration using Skill-Lync's Simscape tutorial. Explore advanced Simscape features for mechanical and electrical engineers. Enroll in Skill-Lync's Full Course online today!
Welcome to another session of the Physical Modeling in Simscape with Simulink & MATLAB blog series! In this post, we’ll expand on the gear transmission model by introducing variable inputs and exploring runtime configuration. These techniques are essential for modeling real-world systems like automotive engines, where conditions constantly change.
This blog is designed for engineers and students looking to refine their skills in physical modeling Simscape. For structured learning, check out Skill-Lync’s Full Course, which provides hands-on practice with Simscape for beginners and advanced users.
Step 1: Adding Variable Inputs
Using a Repeating Sequence:
- Search for the Repeating Sequence block in Simulink to create a variable input signal.
Configure the block with:
- Time values: 0, 2
- Output values: 0, 1000
This setup generates a triangular waveform where angular velocity ramps up to 1000 rad/s every 2 seconds and then resets.
Connecting the Input:
- Replace the constant input with the Repeating Sequence block using a Simulink to PS Converter.
Simulation Output:
- Run the simulation for 10 seconds. Observe the output linear velocity oscillating between 0 and 250 m/s, reflecting the changing angular velocity.
Step 2: Using a Signal Builder
For more control over input signals, use the Signal Builder block.
Configuring the Signal Builder:
- Add a Signal Builder block to your model and define a custom input signal.
- Adjust the time range to 100 seconds and create a signal that varies between 0 and 10 with intermediate values like 5.
Visualizing Results:
- Connect the Signal Builder output to the gear’s input and run the simulation for 100 seconds.
- Use a Scope block to compare the input signal with the output linear velocity. The output reflects the gear ratio and wheel radius.
Step 3: Runtime Configuration with Slider Gain
Introducing the Slider Gain:
- Add the Slider Gain block to enable real-time input changes during simulation.
- Set the slider range to 0–2000 RPM.
Infinite Simulation:
- Change the simulation stop time to inf for continuous runtime.
- Use the slider to dynamically adjust the angular velocity and observe the output in real-time.
Practical Applications: This setup mimics real-world scenarios like adjusting throttle input in a vehicle engine.
Step 4: Analyzing the Results
Input-Output Comparison:
- Connect both the input (e.g., slider gain) and output (e.g., wheel velocity) to the Scope block.
- Overlay the signals to understand how changes in angular velocity impact the linear motion.
Interpreting Graphs:
Observe that the linear velocity closely follows the angular velocity input, scaled by the gear ratio and wheel radius.
Conclusion
You’ve now mastered the art of introducing variable inputs and configuring runtime simulations using Simscape physical modeling. These techniques are crucial for building realistic models that adapt to changing conditions.
For a deeper understanding, consider enrolling in Skill-Lync Simscape Course Online, which includes Simscape certification and real-world projects to solidify your learning.
Stay tuned for our next blog, where we’ll explore multi-domain modeling and complex systems using MATLAB Simscape. Happy modeling!
This blog is part of our ongoing Physical Modeling in Simscape with Simulink & MATLAB. If you missed the previous posts, check them out here.
Would you like to have a more interactive experience in Physical Modeling?
Skill-Lync has released a FREE comprehensive course covering Physical Modeling in Simscape with Simulink & MATLAB! Check it out here.
Check out our hands-on course today and add it to your list of skills!
Let’s get #IndustryReady together, one skill at a time!