matlab zerocrossing,MATLAB 机器人学工具箱(Robotics Toolbox )sl_drivepoint 模型 consecutive zero crossings 问题...

操作环境

工具箱:Robotics Toolbox for MATLAB 版本 10.2.1 作者 Peter Corke

MATLAB版本:R2018a

操作系统:win10

问题

sl_drivepoint模型在使用时出现过零检测错误问题,仿真波形错误,机器人向相反的方向走,matlab报错如下。

An error occurred while running the simulation and the simulation was terminated

Caused by:

During the simulation of model ‘sl_drivepoint‘, 2 zero crossing signal(s) exceeded the maximum number of 1000 consecutive zero crossings at time 0.89480252115574577 and therefore, the simulation will stop.

Suggested Actions

You can suppress the diagnostics and continue simulation without bracketing these zero crossings, by switching the zero crossing detection algorithm to ‘Adaptive‘ and setting the Consecutive zero crossings violation diagnostic to ‘none‘.

原因

下图模块中angadff()函数使用错误,角度相减时顺序颠倒。

1a550a716df1d5a7cce3e53f6f8317bf.png

解决方案

修改为下图所示。

4d990518c79a4b8548f750cc6f5b1fe0.png

原文:https://www.cnblogs.com/jingshikongming/p/13587420.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值