How to implement changing angle of curve as Simulink input?
6 views (last 30 days)
Show older comments
Dear MatLab community,
first off, I just started off using MatLab and Simulink, so my knowledge is very much limited. :)
I'm trying to model skiing turns using a combination of MatLab and simulink.
So far I've modeled the velocity profile when skiing down a steep slope without turns.
I also created a model to incorporate the directionchanges when doing curves.
So far so good, but I've run into a problem:
1.) How do I feed simulink my direction as a angle between the the curve and the main plain?
I've used a for-loop to get the angle of each directional vector n and wrote that into a 61x1 Matrix.
Constant doesn't work because it's always changing obviously.
I tried to convert the vector into a signal, but I'm not really sure how to do that in my case.
What is the best way to get that data into my simulink model?
The Black Arrows are my directional Vectors.
Best Regards
Johannes
0 Comments
Answers (1)
Pavan Guntha
on 18 Nov 2021
Hi Johannes,
You could store the angles of each directional vector into a workspace variable and then leverage From Workspace block in Simulink to load the data into Simulink. You could mention the sample time as well in the block properties so that Simulink can sample the data from the variable w.r.t the sample time mentioned. You could also look at the following example to understand the workflow: Load Data Using the From Workspace Block
Hope this helps!
0 Comments
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!