Virtual hardware availability in simulation environment
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to develop hardware in loop model using STM32 microcontroller hardware. Prior to that, I want to do simulation with virtual model of hardware. It means the mechanism, motors and hardware, all are virtual. Is such facility available in MATLAB for STM32 or for any other hardware?
0 comentarios
Respuestas (2)
Dinesh
el 5 de En. de 2026
There is no such functionality available for STM32 or any other hardwares apart from PX4 for UAVs
Shivam
el 10 de Feb. de 2026 a las 3:38
Hello Nikul,
As per my understanding, you want to do simulation of hardware model, which includes the mechanism, motors and hardware. This thing can be done with Simscape library blocks (https://www.mathworks.com/products/simscape.html) or Motor control blockset (https://www.mathworks.com/products/motor-control.html) , which provides the blocks to model electrical, mechanical and multi domain physical systems. You can simulate the behaviour of machine for a specific control input and you can also observe the dynamics of closed loop system that is controlled by the controller. You can also place block for implementing a perticular control. Therefore, this is not related to STM32. But, if you want to simulate how the hardware behaves when controlled by STM32 based boards, you can create a (simulation + Codegen) model of the plant. The control algorithm is common for simulation and Code generation. The simulation has a plant model which recieves the inputs from the controller, whereas actual hardware has physical control signals given to the plant from STM32 micro-controller. Therefore, both are analogous to each other.
In order to learn how the Simulation+Codegen model is created, you can refer to the shipped examples:
The above example illustrates a sensorless FOC algorithm implemented on STM32 microcontroller. It supports Simulation of hardware to be controlled. In this way, you can test your control algorithm in Simulation (refered to as "Virtual Hardware" in your question), before going directly on actual hardware. The examples uses STM32 peripheral blocks to configure the peripherals and ensure that they perform as expected.
I hope this helps!
Regards,
Shivam Gothi
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!