Borrar filtros
Borrar filtros

How to implement changing angle of curve as Simulink input?

4 visualizaciones (últimos 30 días)
Johannes Wieser
Johannes Wieser el 14 de Oct. de 2021
Respondida: Pavan Guntha el 18 de Nov. de 2021
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

Respuestas (1)

Pavan Guntha
Pavan Guntha el 18 de Nov. de 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!


Más información sobre Simulink Functions en Help Center y File Exchange.




Community Treasure Hunt

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

Start Hunting!

Translated by