How to configure Belt Drive block for Hardware-in-the-Loop simulation?
8 次查看(过去 30 天)
显示 更早的评论
To run a Hardware-in-the-Loop (HIL) simulation, I need to generate C++ code file from the circuit in the figure, which represents a model of a conveyor belt (Solver=ode14x):

The Simulink simulation works fine, but when I transfer the generated C++ code in the HIL platform, the host computer crashes with DRIVE_VERIFIER_detected_violation error. Note that when I replace the Belt Drive block with the Simple Gear block, the HIL simulation is then OK. Current setting of Belt Drive block:
- Drive type: Open belt
- Belt type: Flat band
- Longitudinal stiffness: 1e+4 [N/m]
- Longitudinal damping: 1e+5 [N/(m/s)]
- Pre-tension: 21 [N]
- Pulley radius (Pulley A and B): 0.1 [m]
- Friction velocity threshold: 0.001 [m/s]
Any idea? I thank you in advance.
0 个评论
采纳的回答
Sebastian Castro
2015-10-23
The "Friction velocity threshold" parameter is usually the culprit here. This is usually a small region used to avoid numerical instability by linearly varying the friction force over the range [-0.001 0.001] m/s instead of adding a "jump" right at 0. What if you try increasing this value to make the slope of this force less steep around 0?
Alternatively, it could be that the stiffness and damping of the belt are adding some very fast dynamics that are hard to solve given your local solver time step. You could try either increasing the time step or reducing the stiffness and damping.
In both cases above, of course, you want to verify that you're not significantly affecting your simulation results.
- Sebastian
3 个评论
Sebastian Castro
2015-10-28
Hmm... Do you have any damping in the Revolute Joint block, or have you tried added a rotational damper in parallel with the Torque Source? Maybe the HIL simulation doesn't like runaway acceleration in an undamped system?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
