Simulink/HDL Coder中的反馈回路 [英] Feedback loop in Simulink/HDL Coder

查看:315
本文介绍了Simulink/HDL Coder中的反馈回路的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Simulink/HDL编码器中有一个系统(请参见下图).我有3个输出和3个输入.我希望我的系统运行10次.每次迭代后,都应选择输出并将其用作输入.我该怎么做?

I have a system in Simulink/HDL coder (see below image please). I have 3 outputs and 3 inputs. I want my system to run 10 times. After each iteration it should select the outputs and use them as inputs. How I can do that?

推荐答案

使用内存和每个信号的初始值块构建循环.内存块允许您访问先前的迭代信号,而初始值块则用于设置第一次迭代的输入.

Build a loop using a memory and a initial value block for each signal. The memory block allows you to access the previous iteration signal and the initial value block is used to set the input for the first iteration.

在以下文档中可以找到一个简单的示例,该示例回送一个信号 /a>

A simple example looping back one signal can be found here in the documentation

在您的情况下,它看起来像这样:

In your case it would look like this:

要获得10次迭代,请设置相应的仿真时间.例如使用1s采样率和9s仿真时间的固定步长离散求解器.

To get 10 iterations, set your simulation time corresponding. For example a fixed step discrete solver using 1s sample rate and 9s simulation time.

这篇关于Simulink/HDL Coder中的反馈回路的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆