- For moving a vehicle through an obstacle course, you can use the Simscape Multibody library to model the vehicle dynamics.
- To detect an obstacle, you could use a Simulink block that represents a sensor, such as a proximity sensor from the Simscape Electronics library. You would then write a MATLAB function or use a Simulink block to convert the sensor's output to a voltage.
- To convert the voltage to a wheel input, you can use the Simscape Electrical library to model the electrical circuits that would control the motors connected to the wheels.
- For a library that contains a car with wheels, you can start with the Simscape Driveline library, which provides models for vehicle dynamics and can be integrated with the other Simscape libraries to respond to electrical inputs.
Interface motion sensor to voltage sensor to mechanical wheel
2 views (last 30 days)
Show older comments
I am trying to design a system where a motion sensor placed on some moving object (say simplistic car) provides a signal on encountering an obstacle. The signal must be converted to a voltage. Depending on the voltage, the wheels turn or stop. So I would like to know which functionality and interfaces are available as part of Simscape to allow me to:
- Move a car/ robot/ whatever through an obstacle course
- Which sensor can detect an obstacle, and which interface is needed to convert the output of the sensor to a voltage (over here, it is to my descretion. So for example, if there is an obstacle, I can code it to 5 Volts, but I need some interface to detect there is an obstacle, and code 5 volts or less as input to a circuit)
- Which interface is needed to convert the voltage to a wheel input
- Which library can I find such a car with wheels that will tale an input and just do basic things like stop and turn wheel, and drive straight.
These are multiple questions. As I get answers, i will have a better idea on which question to expand on separately. For now, I am trying to gather information to put things together. I know there is automated driving toolbox, but I am looking to interface sensors with electrical components/ circuits, and then, I am looking to interface the electrical components with car wheels, so not sure if automated driving toolbox is right.
0 Comments
Answers (1)
Hari
on 2 Jan 2024
Edited: Hari
on 2 Jan 2024
Hi N,
I understand that you are designing a simulated system using Simscape where a motion sensor on a vehicle detects obstacles and triggers a voltage response, which then controls the vehicle's wheels to stop or turn.
I am assuming you are looking for components and libraries within Simscape and related products that can help you model the physical system, including the sensor detection, voltage conversion, and wheel actuation.
In Simscape, you can use the following functionalities and interfaces:
Here's a high-level overview of how you might connect these components:
% Example MATLAB code to open the necessary libraries
open_system('simscape');
open_system('simscape/multibody');
open_system('simscape/electronics');
open_system('simscape/electrical');
open_system('simscape/driveline');
To create the actual model, you would use the Simulink environment to drag and drop components from these libraries and connect them as per your system requirements.
For modeling vehicle dynamics, refer to the documentation of Simscape Multibody.
To find sensors and components for converting sensor output to voltage, circuits that can control motors look into Simscape Electronics documentation.
For vehicle components like wheels that can be controlled by electrical inputs, explore Simscape Driveline documentation.
Hope this helps!
0 Comments
See Also
Categories
Find more on Get Started with Simscape Multibody 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!