声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2335|回复: 7

[综合讨论] 关于Simulink中S函数仿真的问题

[复制链接]
发表于 2009-5-27 21:01 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
一个Simulink里面有多个S函数,它们的互为输入输出,同时运行,是否需要设置一些使之同步的东西呢?
我的总是运行不出来,不知道是哪里的问题

还是说一个Simulink里面只能有一个S函数?

[ 本帖最后由 dark1203 于 2009-5-27 21:12 编辑 ]
回复
分享到:

使用道具 举报

发表于 2009-5-27 21:43 | 显示全部楼层
可以有多个 但是据你所说应该会形成环路 需要用memory等来解决

评分

1

查看全部评分

 楼主| 发表于 2009-5-28 14:18 | 显示全部楼层

回复 沙发 yufeng 的帖子

我搜索了一下,是代数环么?但是仿真故障里面没有显示我是代数环的问题 反而说我一个GAIN模块有问题
发表于 2009-5-28 22:01 | 显示全部楼层
那你把错误贴出来
 楼主| 发表于 2009-5-28 23:01 | 显示全部楼层

回复 地板 yufeng 的帖子

警告提示是代数环(algebraic loop(s)).的问题了,现在仿真能运行了,,但是一运行就卡了,每次都得强行关掉,是模型太大了吧。。

Warning: Block diagram 'controller_all' contains 1 algebraic loop(s). To see more
details about the loops use the command line Simulink debugger by typing "sldebug
controller_all" in the MATLAB command window. To eliminate this message, set the
Algebraic loop option in the Diagnostics page of the Simulation Parameters Dialog
to "None".
Found algebraic loop containing:
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/fuyang/fuyang'
  'controller_all/jtyd_santongdao/tanxing1/tanxing1'
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/huangdong1_f/huangdong1_f'
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/huangdong1_f/huangdong1_f'
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/fuyang/yp1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/huangdong1_p/huangdong1_f'
  'controller_all/jtyd_santongdao/tanxing1/zp1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/tanxing1/yp1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/pianhang/zp1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/huangdong1_p/q1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/gundongtongdao/zp1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/huangdong1_f/q1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/gundongtongdao/gundong'
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/huangdong1_f/gamma_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/huangdong1_f/phi_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/huangdong1_f/theta_p' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/gundongtongdao/yp1_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/gundongtongdao/gundong' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/huangdong1_p/gamma_pp'
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/pianhang/S-Function'
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/huangdong1_p/psi_pp' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/huangdong1_p/sigma_p' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/huangdong1_p/huangdong1_f' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/pianhangtongdao/pianhang/S-Function' (algebraic variable)
  'controller_all/jtyd_santongdao/tanxing1/tanxing1' (algebraic variable)
  'controller_all/jtyd_santongdao/santongdao/fuyangtongdao/fuyang/fuyang' (algebraic variable)
Warning: Using a default value of 0.1 for maximum step size.  The simulation
step size will be equal to or less than this value.  You can disable this
diagnostic by setting 'Automatic solver parameter selection' diagnostic to
'none' in the Diagnostics page of the configuration parameters dialog.
 楼主| 发表于 2009-5-28 23:36 | 显示全部楼层

回复 地板 yufeng 的帖子

在每一个反馈前都加了memory以后,再运行,代数环的警告没有了,现在变成

Warning: Using a default value of 0.1 for maximum step size.  The simulation
step size will be equal to or less than this value.  You can disable this
diagnostic by setting 'Automatic solver parameter selection' diagnostic to
'none' in the Diagnostics page of the configuration parameters dialog.

仍然会卡死
发表于 2009-5-30 14:06 | 显示全部楼层
这是参数问题 把参数调整一下

评分

1

查看全部评分

 楼主| 发表于 2009-6-1 15:08 | 显示全部楼层

回复 7楼 yufeng 的帖子

嗯。是参数初值的问题, 能运行了,虽然还是很慢,呵呵,模型太大了
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-23 22:55 , Processed in 0.100075 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表