Simulink 中两个复向量的矩阵乘法

发布于 2024-11-05 17:34:40 字数 726 浏览 5 评论 0原文

确实有两个问题,但我想让它更具描述性:

我正在实现一个调制器,其中涉及复杂向量的矩阵乘法:

仅举一个例子:

cck_encoding_table(1,:)= [  1j  1  1j -1  1j  1 -1j  1 ];
cck_encoding_table(2,:)= [ -1j -1 -1j  1  1j  1 -1j  1 ];
cck_encoding_table(3,:)= [ -1j  1 -1j -1 -1j  1  1j  1 ];
cck_encoding_table(4,:)= [  1j -1  1j  1 -1j  1  1j  1 ];

基本上,我需要最终在硬件中在 Simulink(Xilinx)中实现它:

cck_n_code=exp(1j*Phi1)*cck_encoding_table(index+1,:);

我的问题,如何用复向量模拟矩阵乘法。我的理解是使用复数乘法器。但这就是只乘以 2 个复向量。

如果我必须在一个时钟中乘以 2 个以上的复向量,这是可能的。

我不期待任何像模型本身这样的答案,但可能的方法/方向(如果有的话)可以解决问题

感谢您的阅读, 基兰

Two questions really, But I would like to make it more descriptive :

I am implementing a Modulator which involves Matrix Multiplication of complex Vector:

Just to give an example :

cck_encoding_table(1,:)= [  1j  1  1j -1  1j  1 -1j  1 ];
cck_encoding_table(2,:)= [ -1j -1 -1j  1  1j  1 -1j  1 ];
cck_encoding_table(3,:)= [ -1j  1 -1j -1 -1j  1  1j  1 ];
cck_encoding_table(4,:)= [  1j -1  1j  1 -1j  1  1j  1 ];

Basically, I need to implement this in Simulink( Xilinx) eventually in Hardware:

cck_n_code=exp(1j*Phi1)*cck_encoding_table(index+1,:);

My question, how to model Matrix Multiplication with Complex Vectors. My understanding is to use Complex Multiplier. But that is to multiply only 2 complex vectors

If I have to multiply more than 2 complex vector in a single clock would it be possible.

I am not expecting any answers like model itself, but possible approach/direction if any to solve the problem

Thanks for reading,
Kiran

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月下客 2024-11-12 17:34:40

只需写出矩阵乘法产生的低级方程即可。输出的每个元素将是对输入向量和矩阵中的元素乘法集合求和的结果。

如果您需要快速完成,请根据需要放置尽可能多的复杂乘法器和加法器,并将输入元素连接到它们 - 这将立即为您提供所有输出,并要求您立即提供所有输入。

或者,将您的输入放入一个内存块(或者可能是 2 个,一个用于向量,一个用于矩阵)并安排一些逻辑,将正确的地址输入到该内存块中,以便以适当的顺序迭代元素。这些输入进入复数乘法器,然后进入复数累加器(您可能必须从加法器和可重置寄存器对其进行建模)。您的控制逻辑需要定期重置该累加器。

累加器的输出可以馈送到下一级,或存储在另一个内存块中(供控制逻辑管理的另一个地址)。

如果您的编码表始终包含仅来自集合 (1,-1,j,-j) 的元素,那么您可以将它们编码为 2 位,而不是存储整个完全表示的复数并编写自定义逻辑片段它利用这一事实创建了一个比通用乘法器简单得多的复杂乘法器。

Simply write out the low level equations that result from your matrix multiply. Each element of the output will be the result of summing a collection of multiplications of elements from your input vector&matrix.

If you need to do it fast, then put down as many complex multipliers and adders as you need and wire the input elements up to them - that'll give you all your outputs at once and require you to have all your inputs available at once.

Alternatively, put your inputs into a memory block (or probably 2, one for the vector, one for the matrix) and arrange some logic which will feed the correct address into that memory block to iterate over the elements in an appropriate order. Those inputs go to a complex multiplier and then on to a complex accumulator (you might have to model that from an adder and resettable register). Your control logic will need to reset this accumulator periodically.

The output of the accumulator can be fed on to a next stage, or stored in another memory block (another address for you control logic to manage).

if your encoding table is always going to have elements which are only from the set (1,-1,j,-j) then you can encode these as 2 bits rather than storing entire fully represented complex numbers and write a custom piece of logic which takes advantage of this fact to create a much simpler complex multiplier than the general purpose one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文