New and need to represent (1,1) using simulink?
4 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I am new to the world of simulation and i'm trying to get my 'foot' through the door. I have been creating little models here and there but nothing major. I want to challenge myself and do something more complex.
I thought about simulating a car moving on an X,Y plane and wnated to see its 'location' changes over time.
the first issue I faced is how to represent both X,Y in simulink? say I need to make the intial location of the object/ car to be (0,0) then moves over time based on the configs of a PID then I would need to visually see what happens after like 10 second. Where is the new location of the car be?
How can I do that? Which blocks would allow me to do that?
Thanks again!
0 个评论
回答(1 个)
Animesh
2023-8-21
Hello Ahmed,
You can use the XY Graph block in Simulink to visualize the movement of a car on an X, Y plane. The XY Graph block is an alternative configuration of the Record block that plots two input signals on an XY plot. The first input port provides the x data for the XY plot, and the second input port provides the y data. You can use this block to plot the X and Y coordinates of your car over time.
You can also use a combination of other blocks to simulate the movement of your car based on the configurations of a PID controller. For example, you can use a PID Controller block to control the movement of your car and feed its output into an Integrator block to obtain the position of your car over time. You can then feed the output of the Integrator block into the XY Graph block to visualize the movement of your car on an X, Y plane.
To read more about XY Graph: - https://www.mathworks.com/help/simulink/ug/plot-circle-with-xy-graph.html
Thanks,
Animesh Jha
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PID Controller Tuning 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!